Class ConditionContext

Inheritance Relationships

Base Type

Class Documentation

class amici::ConditionContext : public amici::ContextManager

The ConditionContext class applies condition-specific amici::Model settings and restores them when going out of scope.

Public Functions

ConditionContext(Model *model, const ExpData *edata = nullptr, FixedParameterContext fpc = FixedParameterContext::simulation)

Apply condition-specific settings from edata to model while keeping a backup of the original values.

Parameters
  • model:

  • edata:

  • fpc: flag indicating which fixedParameter from edata to apply

ConditionContext &operator=(const ConditionContext &other) = delete
~ConditionContext()
void applyCondition(const ExpData *edata, FixedParameterContext fpc)

Apply condition-specific settings from edata to the constructor-supplied model, not changing the settings which were backed-up in the constructor call.

Parameters
  • edata:

  • fpc: flag indicating which fixedParameter from edata to apply

void restore()

Restore original settings on constructor-supplied amici::Model. Will be called during destruction. Explicit call is generally not necessary.