Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.58 KB

README.md

File metadata and controls

52 lines (30 loc) · 1.58 KB

Jmodelica-dev

Jupyter Notebook Docker Container for development with JModelica

Compile FMU inside Container

  • pymodelica scans through folder which is definded in $MODELICAPATH. Path was set through Dockerfile and later changes inside the Container wont influence pymodelica
  • dock additional librarys while startup the dockercontainer with additional volumes : docker run -t -i -v <host_dir>:<container_dir>
    • PATH to Modelica files inside Container: '/usr/local/JModelica/ThirdParty/MSL/'
import os

from pymodelica import compile_fmu
from pyfmi import load_fmu

# Directory is not always needed
curr_dir = os.path.dirname(os.path.abspath(__file__));

class_name = 'RLC_Circuit'
mofile = curr_dir+'/files/RLC_Circuit.mo'


# Direct to File
fmu_name = compile_fmu(class_name, mofile)


# If Library is already in MODELICAPATH
fmu_name = compile_fmu("Buildings.Controls.Sources.DayType") 


rlc = load_fmu(fmu_name)


Usefull Commands inside Container

Requierements