Model Resources and Location Headers
When you create a model resource with POST rason.net/api/model, the response will include a 'Location' header whose value is the resource URI which includes the model ID. When you make an API call that requires a model id, you simply substitute the string you get from the Location header for id. Afterwards, you can call GET rason.net/api/model/id/optimize, GET rason.net/api/model/id/simulate or GET rason.net/api/model/id/datamine to place the model in the queue on the Server. After the model is placed in the queue, you should periodically check the status of the model, which will either be "complete" or "incomplete". Once the model has finished solving, or the status returned is "complete", then you can call GET rason.net/api/model/id/result to obtain the final solution to the model. Note: If solving a hard mixed integer model or nonsmooth model, calling GET rason.net/api/model/id/result will return the best solution found so far and the number of subproblems completed.
It is your responsibility to delete model resources when you no longer need them. This is easy to do: just use the API call DELETE rason.net/api/model/id/delete. Deleting a model resource also removes any data files that were uploaded when it was created. For Basic (free) accounts, the RASON Server will delete "aging" model resources; for Platform and other accounts, Frontline Systems reserves the right to charge for model resource storage.
|