Skip to main content

Function: json2model

json2model(json): Model

Converts a model from JSON format into an instance of Model.

Parameters

NameTypeDescription
jsonstringA string containing the model in JSON format.

Returns

Model

An instance of Model corresponding to the model in JSON format.

Remarks

It is assumed that the model was exported using function model2json. The new model is a deep copy of the original model.

Variables in the new model can be accessed using function Model.getIntervalVars.