BuildingsPy
BuildingsPy copied to clipboard
BuildingsPy produces error - Modelica/dymola don't
Hey, I'm using BuildingsPy for parametric studies. Some Parameter from a list are not simulated successfully when executed with the BuildingsPy. When i simulate these parameters directly in Modelica/dymola, there is no problem. Is this a model or BuildingsPy related problem. Does anyone know or had a similar problem?
That should not be the case. Do you have a small script that reproduces the issue.
So this is the code for the simulation. I tried this with a less complex modelica model and it worked. Could it be the case, that the simulation runs into error and in modelica it doesn't? The "simulator.log" file says: "simulateModel(...) = false. All the others are " = True".
I guess there is an error message during the simulation, because when i reduce the simulating time for example to 100 s there is no problem occurring.
Thanks in advance
def CaseStudy(s):
s.setStopTime(simulatingtime)
s.printModelAndTime()
s.setSolver("dassl")
s.simulate()
#----- Simulation of model - H_st list à 10 values ---------------------------------- for i1, i2 in enumerate(H_st):
s = si.Simulator(name_model,"dymola",path_where_stored, path_model)
s.addParameters({'k': i2})
CaseStudy(s)
path.append(os.path.join(path_mat_file, "name.mat"))
I suggest you set https://simulationresearch.lbl.gov/modelica/buildingspy/simulate.html#buildingspy.simulate.Simulator.Simulator.showGUI and https://simulationresearch.lbl.gov/modelica/buildingspy/simulate.html#buildingspy.simulate.Simulator.Simulator.exitSimulator Then Dymola will show the gui, won't exit and you can inspect what happens.