Solver Class

class roadrunner.Solver

Following functions are supported for a given solver instance which can be obtained by calling RoadRunner.getIntegrator() or RoadRunner.getSteadyStateSolver() methods. There are two types of solvers: Integrators(cvode, gillespie, rk4, rk45) - RoadRunner.Integrator() and Steady State Solvers(nleq2) - RoadRunner.SteadyStateSolver()

Solver.getDescription(key)

If key = None, returns description of this solver. Else, returns the description associated with a given key.

Parameters:

key (str) – settings name

Solver.getDisplayName(key)

Returns display name of given key.

Parameters:

key (str) – settings name

Solver.getHint(key)

If key = None, returns a (user-readable) hint for this solver. Else, Returns the hint associated with a given key.

Parameters:

key (str) – settings name

Solver.getName()

Returns the name of this solver

Solver.getNumParams()

Get the number of parameters.

Solver.getParamDesc(n)

Get the description of the parameter at index n

Parameters:

n (int) – index of parameter

Solver.getParamDisplayName(n)

Get the display name of the parameter at index n

Parameters:

n (int) – index of parameter

Solver.getParamHint(n)

Get the hint of the parameter at index n.

Parameters:

n (int) – index of parameter

Solver.getParamName(n)

Get the display name of the parameter at index n.

Parameters:

n (int) – index of parameter

Solver.getSetting(k)

Get value of a solver setting

Parameters:

k (str) – settings name

Solver.getSettings()

Returns a list of all settings for this solver.

Solver.getSettingsRepr()

Returns the solver settings as a string.

Solver.getType(key)

Returns the type associated with a given key.

Parameters:

key (str) – settings name

Solver.getValue(key)

Get the value of an integrator setting.

Parameters:

key (str) – settings name

Solver.getValueAsBool(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsChar(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsDouble(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsFloat(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsInt(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsLong(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsString(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsUChar(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsUInt(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.getValueAsULong(key)

Wrapper for Solver.getValue() which converts output to a specific type

Parameters:

key (str) – settings name

Solver.hasValue(key)

Return true if this setting is supported by the integrator.

Parameters:

key (str) – settings name

Solver.resetSettings()

Reset all settings to their respective default values.

Solver.setSetting(k, v)

Set value of a solver setting

Parameters:
  • k (str) – settings name

  • v (const) – value of the setting

Solver.setValue(key, value)

Sets value of a specific setting.

Parameters:
  • key (str) – settings name

  • value (const) – value of the setting

Solver.settingsPyDictRepr()

Returns Python dictionary-style string representation of settings.

Solver.syncWithModel(m)

Called whenever a new model is loaded to allow integrator to reset internal state

Parameters:

m (object) – new model

Solver.toRepr()

Return string representation a la Python __repr__ method.

Solver.toString()

Return a string representation of the solver.