Typically when using grbcluster, one may return the solution file in the .sol format. However, sometimes you may wish to return the solution status together with the solution file in a single function call.
To achieve this, you can use batch optimization and get the solution as a JSON file, which then contains both the solution status together with the solution file:
grbcluster batch solve ResultFile=a.json InputFile=a.attr a.lp --download
In this example, a.lp is the model to be solved, and a.attr contains the information about which variables are tagged. The results are then written to the file a.json.
Comments
0 comments
Article is closed for comments.