Skip to main content

Function: json2problem

json2problem(json): ProblemDefinition

Converts a problem from JSON format into an instance of ProblemDefinition.

Parameters

NameTypeDescription
jsonstringA string containing the problem in JSON format.

Returns

ProblemDefinition

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

Remarks

It is assumed that the problem was exported using function problem2json.

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