Try our new documentation site (beta).
GRBwritebatchjsonsolution
int | GRBwritebatchjsonsolution ( | GRBbatch | *batch, |
const char* | filename ) |
This function returns the stored solution of a completed batch request from a Cluster Manager. The solution is returned in a gzip-compressed JSON file. The file name you provide must end with a .json.gz extension. The JSON format is described in the JSON solution format section. Note that 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 writing the JSON solution string into the given filename. 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 request from qhere to query its solution.
filename: The name of the file in which to store the JSON solution. It must be a file name ending with the .json.gz extension.
Example usage:
/* save solution into a file */ error = GRBwritebatchjsonsolution(batch, "batch-sol.json.gz"); if (error) goto QUIT;