Simulation Folder

Base simulation

This package contains the interface to different simulation packages.

Module assimulo_interface

This file contains code for mapping our JMI Models to the Problem specifications required by Assimulo.

exception pyfmi.simulation.assimulo_interface.FMIModel_Exception[source]

Bases: exceptions.Exception

A FMIModel Exception.

class pyfmi.simulation.assimulo_interface.FMIODE(model, input=None, result_file_name='', with_jacobian=False, start_time=0.0, logging=False, result_handler=None)[source]

Bases: assimulo.problem.Explicit_Problem

An Assimulo Explicit Model extended to FMI interface.

finalize(solver)[source]
g(t, y, sw)[source]

The event indicator function for a ODE problem.

handle_event(solver, event_info)[source]

This method is called when Assimulo finds an event.

handle_result(solver, t, y)[source]

Post processing (stores the time points).

initialize(solver)[source]
input

Property for accessing the input. The input must be a 2-tuple with the first object as a list of names of the input variables and with the other as a subclass of the class Trajectory.

print_step_info()[source]

Prints the information about step events.

rhs(t, y, sw=None)[source]

The rhs (right-hand-side) for an ODE problem.

step_events(solver)[source]

Method which is called at each successful step.

t(t, y, sw)[source]

Time event function.

class pyfmi.simulation.assimulo_interface.FMIODE2(model, input=None, result_file_name='', with_jacobian=False, start_time=0.0, logging=False, result_handler=None, extra_equations=None)[source]

Bases: assimulo.problem.Explicit_Problem

An Assimulo Explicit Model extended to FMI interface.

finalize(solver)[source]
g(t, y, sw)[source]

The event indicator function for a ODE problem.

handle_event(solver, event_info)[source]

This method is called when Assimulo finds an event.

handle_result(solver, t, y)[source]

Post processing (stores the time points).

initialize(solver)[source]
input

Property for accessing the input. The input must be a 2-tuple with the first object as a list of names of the input variables and with the other as a subclass of the class Trajectory.

j(t, y, sw=None)[source]

The jacobian function for an ODE problem.

print_step_info()[source]

Prints the information about step events.

rhs(t, y, sw=None)[source]

The rhs (right-hand-side) for an ODE problem.

step_events(solver)[source]

Method which is called at each successful step.

t(t, y, sw)[source]

Time event function.

class pyfmi.simulation.assimulo_interface.FMIODESENS(model, input=None, result_file_name='', with_jacobian=False, start_time=0.0, parameters=None, logging=False, result_handler=None)[source]

Bases: pyfmi.simulation.assimulo_interface.FMIODE

FMIODE extended with sensitivity simulation capabilities

handle_result(solver, t, y)[source]
j(t, y, p=None, sw=None)[source]
rhs(t, y, p=None, sw=None)[source]
class pyfmi.simulation.assimulo_interface.FMIODESENS2(model, input=None, result_file_name='', with_jacobian=False, start_time=0.0, logging=False, result_handler=None, extra_equations=None, parameters=None)[source]

Bases: pyfmi.simulation.assimulo_interface.FMIODE2

FMIODE2 extended with sensitivity simulation capabilities

j(t, y, p=None, sw=None)[source]
rhs(t, y, p=None, sw=None)[source]
s(t, y, s, p=None, sw=None)[source]
pyfmi.simulation.assimulo_interface.createLogger(model, minimum_level)[source]

Creates a logger.

pyfmi.simulation.assimulo_interface.write_data(simulator, write_scaled_result=False, result_file_name='')[source]

Writes simulation data to a file. Takes as input a simulated model.