This example app demonstrates the following features:
- Add a list of orders to an existing optimization which has custom matrices.
If the optimization is also reoptimized, a new solution will be returned which will include the added orders.
When you run the example app, in addition to the existing orders, the optimization will also have the added orders
- Create a
vrp::Orderwith the desired fields for each order that will be added and insert them in avrp::OrderList. - Create one
IntListListlist for the distances from the orders which will be added to the existing orders of the optimization and oneIntListListfor the durations. - Create a
ProgressListenerandvrp::Service. - Retrieve the optimization like in the example
GetOptimization()in avrp::Optimization. - Call the
optimization.addOrders()method fromvrp::Optimizationfrom 4.), using the list from 1.), a boolean to specify if the optimization should be reoptimized, the lists from 2.) and theProgressListener. - Once the operation completes, the
vrp::Optimizationfrom 3.) will be updated.