You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of using the FixedStepSizeFMU example, when my code runs here (` fmu.defineRealOutputs( outputs, n_outputs )` ), the kernel will die and 'the process has ended, exit code - 1073741819 (0xC0000005)'. After checking for a long time, I still can't find the cause of the problem.
The python version I use is `python 3.10` and the fmipp version I use is `fmipp 2.1.0`. Maybe there is something wrong with the version I use or with my configuration?
sine_standalone_fmu.zip
`import os.path
import fmipp
import math
uri_to_extracted_fmu = os.path.split(os.path.abspath(file))[0] # define working directory
model_name = 'sine_standalone_fmu' # define FMU model name
logging_on = False
fmu = fmipp.FixedStepSizeFMU( uri_to_extracted_fmu, model_name, logging_on )
n_init = 1 # number of parameter to be initialzed
init_vars = fmipp.new_string_array( n_init ) # construct string array for init parameter names
fmipp.string_array_setitem( init_vars, 0, 'omega' )
init_vals = fmipp.new_double_array( n_init ) # construct double array for init parameter values
fmipp.double_array_setitem( init_vals, 0, 0.1 * math.pi )
n_outputs = 1 # number of outputs
outputs = fmipp.new_string_array( n_outputs ) # construct string array with output names
fmipp.string_array_setitem( outputs, 0, 'x' )
fmu.defineRealOutputs( outputs, n_outputs ) # define real output names
start_time = 0.
stop_time = 5.
fmu_step_size = 1. # fixed step size enforced by FMU
sim_step_size = 0.2 # step size of simulation
time = start_time
status = fmu.init( "test_sine", init_vars, init_vals, n_init, start_time, fmu_step_size )
assert status == 1
while ( time <= stop_time ):
fmu.sync( time, time + sim_step_size )
time += sim_step_size
result = fmu.getRealOutputs()`
The text was updated successfully, but these errors were encountered: