Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Why I don't get enough files as the outputs of the simulation of Dymola model with python ?

I'm simulating a Dymola model with python with this code :

 # Import the function for compilation of models and the load_fmu method
from pymodelica import compile_fmu
from pyfmi import load_fmu
# Import the plotting library
import matplotlib.pyplot as plt
# Compile model
model_name = 'ObjectiveFunction'
mo_file = 'ObjectiveFunction.mo'
VDP_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})
# Load model
vdpid = load_fmu(VDP_fmu)
res = vdpid.simulate(final_time=1000)

the problem is that, this will give me only 3 files as outputs: ObjectiveFunction_result.txt result.txt ObjectiveFunction_log.txt

but I need also dsin.txt , dsfinal.txt and .... so that I can run Genopt or other related programs, what is the problem ?

Why I don't get enough files as the outputs of the simulation of Dymola model with python ?

I'm simulating a Dymola model with python with this code :

 # Import the function for compilation of models and the load_fmu method
from pymodelica import compile_fmu
from pyfmi import load_fmu
# Import the plotting library
import matplotlib.pyplot as plt
# Compile model
model_name = 'ObjectiveFunction'
mo_file = 'ObjectiveFunction.mo'
VDP_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})
# Load model
vdpid = load_fmu(VDP_fmu)
res = vdpid.simulate(final_time=1000)

the problem is that, this will give me only 3 files as outputs: ObjectiveFunction_result.txt result.txt ObjectiveFunction_log.txt

but I need also dsin.txt , dsfinal.txt and .... so that I can run Genopt or other related programs, what is the problem ?

Why I don't get enough files as from the outputs of the simulation of Dymola model with python ?

I'm simulating a Dymola model with python with this code : :

 # Import the function for compilation of models and the load_fmu method
from pymodelica import compile_fmu
from pyfmi import load_fmu
# Import the plotting library
import matplotlib.pyplot as plt
# Compile model
model_name = 'ObjectiveFunction'
mo_file = 'ObjectiveFunction.mo'
VDP_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})
# Load model
vdpid = load_fmu(VDP_fmu)
res = vdpid.simulate(final_time=1000)

the problem is that, this will give me only 3 files as outputs: ObjectiveFunction_result.txt result.txt ObjectiveFunction_log.txt

but I need also dsin.txt , dsfinal.txt dsfinal.txt and .... so that I can run Genopt or other related programs, what is the problem ?

Why I don't get enough files from the outputs of the simulation of Dymola model with python ?

I'm simulating a Dymola model with python with this code :

 # Import the function for compilation of models and the load_fmu method
from pymodelica import compile_fmu
from pyfmi import load_fmu
# Import the plotting library
import matplotlib.pyplot as plt
# Compile model
model_name = 'ObjectiveFunction'
mo_file = 'ObjectiveFunction.mo'
VDP_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})
# Load model
vdpid = load_fmu(VDP_fmu)
res = vdpid.simulate(final_time=1000)

the problem is that, this will give me only 3 files as outputs: ObjectiveFunction_result.txt result.txt ObjectiveFunction_log.txt

but I need also dsin.txt , dsfinal.txt and .... so that I can run Genopt or other related programs, what is the problem ?