routing: Add objective to java sample
This commit is contained in:
@@ -87,6 +87,9 @@ public class VrpResources {
|
||||
/// @brief Print the solution.
|
||||
static void printSolution(
|
||||
DataModel data, RoutingModel routing, RoutingIndexManager manager, Assignment solution) {
|
||||
// Solution cost.
|
||||
logger.info("Objective : " + solution.objectiveValue());
|
||||
// Inspect solution.
|
||||
RoutingDimension timeDimension = routing.getMutableDimension("Time");
|
||||
long totalTime = 0;
|
||||
for (int i = 0; i < data.vehicleNumber; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user