gurobi
Class GRBBatch

java.lang.Object
  extended by gurobi.GRBBatch

public class GRBBatch
extends java.lang.Object

Gurobi batch object. Batch optimization is a feature available with the Gurobi Cluster Manager. It allows a client program to build an optimization model, submit it to a Compute Server cluster (through a Cluster Manager), and later check on the status of the model and retrieve its solution. For more information, please refer to the Batch Optimization section.

Commonly used methods on the batch object include @link GRBBatch#update update (refresh attributes from the Cluster Manager),


Constructor Summary
GRBBatch(GRBEnv env, java.lang.String batchID)
           
 
Method Summary
 void abort()
          This method instructs the Cluster Manager to abort the processing of this batch request, changing its status to ABORTED.
 void discard()
          This method instructs the Cluster Manager to remove all information related to the batch request in question, including the stored solution if available.
 void dispose()
          Free all resources associated with this Batch object.
protected  void finalize()
           
 int get(GRB.IntAttr attr)
          Query the value of an int-valued batch attribute.
 java.lang.String get(GRB.StringAttr attr)
          Query the value of a string-valued batch attribute.
 java.lang.String getJSONSolution()
           
 void retry()
          This method instructs the Cluster Manager to retry optimization of a failed or aborted batch request, changing its status to SUBMITTED.
 void update()
          All Batch attribute values are cached locally, so queries return the value received during the last communication with the Cluster Manager.
 void writeJSONSolution(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GRBBatch

public GRBBatch(GRBEnv env,
                java.lang.String batchID)
         throws GRBException
Parameters:
env - The environment in which the new batch object should be created.
batchID - ID of the batch request for which you want to access status and other information.
Throws:
GRBException
Method Detail

writeJSONSolution

public void writeJSONSolution(java.lang.String filename)
                       throws GRBException
Parameters:
filename - Name of file where the solution should be stored (in JSON format).
Throws:
GRBException

getJSONSolution

public java.lang.String getJSONSolution()
                                 throws GRBException
Returns:
The requested solution in JSON format.
Throws:
GRBException

update

public void update()
            throws GRBException
All Batch attribute values are cached locally, so queries return the value received during the last communication with the Cluster Manager. This method refreshes the values of all attributes with the values currently available in the Cluster Manager (which involves network communication).

Throws:
GRBException

abort

public void abort()
           throws GRBException
This method instructs the Cluster Manager to abort the processing of this batch request, changing its status to ABORTED. Please refer to the Batch Status Codes section for further details.

Throws:
GRBException

retry

public void retry()
           throws GRBException
This method instructs the Cluster Manager to retry optimization of a failed or aborted batch request, changing its status to SUBMITTED. Please refer to the Batch Status Codes section for further details.

Throws:
GRBException

discard

public void discard()
             throws GRBException
This method instructs the Cluster Manager to remove all information related to the batch request in question, including the stored solution if available. Further queries for the associated batch request will fail with error code GRB_ERROR_DATA_NOT_AVAILABLE. Use this function with care, as the removed information can not be recovered later on.

Throws:
GRBException

dispose

public void dispose()
Free all resources associated with this Batch object. After this method is called, this Batch object must no longer be used.


finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

get

public int get(GRB.IntAttr attr)
        throws GRBException
Query the value of an int-valued batch attribute.

Parameters:
attr - The attribute being queried.
Returns:
The current value of the requested attribute.
Throws:
GRBException

get

public java.lang.String get(GRB.StringAttr attr)
                     throws GRBException
Query the value of a string-valued batch attribute.

Parameters:
attr - The attribute being queried.
Returns:
The current value of the requested attribute.
Throws:
GRBException