NVD Solve RequestSolve Request
Overview
Different actions can be performed against a model and the solve request object provides a mechanism to communicate the action to the solver.
Applicable models
- NVD
nvd-hap0j2y4zlm1
Endpoint
Solve Request
The solve request indicates what type of solve should be performed against a specified model
Schema definition
message SolveRequest {
optional Model model = 1;
optional string modelID = 2;
repeated VisitSequence routes = 3;
optional SolveType solveType = 4 [default = Optimise];
}
Fields
- model
- The target model which should be solved (commonly specified). If not specified, the
modelID
field should be provided with a valid reference to an existing model. - modelId
- A GUID which refers to a valid model which has been uploaded via the ivr-data end point. If a modelId references a model which no longer exists on the server, an error is returned indicating that the target model could not be found.
- routes
- An optional list of routes which specify the visit sequence, typically used in conjunction with the
modelId
and the solve typesEvaluate
andReOptimise
. The visit sequence is also available as a field within the model definition where the visit sequence specified in theSolveRequest
will override any visit sequence specified in the encapsulating model. This allows one to run multiple evaluate requests without having to redefine amodel
for each evaluate request. This is a desireable design pattern when implementing user interfaces (UIs) where a drag-and-drop functionality is desired or selecting solutions from a Pareto frontier. Themodel
can be solved, Pareto frontier results returned (with no schedule-detail) and a solution can be evaluated (returning the detail for an instance from the frontier) by using the modelId. - solveType
- An enumerator which defines the target solver behaviour required for the specified model.
Notes
- An NVD model does not return a single solution in the solution response. Instead, all solutions on the non-dominated Pareto frontier are returned. This is because the NVD model inherently supports competing objectives (Balance vs Cost) and a user’s preference is often a function of the returned frontier. Once a tradeoff point has been selected from the Pareto frontier, the complete solution detail can then be obtained for that particular schedule instance.
Solve Request Type
Schema definition
enum SolveType {
Optimise = 0;
Evaluate = 1;
ReOptimise = 2;
}
Fields
- Optimise
- Issues an
Optimise
request which aims to find a feasible solution to the provided model (either a provided model or reference to an existing model). - Evaluate
- Issues an
Evaluate
request which is used in conjunction with a defined set of routes. The feasibility status of the prescribed routes is returned in the solution response. TheEvaluate
enum is also used to retrieve solution instances on the Pareto frontier. - ReOptimise
- Issues a
ReOptimise
request which is used in conjunction with a defined set of routes. If the routes provided are feasible with respect to the model referenced, this is used as a candidate starting solution in the search algorithm. If the solution is feasible, the solution returned by the engine is guaranteed to be better than or equal in cost to the provided visit sequence. There are several use cases for type of solve request. Small modifications may be made to a model which perhaps change the context of a given solution slightly. By providing a high quality starting solution to the solver, the solve time may be reduced somewhat. Another use case is that on much larger models, a heuristic design is employed by the solver. By providing a starting solution, additional search time may be given to the solve around the neighborhood specified.