Try our new documentation site (beta).


GRBgetbatchjsonsolution

int GRBgetbatchjsonsolution ( GRBbatch *batch,
    char** jsonsolP )

This function retrieves the solution of a completed batch request from a Cluster Manager. The solution is returned as a JSON solution string. For this call to succeed, the status of the batch request must be COMPLETED. Note further that the result file stored Cluster Manager side must be gzip-compressed and exactly one result file should be associated with this batch; for batches submitted programmatically through the API both will be the case. Please refer to the Batch Status Codes section for further details.

Return value:

A non-zero return value indicates that a problem occurred while querying the batch solution. Refer to the Error Code table for a list of possible return values. Details on the error can be obtained by calling GRBgeterrormsg.

Arguments:

batch: The batch to query.

jsonsolP: The location in which the pointer to the newly created JSON string should be placed.

Important note:

On Windows, the string returned in buffP is allocated in a different heap from the calling program. You must call GRBfree to free it.

Example usage:

      /* print JSON solution into string */
      error = GRBgetbatchjsonsolution(batch, &jsonsol);
      if (error) goto QUIT;
      printf("JSON solution: %s\n", jsonsol);

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization