Skip to main content

Model

See also: Errors, Model component handles, Services.

Model​

Returned by: JinkoClient.create_empty_model, JinkoClient.create_model_from_json, JinkoClient.get_model, JinkoClient.iter_models, JinkoClient.list_models, Model.combine_with, Model.edit_solving_options, Model.set_solving_times, Model.set_unit_check, Trial.model, VpopDesign.get_model

Also has every member of ProjectItem.

MemberKindDescription
componentspropertyReturn the typed model components service for this model head.
tagspropertyReturn model tags as persistent handles bound to this model head.
diagnosticspropertyAll component diagnostics for the current model head.
diagnostics_atmethodReturn diagnostics for a specific snapshot revision.
get_tagmethodReturn a model tag by id as a persistent handle.
create_tagmethodCreate a model tag and return it as a persistent handle. Color takes a hexadecimal color string.
delete_tagmethodDelete a model tag.
get_solving_optionsmethodReturn model solving options as a raw dictionary.
edit_solving_optionsmethodUpdate model solving options.
get_unit_checkmethodReturn the unit-checking mode for this model snapshot.
set_unit_checkmethodUpdate the model's unit-checking mode.
get_solving_timesmethodReturn base and additional output sampling periods.
set_solving_timesmethodUpdate output sampling periods.
get_latex_odesmethodReturn ODE system equations rendered as LaTeX.
time_dependent_idsmethodReturn component ids statically known to be time-dependent.
simple_solvemethodSolve this model with optional text overrides and selected timeseries IDs.
get_baseline_descriptorsmethodReturn numeric and categorical baseline descriptors for this model snapshot.
download_as_zipmethodDownload this model snapshot as a zip bundle.
create_trialmethodCreate a trial using this model as the required computational model.
create_calibrationmethodCreate a calibration using this model as the computational model.
create_simple_output_setmethodCreate a simple output set using this model and one or more measures.
create_protocol_designmethodCreate a protocol design bound to this model.
create_vpop_design_from_modelmethodCreate a Vpop generator using this model snapshot as input.
create_vpop_design_from_designmethodCreate a Vpop generator design bound to this model snapshot.
copymethodCopy this model. Will default to the same folder.
combine_withmethodCombine another model snapshot into this model and return the new head.
compare_tomethodCompare this model to another model and return the raw diff payload.

components​

Type: ModelComponentsService

Return the typed model components service for this model head.

This is the recommended entrypoint for component work.

Example
p = model.components.get_parameter("k_clearance")
p.update(formula="CL / V", unit="L/h")
Notes
  • The service instance is memoized per Model object.
  • After a write that returns a new Model, use returned_model.components rather than keeping a stale service.

tags​

Type: list['Tag']

Return model tags as persistent handles bound to this model head.

diagnostics​

Type: ModelDiagnostics

All component diagnostics for the current model head.

