Skip to content

simulation.timecourse

Definition of timecourses and timecourse simulations.

Timecourse

Timecourse(
    start,
    end,
    steps,
    changes=None,
    model_changes=None,
    model_manipulations=None,
    discard=False,
)

Bases: ObjectJSONEncoder

Simulation definition.

Definition of all information necessary to run a single timecourse simulation.

A single simulation consists of multiple changes which are applied, all simulations are performed and collected.

Changesets and selections are deep copied for persistence.

Create a time course definition for simulation.

Discarded simulations do not add time shifts, i.e. a pre-simulation does not increase the time of simulation.

:param start: start time :param end: end time :param steps: simulation steps :param changes: parameter and initial condition changes :param model_changes: model parameter and initial condition changes :param model_manipulations: model structure changes :param discard: discards results from simulations (e.g. pre-simulations)

to_dict

to_dict()

Convert to dictionary.

add_change

add_change(sid, value)

Add change.

remove_change

remove_change(sid)

Remove change for given id.

add_model_change

add_model_change(sid, change)

Add model change.

add_model_changes

add_model_changes(model_changes)

Add model changes.

remove_model_change

remove_model_change(sid)

Remove model change for id.

normalize

normalize(uinfo)

Normalize values to model units for all changes.

strip_units

strip_units()

Strip units from changes for parallel simulation.

All changes must be normalized before stripping !.

TimecourseSim

TimecourseSim(
    timecourses,
    selections=None,
    reset=True,
    time_offset=0.0,
)

Bases: AbstractSim

Timecourse simulation consisting of multiple concatenated timecourses.

In case of a single timecourse, only the single timecourse is executed.

Initialize timecourse sim.

:param timecourses: timecourses (or their dictionary representations); empty elements are removed :param selections: :param reset: complete reset of model :param time_offset: time shift of simulation

dimensions

dimensions()

Get dimensions.

add_model_changes

add_model_changes(model_changes)

Add model changes to given simulation.

normalize

normalize(uinfo)

Normalize timecourse simulation.

strip_units

strip_units()

Strip units from simulation.

to_dict

to_dict()

Convert to dictionary.

to_json

to_json(path=None)

Convert definition to JSON.

:param path: path for file, if None the JSON str is returned

from_json staticmethod

from_json(json_info)

Load from JSON.