You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dymola and Optimica simulators have a small discrepancy in the input argument that represents the path to the package containing the root of the model path. In essence theDymola simulator allows the packagePath to be both till the and into the package.mo containing folder. Optimica simulator works with the packagePath only till the package.mo containing folder. Please see examples below.
To successfully run the Dymola simulator I can type any of the following:
from buildingspy.simulate.Dymola import Simulator
s = Simulator("ChillerPlant.ClosedLoopBase.OneDeviceWithWSE", packagePath="/home/milicag/repos/obc/examples/case_study_2/ChillerPlant")
s.simulate()
or
from buildingspy.simulate.Dymola import Simulator
s = Simulator("ChillerPlant.ClosedLoopBase.OneDeviceWithWSE", packagePath="/home/milicag/repos/obc/examples/case_study_2")
s.simulate()
If I use the full package path from the first code block to run the Optimica simulator, I run into an error I copied below from the outputted json file:
from buildingspy.simulate.Optimica import Simulator
s = Simulator("ChillerPlant.ClosedLoopBase.OneDeviceWithWSE", packagePath="/home/milicag/repos/obc/examples/case_study_2/ChillerPlant")
s.simulate()
If I then change the packagePath as follows, I can run the Optimica simulation successfully:
from buildingspy.simulate.Optimica import Simulator
s = Simulator("ChillerPlant.ClosedLoopBase.OneDeviceWithWSE", packagePath="/home/milicag/repos/obc/examples/case_study_2")
s.simulate()
The text was updated successfully, but these errors were encountered:
Dymola
andOptimica
simulators have a small discrepancy in the input argument that represents the path to the package containing the root of the model path. In essence theDymola
simulator allows thepackagePath
to be both till the and into thepackage.mo
containing folder.Optimica
simulator works with thepackagePath
only till thepackage.mo
containing folder. Please see examples below.Let us assume the path to our package is not exported to MODELICAPATH, as it is some custom path we'd like to provide. To demonstrate this discrepancy, I will simulate using
Dymola
andOptimica
a model currently located in the ChillerPlant package, on a development branch of the OBC repo.To successfully run the
Dymola
simulator I can type any of the following:or
If I use the full package path from the first code block to run the
Optimica
simulator, I run into an error I copied below from the outputtedjson
file:If I then change the
packagePath
as follows, I can run theOptimica
simulation successfully:The text was updated successfully, but these errors were encountered: