- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » how to save parameter changed...
how to save parameter changed modelica model in OMPython
how to save parameter changed modelica model in OMPython
Using OMPython interface I'm able to edit the parameters of the modelica model using setParameters option.
omc = OMCSessionZMQ()
But now after changing the parameters i want to save the model. How to do that in OMPython. Also I want save the results in .CSV format not in .MAT format.
mod=ModelicaSystem("D:/FRND/Open_Modelica/_dev/Mar/" + "HP.mo","HP.Systems.SysHeadl")
#mod.buildModel()
mod.setParameters(["headlamp.UCfile=D:/FRND/Open_Modelica/_dev/Mar/Usecases/TA_Combi.txt"])
#after setting this parameter, Have to save the model.
h = mod.getParameters()
r = h['headlamp.UCfile']
print(r)
mod.buildModel()
mod.simulate(resultfile="tmout.csv") #this CSV file also contains the mat file output in csv format. But I want to have it like how it got exported in csv file via Openmodelica software
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » how to save parameter changed...