-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.py
31 lines (25 loc) · 865 Bytes
/
model.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from OMPython import ModelicaSystem
import os
try:
#Update route#
os.chdir('C:/Users/maria/OneDrive/Desktop/Heritage puro/pr/Files')
print("Working directory changed")
except:
print("Error: Working directory not found")
input('Press ENTER to exit')
try:
#Update route#
model_path="/Users/maria/OneDrive/Desktop/Heritage puro/pr/"
print("Model path defined")
except:
print("Error: model path not found")
input('Press ENTER to exit')
try:
mod=ModelicaSystem(model_path + "AFTERLIFE.mo","AFTERLIFE.HeritagePuro", ["Modelica"])
#mod=ModelicaSystem(model_path + "Heritage.mo","AFTERLIFE.Heritage", ["Modelica"])
#mod=ModelicaSystem(model_path + "optima.mo","optima", ["Modelica"])
print("Model defined")
input('Press ENTER to exit')
except:
print("Error: model definition failed")
input('Press ENTER to exit')