Each access fetches a fresh, self-consistent view: diagnostic messages and their components come from the same fetch, so .explain() (which shows each component's formula/definition) also reflects that same fetch. Filters can be chained without any further request::

model.diagnostics.errors()
model.diagnostics.for_kind("Parameter").warnings()
model.diagnostics.errors().explain()

Re-access this property for updated results. For a historical revision use diagnostics_at.

diagnostics_at​

diagnostics_at(revision: int) -> ModelDiagnostics

Return diagnostics for a specific snapshot revision.

See diagnostics for the freshness contract of the returned view.

Parameters:

NameTypeDescriptionDefault
revisionintThe revision number to fetch diagnostics from.

Returns:

  • ModelDiagnostics: class:ModelDiagnostics view for that snapshot.

get_tag​

get_tag(tag_id: str) -> Tag

Return a model tag by id as a persistent handle.

create_tag​

create_tag(
tag_id: str,
*,
description: str | None = None,
color: str = "#232349",
version: str | dict | None = None
) -> Tag

Create a model tag and return it as a persistent handle. Color takes a hexadecimal color string.

delete_tag​

delete_tag(tag: str | 'Tag, force: bool = False) -> None

Delete a model tag.

By default this raises if the tag is still used by model components. Pass force=True to remove the tag from all using components first.

get_solving_options​

get_solving_options(
*,
revision: int | None = None,
duration_format: Literal["iso8601", "timedelta"] = "iso8601"
) -> dict[str, Any]

Return model solving options as a raw dictionary.

Solving-time durations are ISO 8601 strings by default. Set duration_format="timedelta" to convert them.

edit_solving_options​

edit_solving_options(
solving_options: dict[str, Any], *, version: str | dict | None = None
) -> Model

Update model solving options.

solvingTimes accepts timedelta values or ISO 8601 strings. Strings are validated and sent unchanged; timedeltas use fixed day and sub-day units.

get_unit_check​

get_unit_check(*, revision: int | None = None) -> Literal[
"NoUnitCheck",
"UnitCheckWithNoUnitConversion",
"UnitCheckAndConvertAllSpeciesToExtentUnits",
"UnitCheckAndConvertOnlyReactantsAndProductsToExtentUnits",
]

Return the unit-checking mode for this model snapshot.

set_unit_check​

set_unit_check(
unit_check: Literal[
"NoUnitCheck",
"UnitCheckWithNoUnitConversion",
"UnitCheckAndConvertAllSpeciesToExtentUnits",
"UnitCheckAndConvertOnlyReactantsAndProductsToExtentUnits",
],
*,
version: str | dict | None = None
) -> Model

Update the model's unit-checking mode.

get_solving_times​

get_solving_times(
*,
revision: int | None = None,
duration_format: Literal["iso8601", "timedelta"] = "iso8601"
) -> tuple[dict[str, timedelta | str], list[dict[str, timedelta | str]]]

Return base and additional output sampling periods.

The returned dictionaries have t_min, t_max, and t_step keys. Values are ISO 8601 strings by default, preserving expressions such as P1W. Set duration_format="timedelta" to convert them using Jinko's fixed year (365.25 days), month (one twelfth of a year), and week (7 day) lengths. Use jinko.iso8601 for these same conversions in custom code.

set_solving_times​

set_solving_times(
*,
t_max: timedelta | str,
t_step: timedelta | str,
t_min: timedelta | str = timedelta(0),
additional_periods: Sequence[dict[str, timedelta | str]] = (),
version: str | dict | None = None
) -> Model

Update output sampling periods.

t_min, t_max and t_step are the parameters of the mandatory simulation-wide period. Each accepts a timedelta or ISO 8601 string. Timedeltas are emitted with fixed day and sub-day units, so a seven-day timedelta is sent as P7D. ISO 8601 strings are validated and sent unchanged, preserving expressions such as P1W and P1M. Use jinko.iso8601 for these same conversions in custom code.

It must contain every additional period: its t_min must be no greater and its t_max no less than each additional period.

additional_periods optionally add shorter sampling windows and may be in any order. Each period needs a positive t_step and t_min <= t_max. Example: [{"t_min": timedelta(0), "t_max": "P28D", "t_step": "P1D"}]. t_min defaults to timedelta(0), for both the base and additional periods.

get_latex_odes​

get_latex_odes(
*, revision: int | None = None, inline_limit: int | None = None
) -> list[openapi_types.PlainOde]

Return ODE system equations rendered as LaTeX.

This method wraps the model-editor ode_system route and returns one PlainOde entry per state variable. WARNING: fails if the inline_limit is too high.

time_dependent_ids​

time_dependent_ids(*, revision: int | None = None) -> list[str]

Return component ids statically known to be time-dependent.

simple_solve​

simple_solve(
*,
timeseries_ids: list[str | ModelComponentHandle],
overrides: (
dict[str, str | None] | list[dict[str, str | None]] | None
) = None,
revision: int | None = None
) -> SimpleSolveOutput

Solve this model with optional text overrides and selected timeseries IDs.

Prefer the dict form {"example_id": "example_formula_override"}. If you pass a single {"key": ..., "formula": ...} mapping or a list of such mappings, the SDK will try to fit it to the API payload shape before sending the request.

get_baseline_descriptors​

get_baseline_descriptors(
*, revision: int | None = None
) -> openapi_types.BaselineDescriptors

Return numeric and categorical baseline descriptors for this model snapshot.

download_as_zip​

download_as_zip(
*,
cm_in_json: bool,
cm_in_sbml: bool,
solving_options_in_json: bool,
cm_in_simbiology_xlsx: bool = False,
cm_in_julia: bool = False,
cm_in_nlmixr: bool = False,
differential_model: bool = False,
name: str | None = None,
sbml_version: (
openapi_types.SbmlVersion | str
) = openapi_types.SbmlVersion.L3V2,
revision: int | None = None
) -> bytes

Download this model snapshot as a zip bundle.

Use the boolean flags to choose which bundle artifacts to export:

  • cm_in_json: include the model JSON representation.
  • cm_in_sbml: include the SBML export.
  • cm_in_simbiology_xlsx: include the SimBiology XLSX export.
  • solving_options_in_json: include solving options as JSON.
  • cm_in_julia: include the Julia export.
  • cm_in_nlmixr: include the nlmixr export.
  • differential_model: export the differential-model variant.

name overrides the exported model name inside the bundle. sbml_version controls the SBML format version when cm_in_sbml is enabled.

create_trial​

create_trial(
*,
data_tables: Sequence["DataTable | dict[str, Any]"] | None = None,
vpop: Vpop | None = None,
protocol: ProtocolDesign | None = None,
simple_output_set: SimpleOutputSet | None = None,
advanced_output_set: AdvancedOutputSet | None = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> Trial

Create a trial using this model as the required computational model.

advanced_output_set is an optional AdvancedOutputSet supplying the trial's scoring design.

data_tables is optional. Each entry represents one experimental data table to attach to the trial. You can pass either:

  • a DataTable object, which uses the default settings
  • a dict with a DataTable object when you need custom inclusion or weighting behavior
  • a fully explicit dict using id fields instead of objects

A plain DataTable object is converted from the Python-side shorthand equivalent of: {"data_table": <that table>, "include": True, "options": {"weight": 1.0}}.

A custom dict entry should contain:

  • either data_table or data_table_id: required. data_table should be a DataTable object. data_table_id should be an explicit id mapping {"core_item_id": ..., "snapshot_id": ...}.
  • include: required boolean. Whether this table is included in the trial's generated data-table design.
  • options: required dict of generator options.

Supported options keys are:

  • weight: numeric weight for this table when combined with others.
  • label: custom label for the generated fitness contribution.
  • time_tolerance: parameter that lets calibrated time series match the source data within a time window around the data-table time points.
  • log_transform_wide_bounds: list of observable ids for which wide bounds are derived from the narrow bounds, using 50% of the left narrow bound and 200% of the right narrow bound unless explicit wide bounds are already defined in the data table.

These Pythonic keys are translated by the SDK to the API field names.

The trial inherits this model's solving options. Edit them afterward with trial.edit_solving_options() or trial.set_solving_times().

create_calibration​

create_calibration(
*,
data_tables: Sequence["DataTable | dict[str, Any]"],
parameters: Sequence[dict[str, Any]],
simple_output_set: SimpleOutputSet | None = None,
protocol: ProtocolDesign | None = None,
advanced_output_set: AdvancedOutputSet | None = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None,
calib_number_of_iterations: int | None = None,
calib_population_size: int | None = None,
calib_seed: int | None = None,
calib_stagnation_absolute_tolerance: float | None = None,
calib_stagnation_burn_in_period: int | None = None,
calib_stagnation_iteration_window_size: int | None = None,
calib_stagnation_relative_tolerance: float | None = None,
calib_threshold_weighted_score: float | None = None
) -> Calibration

Create a calibration using this model as the computational model.

advanced_output_set is an optional AdvancedOutputSet supplying the calibration's objectives/constraints as a fitness-function source.

data_tables describes the experimental data used by the calibration. Each entry represents one attached data table. You can pass either:

  • a DataTable object, which uses the default settings
  • a dict with a DataTable object when you need custom inclusion or weighting behavior
  • a fully explicit dict using id fields instead of objects

A plain DataTable object is converted from the Python-side shorthand equivalent of: {"data_table": <that table>, "include": True, "options": {"weight": 1.0}}.

A custom dict entry should contain:

  • either data_table or data_table_id: required. data_table should be a DataTable object. data_table_id should be an explicit id mapping {"core_item_id": ..., "snapshot_id": ...}.
  • include: required boolean. Whether this table contributes to the calibration objective construction.
  • options: required dict of generator options.

Supported options keys are:

  • weight: numeric weight for this table when combined with others.
  • label: custom label for the generated fitness contribution.
  • time_tolerance: parameter that lets calibrated time series match the source data within a time window around the data-table time points.
  • log_transform_wide_bounds: list of observable ids for which wide bounds are derived from the narrow bounds, using 50% of the left narrow bound and 200% of the right narrow bound unless explicit wide bounds are already defined in the data table.

These Pythonic keys are translated by the SDK to the API field names.

parameters defines what model quantities the calibration may vary. Each entry is a dict with:

  • id: required. Parameter, species, or compartment id to calibrate.
  • mean: optional mu of the normal prior on the quantity, or on log10(x) when log_transform is enabled.
  • std: optional sigma of the normal prior on the quantity, or on log10(x) when log_transform is enabled.
  • min_bound: optional minimum bound enforced through a penalty term.
  • max_bound: optional maximum bound enforced through a penalty term.
  • log_transform: optional boolean, default False. When true, the prior applies in log10 space.

These Pythonic parameter keys are also translated by the SDK.

Calibration options are exposed as flattened calib_* keyword arguments so you do not need to build a nested options object yourself. Commonly useful calibration arguments include:

  • calib_seed: random seed.
  • calib_threshold_weighted_score: stop as soon as a patient exceeds this weighted score threshold.
  • calib_number_of_iterations: maximum number of iterations.
  • calib_population_size: virtual population size used per iteration.

The calibration inherits this model's solving options. Edit them afterward with calibration.edit_solving_options() or calibration.set_solving_times().

create_simple_output_set​

create_simple_output_set(
measures: list[str | dict[str, Any]],
*,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> SimpleOutputSet

Create a simple output set using this model and one or more measures.

measures accepts a hybrid list of strings and dictionaries.

String entries are shorthand output ids such as "Drug", which is treated as {"timeseriesId": "Drug"}.

Dictionary entries support these keys:

  • timeseriesId (required): model output id to measure.
  • name: custom measure name.
  • origin: "OnEachArm", "DifferenceVsControl", or "RatioVsControl".
  • function: how the measure is computed.

function supports point-in-time forms:

  • {"PointAtTime": "TStart"}
  • {"PointAtTime": "TEnd"}
  • {"PointAtTime": {"At": "PT4H"}}

And across-time forms. ObservationWindow is required by the API whenever you use AcrossTime:

  • {"AcrossTime": {"CrossTimeMeasure": "Min", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "Max", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "TimeOfMax", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "TimeOfMin", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "Avg", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "Auc", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "MaxSlope", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "MinSlope", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "Amplitude", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "EndMinusStart", "ObservationWindow": "FromStartUntilEnd"}}
  • {"AcrossTime": {"CrossTimeMeasure": "HalfLife", "ObservationWindow": "FromStartUntilEnd"}}

ObservationWindow may take one of:

  • {"ObservationWindow": "FromStartUntilEnd"}
  • {"ObservationWindow": {"FromTimeUntilEnd": "PT2H"}}
  • {"ObservationWindow": {"FromStartUntilTime": "PT8H"}}
  • {"ObservationWindow": {"FromTimeUntilTime": {"TStart": "PT2H", "TEnd": "PT8H"}}}

You can repeat the same output id multiple times to create different measures from the same timeseries.

Example:

model.create_simple_output_set(
[
"Drug",
{"timeseriesId": "Drug", "name": "Drug_end"},
{
"timeseriesId": "Drug",
"function": {
"AcrossTime": {
"CrossTimeMeasure": "Auc",
"ObservationWindow": "FromStartUntilEnd",
}
},
"name": "Drug_auc",
},
{
"timeseriesId": "Drug",
"function": {"PointAtTime": {"At": "PT4H"}},
"name": "Drug_4h",
},
],
name="PK outputs",
description="Common PK readouts",
folder=workspace,
version="initial",
)

Only the fields you provide are used. Unspecified measure options are left unset.

Equivalent to JinkoClient.create_simple_output_set(self, ...).

create_protocol_design​

create_protocol_design(
arms: list[dict],
*,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> ProtocolDesign

Create a protocol design bound to this model.

Equivalent to JinkoClient.create_protocol_design(arms, model=self, ...). Prefer this form over the client-level method when a model object is already in hand: the binding is explicit and the platform can validate override keys against the model snapshot.

arms is a list of arm dicts. Each arm dict supports the following keys:

  • armName (required): unique arm identifier string.
  • armOverrides (required): list of {"key": "<component-id>", "formula": "<value>"} entries. key must target a model input that is runnable by the protocol (e.g. "Dose", "route").
  • armControl: name of another arm that this arm is compared against. Omit or set to None for the reference arm.
  • armIsActive: boolean, defaults to True when omitted.
  • armWeight: numeric weight, defaults to 1 when omitted.

Example::

protocol = model.create_protocol_design(
[
{
"armName": "control",
"armOverrides": [{"key": "Dose", "formula": "1.0"}],
},
{
"armName": "treated",
"armControl": "control",
"armOverrides": [{"key": "Dose", "formula": "2.0"}],
},
],
name="My protocol",
)

The raw-dict interface is intentional for the initial creation batch. Once the ProtocolDesign is created, its arms property exposes a more ergonomic object-oriented interface for iterating and refining arms::

protocol.arms.create(
"high_dose",
control="control",
overrides={"Dose": "4.0"},
)

arm = protocol.arms.get("treated")
arm.set_override("Dose", "3.0")

See ProtocolDesign.arms and ProtocolArmsService for the full post-creation editing API.

create_vpop_design_from_model​

create_vpop_design_from_model(
*,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> VpopDesign

Create a Vpop generator using this model snapshot as input.

Equivalent to JinkoClient.create_vpop_design_from_model(self, ...).

create_vpop_design_from_design​

create_vpop_design_from_design(
*,
correlations: dict[tuple[str, str], float] | None = None,
marginal_categoricals: dict[str, dict[str, float]] | None = None,
marginal_distributions: (
dict[str, dict[str, Any] | float | str] | None
) = None,
folder: Folder | str | None = None,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> VpopDesign

Create a Vpop generator design bound to this model snapshot.

Equivalent to JinkoClient.create_vpop_design_from_design(model=self, ...).

copy​

copy(
new_name: str, *, revision: int, folder: Folder | str | None = None
)

Copy this model. Will default to the same folder.

combine_with​

combine_with(
model: Model, *, version: str | dict | None = None
) -> Model

Combine another model snapshot into this model and return the new head.

The incoming model's components are added onto this model snapshot using the model-editor combine route. This instance is updated in place to the newly created snapshot and returned.

compare_to​

compare_to(model: Model, print_pretty_output: bool = False) -> dict

Compare this model to another model and return the raw diff payload.

Set print_pretty_output=True to also print a human-readable summary of the returned comparison.

ComponentsBatch​

Stage multi-component edits and commit them in a single model edit call.

Recommended when changing multiple components together, or when you want to avoid one-request-per-mutator behavior from persisted handles.

Key behavior
  • one network read at creation to snapshot current components
  • no network calls during staging
  • one write on commit()
  • context manager commits on normal exit, discards on exceptions

Returned by: ComponentsBatch.delete, ModelComponentsService.batch

MemberKindDescription
edit_parametermethodStage edits for a parameter by id or component handle.
edit_speciesmethod
edit_compartmentmethod
edit_reactionmethod
edit_eventmethod
edit_odemethod
edit_categorical_parametermethod
edit_baseline_checkmethod
edit_algebraic_rulemethod
create_parametermethodStage creation of a parameter (no network call).
create_speciesmethodStage creation of a species (no network call). compartment should match a valid compartment component id.
create_compartmentmethodStage creation of a compartment (no network call).
create_eventmethodStage creation of an event (no network call).
create_odemethodStage creation of an ODE (no network call).
create_categorical_parametermethodStage creation of a categorical parameter (no network call).
create_baseline_checkmethodStage creation of a baseline check (no network call).
create_algebraic_rulemethodStage creation of an algebraic rule (no network call).
create_general_reactionmethod
create_mass_action_reactionmethod
create_michaelis_menten_reactionmethod
create_reversible_michaelis_menten_reactionmethod
create_hill_equation_reactionmethod
create_enzymatic_activation_reactionmethod
create_competitive_inhibition_reactionmethod
create_uncompetitive_inhibition_reactionmethod
create_mixed_inhibition_reactionmethod
clonemethodStage a clone from a persisted handle or another draft.
deletemethodStage deletion of a component by id or persisted handle.
commitmethodSubmit all staged changes in one model edit request.
discardmethodDiscard staged changes locally.

edit_parameter​

edit_parameter(
component_id_or_component: str | ModelComponentHandle,
) -> DraftParameterEdit

Stage edits for a parameter by id or component handle.

Repeated calls for the same id return the same draft object so changes accumulate.

edit_species​

edit_species(
component_id_or_component: str | ModelComponentHandle,
) -> DraftSpeciesEdit

edit_compartment​

edit_compartment(
component_id_or_component: str | ModelComponentHandle,
) -> DraftCompartmentEdit

edit_reaction​

edit_reaction(
component_id_or_component: str | ModelComponentHandle,
) -> DraftReactionEdit

edit_event​

edit_event(
component_id_or_component: str | ModelComponentHandle,
) -> DraftEventEdit

edit_ode​

edit_ode(
component_id_or_component: str | ModelComponentHandle,
) -> DraftOdeEdit

edit_categorical_parameter​

edit_categorical_parameter(
component_id_or_component: str | ModelComponentHandle,
) -> DraftCategoricalParameterEdit

edit_baseline_check​

edit_baseline_check(
component_id_or_component: str | ModelComponentHandle,
) -> DraftBaselineCheckEdit

edit_algebraic_rule​

edit_algebraic_rule(
component_id_or_component: str | ModelComponentHandle,
) -> DraftAlgebraicRuleEdit

create_parameter​

create_parameter(
*,
id: str,
formula: float | str,
unit: str | None = None,
constant: bool | None = None,
scale: float | str | None = None,
tolerance: float = 1,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftParameterCreate

Stage creation of a parameter (no network call).

Notes
  • constant is staged as provided. If left as None, the API applies its expected default behavior when the batch is committed (expected default: false).

create_species​

create_species(
*,
id: str,
compartment: str,
initial_condition: float | str,
unit: str | None = None,
constant: bool = False,
boundary_condition: bool | None = None,
conversion_factor: str | None = None,
molar_mass: float | str | None = None,
scale: float | str | None = None,
tolerance: float = 1,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftSpeciesCreate

Stage creation of a species (no network call). compartment should match a valid compartment component id.

create_compartment​

create_compartment(
*,
id: str,
volume: float | str,
unit: str | None = None,
constant: bool = False,
scale: float | str | None = None,
tolerance: float = 1,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftCompartmentCreate

Stage creation of a compartment (no network call).

create_event​

create_event(
*,
id: str,
updates: dict[str, Any],
condition_trigger: str | None = None,
time_trigger_first_time: float | str | None = None,
time_trigger_every: float | str | None = None,
time_trigger_count: float | str | None = None,
time_trigger_until: float | str | None = None,
priority: float | str | None = None,
solver_stop: str | None = None,
persistent: bool | None = None,
initial_value: bool | None = None,
use_values_from_trigger_time: bool | None = None,
record: bool | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftEventCreate

Stage creation of an event (no network call).

Notes
  • Accepted time trigger combinations are: first_time only; first_time + every; first_time + every + count; first_time + every + until.
  • count and until are mutually exclusive.
  • count=1 without every is treated as a one-shot trigger and normalized as if count was omitted.
  • For optional trigger/behavior flags (persistent, initial_value, record, use_values_from_trigger_time, solver_stop), None means "let the API apply its expected default behavior" at commit time.
  • Expected API defaults are: persistent=true, initial_value=false, record=false, use_values_from_trigger_time=false.

create_ode​

create_ode(
*,
id: str,
left_side: str,
right_side: float | str,
filter: str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftOdeCreate

Stage creation of an ODE (no network call).

create_categorical_parameter​

create_categorical_parameter(
*,
id: str,
level: str,
available_levels: list[str],
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftCategoricalParameterCreate

Stage creation of a categorical parameter (no network call).

create_baseline_check​

create_baseline_check(
*,
id: str,
condition: str,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftBaselineCheckCreate

Stage creation of a baseline check (no network call).

create_algebraic_rule​

create_algebraic_rule(
*,
id: str,
equation: float | str,
filter: str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftAlgebraicRuleCreate

Stage creation of an algebraic rule (no network call).

create_general_reaction​

create_general_reaction(
*,
id: str,
reactants: dict[str, Any],
products: dict[str, Any],
rate: float | str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_mass_action_reaction​

create_mass_action_reaction(
*,
id: str,
reactants: dict[str, Any],
products: dict[str, Any],
k_plus: str,
k_minus: str | None = None,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_michaelis_menten_reaction​

create_michaelis_menten_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
k_cat: str,
k_m: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_reversible_michaelis_menten_reaction​

create_reversible_michaelis_menten_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
k_cat: str,
k_m: str,
k_inv: str,
k_p: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_hill_equation_reaction​

create_hill_equation_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
k_cat: str,
k_m: str,
hill_coefficient: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_enzymatic_activation_reaction​

create_enzymatic_activation_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
activator: str,
k_cat: str,
k_m: str,
k_a: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_competitive_inhibition_reaction​

create_competitive_inhibition_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
inhibitor: str,
k_cat: str,
k_m: str,
k_i_enzyme: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_uncompetitive_inhibition_reaction​

create_uncompetitive_inhibition_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
inhibitor: str,
k_cat: str,
k_m: str,
k_i_enzymatic_complex: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

create_mixed_inhibition_reaction​

create_mixed_inhibition_reaction(
*,
id: str,
substrate: str,
product: str,
enzyme: str,
inhibitor: str,
k_cat: str,
k_m: str,
k_i_enzyme: str,
k_i_enzymatic_complex: str,
filter: str | None = None,
rate_multiplier: float | str | None = None,
description: str | None = None,
display_name: str | None = None,
tags: Sequence[str | Tag] | None = None,
links: Sequence[str | ProjectItem] | None = None
) -> DraftReactionCreate

clone​

clone(
source: ModelComponentHandle | DraftComponent, *, new_id: str | None
) -> DraftComponent

Stage a clone from a persisted handle or another draft.

delete​

delete(
component_id_or_component: str | ModelComponentHandle,
) -> ComponentsBatch

Stage deletion of a component by id or persisted handle.

commit​

commit(*, version: str | dict | None = None) -> None

Submit all staged changes in one model edit request.

commit(version=...) overrides the default version passed to batch(version=...).

Example
with model.components.batch(version="retune") as b:
b.edit_parameter("k").set_formula("CL / V")
b.create_parameter(id="k_new", formula=1.2)

discard​

discard() -> None

Discard staged changes locally.

This method does not call the server.

Tag​

Returned by: Model.create_tag, Model.get_tag, Model.tags, ModelComponentHandle.tags, Tag.refresh, Tag.set_color, Tag.set_description, Tag.set_id

MemberKindDescription
idpropertyReturn the mutable display identifier for this tag.
immutable_idpropertyReturn the permanent identifier for this tag, if set.
descriptionpropertyReturn the tag description, if set.
colorpropertyReturn the tag color, if set.
protectedpropertyReturn whether this tag is protected from modification.
urlpropertyReturn the Jinko app URL for the model filtered to this tag.
refreshmethodReload this tag's state from the API and return self.
set_idmethodUpdate the display identifier for this tag.
set_descriptionmethodUpdate the description for this tag.
set_colormethodUpdate the display color for this tag.
deletemethodDelete this tag from the model.

id​

Type: str

Return the mutable display identifier for this tag.

immutable_id​

Type: str | None

Return the permanent identifier for this tag, if set.

description​

Type: str | None

Return the tag description, if set.

color​

Type: str | None

Return the tag color, if set.

protected​

Type: bool | None

Return whether this tag is protected from modification.

url​

Type: str

Return the Jinko app URL for the model filtered to this tag.

refresh​

refresh() -> Tag

Reload this tag's state from the API and return self.

set_id​

set_id(tag_id: str, *, version: str | dict | None = None) -> Tag

Update the display identifier for this tag.

Parameters:

NameTypeDescriptionDefault
tag_idstrNew display identifier.
versionstr | dict | NoneOptional version label for the model snapshot created by this edit. Can also be a dict with the keys name and description to set a version description.None

Returns:

  • Tag: The refreshed Tag.

set_description​

set_description(
description: str | None, *, version: str | dict | None = None
) -> Tag

Update the description for this tag.

Parameters:

NameTypeDescriptionDefault
descriptionstr | NoneNew description, or None to clear it.
versionstr | dict | NoneOptional version label for the model snapshot created by this edit. Can also be a dict with the keys name and description to set a version description.None

Returns:

  • Tag: The refreshed Tag.

set_color​

set_color(color: str, *, version: str | dict | None = None) -> Tag

Update the display color for this tag.

Parameters:

NameTypeDescriptionDefault
colorstrNew hexadecimal color string, or None to clear it.
versionstr | dict | NoneOptional version label for the model snapshot created by this edit. Can also be a dict with the keys name and description to set a version description.None

Returns:

  • Tag: The refreshed Tag.

delete​

delete(force: bool = False) -> None

Delete this tag from the model.

Parameters:

NameTypeDescriptionDefault
forceboolWhen True, delete the tag even if it is protected.False