Ticket #5890: simulateCDL.py
| File simulateCDL.py, 483 bytes (added by , 6 years ago) |
|---|
| Line | |
|---|---|
| 1 | import shutil |
| 2 | import os |
| 3 | from OMPython import OMCSessionZMQ |
| 4 | |
| 5 | model="Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.SetPoints.Supply" |
| 6 | parameters="(yHeaMax=0.7, yMin=0.3, TSupSetMax=303.15, TSupSetMin=289.15)" |
| 7 | omc = OMCSessionZMQ() |
| 8 | omc.sendExpression("loadModel(Buildings)") |
| 9 | omc.sendExpression("simulate({}, startTime=0, stopTime=3600, simflags=\"-csvInput reference_input.csv\", outputFormat=\"csv\")".format(model)) |
| 10 | shutil.move("{}_res.csv".format(model), "reference.csv") |
