Ticket #5890: simulateCDL.py

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