Update scenariomodel.cpp

write and save data