Documentation


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. 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);