Class AmiciApplication

Class Documentation

class amici::AmiciApplication

Main class for making calls to AMICI.

This class is used to provide separate AMICI contexts, for example, for use in multi-threaded applications where different threads want to use AMICI with different settings, such custom logging functions.

NOTE: For this moment, the context object needs to be set manually to any Model and Solver object. If not set, they will use the default output channel.

Public Functions

AmiciApplication() = default
std::unique_ptr<ReturnData> runAmiciSimulation(Solver &solver, const ExpData *edata, Model &model, bool rethrow = false)

Core integration routine. Initializes the solver and runs the forward and backward problem.

Parameters
  • solverSolver instance

  • edata – pointer to experimental data object

  • model – model specification object

  • rethrow – rethrow integration exceptions?

Returns

rdata pointer to return data object

std::vector<std::unique_ptr<ReturnData>> runAmiciSimulations(Solver const &solver, const std::vector<ExpData*> &edatas, Model const &model, bool failfast, int num_threads)

Same as runAmiciSimulation, but for multiple ExpData instances.

Parameters
  • solverSolver instance

  • edatas – experimental data objects

  • model – model specification object

  • failfast – flag to allow early termination

  • num_threads – number of threads for parallel execution

Returns

vector of pointers to return data objects

void warningF(const char *identifier, const char *format, ...) const

printf interface to warning()

Parameters
  • identifier – warning identifier

  • format – string with warning message printf-style format

  • ... – arguments to be formatted

void errorF(const char *identifier, const char *format, ...) const

printf interface to error()

Parameters
  • identifier – warning identifier

  • format – string with error message printf-style format

  • ... – arguments to be formatted

Public Members

outputFunctionType warning = printWarnMsgIdAndTxt

Function to process warnings

outputFunctionType error = printErrMsgIdAndTxt

Function to process errors