This example app demonstrates the following features:
- Retrieve optimizations from the database that match the specified search filter.
When you run the example app, all optimizations in the database that contain the searchTerm will be retrieved. The searchTerm is a string used to search for optimizations, and it is matched against the fields in the optimizations object.
- Create a
vrp::OrderListand add the orders to it. Each order needs to have a customer set; you can either add a new customer and then set it to the order, or you cand use a previously created customer (see Get Customer example). - Create a
vrp::ConfigurationParametersand set the desired parameters. - Create one
vrp::VehicleConstraintsfor each vehicle and set them to avrp::VehicleConstraintsList. - Create a
vrp::Optimization, set the desired fields and the objects created at 1.), 2.) and 3.) to it. - Create a
ProgressListener,vrp::Service,vrp::RouteList,vrp::OptimizationListin which the solution will be returned. - Call the
addOptimization()method fromvrp::Serviceusing the list from 5.), thevrp::Optimizationfrom 4.) and the progress listener. - After adding the optimization, call the
getOptimizations()method from thevrp::Serviceusing the list from step 5.) and theProgressListener. - Once the operation completes, the list from step 5.) will be populated with optimizations that match the search criteria.