BuildingsPy icon indicating copy to clipboard operation
BuildingsPy copied to clipboard

BuildingsPy produces error - Modelica/dymola don't

Open Stelzerfe opened this issue 5 years ago • 3 comments

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?

Stelzerfe avatar May 07 '20 12:05 Stelzerfe

That should not be the case. Do you have a small script that reproduces the issue.

mwetter avatar May 07 '20 14:05 mwetter

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"))

Stelzerfe avatar May 08 '20 07:05 Stelzerfe

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.

mwetter avatar May 08 '20 22:05 mwetter