Skip to content

Jupyter Notebook Docker Container for development with JModelica

Notifications You must be signed in to change notification settings

acmbo/jmodelica-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Jupyter Notebook Docker Container for development with JModelica

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published