Documentation


Model.getJSONSolution()

getJSONSolution ( )

After a call to optimize, this method returns the resulting solution and related model attributes as a JSON string. Please refer to the JSON solution format section for details.

Return value:

A JSON string.

Example usage:

  model = read('p0033.mps')
  model.optimize()
  print(model.getJSONSolution())