main f2390d6d04bb cached
399 files
761.0 KB
194.9k tokens
1104 symbols
1 requests
Download .txt
Showing preview only (886K chars total). Download the full file or copy to clipboard to get everything.
Repository: kiegroup/optaweb-vehicle-routing
Branch: main
Commit: f2390d6d04bb
Files: 399
Total size: 761.0 KB

Directory structure:
gitextract__s5biv9q/

├── .gitattributes
├── .github/
│   └── dependabot.yml
├── .gitignore
├── .mvn/
│   ├── extensions.xml
│   └── wrapper/
│       ├── MavenWrapperDownloader.java
│       ├── maven-wrapper.jar
│       └── maven-wrapper.properties
├── CONTRIBUTING.adoc
├── CREDITS.adoc
├── LICENSE.txt
├── README.adoc
├── mvnw
├── mvnw.cmd
├── optaweb-vehicle-routing-backend/
│   ├── .dockerignore
│   ├── .env-example
│   ├── .gitignore
│   ├── Dockerfile
│   ├── README.adoc
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── docker/
│       │   │   ├── Dockerfile.jvm
│       │   │   ├── Dockerfile.legacy-jar
│       │   │   ├── Dockerfile.native
│       │   │   └── Dockerfile.native-micro
│       │   ├── java/
│       │   │   └── org/
│       │   │       └── optaweb/
│       │   │           └── vehiclerouting/
│       │   │               ├── Profiles.java
│       │   │               ├── domain/
│       │   │               │   ├── Coordinates.java
│       │   │               │   ├── CountryCodeValidator.java
│       │   │               │   ├── Distance.java
│       │   │               │   ├── Location.java
│       │   │               │   ├── LocationData.java
│       │   │               │   ├── Route.java
│       │   │               │   ├── RouteWithTrack.java
│       │   │               │   ├── RoutingPlan.java
│       │   │               │   ├── RoutingProblem.java
│       │   │               │   ├── Vehicle.java
│       │   │               │   ├── VehicleData.java
│       │   │               │   ├── VehicleFactory.java
│       │   │               │   └── package-info.java
│       │   │               ├── plugin/
│       │   │               │   ├── persistence/
│       │   │               │   │   ├── DistanceCrudRepository.java
│       │   │               │   │   ├── DistanceEntity.java
│       │   │               │   │   ├── DistanceKey.java
│       │   │               │   │   ├── DistanceRepositoryImpl.java
│       │   │               │   │   ├── LocationCrudRepository.java
│       │   │               │   │   ├── LocationEntity.java
│       │   │               │   │   ├── LocationRepositoryImpl.java
│       │   │               │   │   ├── VehicleCrudRepository.java
│       │   │               │   │   ├── VehicleEntity.java
│       │   │               │   │   ├── VehicleRepositoryImpl.java
│       │   │               │   │   └── package-info.java
│       │   │               │   ├── planner/
│       │   │               │   │   ├── Constants.java
│       │   │               │   │   ├── DistanceMapImpl.java
│       │   │               │   │   ├── RouteChangedEventPublisher.java
│       │   │               │   │   ├── RouteOptimizerConfig.java
│       │   │               │   │   ├── RouteOptimizerImpl.java
│       │   │               │   │   ├── SolverManager.java
│       │   │               │   │   ├── VehicleRoutingConstraintProvider.java
│       │   │               │   │   ├── change/
│       │   │               │   │   │   ├── AddVehicle.java
│       │   │               │   │   │   ├── AddVisit.java
│       │   │               │   │   │   ├── ChangeVehicleCapacity.java
│       │   │               │   │   │   ├── RemoveVehicle.java
│       │   │               │   │   │   ├── RemoveVisit.java
│       │   │               │   │   │   └── package-info.java
│       │   │               │   │   ├── domain/
│       │   │               │   │   │   ├── DistanceMap.java
│       │   │               │   │   │   ├── PlanningDepot.java
│       │   │               │   │   │   ├── PlanningLocation.java
│       │   │               │   │   │   ├── PlanningLocationFactory.java
│       │   │               │   │   │   ├── PlanningVehicle.java
│       │   │               │   │   │   ├── PlanningVehicleFactory.java
│       │   │               │   │   │   ├── PlanningVisit.java
│       │   │               │   │   │   ├── PlanningVisitFactory.java
│       │   │               │   │   │   ├── SolutionFactory.java
│       │   │               │   │   │   ├── Standstill.java
│       │   │               │   │   │   ├── VehicleRoutingSolution.java
│       │   │               │   │   │   └── package-info.java
│       │   │               │   │   ├── package-info.java
│       │   │               │   │   └── weight/
│       │   │               │   │       ├── DepotAngleVisitDifficultyWeightFactory.java
│       │   │               │   │       └── package-info.java
│       │   │               │   ├── rest/
│       │   │               │   │   ├── ClearResource.java
│       │   │               │   │   ├── DataSetDownloadResource.java
│       │   │               │   │   ├── DemoResource.java
│       │   │               │   │   ├── LocationResource.java
│       │   │               │   │   ├── RouteEventResource.java
│       │   │               │   │   ├── ServerInfoResource.java
│       │   │               │   │   ├── VehicleResource.java
│       │   │               │   │   └── model/
│       │   │               │   │       ├── PortableCoordinates.java
│       │   │               │   │       ├── PortableDistance.java
│       │   │               │   │       ├── PortableErrorMessage.java
│       │   │               │   │       ├── PortableLocation.java
│       │   │               │   │       ├── PortableRoute.java
│       │   │               │   │       ├── PortableRoutingPlan.java
│       │   │               │   │       ├── PortableRoutingPlanFactory.java
│       │   │               │   │       ├── PortableVehicle.java
│       │   │               │   │       ├── RoutingProblemInfo.java
│       │   │               │   │       └── ServerInfo.java
│       │   │               │   └── routing/
│       │   │               │       ├── AirDistanceRouter.java
│       │   │               │       ├── Constants.java
│       │   │               │       ├── GraphHopperRouter.java
│       │   │               │       ├── RoutingConfig.java
│       │   │               │       ├── RoutingEngineException.java
│       │   │               │       ├── RoutingProperties.java
│       │   │               │       └── package-info.java
│       │   │               └── service/
│       │   │                   ├── demo/
│       │   │                   │   ├── DemoProperties.java
│       │   │                   │   ├── DemoService.java
│       │   │                   │   ├── RoutingProblemConfig.java
│       │   │                   │   ├── RoutingProblemList.java
│       │   │                   │   ├── dataset/
│       │   │                   │   │   ├── DataSet.java
│       │   │                   │   │   ├── DataSetLocation.java
│       │   │                   │   │   ├── DataSetMarshaller.java
│       │   │                   │   │   ├── DataSetVehicle.java
│       │   │                   │   │   └── package-info.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── distance/
│       │   │                   │   ├── DistanceCalculator.java
│       │   │                   │   ├── DistanceMatrixImpl.java
│       │   │                   │   ├── DistanceRepository.java
│       │   │                   │   ├── RoutingException.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── error/
│       │   │                   │   ├── ErrorEvent.java
│       │   │                   │   ├── ErrorListener.java
│       │   │                   │   ├── ErrorMessage.java
│       │   │                   │   ├── ErrorMessageConsumer.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── location/
│       │   │                   │   ├── DistanceMatrix.java
│       │   │                   │   ├── DistanceMatrixRow.java
│       │   │                   │   ├── LocationPlanner.java
│       │   │                   │   ├── LocationRepository.java
│       │   │                   │   ├── LocationService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── region/
│       │   │                   │   ├── BoundingBox.java
│       │   │                   │   ├── Region.java
│       │   │                   │   ├── RegionProperties.java
│       │   │                   │   ├── RegionService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── reload/
│       │   │                   │   ├── ReloadService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── route/
│       │   │                   │   ├── RouteChangedEvent.java
│       │   │                   │   ├── RouteListener.java
│       │   │                   │   ├── Router.java
│       │   │                   │   ├── ShallowRoute.java
│       │   │                   │   └── package-info.java
│       │   │                   └── vehicle/
│       │   │                       ├── VehiclePlanner.java
│       │   │                       ├── VehicleRepository.java
│       │   │                       ├── VehicleService.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       ├── .gitignore
│       │       ├── application.properties
│       │       ├── org/
│       │       │   └── optaweb/
│       │       │       └── vehiclerouting/
│       │       │           └── service/
│       │       │               └── demo/
│       │       │                   └── belgium-cities.yaml
│       │       └── solverConfig.xml
│       └── test/
│           ├── java/
│           │   └── org/
│           │       └── optaweb/
│           │           └── vehiclerouting/
│           │               ├── TestConfig.java
│           │               ├── domain/
│           │               │   ├── CoordinatesTest.java
│           │               │   ├── CountryCodeValidatorTest.java
│           │               │   ├── DistanceTest.java
│           │               │   ├── LocationDataTest.java
│           │               │   ├── LocationTest.java
│           │               │   ├── RouteTest.java
│           │               │   ├── RouteWithTrackTest.java
│           │               │   ├── RoutingPlanTest.java
│           │               │   ├── VehicleDataTest.java
│           │               │   ├── VehicleFactoryTest.java
│           │               │   └── VehicleTest.java
│           │               ├── plugin/
│           │               │   ├── persistence/
│           │               │   │   ├── DistanceEntityTest.java
│           │               │   │   ├── DistanceRepositoryImplTest.java
│           │               │   │   ├── DistanceRepositoryIntegrationTest.java
│           │               │   │   ├── LocationEntityTest.java
│           │               │   │   ├── LocationRepositoryImplTest.java
│           │               │   │   ├── LocationRepositoryIntegrationTest.java
│           │               │   │   ├── VehicleEntityTest.java
│           │               │   │   └── VehicleRepositoryImplTest.java
│           │               │   ├── planner/
│           │               │   │   ├── DistanceMapImplTest.java
│           │               │   │   ├── MockSolver.java
│           │               │   │   ├── RouteChangedEventPublisherTest.java
│           │               │   │   ├── RouteOptimizerImplTest.java
│           │               │   │   ├── SolverExceptionTest.java
│           │               │   │   ├── SolverIntegrationTest.java
│           │               │   │   ├── SolverManagerIntegrationTest.java
│           │               │   │   ├── SolverManagerTest.java
│           │               │   │   ├── SolverTestProfile.java
│           │               │   │   ├── VehicleRoutingConstraintProviderTest.java
│           │               │   │   ├── change/
│           │               │   │   │   ├── AddVehicleTest.java
│           │               │   │   │   ├── AddVisitTest.java
│           │               │   │   │   ├── ChangeVehicleCapacityTest.java
│           │               │   │   │   ├── RemoveVehicleTest.java
│           │               │   │   │   └── RemoveVisitTest.java
│           │               │   │   ├── domain/
│           │               │   │   │   ├── PlanningLocationFactoryTest.java
│           │               │   │   │   ├── PlanningLocationTest.java
│           │               │   │   │   ├── PlanningVehicleFactoryTest.java
│           │               │   │   │   ├── PlanningVehicleTest.java
│           │               │   │   │   ├── PlanningVisitFactoryTest.java
│           │               │   │   │   └── SolutionFactoryTest.java
│           │               │   │   └── weight/
│           │               │   │       └── DepotAngleVisitDifficultyWeightFactoryTest.java
│           │               │   ├── rest/
│           │               │   │   ├── ClearResourceTest.java
│           │               │   │   ├── DataSetDownloadResourceTest.java
│           │               │   │   ├── DemoResourceTest.java
│           │               │   │   ├── LocationResourceTest.java
│           │               │   │   ├── ServerInfoResourceTest.java
│           │               │   │   ├── VehicleResourceTest.java
│           │               │   │   └── model/
│           │               │   │       ├── PortableCoordinatesTest.java
│           │               │   │       ├── PortableDistanceTest.java
│           │               │   │       ├── PortableErrorMessageTest.java
│           │               │   │       ├── PortableLocationTest.java
│           │               │   │       ├── PortableRouteTest.java
│           │               │   │       ├── PortableRoutingPlanFactoryTest.java
│           │               │   │       └── PortableVehicleTest.java
│           │               │   └── routing/
│           │               │       ├── AirDistanceRouterTest.java
│           │               │       ├── GraphHopperIntegrationTest.java
│           │               │       ├── GraphHopperRouterTest.java
│           │               │       └── RoutingConfigTest.java
│           │               ├── service/
│           │               │   ├── demo/
│           │               │   │   ├── DemoServiceTest.java
│           │               │   │   ├── RoutingProblemListTest.java
│           │               │   │   └── dataset/
│           │               │   │       └── DataSetMarshallerTest.java
│           │               │   ├── distance/
│           │               │   │   └── DistanceMatrixImplTest.java
│           │               │   ├── error/
│           │               │   │   └── ErrorListenerTest.java
│           │               │   ├── location/
│           │               │   │   ├── LocationServiceIntegrationTest.java
│           │               │   │   └── LocationServiceTest.java
│           │               │   ├── region/
│           │               │   │   ├── BoundingBoxTest.java
│           │               │   │   ├── RegionPropertiesTest.java
│           │               │   │   └── RegionServiceTest.java
│           │               │   ├── reload/
│           │               │   │   └── ReloadServiceTest.java
│           │               │   ├── route/
│           │               │   │   ├── RouteListenerTest.java
│           │               │   │   └── ShallowRouteTest.java
│           │               │   └── vehicle/
│           │               │       ├── VehicleServiceIntegrationTest.java
│           │               │       └── VehicleServiceTest.java
│           │               └── util/
│           │                   ├── jackson/
│           │                   │   ├── JacksonAssertions.java
│           │                   │   ├── JsonAssert.java
│           │                   │   └── ObjectAssert.java
│           │                   └── junit/
│           │                       ├── FileContent.java
│           │                       └── FileContentExtension.java
│           └── resources/
│               ├── mockito-extensions/
│               │   ├── README.adoc
│               │   └── org.mockito.plugins.MockMaker
│               └── org/
│                   └── optaweb/
│                       └── vehiclerouting/
│                           ├── plugin/
│                           │   ├── rest/
│                           │   │   └── model/
│                           │   │       ├── portable-error-message.json
│                           │   │       ├── portable-location.json
│                           │   │       └── portable-route.json
│                           │   └── routing/
│                           │       ├── CREDITS.adoc
│                           │       └── planet_12.032,53.0171_12.1024,53.0491.osm.pbf
│                           └── service/
│                               └── demo/
│                                   └── dataset/
│                                       └── test-belgium.yaml
├── optaweb-vehicle-routing-distribution/
│   ├── .gitignore
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── assembly/
│           │   └── assembly-optaweb-vehicle-routing.xml
│           └── resources/
│               └── README.adoc
├── optaweb-vehicle-routing-docs/
│   ├── .gitignore
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── asciidoc/
│           │   ├── appendix-backend-architecture.adoc
│           │   ├── appendix-backend-config.adoc
│           │   ├── attributes.adoc
│           │   ├── contributing.adoc
│           │   ├── development-guide.adoc
│           │   ├── index.adoc
│           │   ├── introduction.adoc
│           │   ├── modules.dot
│           │   ├── quickstart.adoc
│           │   ├── run-locally.adoc
│           │   ├── run-noscript.adoc
│           │   ├── run-openshift.adoc
│           │   └── user-guide.adoc
│           └── assembly/
│               └── assembly-generated-docs-zip.xml
├── optaweb-vehicle-routing-frontend/
│   ├── .editorconfig
│   ├── .eslintignore
│   ├── .eslintrc.json
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.adoc
│   ├── cypress/
│   │   ├── .eslintrc.json
│   │   ├── .gitignore
│   │   ├── fixtures/
│   │   │   ├── example.json
│   │   │   ├── response-garz.json
│   │   │   └── response-hoppenrade.json
│   │   ├── integration/
│   │   │   └── fromLocationsToRoute.js
│   │   ├── plugins/
│   │   │   └── index.js
│   │   └── support/
│   │       ├── commands.js
│   │       └── index.js
│   ├── cypress.json
│   ├── docker/
│   │   ├── .gitignore
│   │   ├── Dockerfile
│   │   ├── default.conf
│   │   └── nginx.conf
│   ├── package.json
│   ├── pom.xml
│   ├── public/
│   │   ├── index.html
│   │   └── manifest.json
│   ├── src/
│   │   ├── @types/
│   │   │   └── eventsourcemock.d.ts
│   │   ├── common.ts
│   │   ├── index.css
│   │   ├── index.tsx
│   │   ├── react-app-env.d.ts
│   │   ├── registerServiceWorker.ts
│   │   ├── setupTests.ts
│   │   ├── store/
│   │   │   ├── client/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── client.test.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   └── types.ts
│   │   │   ├── demo/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── demo.test.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   └── types.ts
│   │   │   ├── index.ts
│   │   │   ├── message/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── message.test.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── selectors.ts
│   │   │   │   └── types.ts
│   │   │   ├── mockStore.ts
│   │   │   ├── route/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── route.test.ts
│   │   │   │   ├── selectors.ts
│   │   │   │   └── types.ts
│   │   │   ├── server/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── server.test.ts
│   │   │   │   └── types.ts
│   │   │   ├── store.ts
│   │   │   ├── types.ts
│   │   │   └── websocket/
│   │   │       ├── actions.ts
│   │   │       ├── index.ts
│   │   │       ├── operations.ts
│   │   │       ├── reducers.ts
│   │   │       ├── types.ts
│   │   │       └── websocket.test.ts
│   │   ├── ui/
│   │   │   ├── App.test.tsx
│   │   │   ├── App.tsx
│   │   │   ├── __snapshots__/
│   │   │   │   └── App.test.tsx.snap
│   │   │   ├── components/
│   │   │   │   ├── Alerts.test.tsx
│   │   │   │   ├── Alerts.tsx
│   │   │   │   ├── Background.tsx
│   │   │   │   ├── DemoDropdown.css
│   │   │   │   ├── DemoDropdown.test.tsx
│   │   │   │   ├── DemoDropdown.tsx
│   │   │   │   ├── Location.test.tsx
│   │   │   │   ├── Location.tsx
│   │   │   │   ├── LocationList.css
│   │   │   │   ├── LocationList.test.tsx
│   │   │   │   ├── LocationList.tsx
│   │   │   │   ├── LocationMarker.test.tsx
│   │   │   │   ├── LocationMarker.tsx
│   │   │   │   ├── RouteMap.test.tsx
│   │   │   │   ├── RouteMap.tsx
│   │   │   │   ├── SearchBox.test.tsx
│   │   │   │   ├── SearchBox.tsx
│   │   │   │   ├── Vehicle.test.tsx
│   │   │   │   ├── Vehicle.tsx
│   │   │   │   └── __snapshots__/
│   │   │   │       ├── Alerts.test.tsx.snap
│   │   │   │       ├── DemoDropdown.test.tsx.snap
│   │   │   │       ├── Location.test.tsx.snap
│   │   │   │       ├── LocationList.test.tsx.snap
│   │   │   │       ├── LocationMarker.test.tsx.snap
│   │   │   │       ├── RouteMap.test.tsx.snap
│   │   │   │       ├── SearchBox.test.tsx.snap
│   │   │   │       └── Vehicle.test.tsx.snap
│   │   │   ├── connection/
│   │   │   │   ├── ConnectionError.test.tsx
│   │   │   │   ├── ConnectionError.tsx
│   │   │   │   ├── ConnectionManager.test.tsx
│   │   │   │   ├── ConnectionManager.tsx
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   ├── ConnectionError.test.tsx.snap
│   │   │   │   │   └── ConnectionManager.test.tsx.snap
│   │   │   │   └── index.ts
│   │   │   ├── header/
│   │   │   │   ├── Header.test.tsx
│   │   │   │   ├── Header.tsx
│   │   │   │   ├── Navigation.test.tsx
│   │   │   │   ├── Navigation.tsx
│   │   │   │   └── __snapshots__/
│   │   │   │       ├── Header.test.tsx.snap
│   │   │   │       └── Navigation.test.tsx.snap
│   │   │   ├── pages/
│   │   │   │   ├── Demo.test.tsx
│   │   │   │   ├── Demo.tsx
│   │   │   │   ├── InfoBlock.test.tsx
│   │   │   │   ├── InfoBlock.tsx
│   │   │   │   ├── Route.test.tsx
│   │   │   │   ├── Route.tsx
│   │   │   │   ├── Vehicles.test.tsx
│   │   │   │   ├── Vehicles.tsx
│   │   │   │   ├── Visits.test.tsx
│   │   │   │   ├── Visits.tsx
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   ├── Demo.test.tsx.snap
│   │   │   │   │   ├── InfoBlock.test.tsx.snap
│   │   │   │   │   ├── Route.test.tsx.snap
│   │   │   │   │   ├── Vehicles.test.tsx.snap
│   │   │   │   │   └── Visits.test.tsx.snap
│   │   │   │   ├── common.ts
│   │   │   │   └── index.ts
│   │   │   └── shallow-test-util.ts
│   │   └── websocket/
│   │       ├── WebSocketClient.test.ts
│   │       └── WebSocketClient.ts
│   └── tsconfig.json
├── optaweb-vehicle-routing-standalone/
│   ├── .gitignore
│   ├── data/
│   │   └── openstreetmap/
│   │       ├── CREDITS.adoc
│   │       └── planet_12.032,53.0171_12.1024,53.0491.osm.pbf
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── assembly/
│           │   └── assembly-quarkus-app.xml
│           └── resources/
│               ├── META-INF/
│               │   └── undertow-handlers.conf
│               └── application.properties
├── pom.xml
├── runLocally.sh
└── runOnOpenShift.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Default to linux endings
* text eol=lf

# OS specific files
###################

*.sh eol=lf
*.bat eol=crlf

# Binary files
##############

# Image files
*.png binary
*.jpg binary
*.gif binary
*.bmp binary
*.ico binary

# Audio files
*.wav binary
*.mp3 binary
*.ogg binary

# Other binary files
*.jar binary
*.pdf binary
*.xls binary
*.xlsx binary


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: maven
  directory: "/"
  schedule:
    interval: daily
    time: '03:00'
  open-pull-requests-limit: 0
  target-branch: "main"
  commit-message:
    prefix: "[bot][main]"
- package-ecosystem: maven
  directory: "/"
  schedule:
    interval: daily
    time: '03:00'
  open-pull-requests-limit: 0
  target-branch: "8.13.x"
  commit-message:
    prefix: "[bot][8.13.x]"
- package-ecosystem: "github-actions"
  directory: "/"
  schedule:
    interval: "daily"


================================================
FILE: .gitignore
================================================
/.DATA_DIR_LAST

/target
/local

# Maven Profiler reports
.profiler

# IntelliJ
.idea
*.ipr
*.iws
*.iml

# NetBeans
nbproject

# STS (Spring Tools Suite)
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

# Visual Studio Code
.vscode

# macOS .DS_Store files
.DS_Store


================================================
FILE: .mvn/extensions.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
  <extension>
    <groupId>fr.jcgay.maven</groupId>
    <artifactId>maven-profiler</artifactId>
    <version>3.0</version>
  </extension>
  <extension>
    <groupId>io.takari.aether</groupId>
    <artifactId>takari-local-repository</artifactId>
    <version>0.11.3</version>
  </extension>
  <extension>
    <groupId>io.takari</groupId>
    <artifactId>takari-filemanager</artifactId>
    <version>0.8.3</version>
  </extension>
  <extension>
    <groupId>io.takari.maven</groupId>
    <artifactId>takari-smart-builder</artifactId>
     <version>0.6.1</version>
  </extension>
</extensions>


================================================
FILE: .mvn/wrapper/MavenWrapperDownloader.java
================================================
/*
 * Copyright 2007-present the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

    private static final String WRAPPER_VERSION = "0.5.6";
    /**
     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
     */
    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
        + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

    /**
     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
     * use instead of the default one.
     */
    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
            ".mvn/wrapper/maven-wrapper.properties";

    /**
     * Path where the maven-wrapper.jar will be saved to.
     */
    private static final String MAVEN_WRAPPER_JAR_PATH =
            ".mvn/wrapper/maven-wrapper.jar";

    /**
     * Name of the property which should be used to override the default download url for the wrapper.
     */
    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

    public static void main(String args[]) {
        System.out.println("- Downloader started");
        File baseDirectory = new File(args[0]);
        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

        // If the maven-wrapper.properties exists, read it and check if it contains a custom
        // wrapperUrl parameter.
        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
        String url = DEFAULT_DOWNLOAD_URL;
        if(mavenWrapperPropertyFile.exists()) {
            FileInputStream mavenWrapperPropertyFileInputStream = null;
            try {
                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
                Properties mavenWrapperProperties = new Properties();
                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
            } catch (IOException e) {
                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
            } finally {
                try {
                    if(mavenWrapperPropertyFileInputStream != null) {
                        mavenWrapperPropertyFileInputStream.close();
                    }
                } catch (IOException e) {
                    // Ignore ...
                }
            }
        }
        System.out.println("- Downloading from: " + url);

        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
        if(!outputFile.getParentFile().exists()) {
            if(!outputFile.getParentFile().mkdirs()) {
                System.out.println(
                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
            }
        }
        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
        try {
            downloadFileFromURL(url, outputFile);
            System.out.println("Done");
            System.exit(0);
        } catch (Throwable e) {
            System.out.println("- Error downloading");
            e.printStackTrace();
            System.exit(1);
        }
    }

    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
            String username = System.getenv("MVNW_USERNAME");
            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
            Authenticator.setDefault(new Authenticator() {
                @Override
                protected PasswordAuthentication getPasswordAuthentication() {
                    return new PasswordAuthentication(username, password);
                }
            });
        }
        URL website = new URL(urlString);
        ReadableByteChannel rbc;
        rbc = Channels.newChannel(website.openStream());
        FileOutputStream fos = new FileOutputStream(destination);
        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
        fos.close();
        rbc.close();
    }

}


================================================
FILE: .mvn/wrapper/maven-wrapper.properties
================================================
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar


================================================
FILE: CONTRIBUTING.adoc
================================================
= Developing Drools, OptaPlanner and jBPM

*If you want to build or contribute to a kiegroup project,
https://github.com/kiegroup/droolsjbpm-build-bootstrap/blob/main/README.md[read this document].*

*It will save you and us a lot of time by setting up your development environment correctly.*
It solves all known pitfalls that can disrupt your development.
It also describes all guidelines, tips and tricks.
If you want your pull requests (or patches) to be merged into main, please respect those guidelines.


================================================
FILE: CREDITS.adoc
================================================
"link:https://www.iconfinder.com/icons/2222740/big_building_construction_home_house_icon[Big, building, construction, home,
house icon]" by https://www.iconfinder.com/strokeicon[strongicon] is licensed under
 https://creativecommons.org/licenses/by/3.0/[CC BY 3.0]


================================================
FILE: LICENSE.txt
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: README.adoc
================================================
:projectKey: org.optaweb.vehiclerouting:optaweb-vehicle-routing

*This project is no longer maintained.*
Visit https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/vehicle-routing[OptaPlanner Vehicle Routing Quickstart] to see how to integrate https://www.optaplanner.org/[OptaPlanner] in your application.

= OptaWeb Vehicle Routing

image:https://img.shields.io/badge/stackoverflow-ask_question-orange.svg?logo=stackoverflow[
"Ask question on Stack Overflow",link="https://stackoverflow.com/questions/tagged/optaplanner"]
image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg?logo=zulip[
"Join Zulip Chat",link="https://kie.zulipchat.com/#narrow/stream/232679-optaplanner"]

Web application for solving the https://www.optaplanner.org/learn/useCases/vehicleRoutingProblem.html[Vehicle Routing Problem]
using https://www.optaplanner.org/[OptaPlanner].

== Run the application using a Bash script

If you're on Linux or macOS, you can use `runLocally.sh` to start the application on your computer.

* Use `runLocally.sh` with no arguments to run with the defaults.
This will download an OSM file needed to work with the built-in data set.

* Use `runLocally.sh -i` for the interactive mode.
In this mode you can choose from downloaded OSM files or download more OSM files.

* Use `runLocally.sh <REGION>` to run with the selected region.

See the
xref:optaweb-vehicle-routing-docs/src/main/asciidoc/run-locally.adoc[documentation]
to learn more about the `runLocally.sh` script.

=== Getting started video

The following https://youtu.be/rEeAML74oWo?t=107[video] shows how to download the OptaPlanner Vehicle Routing distribution and run it using the `runLocally.sh` script.

== Development

Read the <<optaweb-vehicle-routing-docs/src/main/asciidoc/development-guide#development-guide,Development>> chapter in the documentation.


================================================
FILE: mvnw
================================================
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
#   JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
#   M2_HOME - location of maven2's installed home dir
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
#     e.g. to debug Maven itself, use
#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

  if [ -f /etc/mavenrc ] ; then
    . /etc/mavenrc
  fi

  if [ -f "$HOME/.mavenrc" ] ; then
    . "$HOME/.mavenrc"
  fi

fi

# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  MINGW*) mingw=true;;
  Darwin*) darwin=true
    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
    if [ -z "$JAVA_HOME" ]; then
      if [ -x "/usr/libexec/java_home" ]; then
        export JAVA_HOME="`/usr/libexec/java_home`"
      else
        export JAVA_HOME="/Library/Java/Home"
      fi
    fi
    ;;
esac

if [ -z "$JAVA_HOME" ] ; then
  if [ -r /etc/gentoo-release ] ; then
    JAVA_HOME=`java-config --jre-home`
  fi
fi

if [ -z "$M2_HOME" ] ; then
  ## resolve links - $0 may be a link to maven's home
  PRG="$0"

  # need this for relative symlinks
  while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      PRG="$link"
    else
      PRG="`dirname "$PRG"`/$link"
    fi
  done

  saveddir=`pwd`

  M2_HOME=`dirname "$PRG"`/..

  # make it fully qualified
  M2_HOME=`cd "$M2_HOME" && pwd`

  cd "$saveddir"
  # echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --unix "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi

if [ -z "$JAVA_HOME" ]; then
  javaExecutable="`which javac`"
  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
    # readlink(1) is not available as standard on Solaris 10.
    readLink=`which readlink`
    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
      if $darwin ; then
        javaHome="`dirname \"$javaExecutable\"`"
        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
      else
        javaExecutable="`readlink -f \"$javaExecutable\"`"
      fi
      javaHome="`dirname \"$javaExecutable\"`"
      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
      JAVA_HOME="$javaHome"
      export JAVA_HOME
    fi
  fi
fi

if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD="`which java`"
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly." >&2
  echo "  We cannot execute $JAVACMD" >&2
  exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
  echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {

  if [ -z "$1" ]
  then
    echo "Path not specified to find_maven_basedir"
    return 1
  fi

  basedir="$1"
  wdir="$1"
  while [ "$wdir" != '/' ] ; do
    if [ -d "$wdir"/.mvn ] ; then
      basedir=$wdir
      break
    fi
    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
    if [ -d "${wdir}" ]; then
      wdir=`cd "$wdir/.."; pwd`
    fi
    # end of workaround
  done
  echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
  if [ -f "$1" ]; then
    echo "$(tr -s '\n' ' ' < "$1")"
  fi
}

BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
  exit 1;
fi

##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Found .mvn/wrapper/maven-wrapper.jar"
    fi
else
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
    fi
    if [ -n "$MVNW_REPOURL" ]; then
      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
    else
      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
    fi
    while IFS="=" read key value; do
      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
      esac
    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Downloading from: $jarUrl"
    fi
    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
    if $cygwin; then
      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
    fi

    if command -v wget > /dev/null; then
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Found wget ... using wget"
        fi
        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
            wget "$jarUrl" -O "$wrapperJarPath"
        else
            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
        fi
    elif command -v curl > /dev/null; then
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Found curl ... using curl"
        fi
        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
            curl -o "$wrapperJarPath" "$jarUrl" -f
        else
            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
        fi

    else
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Falling back to using Java to download"
        fi
        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
        # For Cygwin, switch paths to Windows format before running javac
        if $cygwin; then
          javaClass=`cygpath --path --windows "$javaClass"`
        fi
        if [ -e "$javaClass" ]; then
            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
                if [ "$MVNW_VERBOSE" = true ]; then
                  echo " - Compiling MavenWrapperDownloader.java ..."
                fi
                # Compiling the Java class
                ("$JAVA_HOME/bin/javac" "$javaClass")
            fi
            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
                # Running the downloader
                if [ "$MVNW_VERBOSE" = true ]; then
                  echo " - Running MavenWrapperDownloader.java ..."
                fi
                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
            fi
        fi
    fi
fi
##########################################################################################
# End of extension
##########################################################################################

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
  echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --path --windows "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
  $MAVEN_OPTS \
  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"


================================================
FILE: mvnw.cmd
================================================
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM    http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"

FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)

@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
    if "%MVNW_VERBOSE%" == "true" (
        echo Found %WRAPPER_JAR%
    )
) else (
    if not "%MVNW_REPOURL%" == "" (
        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
    )
    if "%MVNW_VERBOSE%" == "true" (
        echo Couldn't find %WRAPPER_JAR%, downloading it ...
        echo Downloading from: %DOWNLOAD_URL%
    )

    powershell -Command "&{"^
		"$webclient = new-object System.Net.WebClient;"^
		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
		"}"^
		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
		"}"
    if "%MVNW_VERBOSE%" == "true" (
        echo Finished downloading %WRAPPER_JAR%
    )
)
@REM End of extension

@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%


================================================
FILE: optaweb-vehicle-routing-backend/.dockerignore
================================================
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/quarkus-app*/*


================================================
FILE: optaweb-vehicle-routing-backend/.env-example
================================================
APP_DEMO_DATA_SET_DIR=${user.home}/.optaweb-vehicle-routing/dataset
APP_PERSISTENCE_H2_DIR=${user.home}/.optaweb-vehicle-routing/db
APP_PERSISTENCE_H2_FILENAME=dev
APP_ROUTING_GH_DIR=${user.home}/.optaweb-vehicle-routing/graphhopper
APP_ROUTING_OSM_DIR=${user.home}/.optaweb-vehicle-routing/openstreetmap
#APP_ROUTING_ENGINE=AIR

#QUARKUS_HTTP_PORT=8180

#LOG_LEVEL_APP=DEBUG
#LOG_LEVEL_OPTAPLANNER=DEBUG
#LOG_LEVEL_HIBERNATE=DEBUG
#LOG_LEVEL_DROOLS=DEBUG
#LOG_LEVEL_RESTEASY=DEBUG

QUARKUS_OPTAPLANNER_SOLVER_TERMINATION_SPENT_LIMIT=20s

#APP_ROUTING_OSM_FILE=massachusetts-latest.osm.pbf
#APP_REGION_COUNTRY_CODES=US


================================================
FILE: optaweb-vehicle-routing-backend/.gitignore
================================================
!.mvn/wrapper/maven-wrapper.jar

/.env

/panache-archive.marker

/target
/local


================================================
FILE: optaweb-vehicle-routing-backend/Dockerfile
================================================
FROM docker.io/adoptopenjdk/openjdk15:ubi-minimal-jre
ENV APP_ROUTING_ENGINE air
COPY target/*-exec.jar /opt/app/optaweb-vehicle-routing.jar
WORKDIR /opt/app
VOLUME /opt/app/local
CMD ["java", "-jar", "optaweb-vehicle-routing.jar"]
EXPOSE 8080


================================================
FILE: optaweb-vehicle-routing-backend/README.adoc
================================================
= OptaWeb Vehicle Routing back end

See the <<../optaweb-vehicle-routing-docs/src/main/asciidoc/development-guide#backend,back end development chapter>>
in the documentation.


================================================
FILE: optaweb-vehicle-routing-backend/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.optaweb.vehiclerouting</groupId>
    <artifactId>optaweb-vehicle-routing</artifactId>
    <version>8.35.0.Final</version>
  </parent>

  <artifactId>optaweb-vehicle-routing-backend</artifactId>
  <packaging>jar</packaging>

  <name>OptaWeb Vehicle Routing Backend</name>

  <properties>
    <java.module.name>org.optaweb.vehiclerouting.backend</java.module.name>
    <maven.compiler.parameters>true</maven.compiler.parameters>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <dependencies>
    <!-- Production dependencies -->
    <!-- Dataset YAML -->
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
    </dependency>
    <!-- Persistence -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-hibernate-orm-panache</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-h2</artifactId>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <optional>true</optional>
    </dependency>
    <!-- Planner -->
    <dependency>
      <groupId>org.optaplanner</groupId>
      <artifactId>optaplanner-quarkus</artifactId>
    </dependency>
    <!-- TODO avoid guava if possible. -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <!-- Region -->
    <dependency>
      <groupId>com.neovisionaries</groupId>
      <artifactId>nv-i18n</artifactId>
    </dependency>
    <!-- REST -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jackson</artifactId>
    </dependency>
    <!-- Routing -->
    <dependency>
      <groupId>com.graphhopper</groupId>
      <artifactId>graphhopper-core</artifactId>
    </dependency>
    <!--
      Add JAXB API dependency that's been deprecated in Java 9 and dropped in Java 11. See
      https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j.
    -->
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <scope>runtime</scope>
    </dependency>
    <!-- Testing dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.optaplanner</groupId>
      <artifactId>optaplanner-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <!--
              Visit https://docs.oracle.com/en/java/javase/11/tools/javac.html to learn more about javac warnings.
            -->
            <arg>-Xlint:all</arg>
            <arg>-Xlint:-processing</arg>
            <arg>-Xlint:-serial</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${version.io.quarkus}</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
              <goal>generate-code</goal>
              <goal>generate-code-tests</goal>
            </goals>
            <configuration>
              <properties>
                <quarkus.package.output-directory>quarkus-app-h2</quarkus.package.output-directory>
                <quarkus.package.filter-optional-dependencies>true</quarkus.package.filter-optional-dependencies>
                <quarkus.package.included-optional-dependencies>com.h2database:h2::jar</quarkus.package.included-optional-dependencies>
              </properties>
            </configuration>
          </execution>
          <execution>
            <id>postgresql</id>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <properties>
                <quarkus.profile>postgresql</quarkus.profile>
                <quarkus.package.output-directory>quarkus-app-postgresql</quarkus.package.output-directory>
                <quarkus.package.filter-optional-dependencies>true</quarkus.package.filter-optional-dependencies>
                <quarkus.package.included-optional-dependencies>org.postgresql:postgresql::jar</quarkus.package.included-optional-dependencies>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
            <maven.home>${maven.home}</maven.home>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>mutationCoverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <version>1.11.4</version>
            <dependencies>
              <dependency>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-junit5-plugin</artifactId>
                <version>1.1.2</version>
              </dependency>
            </dependencies>
            <!--
              optaplanner-build-parent contains Pitest configuration that doesn't work well for this project
              and it's not possible to change it without a complete override (combine.self="override"),
              for example excludedClasses, timeoutConstant.
            -->
            <configuration>
              <reportsDirectory>local/pit-reports</reportsDirectory>
              <timestampedReports>true</timestampedReports>
              <!--
                Experimental. Using more than 2 threads doesn't reduce execution time further
                and leads to minion timeouts.
              -->
              <threads>2</threads>
              <mutators>
                <!-- See http://pitest.org/quickstart/mutators/ -->
                <mutator>DEFAULTS</mutator>
                <mutator>NON_VOID_METHOD_CALLS</mutator>
                <mutator>REMOVE_CONDITIONALS</mutator>
              </mutators>
              <avoidCallsTo>
                <!--
                  String concatenation ("a" + "b") is implemented using StringBuilder.append() in bytecode.
                  We're not interested in mutations of these calls - it's mostly toString() and exception messages.
                  Reducing number of mutations also improves execution time.
                -->
                <avoidCallsTo>java.lang.StringBuilder</avoidCallsTo>
                <avoidCallsTo>org.slf4j</avoidCallsTo>
              </avoidCallsTo>
              <excludedClasses>
                <excludedClass>*Config</excludedClass>
                <excludedClass>*Properties</excludedClass>
              </excludedClasses>
              <excludedMethods>hashCode</excludedMethods>
              <excludedTestClasses>
                <param>*IntegrationTest</param>
              </excludedTestClasses>
            </configuration>
            <executions>
              <execution>
                <id>default-pitest</id>
                <phase>verify</phase>
                <goals>
                  <goal>mutationCoverage</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>native</id>
      <activation>
        <property>
          <name>native</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <quarkus.package.type>native</quarkus.package.type>
      </properties>
    </profile>
  </profiles>
</project>


================================================
FILE: optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.jvm
================================================
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the container image run:
#
# ./mvnw package
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/optaweb-vehicle-routing-backend-jvm .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend-jvm
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005) like this :  EXPOSE 8080 5005
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend-jvm
#
# This image uses the `run-java.sh` script to run the application.
# This scripts computes the command line to execute your Java application, and
# includes memory/GC tuning.
# You can configure the behavior using the following environment properties:
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
#   in JAVA_OPTS (example: "-Dsome.property=foo")
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
#   used to calculate a default maximal heap memory based on a containers restriction.
#   If used in a container without any memory constraints for the container then this
#   option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
#   of the container available memory as set here. The default is `50` which means 50%
#   of the available memory is used as an upper boundary. You can skip this mechanism by
#   setting this value to `0` in which case no `-Xmx` option is added.
# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
#   is used to calculate a default initial heap memory based on the maximum heap memory.
#   If used in a container without any memory constraints for the container then this
#   option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
#   of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
#   is used as the initial heap size. You can skip this mechanism by setting this value
#   to `0` in which case no `-Xms` option is added (example: "25")
# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
#   This is used to calculate the maximum value of the initial heap memory. If used in
#   a container without any memory constraints for the container then this option has
#   no effect. If there is a memory constraint then `-Xms` is limited to the value set
#   here. The default is 4096MB which means the calculated value of `-Xms` never will
#   be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
#   when things are happening. This option, if set to true, will set
#  `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
#    true").
# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
#   https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
#   (example: "20")
# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
#   (example: "40")
# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
#   (example: "4")
# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
#   previous GC times. (example: "90")
# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
#   contain the necessary JRE command-line options to specify the required GC, which
#   will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
#   accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-11:1.14

ENV LANGUAGE='en_US:en'


ARG QUARKUS_APP_BUILD_QUALIFIER=h2
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 target/quarkus-app-${QUARKUS_APP_BUILD_QUALIFIER}/lib/ /deployments/lib/
COPY --chown=185 target/quarkus-app-${QUARKUS_APP_BUILD_QUALIFIER}/*.jar /deployments/
COPY --chown=185 target/quarkus-app-${QUARKUS_APP_BUILD_QUALIFIER}/app/ /deployments/app/
COPY --chown=185 target/quarkus-app-${QUARKUS_APP_BUILD_QUALIFIER}/quarkus/ /deployments/quarkus/

EXPOSE 8080
USER 185
ENV AB_JOLOKIA_OFF=""
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
ENV APP_PERSISTENCE_H2_DIR=/deployments/local/db



================================================
FILE: optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.legacy-jar
================================================
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the container image run:
#
# ./mvnw package -Dquarkus.package.type=legacy-jar
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/optaweb-vehicle-routing-backend-legacy-jar .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend-legacy-jar
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005) like this :  EXPOSE 8080 5005
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend-legacy-jar
#
# This image uses the `run-java.sh` script to run the application.
# This scripts computes the command line to execute your Java application, and
# includes memory/GC tuning.
# You can configure the behavior using the following environment properties:
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
#   in JAVA_OPTS (example: "-Dsome.property=foo")
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
#   used to calculate a default maximal heap memory based on a containers restriction.
#   If used in a container without any memory constraints for the container then this
#   option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
#   of the container available memory as set here. The default is `50` which means 50%
#   of the available memory is used as an upper boundary. You can skip this mechanism by
#   setting this value to `0` in which case no `-Xmx` option is added.
# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
#   is used to calculate a default initial heap memory based on the maximum heap memory.
#   If used in a container without any memory constraints for the container then this
#   option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
#   of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
#   is used as the initial heap size. You can skip this mechanism by setting this value
#   to `0` in which case no `-Xms` option is added (example: "25")
# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
#   This is used to calculate the maximum value of the initial heap memory. If used in
#   a container without any memory constraints for the container then this option has
#   no effect. If there is a memory constraint then `-Xms` is limited to the value set
#   here. The default is 4096MB which means the calculated value of `-Xms` never will
#   be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
#   when things are happening. This option, if set to true, will set
#  `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
#    true").
# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
#   https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
#   (example: "20")
# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
#   (example: "40")
# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
#   (example: "4")
# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
#   previous GC times. (example: "90")
# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
#   contain the necessary JRE command-line options to specify the required GC, which
#   will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
#   accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-11:1.14

ENV LANGUAGE='en_US:en'


COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/quarkus-run.jar

EXPOSE 8080
USER 185
ENV AB_JOLOKIA_OFF=""
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"


================================================
FILE: optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.native
================================================
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
#
# Before building the container image run:
#
# ./mvnw package -Pnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native -t quarkus/optaweb-vehicle-routing-backend .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6
WORKDIR /work/
RUN chown 1001 /work \
    && chmod "g+rwX" /work \
    && chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]


================================================
FILE: optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.native-micro
================================================
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./mvnw package -Pnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/optaweb-vehicle-routing-backend .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/optaweb-vehicle-routing-backend
#
###
FROM quay.io/quarkus/quarkus-micro-image:1.0
WORKDIR /work/
RUN chown 1001 /work \
    && chmod "g+rwX" /work \
    && chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/Profiles.java
================================================
package org.optaweb.vehiclerouting;

public class Profiles {

    public static final String TEST = "test";

    private Profiles() {
        throw new AssertionError("Constants class");
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Coordinates.java
================================================
package org.optaweb.vehiclerouting.domain;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * Horizontal geographical coordinates consisting of latitude and longitude.
 */
public class Coordinates {

    private final BigDecimal latitude;
    private final BigDecimal longitude;

    public Coordinates(BigDecimal latitude, BigDecimal longitude) {
        this.latitude = Objects.requireNonNull(latitude);
        this.longitude = Objects.requireNonNull(longitude);
    }

    /**
     * Create coordinates with the given latitude and longitude.
     *
     * @param latitude latitude
     * @param longitude longitude
     * @return coordinates with the given latitude and longitude
     */
    public static Coordinates of(double latitude, double longitude) {
        return new Coordinates(BigDecimal.valueOf(latitude), BigDecimal.valueOf(longitude));
    }

    /**
     * Latitude.
     *
     * @return latitude (never {@code null})
     */
    public BigDecimal latitude() {
        return latitude;
    }

    /**
     * Longitude.
     *
     * @return longitude (never {@code null})
     */
    public BigDecimal longitude() {
        return longitude;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Coordinates coordinates = (Coordinates) o;
        return latitude.compareTo(coordinates.latitude) == 0 &&
                longitude.compareTo(coordinates.longitude) == 0;
    }

    @Override
    public int hashCode() {
        return Objects.hash(latitude.doubleValue(), longitude.doubleValue());
    }

    @Override
    public String toString() {
        return "[" + latitude.toPlainString() +
                ", " + longitude.toPlainString() +
                ']';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/CountryCodeValidator.java
================================================
package org.optaweb.vehiclerouting.domain;

import static java.util.stream.Collectors.toList;

import java.util.List;
import java.util.Objects;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.neovisionaries.i18n.CountryCode;

/**
 * Validates ISO 3166-1 alpha-2 country codes.
 */
public class CountryCodeValidator {

    private static final Logger logger = LoggerFactory.getLogger(CountryCodeValidator.class);

    private CountryCodeValidator() {
        throw new AssertionError("Utility class");
    }

    /**
     * Validates the list of country codes and returns a normalized copy.
     *
     * @param countryCodes input list
     * @return normalized copy of the input list converted to upper case and without duplicates
     * @throws NullPointerException if the list is {@code null} or if any of its elements is {@code null}
     * @throws IllegalArgumentException if any of the elements is not an ISO 3166-1 alpha-2 country code
     */
    public static List<String> validate(List<String> countryCodes) {
        List<String> upperCaseCountries = Objects.requireNonNull(countryCodes).stream()
                .map(String::toUpperCase)
                .collect(toList());
        List<String> invalidCodes = upperCaseCountries.stream()
                .filter(s -> CountryCode.getByAlpha2Code(s) == null)
                .collect(toList());
        if (!invalidCodes.isEmpty()) {
            throw new IllegalArgumentException(
                    "Following elements (" + invalidCodes + ") are not valid ISO 3166-1 alpha-2 country codes");
        }
        List<String> uniqueCountries = upperCaseCountries.stream().distinct().collect(toList());
        if (uniqueCountries.size() < countryCodes.size()) {
            logger.warn("Duplicate items were removed from {}", countryCodes);
        }
        return uniqueCountries;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Distance.java
================================================
package org.optaweb.vehiclerouting.domain;

/**
 * Travel cost (distance between two {@link Location locations} or the length of a {@link Route route}).
 */
public class Distance {

    /**
     * Zero distance, for example the distance from a location to itself.
     */
    public static final Distance ZERO = Distance.ofMillis(0);

    private final long millis;

    /**
     * Create a distance of the given milliseconds.
     *
     * @param millis must be positive or zero
     * @return distance
     */
    public static Distance ofMillis(long millis) {
        return new Distance(millis);
    }

    private Distance(long millis) {
        if (millis < 0) {
            throw new IllegalArgumentException("Milliseconds (" + millis + ") must not be negative.");
        }
        this.millis = millis;
    }

    /**
     * Distance in milliseconds.
     *
     * @return positive number or zero
     */
    public long millis() {
        return millis;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Distance distance = (Distance) o;
        return millis == distance.millis;
    }

    @Override
    public int hashCode() {
        return Long.hashCode(millis);
    }

    @Override
    public String toString() {
        return String.format(
                "%dh %dm %ds %dms",
                millis / 3600_000,
                millis / 60_000 % 60,
                millis / 1000 % 60,
                millis % 1000);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Location.java
================================================
package org.optaweb.vehiclerouting.domain;

/**
 * A unique location significant to the user.
 */
public class Location extends LocationData {

    private final long id;

    public Location(long id, Coordinates coordinates) {
        // TODO remove this?
        this(id, coordinates, "");
    }

    public Location(long id, Coordinates coordinates, String description) {
        super(coordinates, description);
        this.id = id;
    }

    /**
     * Location's ID.
     *
     * @return unique ID
     */
    public long id() {
        return id;
    }

    /**
     * Full description of the location including its ID, description and coordinates.
     *
     * @return full description
     */
    public String fullDescription() {
        return "[" + id + "]: " + super.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Location location = (Location) o;
        return id == location.id;
    }

    @Override
    public int hashCode() {
        return Long.hashCode(id);
    }

    @Override
    public String toString() {
        return description().isEmpty() ? Long.toString(id) : (id + ": '" + description() + "'");
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/LocationData.java
================================================
package org.optaweb.vehiclerouting.domain;

import java.util.Objects;

/**
 * Location properties. It's not an entity yet (it doesn't have an identity, it's a value object).
 * It might be the data about a location sent from a client or data stored in a file,
 * ready to be loaded but not yet tied to a specific location entity.
 */
public class LocationData {

    private final Coordinates coordinates;
    private final String description;

    /**
     * Create location data.
     *
     * @param coordinates never {@code null}
     * @param description never {@code null}
     */
    public LocationData(Coordinates coordinates, String description) {
        this.coordinates = Objects.requireNonNull(coordinates);
        this.description = Objects.requireNonNull(description);
    }

    /**
     * Location coordinates.
     *
     * @return coordinates (never {@code null})
     */
    public Coordinates coordinates() {
        return coordinates;
    }

    /**
     * Location description.
     *
     * @return description (never {@code null})
     */
    public String description() {
        return description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LocationData that = (LocationData) o;
        return coordinates.equals(that.coordinates) &&
                description.equals(that.description);
    }

    @Override
    public int hashCode() {
        return Objects.hash(coordinates, description);
    }

    @Override
    public String toString() {
        return (description.isEmpty() ? "<noname>" : "'" + description + "'") + " " + coordinates;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Route.java
================================================
package org.optaweb.vehiclerouting.domain;

import static java.util.stream.Collectors.toList;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
 * Vehicle's itinerary (sequence of visits) and its depot. This entity cannot exist without the vehicle and the depot
 * but it's allowed to have no visits when the vehicle hasn't been assigned any (it's idle).
 * <p>
 * This entity describes part of a {@link RoutingPlan solution} of the vehicle routing problem
 * (assignment of a subset of visits to one of the vehicles).
 * It doesn't carry the data about physical tracks between adjacent visits.
 * Geographical data is held by {@link RouteWithTrack}.
 */
public class Route {

    private final Vehicle vehicle;
    private final Location depot;
    private final List<Location> visits;

    /**
     * Create a vehicle route.
     *
     * @param vehicle the vehicle assigned to this route (not {@code null})
     * @param depot vehicle's depot (not {@code null})
     * @param visits list of visits (not {@code null})
     */
    public Route(Vehicle vehicle, Location depot, List<Location> visits) {
        this.vehicle = Objects.requireNonNull(vehicle);
        this.depot = Objects.requireNonNull(depot);
        this.visits = new ArrayList<>(Objects.requireNonNull(visits));
        // TODO Probably remove this check when we have more types: new Route(Depot depot, List<Visit> visits).
        //      Then visits obviously cannot contain the depot. But will we still require that no visit has the same
        //      location as the depot? (I don't think so).
        if (visits.contains(depot)) {
            throw new IllegalArgumentException("Depot (" + depot + ") must not be one of the visits (" + visits + ")");
        }
        long uniqueVisits = visits.stream().distinct().count();
        if (uniqueVisits < visits.size()) {
            long duplicates = visits.size() - uniqueVisits;
            throw new IllegalArgumentException("Some visits have been visited multiple times (" + duplicates + ")");
        }
    }

    /**
     * The vehicle assigned to this route.
     *
     * @return route's vehicle (never {@code null})
     */
    public Vehicle vehicle() {
        return vehicle;
    }

    /**
     * Depot in which the route starts and ends.
     *
     * @return route's depot (never {@code null})
     */
    public Location depot() {
        return depot;
    }

    /**
     * List of vehicle's visits (not including the depot).
     *
     * @return list of visits
     */
    public List<Location> visits() {
        return Collections.unmodifiableList(visits);
    }

    @Override
    public String toString() {
        return "Route{" +
                "vehicle=" + vehicle +
                ", depot=" + depot.id() +
                ", visits=" + visits.stream().map(Location::id).collect(toList()) +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RouteWithTrack.java
================================================
package org.optaweb.vehiclerouting.domain;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
 * Vehicle's {@link Route itinerary} enriched with detailed geographical description of the route.
 * This object contains data needed to visualize vehicle's route on a map.
 */
public class RouteWithTrack extends Route {

    private final List<List<Coordinates>> track;

    /**
     * Create a route with track. When route is empty (no visits), track must be empty too and vice-versa
     * (non-empty route must have a non-empty track).
     *
     * @param route vehicle's route (not {@code null})
     * @param track track going through all visits (not {@code null})
     */
    public RouteWithTrack(Route route, List<List<Coordinates>> track) {
        super(route.vehicle(), route.depot(), route.visits());
        this.track = new ArrayList<>(Objects.requireNonNull(track));
        if (route.visits().isEmpty() && !track.isEmpty() || !route.visits().isEmpty() && track.isEmpty()) {
            throw new IllegalArgumentException("Route and track must be either both empty or both non-empty");
        }
    }

    /**
     * Vehicle's track that goes from vehicle's depot through all visits and returns to the depot.
     *
     * @return vehicle's track (not {@code null})
     */
    public List<List<Coordinates>> track() {
        return Collections.unmodifiableList(track);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingPlan.java
================================================
package org.optaweb.vehiclerouting.domain;

import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Route plan for the whole vehicle fleet.
 */
public class RoutingPlan {

    private static final Logger logger = LoggerFactory.getLogger(RoutingPlan.class);

    private final Distance distance;
    private final List<Vehicle> vehicles;
    private final Location depot;
    private final List<Location> visits;
    private final List<RouteWithTrack> routes;

    /**
     * Create a routing plan.
     *
     * @param distance the overall travel distance
     * @param vehicles all available vehicles
     * @param depot the depot (may be {@code null})
     * @param visits all visits
     * @param routes routes of all vehicles
     */
    public RoutingPlan(
            Distance distance,
            List<Vehicle> vehicles,
            Location depot,
            List<Location> visits,
            List<RouteWithTrack> routes) {
        this.distance = Objects.requireNonNull(distance);
        this.vehicles = new ArrayList<>(Objects.requireNonNull(vehicles));
        this.depot = depot;
        this.visits = new ArrayList<>(Objects.requireNonNull(visits));
        this.routes = new ArrayList<>(Objects.requireNonNull(routes));
        if (depot == null) {
            if (!routes.isEmpty()) {
                throw new IllegalArgumentException("Routes must be empty when depot is null");
            }
        } else if (routes.size() != vehicles.size()) {
            throw new IllegalArgumentException(describeVehiclesRoutesInconsistency(
                    "There must be exactly one route per vehicle", vehicles, routes));
        } else if (haveDifferentVehicles(vehicles, routes)) {
            throw new IllegalArgumentException(describeVehiclesRoutesInconsistency(
                    "Some routes are assigned to non-existent vehicles", vehicles, routes));
        } else if (!routes.isEmpty()) {
            List<Location> visited = routes.stream()
                    .map(Route::visits)
                    .flatMap(Collection::stream)
                    .collect(toList());
            ArrayList<Location> unvisited = new ArrayList<>(visits);
            unvisited.removeAll(visited);
            if (!unvisited.isEmpty()) {
                // This happens because we're also publishing solutions that are not fully initialized.
                // TODO decide whether this allowed or not
                logger.warn("Some visits are unvisited: {}", unvisited);
            }
            visited.removeAll(visits);
            if (!visited.isEmpty()) {
                throw new IllegalArgumentException(
                        "Some routes are going through visits that haven't been defined: " + visited);
            }
        }
    }

    private static boolean haveDifferentVehicles(List<Vehicle> vehicles, List<RouteWithTrack> routes) {
        return routes.stream()
                .map(Route::vehicle)
                .anyMatch(vehicle -> !vehicles.contains(vehicle));
    }

    private static String describeVehiclesRoutesInconsistency(
            String cause,
            List<Vehicle> vehicles,
            List<? extends Route> routes) {
        List<Long> vehicleIdsFromRoutes = routes.stream()
                .map(route -> route.vehicle().id())
                .collect(toList());
        return cause
                + ":\n- Vehicles (" + vehicles.size() + "): " + vehicles
                + "\n- Routes' vehicleIds (" + routes.size() + "): " + vehicleIdsFromRoutes;
    }

    /**
     * Create an empty routing plan.
     *
     * @return empty routing plan
     */
    public static RoutingPlan empty() {
        return new RoutingPlan(Distance.ZERO, emptyList(), null, emptyList(), emptyList());
    }

    /**
     * Total distance traveled (sum of distances of all routes).
     *
     * @return travel distance
     */
    public Distance distance() {
        return distance;
    }

    /**
     * All available vehicles.
     *
     * @return all vehicles
     */
    public List<Vehicle> vehicles() {
        return Collections.unmodifiableList(vehicles);
    }

    /**
     * Routes of all vehicles in the depot. Includes empty routes of vehicles that stay in the depot.
     *
     * @return all routes (may be empty when there is no depot or no vehicles)
     */
    public List<RouteWithTrack> routes() {
        return Collections.unmodifiableList(routes);
    }

    /**
     * All visits that are part of the routing problem.
     *
     * @return all visits
     */
    public List<Location> visits() {
        return Collections.unmodifiableList(visits);
    }

    /**
     * The depot.
     *
     * @return depot (may be missing)
     */
    public Optional<Location> depot() {
        return Optional.ofNullable(depot);
    }

    /**
     * Routing plan is empty when there is no depot, no vehicles and no routes.
     *
     * @return {@code true} if the plan is empty
     */
    public boolean isEmpty() {
        // No need to check routes. No depot => no routes.
        return depot == null && vehicles.isEmpty();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingProblem.java
================================================
package org.optaweb.vehiclerouting.domain;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;

/**
 * Definition of the vehicle routing problem instance.
 */
public class RoutingProblem {

    private final String name;
    private final List<VehicleData> vehicles;
    private final LocationData depot;
    private final List<LocationData> visits;

    /**
     * Create routing problem instance.
     *
     * @param name the instance name
     * @param vehicles list of vehicles (not {@code null})
     * @param depot the depot (may be {@code null} if there is no depot)
     * @param visits list of visits (not {@code null})
     */
    public RoutingProblem(
            String name,
            List<? extends VehicleData> vehicles,
            LocationData depot,
            List<? extends LocationData> visits) {
        this.name = Objects.requireNonNull(name);
        this.vehicles = new ArrayList<>(Objects.requireNonNull(vehicles));
        this.depot = depot;
        this.visits = new ArrayList<>(Objects.requireNonNull(visits));
    }

    /**
     * Get routing problem instance name.
     *
     * @return routing problem instance name
     */
    public String name() {
        return name;
    }

    /**
     * Get the depot.
     *
     * @return depot (never {@code null})
     */
    public Optional<LocationData> depot() {
        return Optional.ofNullable(depot);
    }

    /**
     * Get locations that should be visited.
     *
     * @return visits
     */
    public List<LocationData> visits() {
        return visits;
    }

    /**
     * Vehicles that are part of the problem definition.
     *
     * @return vehicles
     */
    public List<VehicleData> vehicles() {
        return vehicles;
    }

    @Override
    public String toString() {
        return name;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Vehicle.java
================================================
package org.optaweb.vehiclerouting.domain;

/**
 * Vehicle that can be used to deliver cargo to visits.
 */
public class Vehicle extends VehicleData {

    private final long id;

    Vehicle(long id, String name, int capacity) {
        super(name, capacity);
        this.id = id;
    }

    /**
     * Vehicle's ID.
     *
     * @return unique ID
     */
    public long id() {
        return id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Vehicle vehicle = (Vehicle) o;
        return id == vehicle.id;
    }

    @Override
    public int hashCode() {
        return Long.hashCode(id);
    }

    @Override
    public String toString() {
        return name().isEmpty() ? Long.toString(id) : (id + ": '" + name() + "'");
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleData.java
================================================
package org.optaweb.vehiclerouting.domain;

import java.util.Objects;

/**
 * Data about a vehicle.
 */
public class VehicleData {

    private final String name;
    private final int capacity;

    VehicleData(String name, int capacity) {
        this.name = Objects.requireNonNull(name);
        this.capacity = capacity;
    }

    /**
     * Vehicle's name (unique description).
     *
     * @return vehicle's name
     */
    public String name() {
        return name;
    }

    /**
     * Vehicle's capacity.
     *
     * @return vehicle's capacity
     */
    public int capacity() {
        return capacity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        VehicleData that = (VehicleData) o;
        return capacity == that.capacity &&
                name.equals(that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, capacity);
    }

    @Override
    public String toString() {
        return name.isEmpty() ? "<noname>" : "'" + name + "'";
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleFactory.java
================================================
package org.optaweb.vehiclerouting.domain;

/**
 * Creates {@link Vehicle} instances.
 */
public class VehicleFactory {

    private VehicleFactory() {
        throw new AssertionError("Utility class");
    }

    /**
     * Create vehicle data.
     *
     * @param name vehicle's name
     * @param capacity vehicle's capacity
     * @return vehicle data
     */
    public static VehicleData vehicleData(String name, int capacity) {
        return new VehicleData(name, capacity);
    }

    /**
     * Create a new vehicle with the given ID, name and capacity.
     *
     * @param id vehicle's ID
     * @param name vehicle's name
     * @param capacity vehicle's capacity
     * @return new vehicle
     */
    public static Vehicle createVehicle(long id, String name, int capacity) {
        return new Vehicle(id, name, capacity);
    }

    /**
     * Create a vehicle with given ID and capacity of zero. The vehicle will have a non-empty name.
     *
     * @param id vehicle's ID
     * @return new testing vehicle instance
     */
    public static Vehicle testVehicle(long id) {
        return new Vehicle(id, "Vehicle " + id, 0);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/package-info.java
================================================
/**
 * Domain model. Contains vehicles, depots, visits and so on.
 * The code in this package only depends on {@link java.lang} and is not affected
 * by any framework used in this project.
 */
package org.optaweb.vehiclerouting.domain;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceCrudRepository.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import javax.enterprise.context.ApplicationScoped;

import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase;
import io.quarkus.panache.common.Parameters;

/**
 * Distance repository.
 */
@ApplicationScoped
public class DistanceCrudRepository implements PanacheRepositoryBase<DistanceEntity, DistanceKey> {

    void deleteByFromIdOrToId(long deletedLocationId) {
        delete(
                "fromId = :deletedLocationId or toId = :deletedLocationId",
                Parameters.with("deletedLocationId", deletedLocationId));
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceEntity.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import java.util.Objects;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

/**
 * Distance between two locations that can be persisted.
 */
@Entity
class DistanceEntity {

    @EmbeddedId
    private DistanceKey key;

    private Long distance;

    protected DistanceEntity() {
        // for JPA
    }

    DistanceEntity(DistanceKey key, Long distance) {
        this.key = Objects.requireNonNull(key);
        this.distance = Objects.requireNonNull(distance);
    }

    DistanceKey getKey() {
        return key;
    }

    Long getDistance() {
        return distance;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DistanceEntity that = (DistanceEntity) o;
        return key.equals(that.key) &&
                distance.equals(that.distance);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key, distance);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceKey.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import java.io.Serializable;
import java.util.Objects;

import javax.persistence.Embeddable;

/**
 * Composite key for {@link DistanceEntity}.
 */
@Embeddable
class DistanceKey implements Serializable {

    // TODO make it a foreign key to LocationEntity
    private Long fromId;
    private Long toId;

    protected DistanceKey() {
        // for JPA
    }

    DistanceKey(long fromId, long toId) {
        this.fromId = fromId;
        this.toId = toId;
    }

    Long getFromId() {
        return fromId;
    }

    void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    Long getToId() {
        return toId;
    }

    void setToId(Long toId) {
        this.toId = toId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DistanceKey that = (DistanceKey) o;
        return fromId.equals(that.fromId) &&
                toId.equals(that.toId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fromId, toId);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryImpl.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import java.util.Optional;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.optaweb.vehiclerouting.domain.Distance;
import org.optaweb.vehiclerouting.domain.Location;
import org.optaweb.vehiclerouting.service.distance.DistanceRepository;

@ApplicationScoped
class DistanceRepositoryImpl implements DistanceRepository {

    private final DistanceCrudRepository distanceRepository;

    @Inject
    DistanceRepositoryImpl(DistanceCrudRepository distanceRepository) {
        this.distanceRepository = distanceRepository;
    }

    @Override
    public void saveDistance(Location from, Location to, Distance distance) {
        DistanceEntity distanceEntity = new DistanceEntity(new DistanceKey(from.id(), to.id()), distance.millis());
        distanceRepository.persist(distanceEntity);
    }

    @Override
    public Optional<Distance> getDistance(Location from, Location to) {
        return distanceRepository.findByIdOptional(new DistanceKey(from.id(), to.id()))
                .map(DistanceEntity::getDistance)
                .map(Distance::ofMillis);
    }

    @Override
    public void deleteDistances(Location location) {
        distanceRepository.deleteByFromIdOrToId(location.id());
    }

    @Override
    public void deleteAll() {
        distanceRepository.deleteAll();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationCrudRepository.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import javax.enterprise.context.ApplicationScoped;

import io.quarkus.hibernate.orm.panache.PanacheRepository;

/**
 * Location repository.
 */
@ApplicationScoped
public class LocationCrudRepository implements PanacheRepository<LocationEntity> {

}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationEntity.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import java.math.BigDecimal;
import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Persistable location.
 */
@Entity
class LocationEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    // https://wiki.openstreetmap.org/wiki/Node#Structure
    @Column(precision = 9, scale = 7)
    private BigDecimal latitude;
    @Column(precision = 10, scale = 7)
    private BigDecimal longitude;

    private String description;

    protected LocationEntity() {
        // for JPA
    }

    LocationEntity(long id, BigDecimal latitude, BigDecimal longitude, String description) {
        this.id = id;
        this.latitude = Objects.requireNonNull(latitude);
        this.longitude = Objects.requireNonNull(longitude);
        this.description = Objects.requireNonNull(description);
    }

    long getId() {
        return id;
    }

    BigDecimal getLatitude() {
        return latitude;
    }

    BigDecimal getLongitude() {
        return longitude;
    }

    String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "LocationEntity{" +
                "id=" + id +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ", description='" + description + '\'' +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryImpl.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import static java.util.stream.Collectors.toList;

import java.util.List;
import java.util.Optional;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.optaweb.vehiclerouting.domain.Coordinates;
import org.optaweb.vehiclerouting.domain.Location;
import org.optaweb.vehiclerouting.service.location.LocationRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ApplicationScoped
class LocationRepositoryImpl implements LocationRepository {

    private static final Logger logger = LoggerFactory.getLogger(LocationRepositoryImpl.class);
    private final LocationCrudRepository repository;

    @Inject
    LocationRepositoryImpl(LocationCrudRepository repository) {
        this.repository = repository;
    }

    @Override
    public Location createLocation(Coordinates coordinates, String description) {
        LocationEntity locationEntity = new LocationEntity(0, coordinates.latitude(), coordinates.longitude(), description);
        repository.persist(locationEntity);
        Location location = toDomain(locationEntity);
        logger.info("Created location {}.", location.fullDescription());
        return location;
    }

    @Override
    public List<Location> locations() {
        return repository.streamAll()
                .map(LocationRepositoryImpl::toDomain)
                .collect(toList());
    }

    @Override
    public Location removeLocation(long id) {
        Optional<LocationEntity> maybeLocation = repository.findByIdOptional(id);
        maybeLocation.ifPresent(locationEntity -> repository.deleteById(id));
        LocationEntity locationEntity = maybeLocation.orElseThrow(
                () -> new IllegalArgumentException("Location{id=" + id + "} doesn't exist"));
        Location location = toDomain(locationEntity);
        logger.info("Deleted location {}.", location.fullDescription());
        return location;
    }

    @Override
    public void removeAll() {
        repository.deleteAll();
    }

    @Override
    public Optional<Location> find(long locationId) {
        return repository.findByIdOptional(locationId).map(LocationRepositoryImpl::toDomain);
    }

    private static Location toDomain(LocationEntity locationEntity) {
        return new Location(
                locationEntity.getId(),
                new Coordinates(locationEntity.getLatitude(), locationEntity.getLongitude()),
                locationEntity.getDescription());
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleCrudRepository.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import javax.enterprise.context.ApplicationScoped;

import io.quarkus.hibernate.orm.panache.PanacheRepository;

/**
 * Vehicle repository.
 */
@ApplicationScoped
public class VehicleCrudRepository implements PanacheRepository<VehicleEntity> {

}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleEntity.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Persistable vehicle.
 */
@Entity
public class VehicleEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;
    private String name;
    private int capacity;

    protected VehicleEntity() {
        // for JPA
    }

    public VehicleEntity(long id, String name, int capacity) {
        this.id = id;
        this.name = name;
        this.capacity = capacity;
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    @Override
    public String toString() {
        return "VehicleEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", capacity=" + capacity +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleRepositoryImpl.java
================================================
package org.optaweb.vehiclerouting.plugin.persistence;

import static java.util.stream.Collectors.toList;

import java.util.List;
import java.util.Optional;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.optaweb.vehiclerouting.domain.Vehicle;
import org.optaweb.vehiclerouting.domain.VehicleData;
import org.optaweb.vehiclerouting.domain.VehicleFactory;
import org.optaweb.vehiclerouting.service.vehicle.VehicleRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ApplicationScoped
public class VehicleRepositoryImpl implements VehicleRepository {

    private static final Logger logger = LoggerFactory.getLogger(VehicleRepositoryImpl.class);
    private final VehicleCrudRepository repository;

    @Inject
    public VehicleRepositoryImpl(VehicleCrudRepository repository) {
        this.repository = repository;
    }

    @Override
    public Vehicle createVehicle(int capacity) {
        VehicleEntity vehicleEntity = new VehicleEntity(0, null, capacity);
        repository.persist(vehicleEntity);
        vehicleEntity.setName("Vehicle " + vehicleEntity.getId());
        Vehicle vehicle = toDomain(vehicleEntity);
        logger.info("Created vehicle {}.", vehicle);
        return vehicle;
    }

    @Override
    public Vehicle createVehicle(VehicleData vehicleData) {
        VehicleEntity vehicleEntity = new VehicleEntity(0, vehicleData.name(), vehicleData.capacity());
        repository.persist(vehicleEntity);
        Vehicle vehicle = toDomain(vehicleEntity);
        logger.info("Created vehicle {}.", vehicle);
        return vehicle;
    }

    @Override
    public List<Vehicle> vehicles() {
        return repository.streamAll()
                .map(VehicleRepositoryImpl::toDomain)
                .collect(toList());
    }

    @Override
    public Vehicle removeVehicle(long id) {
        Optional<VehicleEntity> optionalVehicleEntity = repository.findByIdOptional(id);
        VehicleEntity vehicleEntity = optionalVehicleEntity.orElseThrow(
                () -> new IllegalArgumentException("Vehicle{id=" + id + "} doesn't exist"));
        repository.deleteById(id);
        Vehicle vehicle = toDomain(vehicleEntity);
        logger.info("Deleted vehicle {}.", vehicle);
        return vehicle;
    }

    @Override
    public void removeAll() {
        repository.deleteAll();
    }

    @Override
    public Optional<Vehicle> find(long vehicleId) {
        return repository.findByIdOptional(vehicleId).map(VehicleRepositoryImpl::toDomain);
    }

    @Override
    public Vehicle changeCapacity(long vehicleId, int capacity) {
        VehicleEntity vehicleEntity = repository.findByIdOptional(vehicleId).orElseThrow(() -> new IllegalArgumentException(
                "Can't change Vehicle{id=" + vehicleId + "} because it doesn't exist"));
        vehicleEntity.setCapacity(capacity);
        repository.flush();
        return VehicleFactory.createVehicle(vehicleEntity.getId(), vehicleEntity.getName(), vehicleEntity.getCapacity());
    }

    private static Vehicle toDomain(VehicleEntity vehicleEntity) {
        return VehicleFactory.createVehicle(
                vehicleEntity.getId(),
                vehicleEntity.getName(),
                vehicleEntity.getCapacity());
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/package-info.java
================================================
/**
 * Persistence infrastructure.
 */
package org.optaweb.vehiclerouting.plugin.persistence;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/Constants.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

public class Constants {

    public static final String SOLVER_CONFIG = "solverConfig.xml";

    private Constants() {
        throw new AssertionError("Constants class");
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/DistanceMapImpl.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import java.util.Objects;

import org.optaweb.vehiclerouting.plugin.planner.domain.DistanceMap;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningLocation;
import org.optaweb.vehiclerouting.service.location.DistanceMatrixRow;

/**
 * Provides distances to {@link PlanningLocation}s by reading from a {@link DistanceMatrixRow}.
 */
public class DistanceMapImpl implements DistanceMap {

    private final DistanceMatrixRow distanceMatrixRow;

    public DistanceMapImpl(DistanceMatrixRow distanceMatrixRow) {
        this.distanceMatrixRow = Objects.requireNonNull(distanceMatrixRow);
    }

    @Override
    public long distanceTo(PlanningLocation location) {
        return distanceMatrixRow.distanceTo(location.getId()).millis();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisher.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import static java.util.stream.Collectors.toList;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Event;
import javax.inject.Inject;

import org.optaweb.vehiclerouting.domain.Distance;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningDepot;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;
import org.optaweb.vehiclerouting.service.route.RouteChangedEvent;
import org.optaweb.vehiclerouting.service.route.ShallowRoute;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Converts planning solution to a {@link RouteChangedEvent} and publishes it so that it can be processed by other
 * components that listen for this type of event.
 */
@ApplicationScoped
class RouteChangedEventPublisher {

    private static final Logger logger = LoggerFactory.getLogger(RouteChangedEventPublisher.class);

    private final Event<RouteChangedEvent> eventPublisher;

    @Inject
    RouteChangedEventPublisher(Event<RouteChangedEvent> eventPublisher) {
        this.eventPublisher = eventPublisher;
    }

    /**
     * Publish solution as a {@link RouteChangedEvent}.
     *
     * @param solution solution
     */
    void publishSolution(VehicleRoutingSolution solution) {
        RouteChangedEvent event = solutionToEvent(solution, this);
        logger.info(
                "New solution with {} depots, {} vehicles, {} visits, distance: {}, score: {}",
                solution.getDepotList().size(),
                solution.getVehicleList().size(),
                solution.getVisitList().size(),
                event.distance(),
                solution.getScore());
        logger.debug("Routes: {}", event.routes());
        eventPublisher.fire(event);
    }

    /**
     * Convert a planning domain solution to an event that can be published.
     *
     * @param solution solution
     * @param source source of the event
     * @return new event describing the solution
     */
    static RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source) {
        List<ShallowRoute> routes = routes(solution);
        return new RouteChangedEvent(
                source,
                // Turn negative soft score into a positive amount of time.
                Distance.ofMillis(-solution.getScore().softScore()),
                vehicleIds(solution),
                depotId(solution),
                visitIds(solution),
                routes);
    }

    private static List<Long> visitIds(VehicleRoutingSolution solution) {
        return solution.getVisitList().stream()
                .map(visit -> visit.getLocation().getId())
                .collect(toList());
    }

    /**
     * Extract routes from the solution. Includes empty routes of vehicles that stay in the depot.
     *
     * @param solution solution
     * @return one route per vehicle
     */
    private static List<ShallowRoute> routes(VehicleRoutingSolution solution) {
        // TODO include unconnected customers in the result
        if (solution.getDepotList().isEmpty()) {
            return Collections.emptyList();
        }
        ArrayList<ShallowRoute> routes = new ArrayList<>();
        for (PlanningVehicle vehicle : solution.getVehicleList()) {
            PlanningDepot depot = vehicle.getDepot();
            if (depot == null) {
                throw new IllegalArgumentException(
                        "Vehicle (id=" + vehicle.getId() + ") is not in the depot. That's not allowed");
            }
            List<Long> visits = new ArrayList<>();
            for (PlanningVisit visit : vehicle.getFutureVisits()) {
                if (!solution.getVisitList().contains(visit)) {
                    throw new IllegalArgumentException("Visit (" + visit + ") doesn't exist");
                }
                visits.add(visit.getLocation().getId());
            }
            routes.add(new ShallowRoute(vehicle.getId(), depot.getId(), visits));
        }
        return routes;
    }

    /**
     * Get IDs of vehicles in the solution.
     *
     * @param solution the solution
     * @return vehicle IDs
     */
    private static List<Long> vehicleIds(VehicleRoutingSolution solution) {
        return solution.getVehicleList().stream()
                .map(PlanningVehicle::getId)
                .collect(toList());
    }

    /**
     * Get solution's depot ID.
     *
     * @param solution the solution in which to look for the depot
     * @return first depot ID from the solution or {@code null} if there are no depots
     */
    private static Long depotId(VehicleRoutingSolution solution) {
        return solution.getDepotList().isEmpty() ? null : solution.getDepotList().get(0).getId();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerConfig.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Produces;

import org.optaplanner.core.api.solver.Solver;
import org.optaplanner.core.api.solver.SolverFactory;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;

/**
 * Configuration bean that creates {@link RouteOptimizerImpl route optimizer}'s dependencies.
 */
@Dependent
class RouteOptimizerConfig {

    private final SolverFactory<VehicleRoutingSolution> solverFactory;

    RouteOptimizerConfig(SolverFactory<VehicleRoutingSolution> solverFactory) {
        this.solverFactory = solverFactory;
    }

    @Produces
    Solver<VehicleRoutingSolution> solver() {
        return solverFactory.buildSolver();
    }

    @Produces
    ListeningExecutorService executor() {
        ExecutorService executorService = Executors.newFixedThreadPool(1);
        return MoreExecutors.listeningDecorator(executorService);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerImpl.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import java.util.ArrayList;
import java.util.List;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.optaweb.vehiclerouting.domain.Location;
import org.optaweb.vehiclerouting.domain.Vehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningDepot;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningLocation;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningLocationFactory;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicleFactory;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisitFactory;
import org.optaweb.vehiclerouting.plugin.planner.domain.SolutionFactory;
import org.optaweb.vehiclerouting.service.location.DistanceMatrixRow;
import org.optaweb.vehiclerouting.service.location.LocationPlanner;
import org.optaweb.vehiclerouting.service.vehicle.VehiclePlanner;

/**
 * Accumulates vehicles, depots and visits until there's enough data to start the optimization.
 * Solutions are published even if solving hasn't started yet due to missing facts (e.g. no vehicles or no visits).
 * Stops solver when vehicles or visits are reduced to zero.
 */
@ApplicationScoped
class RouteOptimizerImpl implements LocationPlanner, VehiclePlanner {

    private final SolverManager solverManager;
    private final RouteChangedEventPublisher routeChangedEventPublisher;

    private final List<PlanningVehicle> vehicles = new ArrayList<>();
    private final List<PlanningVisit> visits = new ArrayList<>();
    private PlanningDepot depot;

    @Inject
    RouteOptimizerImpl(SolverManager solverManager, RouteChangedEventPublisher routeChangedEventPublisher) {
        this.solverManager = solverManager;
        this.routeChangedEventPublisher = routeChangedEventPublisher;
    }

    @Override
    public void addLocation(Location domainLocation, DistanceMatrixRow distanceMatrixRow) {
        PlanningLocation location = PlanningLocationFactory.fromDomain(
                domainLocation,
                new DistanceMapImpl(distanceMatrixRow));
        // Unfortunately can't start solver with an empty solution (see https://issues.redhat.com/browse/PLANNER-776)
        if (depot == null) {
            depot = new PlanningDepot(location);
            publishSolution();
        } else {
            PlanningVisit visit = PlanningVisitFactory.fromLocation(location);
            visits.add(visit);
            if (vehicles.isEmpty()) {
                publishSolution();
            } else if (visits.size() == 1) {
                solverManager.startSolver(SolutionFactory.solutionFromVisits(vehicles, depot, visits));
            } else {
                solverManager.addVisit(visit);
            }
        }
    }

    @Override
    public void removeLocation(Location domainLocation) {
        if (visits.isEmpty()) {
            if (depot == null) {
                throw new IllegalArgumentException(
                        "Cannot remove " + domainLocation + " because there are no locations");
            }
            if (depot.getId() != domainLocation.id()) {
                throw new IllegalArgumentException("Cannot remove " + domainLocation + " because it doesn't exist");
            }
            depot = null;
            publishSolution();
        } else {
            if (depot.getId() == domainLocation.id()) {
                throw new IllegalStateException("You can only remove depot if there are no visits");
            }
            if (!visits.removeIf(item -> item.getId() == domainLocation.id())) {
                throw new IllegalArgumentException("Cannot remove " + domainLocation + " because it doesn't exist");
            }
            if (vehicles.isEmpty()) { // solver is not running
                publishSolution();
            } else if (visits.isEmpty()) { // solver is running
                solverManager.stopSolver();
                publishSolution();
            } else {
                // TODO maybe allow removing location by ID (only require the necessary information)
                solverManager.removeVisit(
                        PlanningVisitFactory.fromLocation(PlanningLocationFactory.fromDomain(domainLocation)));
            }
        }
    }

    @Override
    public void addVehicle(Vehicle domainVehicle) {
        PlanningVehicle vehicle = PlanningVehicleFactory.fromDomain(domainVehicle);
        vehicle.setDepot(depot);
        vehicles.add(vehicle);
        if (visits.isEmpty()) {
            publishSolution();
        } else if (vehicles.size() == 1) {
            solverManager.startSolver(SolutionFactory.solutionFromVisits(vehicles, depot, visits));
        } else {
            solverManager.addVehicle(vehicle);
        }
    }

    @Override
    public void removeVehicle(Vehicle domainVehicle) {
        if (!vehicles.removeIf(vehicle -> vehicle.getId() == domainVehicle.id())) {
            throw new IllegalArgumentException("Cannot remove " + domainVehicle + " because it doesn't exist");
        }
        if (visits.isEmpty()) { // solver is not running
            publishSolution();
        } else if (vehicles.isEmpty()) { // solver is running
            solverManager.stopSolver();
            publishSolution();
        } else {
            solverManager.removeVehicle(PlanningVehicleFactory.fromDomain(domainVehicle));
        }
    }

    @Override
    public void changeCapacity(Vehicle domainVehicle) {
        PlanningVehicle vehicle = vehicles.stream()
                .filter(item -> item.getId() == domainVehicle.id())
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException(
                        "Cannot change capacity of " + domainVehicle + " because it doesn't exist"));
        vehicle.setCapacity(domainVehicle.capacity());
        if (!visits.isEmpty()) {
            solverManager.changeCapacity(vehicle);
        } else {
            publishSolution();
        }
    }

    @Override
    public void removeAllLocations() {
        solverManager.stopSolver();
        depot = null;
        visits.clear();
        publishSolution();
    }

    @Override
    public void removeAllVehicles() {
        solverManager.stopSolver();
        vehicles.clear();
        publishSolution();
    }

    private void publishSolution() {
        routeChangedEventPublisher.publishSolution(SolutionFactory.solutionFromVisits(vehicles, depot, visits));
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/SolverManager.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Default;
import javax.inject.Inject;

import org.optaplanner.core.api.solver.Solver;
import org.optaplanner.core.api.solver.event.BestSolutionChangedEvent;
import org.optaplanner.core.api.solver.event.SolverEventListener;
import org.optaweb.vehiclerouting.plugin.planner.change.AddVehicle;
import org.optaweb.vehiclerouting.plugin.planner.change.AddVisit;
import org.optaweb.vehiclerouting.plugin.planner.change.ChangeVehicleCapacity;
import org.optaweb.vehiclerouting.plugin.planner.change.RemoveVehicle;
import org.optaweb.vehiclerouting.plugin.planner.change.RemoveVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;
import org.optaweb.vehiclerouting.service.error.ErrorEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;

/**
 * Manages a solver running in a different thread.
 * <p>
 * Does following:
 * <ul>
 * <li>Starts solver by running {@link Solver#solve(Object problem)} in a thread that's not the caller's thread.</li>
 * <li>Stops the solver (synchronously).</li>
 * <li>Adds problem fact changes to the solver.</li>
 * <li>Propagates any exception that happens in {@code Solver.solver()} (in a different thread) to the thread that
 * interacts with {@code SolverManager}.</li>
 * <li>Listens for best solution changes and publishes new best solutions via {@link RouteChangedEventPublisher}.</li>
 * </ul>
 */
@ApplicationScoped
@Default
class SolverManager implements SolverEventListener<VehicleRoutingSolution> {

    private static final Logger logger = LoggerFactory.getLogger(SolverManager.class);

    private final Solver<VehicleRoutingSolution> solver;
    private final ListeningExecutorService executor;
    private final RouteChangedEventPublisher routeChangedEventPublisher;
    private final Event<ErrorEvent> errorEvent;

    private ListenableFuture<VehicleRoutingSolution> solverFuture;

    @Inject
    SolverManager(
            Solver<VehicleRoutingSolution> solver,
            ListeningExecutorService executor,
            RouteChangedEventPublisher routeChangedEventPublisher,
            Event<ErrorEvent> errorEvent) {
        this.solver = solver;
        this.executor = executor;
        this.routeChangedEventPublisher = routeChangedEventPublisher;
        this.errorEvent = errorEvent;
        this.solver.addEventListener(this);
    }

    @Override
    public void bestSolutionChanged(BestSolutionChangedEvent<VehicleRoutingSolution> bestSolutionChangedEvent) {
        // CAUTION! This runs on the solver thread. Implications:
        // 1. The method should be as quick as possible to avoid blocking solver unnecessarily.
        // 2. This place is a potential source of race conditions.
        if (!bestSolutionChangedEvent.isEveryProblemChangeProcessed()) {
            logger.info("Ignoring a new best solution that has some problem facts missing");
            return;
        }
        // TODO Race condition, if a servlet thread deletes that location in the middle of this method happening
        //      on the solver thread. Make sure that location is still in the repository.
        //      Maybe repair the solution OR ignore if it's inconsistent (log a WARNING).
        routeChangedEventPublisher.publishSolution(bestSolutionChangedEvent.getNewBestSolution()); // TODO @Async
    }

    void startSolver(VehicleRoutingSolution solution) {
        if (solverFuture != null) {
            throw new IllegalStateException("Solver start has already been requested");
        }
        solverFuture = executor.submit((SolvingTask) () -> solver.solve(solution));
        solverFuture.addListener(
                // IMPORTANT: This is happening on the solver thread.
                // TODO maybe restart or somehow recover?
                () -> {
                    if (!solver.isTerminateEarly()) {
                        // Solver in daemon mode can't return from solve() unless it has been terminated early
                        // (see #stopSolver()).
                        // So this case is only possible when an exception is thrown during solver.solve().
                        try {
                            solverFuture.get();
                            logger.error("The solver has stopped without being terminated early so at this point"
                                    + " it is expected to have crashed but there was no exception.\n"
                                    + "If you see this other than during test execution it is probably a bug.");
                            errorEvent.fire(new ErrorEvent(
                                    this,
                                    "Solver stopped without being terminated early and without throwing an exception."
                                            + " This is a bug."));
                        } catch (InterruptedException e) {
                            Thread.currentThread().interrupt();
                            throw new RuntimeException("Interrupted while retrieving the cause of solver failure", e);
                        } catch (ExecutionException e) {
                            logger.error("Solver failed", e);
                            errorEvent.fire(new ErrorEvent(this, e.toString()));
                        }
                    }
                },
                MoreExecutors.directExecutor());
    }

    void stopSolver() {
        if (solverFuture != null) {
            // TODO what happens if solver hasn't started yet (solve() is called asynchronously)
            solver.terminateEarly();
            // make sure solver has terminated and propagate exceptions
            try {
                solverFuture.get();
                solverFuture = null;
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new RuntimeException("Failed to stop solver", e);
            } catch (ExecutionException e) {
                // Skipping the wrapper ExecutionException because it only tells that the problem occurred
                // in solverFuture.get() but that's obvious.
                throw new RuntimeException("Failed to stop solver", e.getCause());
            }
        }
    }

    private void assertSolverIsAlive() {
        if (solverFuture == null) {
            throw new IllegalStateException("Solver has not started yet");
        }
        if (solverFuture.isDone()) {
            try {
                solverFuture.get();
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new RuntimeException("Solver has died", e);
            } catch (ExecutionException e) {
                // Skipping the wrapper ExecutionException because it only tells that the problem occurred
                // in solverFuture.get() but that's obvious.
                throw new RuntimeException("Solver has died", e.getCause());
            }
            throw new IllegalStateException("Solver has finished solving even though it operates in daemon mode");
        }
    }

    void addVisit(PlanningVisit visit) {
        assertSolverIsAlive();
        solver.addProblemChange(new AddVisit(visit));
    }

    void removeVisit(PlanningVisit visit) {
        assertSolverIsAlive();
        solver.addProblemChange(new RemoveVisit(visit));
    }

    void addVehicle(PlanningVehicle vehicle) {
        assertSolverIsAlive();
        solver.addProblemChange(new AddVehicle(vehicle));
    }

    void removeVehicle(PlanningVehicle vehicle) {
        assertSolverIsAlive();
        solver.addProblemChange(new RemoveVehicle(vehicle));
    }

    void changeCapacity(PlanningVehicle vehicle) {
        assertSolverIsAlive();
        solver.addProblemChange(new ChangeVehicleCapacity(vehicle));
    }

    /**
     * An alias interface that fixates the Callable's type parameter. This avoids unchecked warnings in tests.
     */
    interface SolvingTask extends Callable<VehicleRoutingSolution> {

    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/VehicleRoutingConstraintProvider.java
================================================
package org.optaweb.vehiclerouting.plugin.planner;

import static org.optaplanner.core.api.score.stream.ConstraintCollectors.sum;

import org.optaplanner.core.api.score.buildin.hardsoftlong.HardSoftLongScore;
import org.optaplanner.core.api.score.stream.Constraint;
import org.optaplanner.core.api.score.stream.ConstraintFactory;
import org.optaplanner.core.api.score.stream.ConstraintProvider;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;

public class VehicleRoutingConstraintProvider implements ConstraintProvider {

    @Override
    public Constraint[] defineConstraints(ConstraintFactory constraintFactory) {
        return new Constraint[] {
                vehicleCapacity(constraintFactory),
                distanceFromPreviousStandstill(constraintFactory),
                distanceFromLastVisitToDepot(constraintFactory)
        };
    }

    Constraint vehicleCapacity(ConstraintFactory constraintFactory) {
        return constraintFactory.forEach(PlanningVisit.class)
                .groupBy(PlanningVisit::getVehicle, sum(PlanningVisit::getDemand))
                .filter((vehicle, demand) -> demand > vehicle.getCapacity())
                .penalizeLong(HardSoftLongScore.ONE_HARD,
                        (vehicle, demand) -> demand - vehicle.getCapacity())
                .asConstraint("vehicle capacity");
    }

    Constraint distanceFromPreviousStandstill(ConstraintFactory constraintFactory) {
        return constraintFactory.forEach(PlanningVisit.class)
                .penalizeLong(HardSoftLongScore.ONE_SOFT,
                        PlanningVisit::distanceFromPreviousStandstill)
                .asConstraint("distance from previous standstill");
    }

    Constraint distanceFromLastVisitToDepot(ConstraintFactory constraintFactory) {
        return constraintFactory.forEach(PlanningVisit.class)
                .filter(PlanningVisit::isLast)
                .penalizeLong(HardSoftLongScore.ONE_SOFT,
                        PlanningVisit::distanceToDepot)
                .asConstraint("distance from last visit to depot");
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicle.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.change;

import java.util.Objects;

import org.optaplanner.core.api.solver.change.ProblemChange;
import org.optaplanner.core.api.solver.change.ProblemChangeDirector;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

public class AddVehicle implements ProblemChange<VehicleRoutingSolution> {

    private final PlanningVehicle vehicle;

    public AddVehicle(PlanningVehicle vehicle) {
        this.vehicle = Objects.requireNonNull(vehicle);
    }

    @Override
    public void doChange(VehicleRoutingSolution workingSolution, ProblemChangeDirector problemChangeDirector) {
        problemChangeDirector.addProblemFact(vehicle, workingSolution.getVehicleList()::add);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisit.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.change;

import java.util.Objects;

import org.optaplanner.core.api.solver.change.ProblemChange;
import org.optaplanner.core.api.solver.change.ProblemChangeDirector;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

public class AddVisit implements ProblemChange<VehicleRoutingSolution> {

    private final PlanningVisit visit;

    public AddVisit(PlanningVisit visit) {
        this.visit = Objects.requireNonNull(visit);
    }

    @Override
    public void doChange(VehicleRoutingSolution workingSolution, ProblemChangeDirector problemChangeDirector) {
        problemChangeDirector.addEntity(visit, workingSolution.getVisitList()::add);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/ChangeVehicleCapacity.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.change;

import java.util.Objects;

import org.optaplanner.core.api.solver.change.ProblemChange;
import org.optaplanner.core.api.solver.change.ProblemChangeDirector;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

public class ChangeVehicleCapacity implements ProblemChange<VehicleRoutingSolution> {

    private final PlanningVehicle vehicle;

    public ChangeVehicleCapacity(PlanningVehicle vehicle) {
        this.vehicle = Objects.requireNonNull(vehicle);
    }

    @Override
    public void doChange(VehicleRoutingSolution workingSolution, ProblemChangeDirector problemChangeDirector) {
        // No need to clone the workingVehicle because it is a planning entity, so it is already planning-cloned.
        // To learn more about problem fact changes, see:
        // https://www.optaplanner.org/docs/optaplanner/latest/repeated-planning/repeated-planning.html#problemChangeExample
        problemChangeDirector.changeProblemProperty(vehicle,
                workingVehicle -> workingVehicle.setCapacity(vehicle.getCapacity()));
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVehicle.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.change;

import java.util.Objects;

import org.optaplanner.core.api.solver.change.ProblemChange;
import org.optaplanner.core.api.solver.change.ProblemChangeDirector;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVehicle;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

public class RemoveVehicle implements ProblemChange<VehicleRoutingSolution> {

    private final PlanningVehicle removedVehicle;

    public RemoveVehicle(PlanningVehicle removedVehicle) {
        this.removedVehicle = Objects.requireNonNull(removedVehicle);
    }

    @Override
    public void doChange(VehicleRoutingSolution workingSolution, ProblemChangeDirector problemChangeDirector) {
        // Look up a working copy of the vehicle
        PlanningVehicle workingVehicle = problemChangeDirector.lookUpWorkingObjectOrFail(removedVehicle);

        // Un-initialize all visits of this vehicle
        for (PlanningVisit visit : workingVehicle.getFutureVisits()) {
            problemChangeDirector.changeVariable(visit, "previousStandstill",
                    planningVisit -> planningVisit.setPreviousStandstill(null));
        }

        // No need to clone the vehicleList because it is a planning entity collection, so it is already
        // planning-cloned.
        // To learn more about problem fact changes, see:
        // https://www.optaplanner.org/docs/optaplanner/latest/repeated-planning/repeated-planning.html#problemChangeExample

        // Remove the vehicle
        problemChangeDirector.removeProblemFact(workingVehicle, planningVehicle -> {
            if (!workingSolution.getVehicleList().remove(planningVehicle)) {
                throw new IllegalStateException(
                        "Working solution's vehicleList "
                                + workingSolution.getVehicleList()
                                + " doesn't contain the workingVehicle ("
                                + planningVehicle
                                + "). This is a bug!");
            }
        });
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVisit.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.change;

import java.util.Objects;

import org.optaplanner.core.api.solver.change.ProblemChange;
import org.optaplanner.core.api.solver.change.ProblemChangeDirector;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

public class RemoveVisit implements ProblemChange<VehicleRoutingSolution> {

    private final PlanningVisit planningVisit;

    public RemoveVisit(PlanningVisit planningVisit) {
        this.planningVisit = Objects.requireNonNull(planningVisit);
    }

    @Override
    public void doChange(VehicleRoutingSolution workingSolution, ProblemChangeDirector problemChangeDirector) {
        // Look up a working copy of the visit
        PlanningVisit workingVisit = problemChangeDirector.lookUpWorkingObjectOrFail(planningVisit);

        // Fix the next visit and set its previousStandstill to the removed visit's previousStandstill
        PlanningVisit nextVisit = workingVisit.getNextVisit();
        if (nextVisit != null) { // otherwise it's the last visit
            problemChangeDirector.changeVariable(nextVisit, "previousStandstill",
                    workingNextVisit -> workingNextVisit.setPreviousStandstill(workingVisit.getPreviousStandstill()));
        }

        // No need to clone the visitList because it is a planning entity collection, so it is already planning-cloned.
        // To learn more about problem fact changes, see:
        // https://www.optaplanner.org/docs/optaplanner/latest/repeated-planning/repeated-planning.html#problemChangeExample

        // Remove the visit
        problemChangeDirector.removeEntity(planningVisit, visit -> {
            if (!workingSolution.getVisitList().remove(visit)) {
                throw new IllegalStateException(
                        "Working solution's visitList "
                                + workingSolution.getVisitList()
                                + " doesn't contain the workingVisit ("
                                + visit
                                + "). This is a bug!");
            }
        });
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/package-info.java
================================================
/**
 * {@link org.optaplanner.core.api.solver.change.ProblemChange} implementations.
 * <p>
 * Problem fact changes are difficult to write correctly. To understand the code and when implementing new fact changes,
 * read <a href="https://www.optaplanner.org/docs/optaplanner/latest/repeated-planning/repeated-planning.html#problemChange">
 * ProblemChange documentation</a>.
 */
package org.optaweb.vehiclerouting.plugin.planner.change;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/DistanceMap.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

/**
 * Contains travel distances from a reference location to other locations.
 */
@FunctionalInterface
public interface DistanceMap {

    /**
     * Get distance from a reference location to the given location. The actual physical quantity (distance or time)
     * and its units depend on the configuration of the routing engine and is not important for optimization.
     *
     * @param location location the distance of which will be returned
     * @return location's distance
     */
    long distanceTo(PlanningLocation location);
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningDepot.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import java.util.Objects;

public class PlanningDepot {

    private final PlanningLocation location;

    public PlanningDepot(PlanningLocation location) {
        this.location = Objects.requireNonNull(location);
    }

    public long getId() {
        return location.getId();
    }

    public PlanningLocation getLocation() {
        return location;
    }

    @Override
    public String toString() {
        return "PlanningDepot{" +
                "location=" + location.getId() +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocation.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import java.util.Objects;

public class PlanningLocation {

    private final long id;
    // Only used to calculate angle.
    private final double latitude;
    private final double longitude;
    private final DistanceMap travelDistanceMap;

    PlanningLocation(long id, double latitude, double longitude, DistanceMap travelDistanceMap) {
        this.id = id;
        this.latitude = latitude;
        this.longitude = longitude;
        this.travelDistanceMap = Objects.requireNonNull(travelDistanceMap);
    }

    /**
     * ID of the corresponding domain location.
     *
     * @return domain location ID
     */
    public long getId() {
        return id;
    }

    /**
     * Distance to the given location.
     *
     * @param location other location
     * @return distance to the other location
     */
    public long distanceTo(PlanningLocation location) {
        if (this == location) {
            return 0L;
        }
        return travelDistanceMap.distanceTo(location);
    }

    /**
     * Angle between the given location and the direction EAST with {@code this} location being the vertex.
     *
     * @param location location that forms one side of the angle (not {@code null})
     * @return angle in radians in the range of -π to π
     */
    public double angleTo(PlanningLocation location) {
        // Euclidean distance (Pythagorean theorem) - not correct when the surface is a sphere
        double latitudeDifference = location.latitude - latitude;
        double longitudeDifference = location.longitude - longitude;
        return Math.atan2(latitudeDifference, longitudeDifference);
    }

    @Override
    public String toString() {
        return "PlanningLocation{" +
                "latitude=" + latitude +
                ",longitude=" + longitude +
                ",travelDistanceMap=" + travelDistanceMap +
                ",id=" + id +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import org.optaweb.vehiclerouting.domain.Location;

/**
 * Creates {@link PlanningLocation}s.
 */
public class PlanningLocationFactory {

    private PlanningLocationFactory() {
        throw new AssertionError("Utility class");
    }

    /**
     * Create planning location without a distance map. This location cannot be used for planning but can be used for
     * a problem fact change to remove a visit.
     *
     * @param location domain location
     * @return planning location without distance map
     */
    public static PlanningLocation fromDomain(Location location) {
        return fromDomain(location, PlanningLocationFactory::failFast);
    }

    /**
     * Create planning location from a domain location and a distance map.
     *
     * @param location domain location
     * @param distanceMap distance map of this planning location
     * @return planning location
     */
    public static PlanningLocation fromDomain(Location location, DistanceMap distanceMap) {
        return new PlanningLocation(
                location.id(),
                location.coordinates().latitude().doubleValue(),
                location.coordinates().longitude().doubleValue(),
                distanceMap);
    }

    /**
     * Create test location without distance map and coordinates. Coordinates will be initialized to zero.
     *
     * @param id location ID
     * @return planning location without distance map and coordinates
     */
    public static PlanningLocation testLocation(long id) {
        return testLocation(id, PlanningLocationFactory::failFast);
    }

    /**
     * Create test location with distance map and without coordinates. Coordinates will be initialized to zero.
     *
     * @param id location ID
     * @param distanceMap distance map
     * @return planning location with distance map and without coordinates
     */
    public static PlanningLocation testLocation(long id, DistanceMap distanceMap) {
        return new PlanningLocation(id, 0, 0, distanceMap);
    }

    private static long failFast(PlanningLocation location) {
        throw new IllegalStateException();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicle.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import java.util.Iterator;
import java.util.NoSuchElementException;

import org.optaplanner.core.api.domain.lookup.PlanningId;

public class PlanningVehicle implements Standstill {

    @PlanningId
    private long id;
    private int capacity;
    private PlanningDepot depot;

    // Shadow variables
    private PlanningVisit nextVisit;

    PlanningVehicle() {
        // Hide public constructor in favor of the factory.
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public PlanningDepot getDepot() {
        return depot;
    }

    public void setDepot(PlanningDepot depot) {
        this.depot = depot;
    }

    @Override
    public PlanningVisit getNextVisit() {
        return nextVisit;
    }

    @Override
    public void setNextVisit(PlanningVisit nextVisit) {
        this.nextVisit = nextVisit;
    }

    public Iterable<PlanningVisit> getFutureVisits() {
        return () -> new Iterator<PlanningVisit>() {
            PlanningVisit nextVisit = getNextVisit();

            @Override
            public boolean hasNext() {
                return nextVisit != null;
            }

            @Override
            public PlanningVisit next() {
                if (nextVisit == null) {
                    throw new NoSuchElementException();
                }
                PlanningVisit out = nextVisit;
                nextVisit = nextVisit.getNextVisit();
                return out;
            }
        };
    }

    @Override
    public PlanningLocation getLocation() {
        return depot.getLocation();
    }

    @Override
    public String toString() {
        return "PlanningVehicle{" +
                "capacity=" + capacity +
                (depot == null ? "" : ",depot=" + depot.getId()) +
                (nextVisit == null ? "" : ",nextVisit=" + nextVisit.getId()) +
                ",id=" + id +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import org.optaweb.vehiclerouting.domain.Vehicle;

/**
 * Creates {@link PlanningVehicle} instances.
 */
public class PlanningVehicleFactory {

    private PlanningVehicleFactory() {
        throw new AssertionError("Utility class");
    }

    /**
     * Create planning vehicle from domain vehicle.
     *
     * @param domainVehicle domain vehicle
     * @return planning vehicle
     */
    public static PlanningVehicle fromDomain(Vehicle domainVehicle) {
        return vehicle(domainVehicle.id(), domainVehicle.capacity());
    }

    /**
     * Create a testing vehicle with zero capacity.
     *
     * @param id vehicle's ID
     * @return new vehicle with zero capacity
     */
    public static PlanningVehicle testVehicle(long id) {
        return vehicle(id, 0);
    }

    /**
     * Create a testing vehicle with capacity.
     *
     * @param id vehicle's ID
     * @return new vehicle with the given capacity
     */
    public static PlanningVehicle testVehicle(long id, int capacity) {
        return vehicle(id, capacity);
    }

    private static PlanningVehicle vehicle(long id, int capacity) {
        PlanningVehicle vehicle = new PlanningVehicle();
        vehicle.setId(id);
        vehicle.setCapacity(capacity);
        return vehicle;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisit.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.lookup.PlanningId;
import org.optaplanner.core.api.domain.variable.AnchorShadowVariable;
import org.optaplanner.core.api.domain.variable.PlanningVariable;
import org.optaplanner.core.api.domain.variable.PlanningVariableGraphType;
import org.optaweb.vehiclerouting.plugin.planner.weight.DepotAngleVisitDifficultyWeightFactory;

@PlanningEntity(difficultyWeightFactoryClass = DepotAngleVisitDifficultyWeightFactory.class)
public class PlanningVisit implements Standstill {

    @PlanningId
    private long id;
    private PlanningLocation location;
    private int demand;

    // Planning variable: changes during planning, between score calculations.
    @PlanningVariable(valueRangeProviderRefs = { "vehicleRange", "visitRange" },
            graphType = PlanningVariableGraphType.CHAINED)
    private Standstill previousStandstill;

    // Shadow variables
    private PlanningVisit nextVisit;
    @AnchorShadowVariable(sourceVariableName = "previousStandstill")
    private PlanningVehicle vehicle;

    PlanningVisit() {
        // Hide public constructor in favor of the factory.
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Override
    public PlanningLocation getLocation() {
        return location;
    }

    public void setLocation(PlanningLocation location) {
        this.location = location;
    }

    public int getDemand() {
        return demand;
    }

    public void setDemand(int demand) {
        this.demand = demand;
    }

    public Standstill getPreviousStandstill() {
        return previousStandstill;
    }

    public void setPreviousStandstill(Standstill previousStandstill) {
        this.previousStandstill = previousStandstill;
    }

    @Override
    public PlanningVisit getNextVisit() {
        return nextVisit;
    }

    @Override
    public void setNextVisit(PlanningVisit nextVisit) {
        this.nextVisit = nextVisit;
    }

    public PlanningVehicle getVehicle() {
        return vehicle;
    }

    public void setVehicle(PlanningVehicle vehicle) {
        this.vehicle = vehicle;
    }

    // ************************************************************************
    // Complex methods
    // ************************************************************************

    /**
     * Distance from the previous standstill to this visit. This is used to calculate the travel cost of a chain
     * beginning with a vehicle (at a depot) and ending with the {@link #isLast() last} visit.
     * The chain ends with a visit, not a depot so the cost of returning from the last visit back to the depot
     * has to be added in a separate step using {@link #distanceToDepot()}.
     *
     * @return distance from previous standstill to this visit
     */
    public long distanceFromPreviousStandstill() {
        if (previousStandstill == null) {
            throw new IllegalStateException(
                    "This method must not be called when the previousStandstill (null) is not initialized yet.");
        }
        return previousStandstill.getLocation().distanceTo(location);
    }

    /**
     * Distance from this visit back to the depot.
     *
     * @return distance from this visit back its vehicle's depot
     */
    public long distanceToDepot() {
        return location.distanceTo(vehicle.getLocation());
    }

    /**
     * Whether this visit is the last in a chain.
     *
     * @return true, if this visit has no {@link #getNextVisit() next} visit
     */
    public boolean isLast() {
        return nextVisit == null;
    }

    @Override
    public String toString() {
        return "PlanningVisit{" +
                (location == null ? "" : "location=" + location.getId()) +
                ",demand=" + demand +
                (previousStandstill == null ? "" : ",previousStandstill='" + previousStandstill.getLocation().getId()) +
                (nextVisit == null ? "" : ",nextVisit=" + nextVisit.getId()) +
                (vehicle == null ? "" : ",vehicle=" + vehicle.getId()) +
                ",id=" + id +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisitFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

/**
 * Creates {@link PlanningVisit} instances.
 */
public class PlanningVisitFactory {

    static final int DEFAULT_VISIT_DEMAND = 1;

    private PlanningVisitFactory() {
        throw new AssertionError("Utility class");
    }

    /**
     * Create visit with {@link #DEFAULT_VISIT_DEMAND}.
     *
     * @param location visit's location
     * @return new visit with the default demand
     */
    public static PlanningVisit fromLocation(PlanningLocation location) {
        return fromLocation(location, DEFAULT_VISIT_DEMAND);
    }

    /**
     * Create visit of a location with the given demand.
     *
     * @param location visit's location
     * @param demand visit's demand
     * @return visit with demand at the given location
     */
    public static PlanningVisit fromLocation(PlanningLocation location, int demand) {
        PlanningVisit visit = new PlanningVisit();
        visit.setId(location.getId());
        visit.setLocation(location);
        visit.setDemand(demand);
        return visit;
    }

    /**
     * Create a test visit with the given ID.
     *
     * @param id ID of the visit and its location
     * @return visit with an ID only
     */
    public static PlanningVisit testVisit(long id) {
        return fromLocation(PlanningLocationFactory.testLocation(id));
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import java.util.ArrayList;
import java.util.List;

import org.optaplanner.core.api.score.buildin.hardsoftlong.HardSoftLongScore;

/**
 * Creates {@link VehicleRoutingSolution} instances.
 */
public class SolutionFactory {

    private SolutionFactory() {
        throw new AssertionError("Utility class");
    }

    /**
     * Create an empty solution. Empty solution has zero locations, depots, visits and vehicles and a zero score.
     *
     * @return empty solution
     */
    public static VehicleRoutingSolution emptySolution() {
        VehicleRoutingSolution solution = new VehicleRoutingSolution();
        solution.setVisitList(new ArrayList<>());
        solution.setDepotList(new ArrayList<>());
        solution.setVehicleList(new ArrayList<>());
        solution.setScore(HardSoftLongScore.ZERO);
        return solution;
    }

    /**
     * Create a new solution from given vehicles, depot and visits.
     * All vehicles will be placed in the depot.
     * <p>
     * The returned solution's vehicles and locations are new collections so modifying the solution
     * won't affect the collections given as arguments.
     * <p>
     * <strong><em>Elements of the argument collections are NOT cloned.</em></strong>
     *
     * @param vehicles vehicles
     * @param depot depot
     * @param visits visits
     * @return solution containing the given vehicles, depot, visits and their locations
     */
    public static VehicleRoutingSolution solutionFromVisits(
            List<PlanningVehicle> vehicles,
            PlanningDepot depot,
            List<PlanningVisit> visits) {
        VehicleRoutingSolution solution = new VehicleRoutingSolution();
        solution.setVehicleList(new ArrayList<>(vehicles));
        solution.setDepotList(new ArrayList<>(1));
        if (depot != null) {
            solution.getDepotList().add(depot);
            moveAllVehiclesToDepot(vehicles, depot);
        }
        solution.setVisitList(new ArrayList<>(visits));
        solution.setScore(HardSoftLongScore.ZERO);
        return solution;
    }

    private static void moveAllVehiclesToDepot(List<PlanningVehicle> vehicles, PlanningDepot depot) {
        vehicles.forEach(vehicle -> vehicle.setDepot(depot));
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/Standstill.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.variable.InverseRelationShadowVariable;

@PlanningEntity
public interface Standstill {

    /**
     * The standstill's location.
     *
     * @return never {@code null}
     */
    PlanningLocation getLocation();

    /**
     * The next visit after this standstill.
     *
     * @return sometimes {@code null}
     */
    @InverseRelationShadowVariable(sourceVariableName = "previousStandstill")
    PlanningVisit getNextVisit();

    void setNextVisit(PlanningVisit nextVisit);
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/VehicleRoutingSolution.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.domain;

import java.util.List;

import org.optaplanner.core.api.domain.solution.PlanningEntityCollectionProperty;
import org.optaplanner.core.api.domain.solution.PlanningScore;
import org.optaplanner.core.api.domain.solution.PlanningSolution;
import org.optaplanner.core.api.domain.solution.ProblemFactCollectionProperty;
import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider;
import org.optaplanner.core.api.score.buildin.hardsoftlong.HardSoftLongScore;

@PlanningSolution
public class VehicleRoutingSolution {

    @ProblemFactCollectionProperty
    private List<PlanningDepot> depotList;
    @PlanningEntityCollectionProperty
    @ValueRangeProvider(id = "vehicleRange")
    private List<PlanningVehicle> vehicleList;
    @PlanningEntityCollectionProperty
    @ValueRangeProvider(id = "visitRange")
    private List<PlanningVisit> visitList;
    @PlanningScore
    private HardSoftLongScore score;

    VehicleRoutingSolution() {
        // Hide public constructor in favor of the factory.
    }

    public List<PlanningDepot> getDepotList() {
        return this.depotList;
    }

    public void setDepotList(List<PlanningDepot> depotList) {
        this.depotList = depotList;
    }

    public List<PlanningVehicle> getVehicleList() {
        return this.vehicleList;
    }

    public void setVehicleList(List<PlanningVehicle> vehicleList) {
        this.vehicleList = vehicleList;
    }

    public List<PlanningVisit> getVisitList() {
        return this.visitList;
    }

    public void setVisitList(List<PlanningVisit> visitList) {
        this.visitList = visitList;
    }

    public HardSoftLongScore getScore() {
        return this.score;
    }

    public void setScore(HardSoftLongScore score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "VehicleRoutingSolution{" +
                "depotList=" + depotList +
                ", vehicleList=" + vehicleList +
                ", visitList=" + visitList +
                ", score=" + score +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/package-info.java
================================================
/**
 * Domain model adjusted for OptaPlanner.
 */
package org.optaweb.vehiclerouting.plugin.planner.domain;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/package-info.java
================================================
/**
 * Route optimization.
 */
package org.optaweb.vehiclerouting.plugin.planner;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/weight/DepotAngleVisitDifficultyWeightFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.planner.weight;

import static java.util.Comparator.comparingDouble;
import static java.util.Comparator.comparingLong;

import java.util.Comparator;
import java.util.Objects;

import org.optaplanner.core.impl.heuristic.selector.common.decorator.SelectionSorterWeightFactory;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningDepot;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningLocation;
import org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisit;
import org.optaweb.vehiclerouting.plugin.planner.domain.VehicleRoutingSolution;

/**
 * On large data sets, the constructed solution looks like pizza slices.
 * The order of the slices depends on the {@link PlanningLocation#angleTo} implementation.
 */
public class DepotAngleVisitDifficultyWeightFactory
        implements SelectionSorterWeightFactory<VehicleRoutingSolution, PlanningVisit> {

    @Override
    public DepotAngleVisitDifficultyWeight createSorterWeight(VehicleRoutingSolution solution, PlanningVisit visit) {
        PlanningDepot depot = solution.getDepotList().get(0);
        return new DepotAngleVisitDifficultyWeight(
                visit,
                // angle of the line from visit to depot relative to visit→east
                visit.getLocation().angleTo(depot.getLocation()),
                visit.getLocation().distanceTo(depot.getLocation())
                        + depot.getLocation().distanceTo(visit.getLocation()));
    }

    static class DepotAngleVisitDifficultyWeight implements Comparable<DepotAngleVisitDifficultyWeight> {

        private static final Comparator<DepotAngleVisitDifficultyWeight> COMPARATOR =
                comparingDouble((DepotAngleVisitDifficultyWeight weight) -> weight.depotAngle)
                        // Ascending (further from the depot are more difficult)
                        .thenComparingLong(weight -> weight.depotRoundTripDistance)
                        .thenComparing(weight -> weight.visit, comparingLong(PlanningVisit::getId));

        private final PlanningVisit visit;
        private final double depotAngle;
        private final long depotRoundTripDistance;

        DepotAngleVisitDifficultyWeight(PlanningVisit visit, double depotAngle, long depotRoundTripDistance) {
            this.visit = visit;
            this.depotAngle = depotAngle;
            this.depotRoundTripDistance = depotRoundTripDistance;
        }

        @Override
        public int compareTo(DepotAngleVisitDifficultyWeight other) {
            return COMPARATOR.compare(this, other);
        }

        @Override
        public boolean equals(Object o) {
            if (!(o instanceof DepotAngleVisitDifficultyWeight)) {
                return false;
            }
            return compareTo((DepotAngleVisitDifficultyWeight) o) == 0;
        }

        @Override
        public int hashCode() {
            return Objects.hash(visit, depotAngle, depotRoundTripDistance);
        }

        @Override
        public String toString() {
            return "DepotAngleVisitDifficultyWeight{" +
                    "visit=" + visit +
                    ", depotAngle=" + depotAngle +
                    ", depotRoundTripDistance=" + depotRoundTripDistance +
                    '}';
        }
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/weight/package-info.java
================================================
/**
 * Implements
 * <a href="https://docs.optaplanner.org/latest/optaplanner-docs/html_single/#planningEntityDifficulty">
 * planning entity difficulty comparison
 * </a>
 * or
 * <a href="https://docs.optaplanner.org/latest/optaplanner-docs/html_single/#planningValueStrength">
 * planning variable strength comparison
 * </a>
 * to enable advanced
 * <a href="https://docs.optaplanner.org/latest/optaplanner-docs/html_single/#constructionHeuristics">
 * Construction Heuristic
 * </a>
 * algorithms or
 * <a href="https://docs.optaplanner.org/latest/optaplanner-docs/html_single/#sortedSelection">
 * sorted selection
 * </a>.
 */
package org.optaweb.vehiclerouting.plugin.planner.weight;


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ClearResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import javax.inject.Inject;
import javax.ws.rs.POST;
import javax.ws.rs.Path;

import org.optaweb.vehiclerouting.service.location.LocationService;
import org.optaweb.vehiclerouting.service.vehicle.VehicleService;

@Path("api/clear")
public class ClearResource {

    private final LocationService locationService;
    private final VehicleService vehicleService;

    @Inject
    public ClearResource(LocationService locationService, VehicleService vehicleService) {
        this.locationService = locationService;
        this.vehicleService = vehicleService;
    }

    @POST
    public void clear() {
        // TODO do this in one step (=> new RoutingPlanService)
        vehicleService.removeAll();
        locationService.removeAll();
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DataSetDownloadResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.optaweb.vehiclerouting.service.demo.DemoService;

/**
 * Serves the current data set as a downloadable YAML file.
 */
@Path("api/dataset/export")
@Produces("text/x-yaml")
public class DataSetDownloadResource {

    private final DemoService demoService;

    DataSetDownloadResource(DemoService demoService) {
        this.demoService = demoService;
    }

    @GET
    public Response exportDataSet() throws IOException {
        String dataSet = demoService.exportDataSet();
        byte[] dataSetBytes = dataSet.getBytes(StandardCharsets.UTF_8);
        try (InputStream is = new ByteArrayInputStream(dataSetBytes)) {
            return Response.ok()
                    .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"vrp_data_set.yaml\"")
                    .header(HttpHeaders.CONTENT_LENGTH, dataSetBytes.length)
                    .type(new MediaType("text", "x-yaml", StandardCharsets.UTF_8.name()))
                    .entity(is)
                    .build();
        }
    }

    // TODO exception handler
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DemoResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import javax.inject.Inject;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import org.optaweb.vehiclerouting.service.demo.DemoService;

@Path("api/demo/{name}")
public class DemoResource {

    private final DemoService demoService;

    @Inject
    public DemoResource(DemoService demoService) {
        this.demoService = demoService;
    }

    /**
     * Load a demo data set.
     *
     * @param name data set name
     */
    @POST
    public void loadDemo(@PathParam("name") String name) {
        demoService.loadDemo(name);
    }

}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/LocationResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import org.optaweb.vehiclerouting.domain.Coordinates;
import org.optaweb.vehiclerouting.plugin.rest.model.PortableLocation;
import org.optaweb.vehiclerouting.service.location.LocationService;

@Path("api/location")
public class LocationResource {

    private final LocationService locationService;

    @Inject
    public LocationResource(LocationService locationService) {
        this.locationService = locationService;
    }

    /**
     * Create new location.
     *
     * @param request new location description
     */
    @Transactional
    @POST
    public void addLocation(PortableLocation request) {
        locationService.createLocation(
                new Coordinates(request.getLatitude(), request.getLongitude()),
                request.getDescription());
    }

    /**
     * Delete location.
     *
     * @param id ID of the location to be deleted
     */
    @Transactional
    @DELETE
    @Path("{id}")
    public void deleteLocation(@PathParam("id") long id) {
        locationService.removeLocation(id);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/RouteEventResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.sse.OutboundSseEvent;
import javax.ws.rs.sse.Sse;
import javax.ws.rs.sse.SseBroadcaster;
import javax.ws.rs.sse.SseEventSink;

import org.optaweb.vehiclerouting.domain.RoutingPlan;
import org.optaweb.vehiclerouting.plugin.rest.model.PortableErrorMessage;
import org.optaweb.vehiclerouting.plugin.rest.model.PortableRoutingPlanFactory;
import org.optaweb.vehiclerouting.service.error.ErrorMessage;
import org.optaweb.vehiclerouting.service.route.RouteListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ApplicationScoped
@Path("api/events")
public class RouteEventResource {

    private static final Logger logger = LoggerFactory.getLogger(RouteEventResource.class);

    // TODO repository, not listener (service)
    private final RouteListener routeListener;

    private SseBroadcaster sseBroadcaster;
    private OutboundSseEvent.Builder eventBuilder;

    @Inject
    public RouteEventResource(RouteListener routeListener) {
        this.routeListener = routeListener;
    }

    // Handy during development.
    @PreDestroy
    public void closeBroadcaster() {
        if (sseBroadcaster != null) {
            logger.debug("Closing Server-Sent Events broadcaster.");
            sseBroadcaster.close();
        }
    }

    public void observeRoute(@Observes RoutingPlan event) {
        if (sseBroadcaster != null) {
            sseBroadcaster.broadcast(eventBuilder
                    .data(PortableRoutingPlanFactory.fromRoutingPlan(event))
                    .name("route")
                    .comment("route update")
                    .build());
        }
    }

    public void observeError(@Observes ErrorMessage event) {
        if (sseBroadcaster != null) {
            sseBroadcaster.broadcast(eventBuilder
                    .data(PortableErrorMessage.fromMessage(event))
                    .name("errorMessage")
                    .comment("error message")
                    .build());
        }
    }

    @GET
    @Produces(MediaType.SERVER_SENT_EVENTS)
    public void sse(@Context Sse sse, @Context SseEventSink eventSink) {
        if (sseBroadcaster == null) {
            sseBroadcaster = sse.newBroadcaster();
            eventBuilder = sse.newEventBuilder()
                    .mediaType(MediaType.APPLICATION_JSON_TYPE)
                    .reconnectDelay(3000);
        }
        OutboundSseEvent sseEvent = eventBuilder
                .data(PortableRoutingPlanFactory.fromRoutingPlan(routeListener.getBestRoutingPlan()))
                .comment("best route")
                .build();
        eventSink.send(sseEvent);
        sseBroadcaster.register(eventSink);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ServerInfoResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import static java.util.stream.Collectors.toList;

import java.util.Arrays;
import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.optaweb.vehiclerouting.plugin.rest.model.PortableCoordinates;
import org.optaweb.vehiclerouting.plugin.rest.model.RoutingProblemInfo;
import org.optaweb.vehiclerouting.plugin.rest.model.ServerInfo;
import org.optaweb.vehiclerouting.service.demo.DemoService;
import org.optaweb.vehiclerouting.service.region.BoundingBox;
import org.optaweb.vehiclerouting.service.region.RegionService;

@Path("api/serverInfo")
public class ServerInfoResource {

    private final DemoService demoService;
    private final RegionService regionService;

    @Inject
    public ServerInfoResource(DemoService demoService, RegionService regionService) {
        this.demoService = demoService;
        this.regionService = regionService;
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public ServerInfo serverInfo() {
        BoundingBox boundingBox = regionService.boundingBox();
        List<PortableCoordinates> portableBoundingBox = Arrays.asList(
                PortableCoordinates.fromCoordinates(boundingBox.getSouthWest()),
                PortableCoordinates.fromCoordinates(boundingBox.getNorthEast()));
        List<RoutingProblemInfo> demos = demoService.demos().stream()
                .map(routingProblem -> new RoutingProblemInfo(
                        routingProblem.name(),
                        routingProblem.visits().size()))
                .collect(toList());
        return new ServerInfo(portableBoundingBox, regionService.countryCodes(), demos);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/VehicleResource.java
================================================
package org.optaweb.vehiclerouting.plugin.rest;

import javax.inject.Inject;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import org.optaweb.vehiclerouting.service.vehicle.VehicleService;

@Path("api/vehicle")
public class VehicleResource {

    private final VehicleService vehicleService;

    @Inject
    public VehicleResource(VehicleService vehicleService) {
        this.vehicleService = vehicleService;
    }

    @POST
    public void addVehicle() {
        vehicleService.createVehicle();
    }

    /**
     * Delete vehicle.
     *
     * @param id ID of the vehicle to be deleted
     */
    @DELETE
    @Path("{id}")
    public void removeVehicle(@PathParam("id") long id) {
        vehicleService.removeVehicle(id);
    }

    @POST
    @Path("deleteAny")
    public void removeAnyVehicle() {
        vehicleService.removeAnyVehicle();
    }

    @POST
    @Path("{id}/capacity")
    public void changeCapacity(@PathParam("id") long id, int capacity) {
        vehicleService.changeCapacity(id, capacity);
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableCoordinates.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Objects;

import org.optaweb.vehiclerouting.domain.Coordinates;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * {@link Coordinates} representation optimized for network transport.
 */
public class PortableCoordinates {

    /*
     * Five decimal places gives "metric" precision (±55 cm on equator). That's enough for visualising the track.
     * https://wiki.openstreetmap.org/wiki/Node#Structure
     */
    private static final int LATLNG_SCALE = 5;

    @JsonProperty(value = "lat")
    private final BigDecimal latitude;
    @JsonProperty(value = "lng")
    private final BigDecimal longitude;

    public static PortableCoordinates fromCoordinates(Coordinates coordinates) {
        Objects.requireNonNull(coordinates, "coordinates must not be null");
        return new PortableCoordinates(
                coordinates.latitude(),
                coordinates.longitude());
    }

    private static BigDecimal scale(BigDecimal number) {
        return number.setScale(Math.min(number.scale(), LATLNG_SCALE), RoundingMode.HALF_EVEN).stripTrailingZeros();
    }

    PortableCoordinates(BigDecimal latitude, BigDecimal longitude) {
        this.latitude = scale(latitude);
        this.longitude = scale(longitude);
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PortableCoordinates that = (PortableCoordinates) o;
        return Objects.equals(latitude, that.latitude) &&
                Objects.equals(longitude, that.longitude);
    }

    @Override
    public int hashCode() {
        return Objects.hash(latitude, longitude);
    }

    @Override
    public String toString() {
        return "PortableCoordinates{" +
                "latitude=" + latitude +
                ", longitude=" + longitude +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableDistance.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.Objects;

import org.optaweb.vehiclerouting.domain.Distance;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Portable representation of a {@link Distance distance}.
 */
public class PortableDistance {

    @JsonValue
    private final String distance;

    static PortableDistance fromDistance(Distance distance) {
        long seconds = (Objects.requireNonNull(distance).millis() + 500) / 1000;
        return new PortableDistance(String.format("%dh %dm %ds", seconds / 3600, seconds / 60 % 60, seconds % 60));
    }

    private PortableDistance(String distance) {
        this.distance = distance;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PortableDistance that = (PortableDistance) o;
        return distance.equals(that.distance);
    }

    @Override
    public int hashCode() {
        return Objects.hash(distance);
    }

    @Override
    public String toString() {
        return "PortableDistance{" +
                "distance='" + distance + '\'' +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableErrorMessage.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.Objects;

import org.optaweb.vehiclerouting.service.error.ErrorMessage;

/**
 * Portable error message.
 */
public class PortableErrorMessage {

    private final String id;
    private final String text;

    public static PortableErrorMessage fromMessage(ErrorMessage message) {
        return new PortableErrorMessage(message.id, message.text);
    }

    PortableErrorMessage(String id, String text) {
        this.id = id;
        this.text = text;
    }

    public String getId() {
        return id;
    }

    public String getText() {
        return text;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PortableErrorMessage that = (PortableErrorMessage) o;
        return id.equals(that.id) &&
                text.equals(that.text);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, text);
    }

    @Override
    public String toString() {
        return "PortableErrorMessage{" +
                "id='" + id + '\'' +
                ", text='" + text + '\'' +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableLocation.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.math.BigDecimal;
import java.util.Objects;

import org.optaweb.vehiclerouting.domain.Location;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * {@link Location} representation convenient for marshalling.
 */
public class PortableLocation {

    private final long id;

    @JsonProperty(value = "lat", required = true)
    private final BigDecimal latitude;
    @JsonProperty(value = "lng", required = true)
    private final BigDecimal longitude;

    private final String description;

    static PortableLocation fromLocation(Location location) {
        Objects.requireNonNull(location, "location must not be null");
        return new PortableLocation(
                location.id(),
                location.coordinates().latitude(),
                location.coordinates().longitude(),
                location.description());
    }

    @JsonCreator
    public PortableLocation(
            @JsonProperty(value = "id") long id,
            @JsonProperty(value = "lat") BigDecimal latitude,
            @JsonProperty(value = "lng") BigDecimal longitude,
            @JsonProperty(value = "description") String description) {
        this.id = id;
        this.latitude = Objects.requireNonNull(latitude);
        this.longitude = Objects.requireNonNull(longitude);
        this.description = Objects.requireNonNull(description);
    }

    public long getId() {
        return id;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PortableLocation that = (PortableLocation) o;
        return id == that.id &&
                description.equals(that.description) &&
                latitude.compareTo(that.latitude) == 0 &&
                longitude.compareTo(that.longitude) == 0;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, description, latitude, longitude);
    }

    @Override
    public String toString() {
        return "PortableLocation{" +
                "id=" + id +
                ", description='" + description + '\'' +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoute.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.List;
import java.util.Objects;

import org.optaweb.vehiclerouting.domain.Route;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Vehicle {@link Route route} representation convenient for marshalling.
 */
class PortableRoute {

    private final PortableVehicle vehicle;
    private final PortableLocation depot;
    private final List<PortableLocation> visits;
    @JsonFormat(shape = JsonFormat.Shape.ARRAY)
    private final List<List<PortableCoordinates>> track;

    PortableRoute(
            PortableVehicle vehicle,
            PortableLocation depot,
            List<PortableLocation> visits,
            List<List<PortableCoordinates>> track) {
        this.vehicle = Objects.requireNonNull(vehicle);
        this.depot = Objects.requireNonNull(depot);
        this.visits = Objects.requireNonNull(visits);
        this.track = Objects.requireNonNull(track);
    }

    public PortableVehicle getVehicle() {
        return vehicle;
    }

    public PortableLocation getDepot() {
        return depot;
    }

    public List<PortableLocation> getVisits() {
        return visits;
    }

    public List<List<PortableCoordinates>> getTrack() {
        return track;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlan.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.List;

import org.optaweb.vehiclerouting.domain.RoutingPlan;

/**
 * {@link RoutingPlan} representation convenient for marshalling.
 */
public class PortableRoutingPlan {

    private final PortableDistance distance;
    private final List<PortableVehicle> vehicles;
    private final PortableLocation depot;
    private final List<PortableLocation> visits;
    private final List<PortableRoute> routes;

    PortableRoutingPlan(
            PortableDistance distance,
            List<PortableVehicle> vehicles,
            PortableLocation depot,
            List<PortableLocation> visits,
            List<PortableRoute> routes) {
        // TODO require non-null
        this.distance = distance;
        this.vehicles = vehicles;
        this.depot = depot;
        this.visits = visits;
        this.routes = routes;
    }

    public PortableDistance getDistance() {
        return distance;
    }

    public List<PortableVehicle> getVehicles() {
        return vehicles;
    }

    public PortableLocation getDepot() {
        return depot;
    }

    public List<PortableLocation> getVisits() {
        return visits;
    }

    public List<PortableRoute> getRoutes() {
        return routes;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlanFactory.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import static java.util.stream.Collectors.toList;

import java.util.ArrayList;
import java.util.List;

import org.optaweb.vehiclerouting.domain.Coordinates;
import org.optaweb.vehiclerouting.domain.Location;
import org.optaweb.vehiclerouting.domain.RoutingPlan;
import org.optaweb.vehiclerouting.domain.Vehicle;

/**
 * Creates instances of {@link PortableRoutingPlan}.
 */
public class PortableRoutingPlanFactory {

    private PortableRoutingPlanFactory() {
        throw new AssertionError("Utility class");
    }

    public static PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan) {
        PortableDistance distance = PortableDistance.fromDistance(routingPlan.distance());
        List<PortableVehicle> vehicles = portableVehicles(routingPlan.vehicles());
        PortableLocation depot = routingPlan.depot().map(PortableLocation::fromLocation).orElse(null);
        List<PortableLocation> visits = portableVisits(routingPlan.visits());
        List<PortableRoute> routes = routingPlan.routes().stream()
                .map(routeWithTrack -> new PortableRoute(
                        PortableVehicle.fromVehicle(routeWithTrack.vehicle()),
                        depot,
                        portableVisits(routeWithTrack.visits()),
                        portableTrack(routeWithTrack.track())))
                .collect(toList());
        return new PortableRoutingPlan(distance, vehicles, depot, visits, routes);
    }

    private static List<List<PortableCoordinates>> portableTrack(List<List<Coordinates>> track) {
        ArrayList<List<PortableCoordinates>> portableTrack = new ArrayList<>();
        for (List<Coordinates> segment : track) {
            List<PortableCoordinates> portableSegment = segment.stream()
                    .map(PortableCoordinates::fromCoordinates)
                    .collect(toList());
            portableTrack.add(portableSegment);
        }
        return portableTrack;
    }

    private static List<PortableLocation> portableVisits(List<Location> visits) {
        return visits.stream()
                .map(PortableLocation::fromLocation)
                .collect(toList());
    }

    private static List<PortableVehicle> portableVehicles(List<Vehicle> vehicles) {
        return vehicles.stream()
                .map(PortableVehicle::fromVehicle)
                .collect(toList());
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableVehicle.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.Objects;

import org.optaweb.vehiclerouting.domain.Vehicle;

/**
 * {@link Vehicle} representation suitable for network transport.
 */
public class PortableVehicle {

    private final long id;
    private final String name;
    private final int capacity;

    static PortableVehicle fromVehicle(Vehicle vehicle) {
        Objects.requireNonNull(vehicle, "vehicle must not be null");
        return new PortableVehicle(vehicle.id(), vehicle.name(), vehicle.capacity());
    }

    PortableVehicle(long id, String name, int capacity) {
        this.id = id;
        this.name = Objects.requireNonNull(name);
        this.capacity = capacity;
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getCapacity() {
        return capacity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PortableVehicle vehicle = (PortableVehicle) o;
        return id == vehicle.id &&
                capacity == vehicle.capacity &&
                name.equals(vehicle.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, capacity);
    }

    @Override
    public String toString() {
        return "PortableVehicle{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", capacity=" + capacity +
                '}';
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/RoutingProblemInfo.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.Objects;

import org.optaweb.vehiclerouting.domain.RoutingProblem;

/**
 * Information about a {@link RoutingProblem routing problem instance}.
 */
public class RoutingProblemInfo {

    private final String name;
    private final int visits;

    public RoutingProblemInfo(String name, int visits) {
        this.name = Objects.requireNonNull(name);
        this.visits = visits;
    }

    /**
     * Routing problem instance name.
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * Number of visits in the routing problem instance.
     *
     * @return number of visits
     */
    public int getVisits() {
        return visits;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/ServerInfo.java
================================================
package org.optaweb.vehiclerouting.plugin.rest.model;

import java.util.List;

/**
 * Server info suitable for network transport.
 */
public class ServerInfo {

    private final List<PortableCoordinates> boundingBox;
    private final List<String> countryCodes;
    private final List<RoutingProblemInfo> demos;

    public ServerInfo(List<PortableCoordinates> boundingBox, List<String> countryCodes, List<RoutingProblemInfo> demos) {
        this.boundingBox = boundingBox;
        this.countryCodes = countryCodes;
        this.demos = demos;
    }

    public List<PortableCoordinates> getBoundingBox() {
        return boundingBox;
    }

    public List<String> getCountryCodes() {
        return countryCodes;
    }

    public List<RoutingProblemInfo> getDemos() {
        return demos;
    }
}


================================================
FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouter.java
================================================
package org.optaweb.vehiclerouting.plugin.routing;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;

import javax.enterprise.context.ApplicationScoped;

import org.optaweb.vehiclerouting.domain.Coordinates;
import org.optaweb.vehiclerouting.service.distance.DistanceCalculator;
import org.optaweb.vehiclerouting.service.region.BoundingBox;
import org.optaweb.vehiclerouting.service.region.Region;
import org.optaweb.vehiclerouting.service.route.Router;

import io.quarkus.arc.properties.IfBuildProperty;

@ApplicationScoped
@IfBuildProperty(name = "app.routing.engine", stringValue = "AIR")
public class AirDistanceRouter implements Router, DistanceCalculator, Region {

    protected static final int TRAVEL_SPEED_KPH = 60;
    // Approximate Metric Equivalents for Degrees. At the equator for longitude and for latitude anywhere,
    // the following approximations are valid: 1° = 111 km (or 60 nautical miles) 0.1° = 11.1 km.
    protected static final double KILOMETERS_PER_DEGREE = 111;
    protected static final long MILLIS_IN_ONE_HOUR = TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS);

    @Override
    public long travelTimeMillis(Coordinates fro
Download .txt
gitextract__s5biv9q/

├── .gitattributes
├── .github/
│   └── dependabot.yml
├── .gitignore
├── .mvn/
│   ├── extensions.xml
│   └── wrapper/
│       ├── MavenWrapperDownloader.java
│       ├── maven-wrapper.jar
│       └── maven-wrapper.properties
├── CONTRIBUTING.adoc
├── CREDITS.adoc
├── LICENSE.txt
├── README.adoc
├── mvnw
├── mvnw.cmd
├── optaweb-vehicle-routing-backend/
│   ├── .dockerignore
│   ├── .env-example
│   ├── .gitignore
│   ├── Dockerfile
│   ├── README.adoc
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── docker/
│       │   │   ├── Dockerfile.jvm
│       │   │   ├── Dockerfile.legacy-jar
│       │   │   ├── Dockerfile.native
│       │   │   └── Dockerfile.native-micro
│       │   ├── java/
│       │   │   └── org/
│       │   │       └── optaweb/
│       │   │           └── vehiclerouting/
│       │   │               ├── Profiles.java
│       │   │               ├── domain/
│       │   │               │   ├── Coordinates.java
│       │   │               │   ├── CountryCodeValidator.java
│       │   │               │   ├── Distance.java
│       │   │               │   ├── Location.java
│       │   │               │   ├── LocationData.java
│       │   │               │   ├── Route.java
│       │   │               │   ├── RouteWithTrack.java
│       │   │               │   ├── RoutingPlan.java
│       │   │               │   ├── RoutingProblem.java
│       │   │               │   ├── Vehicle.java
│       │   │               │   ├── VehicleData.java
│       │   │               │   ├── VehicleFactory.java
│       │   │               │   └── package-info.java
│       │   │               ├── plugin/
│       │   │               │   ├── persistence/
│       │   │               │   │   ├── DistanceCrudRepository.java
│       │   │               │   │   ├── DistanceEntity.java
│       │   │               │   │   ├── DistanceKey.java
│       │   │               │   │   ├── DistanceRepositoryImpl.java
│       │   │               │   │   ├── LocationCrudRepository.java
│       │   │               │   │   ├── LocationEntity.java
│       │   │               │   │   ├── LocationRepositoryImpl.java
│       │   │               │   │   ├── VehicleCrudRepository.java
│       │   │               │   │   ├── VehicleEntity.java
│       │   │               │   │   ├── VehicleRepositoryImpl.java
│       │   │               │   │   └── package-info.java
│       │   │               │   ├── planner/
│       │   │               │   │   ├── Constants.java
│       │   │               │   │   ├── DistanceMapImpl.java
│       │   │               │   │   ├── RouteChangedEventPublisher.java
│       │   │               │   │   ├── RouteOptimizerConfig.java
│       │   │               │   │   ├── RouteOptimizerImpl.java
│       │   │               │   │   ├── SolverManager.java
│       │   │               │   │   ├── VehicleRoutingConstraintProvider.java
│       │   │               │   │   ├── change/
│       │   │               │   │   │   ├── AddVehicle.java
│       │   │               │   │   │   ├── AddVisit.java
│       │   │               │   │   │   ├── ChangeVehicleCapacity.java
│       │   │               │   │   │   ├── RemoveVehicle.java
│       │   │               │   │   │   ├── RemoveVisit.java
│       │   │               │   │   │   └── package-info.java
│       │   │               │   │   ├── domain/
│       │   │               │   │   │   ├── DistanceMap.java
│       │   │               │   │   │   ├── PlanningDepot.java
│       │   │               │   │   │   ├── PlanningLocation.java
│       │   │               │   │   │   ├── PlanningLocationFactory.java
│       │   │               │   │   │   ├── PlanningVehicle.java
│       │   │               │   │   │   ├── PlanningVehicleFactory.java
│       │   │               │   │   │   ├── PlanningVisit.java
│       │   │               │   │   │   ├── PlanningVisitFactory.java
│       │   │               │   │   │   ├── SolutionFactory.java
│       │   │               │   │   │   ├── Standstill.java
│       │   │               │   │   │   ├── VehicleRoutingSolution.java
│       │   │               │   │   │   └── package-info.java
│       │   │               │   │   ├── package-info.java
│       │   │               │   │   └── weight/
│       │   │               │   │       ├── DepotAngleVisitDifficultyWeightFactory.java
│       │   │               │   │       └── package-info.java
│       │   │               │   ├── rest/
│       │   │               │   │   ├── ClearResource.java
│       │   │               │   │   ├── DataSetDownloadResource.java
│       │   │               │   │   ├── DemoResource.java
│       │   │               │   │   ├── LocationResource.java
│       │   │               │   │   ├── RouteEventResource.java
│       │   │               │   │   ├── ServerInfoResource.java
│       │   │               │   │   ├── VehicleResource.java
│       │   │               │   │   └── model/
│       │   │               │   │       ├── PortableCoordinates.java
│       │   │               │   │       ├── PortableDistance.java
│       │   │               │   │       ├── PortableErrorMessage.java
│       │   │               │   │       ├── PortableLocation.java
│       │   │               │   │       ├── PortableRoute.java
│       │   │               │   │       ├── PortableRoutingPlan.java
│       │   │               │   │       ├── PortableRoutingPlanFactory.java
│       │   │               │   │       ├── PortableVehicle.java
│       │   │               │   │       ├── RoutingProblemInfo.java
│       │   │               │   │       └── ServerInfo.java
│       │   │               │   └── routing/
│       │   │               │       ├── AirDistanceRouter.java
│       │   │               │       ├── Constants.java
│       │   │               │       ├── GraphHopperRouter.java
│       │   │               │       ├── RoutingConfig.java
│       │   │               │       ├── RoutingEngineException.java
│       │   │               │       ├── RoutingProperties.java
│       │   │               │       └── package-info.java
│       │   │               └── service/
│       │   │                   ├── demo/
│       │   │                   │   ├── DemoProperties.java
│       │   │                   │   ├── DemoService.java
│       │   │                   │   ├── RoutingProblemConfig.java
│       │   │                   │   ├── RoutingProblemList.java
│       │   │                   │   ├── dataset/
│       │   │                   │   │   ├── DataSet.java
│       │   │                   │   │   ├── DataSetLocation.java
│       │   │                   │   │   ├── DataSetMarshaller.java
│       │   │                   │   │   ├── DataSetVehicle.java
│       │   │                   │   │   └── package-info.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── distance/
│       │   │                   │   ├── DistanceCalculator.java
│       │   │                   │   ├── DistanceMatrixImpl.java
│       │   │                   │   ├── DistanceRepository.java
│       │   │                   │   ├── RoutingException.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── error/
│       │   │                   │   ├── ErrorEvent.java
│       │   │                   │   ├── ErrorListener.java
│       │   │                   │   ├── ErrorMessage.java
│       │   │                   │   ├── ErrorMessageConsumer.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── location/
│       │   │                   │   ├── DistanceMatrix.java
│       │   │                   │   ├── DistanceMatrixRow.java
│       │   │                   │   ├── LocationPlanner.java
│       │   │                   │   ├── LocationRepository.java
│       │   │                   │   ├── LocationService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── region/
│       │   │                   │   ├── BoundingBox.java
│       │   │                   │   ├── Region.java
│       │   │                   │   ├── RegionProperties.java
│       │   │                   │   ├── RegionService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── reload/
│       │   │                   │   ├── ReloadService.java
│       │   │                   │   └── package-info.java
│       │   │                   ├── route/
│       │   │                   │   ├── RouteChangedEvent.java
│       │   │                   │   ├── RouteListener.java
│       │   │                   │   ├── Router.java
│       │   │                   │   ├── ShallowRoute.java
│       │   │                   │   └── package-info.java
│       │   │                   └── vehicle/
│       │   │                       ├── VehiclePlanner.java
│       │   │                       ├── VehicleRepository.java
│       │   │                       ├── VehicleService.java
│       │   │                       └── package-info.java
│       │   └── resources/
│       │       ├── .gitignore
│       │       ├── application.properties
│       │       ├── org/
│       │       │   └── optaweb/
│       │       │       └── vehiclerouting/
│       │       │           └── service/
│       │       │               └── demo/
│       │       │                   └── belgium-cities.yaml
│       │       └── solverConfig.xml
│       └── test/
│           ├── java/
│           │   └── org/
│           │       └── optaweb/
│           │           └── vehiclerouting/
│           │               ├── TestConfig.java
│           │               ├── domain/
│           │               │   ├── CoordinatesTest.java
│           │               │   ├── CountryCodeValidatorTest.java
│           │               │   ├── DistanceTest.java
│           │               │   ├── LocationDataTest.java
│           │               │   ├── LocationTest.java
│           │               │   ├── RouteTest.java
│           │               │   ├── RouteWithTrackTest.java
│           │               │   ├── RoutingPlanTest.java
│           │               │   ├── VehicleDataTest.java
│           │               │   ├── VehicleFactoryTest.java
│           │               │   └── VehicleTest.java
│           │               ├── plugin/
│           │               │   ├── persistence/
│           │               │   │   ├── DistanceEntityTest.java
│           │               │   │   ├── DistanceRepositoryImplTest.java
│           │               │   │   ├── DistanceRepositoryIntegrationTest.java
│           │               │   │   ├── LocationEntityTest.java
│           │               │   │   ├── LocationRepositoryImplTest.java
│           │               │   │   ├── LocationRepositoryIntegrationTest.java
│           │               │   │   ├── VehicleEntityTest.java
│           │               │   │   └── VehicleRepositoryImplTest.java
│           │               │   ├── planner/
│           │               │   │   ├── DistanceMapImplTest.java
│           │               │   │   ├── MockSolver.java
│           │               │   │   ├── RouteChangedEventPublisherTest.java
│           │               │   │   ├── RouteOptimizerImplTest.java
│           │               │   │   ├── SolverExceptionTest.java
│           │               │   │   ├── SolverIntegrationTest.java
│           │               │   │   ├── SolverManagerIntegrationTest.java
│           │               │   │   ├── SolverManagerTest.java
│           │               │   │   ├── SolverTestProfile.java
│           │               │   │   ├── VehicleRoutingConstraintProviderTest.java
│           │               │   │   ├── change/
│           │               │   │   │   ├── AddVehicleTest.java
│           │               │   │   │   ├── AddVisitTest.java
│           │               │   │   │   ├── ChangeVehicleCapacityTest.java
│           │               │   │   │   ├── RemoveVehicleTest.java
│           │               │   │   │   └── RemoveVisitTest.java
│           │               │   │   ├── domain/
│           │               │   │   │   ├── PlanningLocationFactoryTest.java
│           │               │   │   │   ├── PlanningLocationTest.java
│           │               │   │   │   ├── PlanningVehicleFactoryTest.java
│           │               │   │   │   ├── PlanningVehicleTest.java
│           │               │   │   │   ├── PlanningVisitFactoryTest.java
│           │               │   │   │   └── SolutionFactoryTest.java
│           │               │   │   └── weight/
│           │               │   │       └── DepotAngleVisitDifficultyWeightFactoryTest.java
│           │               │   ├── rest/
│           │               │   │   ├── ClearResourceTest.java
│           │               │   │   ├── DataSetDownloadResourceTest.java
│           │               │   │   ├── DemoResourceTest.java
│           │               │   │   ├── LocationResourceTest.java
│           │               │   │   ├── ServerInfoResourceTest.java
│           │               │   │   ├── VehicleResourceTest.java
│           │               │   │   └── model/
│           │               │   │       ├── PortableCoordinatesTest.java
│           │               │   │       ├── PortableDistanceTest.java
│           │               │   │       ├── PortableErrorMessageTest.java
│           │               │   │       ├── PortableLocationTest.java
│           │               │   │       ├── PortableRouteTest.java
│           │               │   │       ├── PortableRoutingPlanFactoryTest.java
│           │               │   │       └── PortableVehicleTest.java
│           │               │   └── routing/
│           │               │       ├── AirDistanceRouterTest.java
│           │               │       ├── GraphHopperIntegrationTest.java
│           │               │       ├── GraphHopperRouterTest.java
│           │               │       └── RoutingConfigTest.java
│           │               ├── service/
│           │               │   ├── demo/
│           │               │   │   ├── DemoServiceTest.java
│           │               │   │   ├── RoutingProblemListTest.java
│           │               │   │   └── dataset/
│           │               │   │       └── DataSetMarshallerTest.java
│           │               │   ├── distance/
│           │               │   │   └── DistanceMatrixImplTest.java
│           │               │   ├── error/
│           │               │   │   └── ErrorListenerTest.java
│           │               │   ├── location/
│           │               │   │   ├── LocationServiceIntegrationTest.java
│           │               │   │   └── LocationServiceTest.java
│           │               │   ├── region/
│           │               │   │   ├── BoundingBoxTest.java
│           │               │   │   ├── RegionPropertiesTest.java
│           │               │   │   └── RegionServiceTest.java
│           │               │   ├── reload/
│           │               │   │   └── ReloadServiceTest.java
│           │               │   ├── route/
│           │               │   │   ├── RouteListenerTest.java
│           │               │   │   └── ShallowRouteTest.java
│           │               │   └── vehicle/
│           │               │       ├── VehicleServiceIntegrationTest.java
│           │               │       └── VehicleServiceTest.java
│           │               └── util/
│           │                   ├── jackson/
│           │                   │   ├── JacksonAssertions.java
│           │                   │   ├── JsonAssert.java
│           │                   │   └── ObjectAssert.java
│           │                   └── junit/
│           │                       ├── FileContent.java
│           │                       └── FileContentExtension.java
│           └── resources/
│               ├── mockito-extensions/
│               │   ├── README.adoc
│               │   └── org.mockito.plugins.MockMaker
│               └── org/
│                   └── optaweb/
│                       └── vehiclerouting/
│                           ├── plugin/
│                           │   ├── rest/
│                           │   │   └── model/
│                           │   │       ├── portable-error-message.json
│                           │   │       ├── portable-location.json
│                           │   │       └── portable-route.json
│                           │   └── routing/
│                           │       ├── CREDITS.adoc
│                           │       └── planet_12.032,53.0171_12.1024,53.0491.osm.pbf
│                           └── service/
│                               └── demo/
│                                   └── dataset/
│                                       └── test-belgium.yaml
├── optaweb-vehicle-routing-distribution/
│   ├── .gitignore
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── assembly/
│           │   └── assembly-optaweb-vehicle-routing.xml
│           └── resources/
│               └── README.adoc
├── optaweb-vehicle-routing-docs/
│   ├── .gitignore
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── asciidoc/
│           │   ├── appendix-backend-architecture.adoc
│           │   ├── appendix-backend-config.adoc
│           │   ├── attributes.adoc
│           │   ├── contributing.adoc
│           │   ├── development-guide.adoc
│           │   ├── index.adoc
│           │   ├── introduction.adoc
│           │   ├── modules.dot
│           │   ├── quickstart.adoc
│           │   ├── run-locally.adoc
│           │   ├── run-noscript.adoc
│           │   ├── run-openshift.adoc
│           │   └── user-guide.adoc
│           └── assembly/
│               └── assembly-generated-docs-zip.xml
├── optaweb-vehicle-routing-frontend/
│   ├── .editorconfig
│   ├── .eslintignore
│   ├── .eslintrc.json
│   ├── .gitignore
│   ├── .prettierrc
│   ├── README.adoc
│   ├── cypress/
│   │   ├── .eslintrc.json
│   │   ├── .gitignore
│   │   ├── fixtures/
│   │   │   ├── example.json
│   │   │   ├── response-garz.json
│   │   │   └── response-hoppenrade.json
│   │   ├── integration/
│   │   │   └── fromLocationsToRoute.js
│   │   ├── plugins/
│   │   │   └── index.js
│   │   └── support/
│   │       ├── commands.js
│   │       └── index.js
│   ├── cypress.json
│   ├── docker/
│   │   ├── .gitignore
│   │   ├── Dockerfile
│   │   ├── default.conf
│   │   └── nginx.conf
│   ├── package.json
│   ├── pom.xml
│   ├── public/
│   │   ├── index.html
│   │   └── manifest.json
│   ├── src/
│   │   ├── @types/
│   │   │   └── eventsourcemock.d.ts
│   │   ├── common.ts
│   │   ├── index.css
│   │   ├── index.tsx
│   │   ├── react-app-env.d.ts
│   │   ├── registerServiceWorker.ts
│   │   ├── setupTests.ts
│   │   ├── store/
│   │   │   ├── client/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── client.test.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   └── types.ts
│   │   │   ├── demo/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── demo.test.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   └── types.ts
│   │   │   ├── index.ts
│   │   │   ├── message/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── message.test.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── selectors.ts
│   │   │   │   └── types.ts
│   │   │   ├── mockStore.ts
│   │   │   ├── route/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── route.test.ts
│   │   │   │   ├── selectors.ts
│   │   │   │   └── types.ts
│   │   │   ├── server/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── operations.ts
│   │   │   │   ├── reducers.ts
│   │   │   │   ├── server.test.ts
│   │   │   │   └── types.ts
│   │   │   ├── store.ts
│   │   │   ├── types.ts
│   │   │   └── websocket/
│   │   │       ├── actions.ts
│   │   │       ├── index.ts
│   │   │       ├── operations.ts
│   │   │       ├── reducers.ts
│   │   │       ├── types.ts
│   │   │       └── websocket.test.ts
│   │   ├── ui/
│   │   │   ├── App.test.tsx
│   │   │   ├── App.tsx
│   │   │   ├── __snapshots__/
│   │   │   │   └── App.test.tsx.snap
│   │   │   ├── components/
│   │   │   │   ├── Alerts.test.tsx
│   │   │   │   ├── Alerts.tsx
│   │   │   │   ├── Background.tsx
│   │   │   │   ├── DemoDropdown.css
│   │   │   │   ├── DemoDropdown.test.tsx
│   │   │   │   ├── DemoDropdown.tsx
│   │   │   │   ├── Location.test.tsx
│   │   │   │   ├── Location.tsx
│   │   │   │   ├── LocationList.css
│   │   │   │   ├── LocationList.test.tsx
│   │   │   │   ├── LocationList.tsx
│   │   │   │   ├── LocationMarker.test.tsx
│   │   │   │   ├── LocationMarker.tsx
│   │   │   │   ├── RouteMap.test.tsx
│   │   │   │   ├── RouteMap.tsx
│   │   │   │   ├── SearchBox.test.tsx
│   │   │   │   ├── SearchBox.tsx
│   │   │   │   ├── Vehicle.test.tsx
│   │   │   │   ├── Vehicle.tsx
│   │   │   │   └── __snapshots__/
│   │   │   │       ├── Alerts.test.tsx.snap
│   │   │   │       ├── DemoDropdown.test.tsx.snap
│   │   │   │       ├── Location.test.tsx.snap
│   │   │   │       ├── LocationList.test.tsx.snap
│   │   │   │       ├── LocationMarker.test.tsx.snap
│   │   │   │       ├── RouteMap.test.tsx.snap
│   │   │   │       ├── SearchBox.test.tsx.snap
│   │   │   │       └── Vehicle.test.tsx.snap
│   │   │   ├── connection/
│   │   │   │   ├── ConnectionError.test.tsx
│   │   │   │   ├── ConnectionError.tsx
│   │   │   │   ├── ConnectionManager.test.tsx
│   │   │   │   ├── ConnectionManager.tsx
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   ├── ConnectionError.test.tsx.snap
│   │   │   │   │   └── ConnectionManager.test.tsx.snap
│   │   │   │   └── index.ts
│   │   │   ├── header/
│   │   │   │   ├── Header.test.tsx
│   │   │   │   ├── Header.tsx
│   │   │   │   ├── Navigation.test.tsx
│   │   │   │   ├── Navigation.tsx
│   │   │   │   └── __snapshots__/
│   │   │   │       ├── Header.test.tsx.snap
│   │   │   │       └── Navigation.test.tsx.snap
│   │   │   ├── pages/
│   │   │   │   ├── Demo.test.tsx
│   │   │   │   ├── Demo.tsx
│   │   │   │   ├── InfoBlock.test.tsx
│   │   │   │   ├── InfoBlock.tsx
│   │   │   │   ├── Route.test.tsx
│   │   │   │   ├── Route.tsx
│   │   │   │   ├── Vehicles.test.tsx
│   │   │   │   ├── Vehicles.tsx
│   │   │   │   ├── Visits.test.tsx
│   │   │   │   ├── Visits.tsx
│   │   │   │   ├── __snapshots__/
│   │   │   │   │   ├── Demo.test.tsx.snap
│   │   │   │   │   ├── InfoBlock.test.tsx.snap
│   │   │   │   │   ├── Route.test.tsx.snap
│   │   │   │   │   ├── Vehicles.test.tsx.snap
│   │   │   │   │   └── Visits.test.tsx.snap
│   │   │   │   ├── common.ts
│   │   │   │   └── index.ts
│   │   │   └── shallow-test-util.ts
│   │   └── websocket/
│   │       ├── WebSocketClient.test.ts
│   │       └── WebSocketClient.ts
│   └── tsconfig.json
├── optaweb-vehicle-routing-standalone/
│   ├── .gitignore
│   ├── data/
│   │   └── openstreetmap/
│   │       ├── CREDITS.adoc
│   │       └── planet_12.032,53.0171_12.1024,53.0491.osm.pbf
│   ├── pom.xml
│   └── src/
│       └── main/
│           ├── assembly/
│           │   └── assembly-quarkus-app.xml
│           └── resources/
│               ├── META-INF/
│               │   └── undertow-handlers.conf
│               └── application.properties
├── pom.xml
├── runLocally.sh
└── runOnOpenShift.sh
Download .txt
SYMBOL INDEX (1104 symbols across 210 files)

FILE: .mvn/wrapper/MavenWrapperDownloader.java
  class MavenWrapperDownloader (line 21) | public class MavenWrapperDownloader {
    method main (line 48) | public static void main(String args[]) {
    method downloadFileFromURL (line 97) | private static void downloadFileFromURL(String urlString, File destina...

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/Profiles.java
  class Profiles (line 3) | public class Profiles {
    method Profiles (line 7) | private Profiles() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Coordinates.java
  class Coordinates (line 9) | public class Coordinates {
    method Coordinates (line 14) | public Coordinates(BigDecimal latitude, BigDecimal longitude) {
    method of (line 26) | public static Coordinates of(double latitude, double longitude) {
    method latitude (line 35) | public BigDecimal latitude() {
    method longitude (line 44) | public BigDecimal longitude() {
    method equals (line 48) | @Override
    method hashCode (line 61) | @Override
    method toString (line 66) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/CountryCodeValidator.java
  class CountryCodeValidator (line 16) | public class CountryCodeValidator {
    method CountryCodeValidator (line 20) | private CountryCodeValidator() {
    method validate (line 32) | public static List<String> validate(List<String> countryCodes) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Distance.java
  class Distance (line 6) | public class Distance {
    method ofMillis (line 21) | public static Distance ofMillis(long millis) {
    method Distance (line 25) | private Distance(long millis) {
    method millis (line 37) | public long millis() {
    method equals (line 41) | @Override
    method hashCode (line 53) | @Override
    method toString (line 58) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Location.java
  class Location (line 6) | public class Location extends LocationData {
    method Location (line 10) | public Location(long id, Coordinates coordinates) {
    method Location (line 15) | public Location(long id, Coordinates coordinates, String description) {
    method id (line 25) | public long id() {
    method fullDescription (line 34) | public String fullDescription() {
    method equals (line 38) | @Override
    method hashCode (line 50) | @Override
    method toString (line 55) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/LocationData.java
  class LocationData (line 10) | public class LocationData {
    method LocationData (line 21) | public LocationData(Coordinates coordinates, String description) {
    method coordinates (line 31) | public Coordinates coordinates() {
    method description (line 40) | public String description() {
    method equals (line 44) | @Override
    method hashCode (line 57) | @Override
    method toString (line 62) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Route.java
  class Route (line 19) | public class Route {
    method Route (line 32) | public Route(Vehicle vehicle, Location depot, List<Location> visits) {
    method vehicle (line 54) | public Vehicle vehicle() {
    method depot (line 63) | public Location depot() {
    method visits (line 72) | public List<Location> visits() {
    method toString (line 76) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RouteWithTrack.java
  class RouteWithTrack (line 12) | public class RouteWithTrack extends Route {
    method RouteWithTrack (line 23) | public RouteWithTrack(Route route, List<List<Coordinates>> track) {
    method track (line 36) | public List<List<Coordinates>> track() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingPlan.java
  class RoutingPlan (line 19) | public class RoutingPlan {
    method RoutingPlan (line 38) | public RoutingPlan(
    method haveDifferentVehicles (line 79) | private static boolean haveDifferentVehicles(List<Vehicle> vehicles, L...
    method describeVehiclesRoutesInconsistency (line 85) | private static String describeVehiclesRoutesInconsistency(
    method empty (line 102) | public static RoutingPlan empty() {
    method distance (line 111) | public Distance distance() {
    method vehicles (line 120) | public List<Vehicle> vehicles() {
    method routes (line 129) | public List<RouteWithTrack> routes() {
    method visits (line 138) | public List<Location> visits() {
    method depot (line 147) | public Optional<Location> depot() {
    method isEmpty (line 156) | public boolean isEmpty() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingProblem.java
  class RoutingProblem (line 11) | public class RoutingProblem {
    method RoutingProblem (line 26) | public RoutingProblem(
    method name (line 42) | public String name() {
    method depot (line 51) | public Optional<LocationData> depot() {
    method visits (line 60) | public List<LocationData> visits() {
    method vehicles (line 69) | public List<VehicleData> vehicles() {
    method toString (line 73) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Vehicle.java
  class Vehicle (line 6) | public class Vehicle extends VehicleData {
    method Vehicle (line 10) | Vehicle(long id, String name, int capacity) {
    method id (line 20) | public long id() {
    method equals (line 24) | @Override
    method hashCode (line 36) | @Override
    method toString (line 41) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleData.java
  class VehicleData (line 8) | public class VehicleData {
    method VehicleData (line 13) | VehicleData(String name, int capacity) {
    method name (line 23) | public String name() {
    method capacity (line 32) | public int capacity() {
    method equals (line 36) | @Override
    method hashCode (line 49) | @Override
    method toString (line 54) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleFactory.java
  class VehicleFactory (line 6) | public class VehicleFactory {
    method VehicleFactory (line 8) | private VehicleFactory() {
    method vehicleData (line 19) | public static VehicleData vehicleData(String name, int capacity) {
    method createVehicle (line 31) | public static Vehicle createVehicle(long id, String name, int capacity) {
    method testVehicle (line 41) | public static Vehicle testVehicle(long id) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceCrudRepository.java
  class DistanceCrudRepository (line 11) | @ApplicationScoped
    method deleteByFromIdOrToId (line 14) | void deleteByFromIdOrToId(long deletedLocationId) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceEntity.java
  class DistanceEntity (line 11) | @Entity
    method DistanceEntity (line 19) | protected DistanceEntity() {
    method DistanceEntity (line 23) | DistanceEntity(DistanceKey key, Long distance) {
    method getKey (line 28) | DistanceKey getKey() {
    method getDistance (line 32) | Long getDistance() {
    method equals (line 36) | @Override
    method hashCode (line 49) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceKey.java
  class DistanceKey (line 11) | @Embeddable
    method DistanceKey (line 18) | protected DistanceKey() {
    method DistanceKey (line 22) | DistanceKey(long fromId, long toId) {
    method getFromId (line 27) | Long getFromId() {
    method setFromId (line 31) | void setFromId(Long fromId) {
    method getToId (line 35) | Long getToId() {
    method setToId (line 39) | void setToId(Long toId) {
    method equals (line 43) | @Override
    method hashCode (line 56) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryImpl.java
  class DistanceRepositoryImpl (line 12) | @ApplicationScoped
    method DistanceRepositoryImpl (line 17) | @Inject
    method saveDistance (line 22) | @Override
    method getDistance (line 28) | @Override
    method deleteDistances (line 35) | @Override
    method deleteAll (line 40) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationCrudRepository.java
  class LocationCrudRepository (line 10) | @ApplicationScoped

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationEntity.java
  class LocationEntity (line 15) | @Entity
    method LocationEntity (line 30) | protected LocationEntity() {
    method LocationEntity (line 34) | LocationEntity(long id, BigDecimal latitude, BigDecimal longitude, Str...
    method getId (line 41) | long getId() {
    method getLatitude (line 45) | BigDecimal getLatitude() {
    method getLongitude (line 49) | BigDecimal getLongitude() {
    method getDescription (line 53) | String getDescription() {
    method toString (line 57) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryImpl.java
  class LocationRepositoryImpl (line 17) | @ApplicationScoped
    method LocationRepositoryImpl (line 23) | @Inject
    method createLocation (line 28) | @Override
    method locations (line 37) | @Override
    method removeLocation (line 44) | @Override
    method removeAll (line 55) | @Override
    method find (line 60) | @Override
    method toDomain (line 65) | private static Location toDomain(LocationEntity locationEntity) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleCrudRepository.java
  class VehicleCrudRepository (line 10) | @ApplicationScoped

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleEntity.java
  class VehicleEntity (line 11) | @Entity
    method VehicleEntity (line 20) | protected VehicleEntity() {
    method VehicleEntity (line 24) | public VehicleEntity(long id, String name, int capacity) {
    method getId (line 30) | public long getId() {
    method getName (line 34) | public String getName() {
    method setName (line 38) | public void setName(String name) {
    method getCapacity (line 42) | public int getCapacity() {
    method setCapacity (line 46) | public void setCapacity(int capacity) {
    method toString (line 50) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleRepositoryImpl.java
  class VehicleRepositoryImpl (line 18) | @ApplicationScoped
    method VehicleRepositoryImpl (line 24) | @Inject
    method createVehicle (line 29) | @Override
    method createVehicle (line 39) | @Override
    method vehicles (line 48) | @Override
    method removeVehicle (line 55) | @Override
    method removeAll (line 66) | @Override
    method find (line 71) | @Override
    method changeCapacity (line 76) | @Override
    method toDomain (line 85) | private static Vehicle toDomain(VehicleEntity vehicleEntity) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/Constants.java
  class Constants (line 3) | public class Constants {
    method Constants (line 7) | private Constants() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/DistanceMapImpl.java
  class DistanceMapImpl (line 12) | public class DistanceMapImpl implements DistanceMap {
    method DistanceMapImpl (line 16) | public DistanceMapImpl(DistanceMatrixRow distanceMatrixRow) {
    method distanceTo (line 20) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisher.java
  class RouteChangedEventPublisher (line 27) | @ApplicationScoped
    method RouteChangedEventPublisher (line 34) | @Inject
    method publishSolution (line 44) | void publishSolution(VehicleRoutingSolution solution) {
    method solutionToEvent (line 64) | static RouteChangedEvent solutionToEvent(VehicleRoutingSolution soluti...
    method visitIds (line 76) | private static List<Long> visitIds(VehicleRoutingSolution solution) {
    method routes (line 88) | private static List<ShallowRoute> routes(VehicleRoutingSolution soluti...
    method vehicleIds (line 118) | private static List<Long> vehicleIds(VehicleRoutingSolution solution) {
    method depotId (line 130) | private static Long depotId(VehicleRoutingSolution solution) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerConfig.java
  class RouteOptimizerConfig (line 19) | @Dependent
    method RouteOptimizerConfig (line 24) | RouteOptimizerConfig(SolverFactory<VehicleRoutingSolution> solverFacto...
    method solver (line 28) | @Produces
    method executor (line 33) | @Produces

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerImpl.java
  class RouteOptimizerImpl (line 28) | @ApplicationScoped
    method RouteOptimizerImpl (line 38) | @Inject
    method addLocation (line 44) | @Override
    method removeLocation (line 66) | @Override
    method addVehicle (line 98) | @Override
    method removeVehicle (line 112) | @Override
    method changeCapacity (line 127) | @Override
    method removeAllLocations (line 142) | @Override
    method removeAllVehicles (line 150) | @Override
    method publishSolution (line 157) | private void publishSolution() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/SolverManager.java
  class SolverManager (line 43) | @ApplicationScoped
    method SolverManager (line 56) | @Inject
    method bestSolutionChanged (line 69) | @Override
    method startSolver (line 84) | void startSolver(VehicleRoutingSolution solution) {
    method stopSolver (line 118) | void stopSolver() {
    method assertSolverIsAlive (line 137) | private void assertSolverIsAlive() {
    method addVisit (line 156) | void addVisit(PlanningVisit visit) {
    method removeVisit (line 161) | void removeVisit(PlanningVisit visit) {
    method addVehicle (line 166) | void addVehicle(PlanningVehicle vehicle) {
    method removeVehicle (line 171) | void removeVehicle(PlanningVehicle vehicle) {
    method changeCapacity (line 176) | void changeCapacity(PlanningVehicle vehicle) {
    type SolvingTask (line 184) | interface SolvingTask extends Callable<VehicleRoutingSolution> {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/VehicleRoutingConstraintProvider.java
  class VehicleRoutingConstraintProvider (line 11) | public class VehicleRoutingConstraintProvider implements ConstraintProvi...
    method defineConstraints (line 13) | @Override
    method vehicleCapacity (line 22) | Constraint vehicleCapacity(ConstraintFactory constraintFactory) {
    method distanceFromPreviousStandstill (line 31) | Constraint distanceFromPreviousStandstill(ConstraintFactory constraint...
    method distanceFromLastVisitToDepot (line 38) | Constraint distanceFromLastVisitToDepot(ConstraintFactory constraintFa...

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicle.java
  class AddVehicle (line 10) | public class AddVehicle implements ProblemChange<VehicleRoutingSolution> {
    method AddVehicle (line 14) | public AddVehicle(PlanningVehicle vehicle) {
    method doChange (line 18) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisit.java
  class AddVisit (line 10) | public class AddVisit implements ProblemChange<VehicleRoutingSolution> {
    method AddVisit (line 14) | public AddVisit(PlanningVisit visit) {
    method doChange (line 18) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/ChangeVehicleCapacity.java
  class ChangeVehicleCapacity (line 10) | public class ChangeVehicleCapacity implements ProblemChange<VehicleRouti...
    method ChangeVehicleCapacity (line 14) | public ChangeVehicleCapacity(PlanningVehicle vehicle) {
    method doChange (line 18) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVehicle.java
  class RemoveVehicle (line 11) | public class RemoveVehicle implements ProblemChange<VehicleRoutingSoluti...
    method RemoveVehicle (line 15) | public RemoveVehicle(PlanningVehicle removedVehicle) {
    method doChange (line 19) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVisit.java
  class RemoveVisit (line 10) | public class RemoveVisit implements ProblemChange<VehicleRoutingSolution> {
    method RemoveVisit (line 14) | public RemoveVisit(PlanningVisit planningVisit) {
    method doChange (line 18) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/DistanceMap.java
  type DistanceMap (line 6) | @FunctionalInterface
    method distanceTo (line 16) | long distanceTo(PlanningLocation location);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningDepot.java
  class PlanningDepot (line 5) | public class PlanningDepot {
    method PlanningDepot (line 9) | public PlanningDepot(PlanningLocation location) {
    method getId (line 13) | public long getId() {
    method getLocation (line 17) | public PlanningLocation getLocation() {
    method toString (line 21) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocation.java
  class PlanningLocation (line 5) | public class PlanningLocation {
    method PlanningLocation (line 13) | PlanningLocation(long id, double latitude, double longitude, DistanceM...
    method getId (line 25) | public long getId() {
    method distanceTo (line 35) | public long distanceTo(PlanningLocation location) {
    method angleTo (line 48) | public double angleTo(PlanningLocation location) {
    method toString (line 55) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationFactory.java
  class PlanningLocationFactory (line 8) | public class PlanningLocationFactory {
    method PlanningLocationFactory (line 10) | private PlanningLocationFactory() {
    method fromDomain (line 21) | public static PlanningLocation fromDomain(Location location) {
    method fromDomain (line 32) | public static PlanningLocation fromDomain(Location location, DistanceM...
    method testLocation (line 46) | public static PlanningLocation testLocation(long id) {
    method testLocation (line 57) | public static PlanningLocation testLocation(long id, DistanceMap dista...
    method failFast (line 61) | private static long failFast(PlanningLocation location) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicle.java
  class PlanningVehicle (line 8) | public class PlanningVehicle implements Standstill {
    method PlanningVehicle (line 18) | PlanningVehicle() {
    method getId (line 22) | public long getId() {
    method setId (line 26) | public void setId(long id) {
    method getCapacity (line 30) | public int getCapacity() {
    method setCapacity (line 34) | public void setCapacity(int capacity) {
    method getDepot (line 38) | public PlanningDepot getDepot() {
    method setDepot (line 42) | public void setDepot(PlanningDepot depot) {
    method getNextVisit (line 46) | @Override
    method setNextVisit (line 51) | @Override
    method getFutureVisits (line 56) | public Iterable<PlanningVisit> getFutureVisits() {
    method getLocation (line 77) | @Override
    method toString (line 82) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleFactory.java
  class PlanningVehicleFactory (line 8) | public class PlanningVehicleFactory {
    method PlanningVehicleFactory (line 10) | private PlanningVehicleFactory() {
    method fromDomain (line 20) | public static PlanningVehicle fromDomain(Vehicle domainVehicle) {
    method testVehicle (line 30) | public static PlanningVehicle testVehicle(long id) {
    method testVehicle (line 40) | public static PlanningVehicle testVehicle(long id, int capacity) {
    method vehicle (line 44) | private static PlanningVehicle vehicle(long id, int capacity) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisit.java
  class PlanningVisit (line 10) | @PlanningEntity(difficultyWeightFactoryClass = DepotAngleVisitDifficulty...
    method PlanningVisit (line 28) | PlanningVisit() {
    method getId (line 32) | public long getId() {
    method setId (line 36) | public void setId(long id) {
    method getLocation (line 40) | @Override
    method setLocation (line 45) | public void setLocation(PlanningLocation location) {
    method getDemand (line 49) | public int getDemand() {
    method setDemand (line 53) | public void setDemand(int demand) {
    method getPreviousStandstill (line 57) | public Standstill getPreviousStandstill() {
    method setPreviousStandstill (line 61) | public void setPreviousStandstill(Standstill previousStandstill) {
    method getNextVisit (line 65) | @Override
    method setNextVisit (line 70) | @Override
    method getVehicle (line 75) | public PlanningVehicle getVehicle() {
    method setVehicle (line 79) | public void setVehicle(PlanningVehicle vehicle) {
    method distanceFromPreviousStandstill (line 95) | public long distanceFromPreviousStandstill() {
    method distanceToDepot (line 108) | public long distanceToDepot() {
    method isLast (line 117) | public boolean isLast() {
    method toString (line 121) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisitFactory.java
  class PlanningVisitFactory (line 6) | public class PlanningVisitFactory {
    method PlanningVisitFactory (line 10) | private PlanningVisitFactory() {
    method fromLocation (line 20) | public static PlanningVisit fromLocation(PlanningLocation location) {
    method fromLocation (line 31) | public static PlanningVisit fromLocation(PlanningLocation location, in...
    method testVisit (line 45) | public static PlanningVisit testVisit(long id) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactory.java
  class SolutionFactory (line 11) | public class SolutionFactory {
    method SolutionFactory (line 13) | private SolutionFactory() {
    method emptySolution (line 22) | public static VehicleRoutingSolution emptySolution() {
    method solutionFromVisits (line 45) | public static VehicleRoutingSolution solutionFromVisits(
    method moveAllVehiclesToDepot (line 61) | private static void moveAllVehiclesToDepot(List<PlanningVehicle> vehic...

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/Standstill.java
  type Standstill (line 6) | @PlanningEntity
    method getLocation (line 14) | PlanningLocation getLocation();
    method getNextVisit (line 21) | @InverseRelationShadowVariable(sourceVariableName = "previousStandstill")
    method setNextVisit (line 24) | void setNextVisit(PlanningVisit nextVisit);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/VehicleRoutingSolution.java
  class VehicleRoutingSolution (line 12) | @PlanningSolution
    method VehicleRoutingSolution (line 26) | VehicleRoutingSolution() {
    method getDepotList (line 30) | public List<PlanningDepot> getDepotList() {
    method setDepotList (line 34) | public void setDepotList(List<PlanningDepot> depotList) {
    method getVehicleList (line 38) | public List<PlanningVehicle> getVehicleList() {
    method setVehicleList (line 42) | public void setVehicleList(List<PlanningVehicle> vehicleList) {
    method getVisitList (line 46) | public List<PlanningVisit> getVisitList() {
    method setVisitList (line 50) | public void setVisitList(List<PlanningVisit> visitList) {
    method getScore (line 54) | public HardSoftLongScore getScore() {
    method setScore (line 58) | public void setScore(HardSoftLongScore score) {
    method toString (line 62) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/weight/DepotAngleVisitDifficultyWeightFactory.java
  class DepotAngleVisitDifficultyWeightFactory (line 19) | public class DepotAngleVisitDifficultyWeightFactory
    method createSorterWeight (line 22) | @Override
    class DepotAngleVisitDifficultyWeight (line 33) | static class DepotAngleVisitDifficultyWeight implements Comparable<Dep...
      method DepotAngleVisitDifficultyWeight (line 45) | DepotAngleVisitDifficultyWeight(PlanningVisit visit, double depotAng...
      method compareTo (line 51) | @Override
      method equals (line 56) | @Override
      method hashCode (line 64) | @Override
      method toString (line 69) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ClearResource.java
  class ClearResource (line 10) | @Path("api/clear")
    method ClearResource (line 16) | @Inject
    method clear (line 22) | @POST

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DataSetDownloadResource.java
  class DataSetDownloadResource (line 20) | @Path("api/dataset/export")
    method DataSetDownloadResource (line 26) | DataSetDownloadResource(DemoService demoService) {
    method exportDataSet (line 30) | @GET

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DemoResource.java
  class DemoResource (line 10) | @Path("api/demo/{name}")
    method DemoResource (line 15) | @Inject
    method loadDemo (line 25) | @POST

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/LocationResource.java
  class LocationResource (line 14) | @Path("api/location")
    method LocationResource (line 19) | @Inject
    method addLocation (line 29) | @Transactional
    method deleteLocation (line 42) | @Transactional

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/RouteEventResource.java
  class RouteEventResource (line 25) | @ApplicationScoped
    method RouteEventResource (line 37) | @Inject
    method closeBroadcaster (line 43) | @PreDestroy
    method observeRoute (line 51) | public void observeRoute(@Observes RoutingPlan event) {
    method observeError (line 61) | public void observeError(@Observes ErrorMessage event) {
    method sse (line 71) | @GET

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ServerInfoResource.java
  class ServerInfoResource (line 21) | @Path("api/serverInfo")
    method ServerInfoResource (line 27) | @Inject
    method serverInfo (line 33) | @GET

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/VehicleResource.java
  class VehicleResource (line 11) | @Path("api/vehicle")
    method VehicleResource (line 16) | @Inject
    method addVehicle (line 21) | @POST
    method removeVehicle (line 31) | @DELETE
    method removeAnyVehicle (line 37) | @POST
    method changeCapacity (line 43) | @POST

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableCoordinates.java
  class PortableCoordinates (line 14) | public class PortableCoordinates {
    method fromCoordinates (line 27) | public static PortableCoordinates fromCoordinates(Coordinates coordina...
    method scale (line 34) | private static BigDecimal scale(BigDecimal number) {
    method PortableCoordinates (line 38) | PortableCoordinates(BigDecimal latitude, BigDecimal longitude) {
    method getLatitude (line 43) | public BigDecimal getLatitude() {
    method getLongitude (line 47) | public BigDecimal getLongitude() {
    method equals (line 51) | @Override
    method hashCode (line 64) | @Override
    method toString (line 69) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableDistance.java
  class PortableDistance (line 12) | public class PortableDistance {
    method fromDistance (line 17) | static PortableDistance fromDistance(Distance distance) {
    method PortableDistance (line 22) | private PortableDistance(String distance) {
    method equals (line 26) | @Override
    method hashCode (line 38) | @Override
    method toString (line 43) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableErrorMessage.java
  class PortableErrorMessage (line 10) | public class PortableErrorMessage {
    method fromMessage (line 15) | public static PortableErrorMessage fromMessage(ErrorMessage message) {
    method PortableErrorMessage (line 19) | PortableErrorMessage(String id, String text) {
    method getId (line 24) | public String getId() {
    method getText (line 28) | public String getText() {
    method equals (line 32) | @Override
    method hashCode (line 45) | @Override
    method toString (line 50) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableLocation.java
  class PortableLocation (line 14) | public class PortableLocation {
    method fromLocation (line 25) | static PortableLocation fromLocation(Location location) {
    method PortableLocation (line 34) | @JsonCreator
    method getId (line 46) | public long getId() {
    method getLatitude (line 50) | public BigDecimal getLatitude() {
    method getLongitude (line 54) | public BigDecimal getLongitude() {
    method getDescription (line 58) | public String getDescription() {
    method equals (line 62) | @Override
    method hashCode (line 77) | @Override
    method toString (line 82) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoute.java
  class PortableRoute (line 13) | class PortableRoute {
    method PortableRoute (line 21) | PortableRoute(
    method getVehicle (line 32) | public PortableVehicle getVehicle() {
    method getDepot (line 36) | public PortableLocation getDepot() {
    method getVisits (line 40) | public List<PortableLocation> getVisits() {
    method getTrack (line 44) | public List<List<PortableCoordinates>> getTrack() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlan.java
  class PortableRoutingPlan (line 10) | public class PortableRoutingPlan {
    method PortableRoutingPlan (line 18) | PortableRoutingPlan(
    method getDistance (line 32) | public PortableDistance getDistance() {
    method getVehicles (line 36) | public List<PortableVehicle> getVehicles() {
    method getDepot (line 40) | public PortableLocation getDepot() {
    method getVisits (line 44) | public List<PortableLocation> getVisits() {
    method getRoutes (line 48) | public List<PortableRoute> getRoutes() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlanFactory.java
  class PortableRoutingPlanFactory (line 16) | public class PortableRoutingPlanFactory {
    method PortableRoutingPlanFactory (line 18) | private PortableRoutingPlanFactory() {
    method fromRoutingPlan (line 22) | public static PortableRoutingPlan fromRoutingPlan(RoutingPlan routingP...
    method portableTrack (line 37) | private static List<List<PortableCoordinates>> portableTrack(List<List...
    method portableVisits (line 48) | private static List<PortableLocation> portableVisits(List<Location> vi...
    method portableVehicles (line 54) | private static List<PortableVehicle> portableVehicles(List<Vehicle> ve...

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableVehicle.java
  class PortableVehicle (line 10) | public class PortableVehicle {
    method fromVehicle (line 16) | static PortableVehicle fromVehicle(Vehicle vehicle) {
    method PortableVehicle (line 21) | PortableVehicle(long id, String name, int capacity) {
    method getId (line 27) | public long getId() {
    method getName (line 31) | public String getName() {
    method getCapacity (line 35) | public int getCapacity() {
    method equals (line 39) | @Override
    method hashCode (line 53) | @Override
    method toString (line 58) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/RoutingProblemInfo.java
  class RoutingProblemInfo (line 10) | public class RoutingProblemInfo {
    method RoutingProblemInfo (line 15) | public RoutingProblemInfo(String name, int visits) {
    method getName (line 25) | public String getName() {
    method getVisits (line 34) | public int getVisits() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/ServerInfo.java
  class ServerInfo (line 8) | public class ServerInfo {
    method ServerInfo (line 14) | public ServerInfo(List<PortableCoordinates> boundingBox, List<String> ...
    method getBoundingBox (line 20) | public List<PortableCoordinates> getBoundingBox() {
    method getCountryCodes (line 24) | public List<String> getCountryCodes() {
    method getDemos (line 28) | public List<RoutingProblemInfo> getDemos() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouter.java
  class AirDistanceRouter (line 18) | @ApplicationScoped
    method travelTimeMillis (line 28) | @Override
    method getPath (line 36) | @Override
    method getBounds (line 41) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/Constants.java
  class Constants (line 3) | public class Constants {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperRouter.java
  class GraphHopperRouter (line 30) | @ApplicationScoped
    method GraphHopperRouter (line 36) | @Inject
    method getPath (line 41) | @Override
    method travelTimeMillis (line 49) | @Override
    method getBestRoute (line 54) | private ResponsePath getBestRoute(Coordinates from, Coordinates to) {
    method getBounds (line 68) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingConfig.java
  class RoutingConfig (line 34) | @Dependent
    method RoutingConfig (line 45) | @Inject
    method graphHopper (line 60) | @UnlessBuildProfile(Profiles.TEST)
    method graphDirIsNotEmpty (line 125) | private boolean graphDirIsNotEmpty() {
    method initDirs (line 138) | private void initDirs() {
    method downloadOsmFile (line 147) | static void downloadOsmFile(String urlString, Path osmFile) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingEngineException.java
  class RoutingEngineException (line 3) | public class RoutingEngineException extends RuntimeException {
    method RoutingEngineException (line 5) | RoutingEngineException(String message, Throwable cause) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingProperties.java
  type RoutingProperties (line 7) | @ConfigMapping(prefix = "app.routing")
    method osmDir (line 13) | String osmDir();
    method ghDir (line 18) | String ghDir();
    method osmFile (line 23) | String osmFile();
    method osmDownloadUrl (line 28) | Optional<String> osmDownloadUrl();
    method engine (line 33) | RoutingEngine engine();
    type RoutingEngine (line 35) | enum RoutingEngine {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/DemoProperties.java
  type DemoProperties (line 7) | @ConfigMapping(prefix = "app.demo")
    method dataSetDir (line 13) | Optional<String> dataSetDir();

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/DemoService.java
  class DemoService (line 23) | @ApplicationScoped
    method DemoService (line 35) | @Inject
    method demos (line 51) | public Collection<RoutingProblem> demos() {
    method loadDemo (line 55) | public void loadDemo(String name) {
    method addWithRetry (line 65) | private void addWithRetry(Coordinates coordinates, String description) {
    method exportDataSet (line 76) | public String exportDataSet() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/RoutingProblemConfig.java
  class RoutingProblemConfig (line 32) | @Dependent
    method RoutingProblemConfig (line 39) | @Inject
    method routingProblems (line 45) | @Produces
    method classPathProblems (line 51) | private Stream<RoutingProblem> classPathProblems() {
    method dataSetDirProblems (line 55) | private Stream<RoutingProblem> dataSetDirProblems() {
    method collectProblems (line 59) | private List<RoutingProblem> collectProblems(Path dataSetDirPath) {
    method dataSetDir (line 82) | private Optional<Path> dataSetDir() {
    method belgiumReader (line 99) | private static Reader belgiumReader() {
    method isReadableDir (line 105) | private static boolean isReadableDir(Path path) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/RoutingProblemList.java
  class RoutingProblemList (line 16) | class RoutingProblemList {
    method RoutingProblemList (line 20) | RoutingProblemList(Stream<RoutingProblem> routingProblems) {
    method all (line 26) | Collection<RoutingProblem> all() {
    method byName (line 30) | RoutingProblem byName(String name) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSet.java
  class DataSet (line 8) | class DataSet {
    method getName (line 20) | public String getName() {
    method setName (line 24) | public void setName(String name) {
    method getVehicles (line 33) | public List<DataSetVehicle> getVehicles() {
    method setVehicles (line 37) | public void setVehicles(List<DataSetVehicle> vehicles) {
    method getDepot (line 46) | public DataSetLocation getDepot() {
    method setDepot (line 50) | public void setDepot(DataSetLocation depot) {
    method getVisits (line 59) | public List<DataSetLocation> getVisits() {
    method setVisits (line 63) | public void setVisits(List<DataSetLocation> visits) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetLocation.java
  class DataSetLocation (line 8) | class DataSetLocation {
    method DataSetLocation (line 16) | private DataSetLocation() {
    method DataSetLocation (line 20) | DataSetLocation(String label, double latitude, double longitude) {
    method getLabel (line 31) | public String getLabel() {
    method setLabel (line 35) | public void setLabel(String label) {
    method getLatitude (line 44) | public double getLatitude() {
    method setLatitude (line 48) | public void setLatitude(double latitude) {
    method getLongitude (line 57) | public double getLongitude() {
    method setLongitude (line 61) | public void setLongitude(double longitude) {
    method toString (line 65) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetMarshaller.java
  class DataSetMarshaller (line 25) | @ApplicationScoped
    method DataSetMarshaller (line 33) | DataSetMarshaller() {
    method DataSetMarshaller (line 42) | DataSetMarshaller(ObjectMapper mapper) {
    method unmarshal (line 52) | public RoutingProblem unmarshal(Reader reader) {
    method marshal (line 64) | public String marshal(RoutingProblem routingProblem) {
    method unmarshalToDataSet (line 68) | DataSet unmarshalToDataSet(Reader reader) {
    method marshal (line 76) | String marshal(DataSet dataSet) {
    method toDataSet (line 84) | static DataSet toDataSet(RoutingProblem routingProblem) {
    method toDataSet (line 97) | static DataSetLocation toDataSet(LocationData locationData) {
    method toDataSet (line 104) | static DataSetVehicle toDataSet(VehicleData vehicleData) {
    method toDomain (line 108) | static RoutingProblem toDomain(DataSet dataSet) {
    method toDomain (line 122) | static LocationData toDomain(DataSetLocation dataSetLocation) {
    method toDomain (line 128) | static VehicleData toDomain(DataSetVehicle dataSetVehicle) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetVehicle.java
  class DataSetVehicle (line 9) | public class DataSetVehicle {
    method DataSetVehicle (line 16) | @JsonCreator

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceCalculator.java
  type DistanceCalculator (line 8) | public interface DistanceCalculator {
    method travelTimeMillis (line 18) | long travelTimeMillis(Coordinates from, Coordinates to);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceMatrixImpl.java
  class DistanceMatrixImpl (line 15) | @ApplicationScoped
    method DistanceMatrixImpl (line 21) | @Inject
    method addLocation (line 26) | @Override
    method updateMatrixLazily (line 38) | private Map<Long, Distance> updateMatrixLazily(Location location) {
    method calculateDistance (line 70) | private Distance calculateDistance(Location from, Location to) {
    method distance (line 74) | @Override
    method put (line 86) | @Override
    method removeLocation (line 91) | @Override
    method clear (line 101) | @Override
    method dimension (line 111) | public int dimension() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceRepository.java
  type DistanceRepository (line 11) | public interface DistanceRepository {
    method saveDistance (line 13) | void saveDistance(Location from, Location to, Distance distance);
    method getDistance (line 15) | Optional<Distance> getDistance(Location from, Location to);
    method deleteDistances (line 17) | void deleteDistances(Location location);
    method deleteAll (line 19) | void deleteAll();

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/RoutingException.java
  class RoutingException (line 3) | public class RoutingException extends RuntimeException {
    method RoutingException (line 5) | public RoutingException(String message, Throwable cause) {
    method RoutingException (line 9) | public RoutingException(String message) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorEvent.java
  class ErrorEvent (line 5) | public class ErrorEvent {
    method ErrorEvent (line 16) | public ErrorEvent(Object source, String message) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorListener.java
  class ErrorListener (line 13) | @ApplicationScoped
    method ErrorListener (line 18) | @Inject
    method onErrorEvent (line 23) | public void onErrorEvent(@Observes ErrorEvent event) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorMessage.java
  class ErrorMessage (line 5) | public class ErrorMessage {
    method of (line 16) | public static ErrorMessage of(String id, String text) {
    method ErrorMessage (line 20) | private ErrorMessage(String id, String text) {
    method toString (line 25) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorMessageConsumer.java
  type ErrorMessageConsumer (line 6) | public interface ErrorMessageConsumer {
    method consumeMessage (line 13) | void consumeMessage(ErrorMessage message);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/DistanceMatrix.java
  type DistanceMatrix (line 9) | public interface DistanceMatrix {
    method addLocation (line 11) | DistanceMatrixRow addLocation(Location location);
    method removeLocation (line 13) | void removeLocation(Location location);
    method clear (line 15) | void clear();
    method distance (line 17) | Distance distance(Location from, Location to);
    method put (line 19) | void put(Location from, Location to, Distance distance);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/DistanceMatrixRow.java
  type DistanceMatrixRow (line 8) | public interface DistanceMatrixRow {
    method distanceTo (line 16) | Distance distanceTo(long locationId);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationPlanner.java
  type LocationPlanner (line 8) | public interface LocationPlanner {
    method addLocation (line 10) | void addLocation(Location location, DistanceMatrixRow distanceMatrixRow);
    method removeLocation (line 12) | void removeLocation(Location location);
    method removeAllLocations (line 14) | void removeAllLocations();

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationRepository.java
  type LocationRepository (line 12) | public interface LocationRepository {
    method createLocation (line 21) | Location createLocation(Coordinates coordinates, String description);
    method locations (line 28) | List<Location> locations();
    method removeLocation (line 36) | Location removeLocation(long id);
    method removeAll (line 41) | void removeAll();
    method find (line 49) | Optional<Location> find(long locationId);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationService.java
  class LocationService (line 24) | @ApplicationScoped
    method LocationService (line 35) | @Inject
    method addLocation (line 49) | public synchronized void addLocation(Location location) {
    method createLocation (line 55) | @Transactional
    method addToMatrix (line 71) | private Optional<DistanceMatrixRow> addToMatrix(Location location) {
    method removeLocation (line 95) | @Transactional
    method removeAll (line 121) | @Transactional
    method populateDistanceMatrix (line 129) | public void populateDistanceMatrix() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/BoundingBox.java
  class BoundingBox (line 10) | public class BoundingBox {
    method BoundingBox (line 21) | public BoundingBox(Coordinates southWest, Coordinates northEast) {
    method getSouthWest (line 47) | public Coordinates getSouthWest() {
    method getNorthEast (line 56) | public Coordinates getNorthEast() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/Region.java
  type Region (line 3) | public interface Region {
    method getBounds (line 5) | BoundingBox getBounds();

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/RegionProperties.java
  type RegionProperties (line 8) | @ConfigMapping(prefix = "app.region")
    method countryCodes (line 17) | Optional<List<String>> countryCodes();

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/RegionService.java
  class RegionService (line 11) | @ApplicationScoped
    method RegionService (line 17) | @Inject
    method countryCodes (line 28) | public List<String> countryCodes() {
    method boundingBox (line 37) | public BoundingBox boundingBox() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/reload/ReloadService.java
  class ReloadService (line 17) | @ApplicationScoped
    method ReloadService (line 25) | @Inject
    method reload (line 37) | public void reload(@Observes StartupEvent startupEvent) {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/RouteChangedEvent.java
  class RouteChangedEvent (line 14) | public class RouteChangedEvent {
    method RouteChangedEvent (line 32) | public RouteChangedEvent(
    method vehicleIds (line 51) | public List<Long> vehicleIds() {
    method routes (line 60) | public Collection<ShallowRoute> routes() {
    method distance (line 69) | public Distance distance() {
    method depotId (line 78) | public Optional<Long> depotId() {
    method visitIds (line 82) | public List<Long> visitIds() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/RouteListener.java
  class RouteListener (line 33) | @ApplicationScoped
    method RouteListener (line 47) | @Inject
    method onApplicationEvent (line 61) | public void onApplicationEvent(@Observes RouteChangedEvent event) {
    method findVehicleById (line 96) | private Vehicle findVehicleById(long id) {
    method findLocationById (line 101) | private Location findLocationById(long id) {
    method track (line 106) | private List<List<Coordinates>> track(Location depot, List<Location> r...
    method getBestRoutingPlan (line 124) | public RoutingPlan getBestRoutingPlan() {

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/Router.java
  type Router (line 10) | public interface Router {
    method getPath (line 19) | List<Coordinates> getPath(Coordinates from, Coordinates to);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/ShallowRoute.java
  class ShallowRoute (line 22) | public class ShallowRoute {
    method ShallowRoute (line 44) | public ShallowRoute(long vehicleId, long depotId, List<Long> visitIds) {
    method toString (line 50) | @Override

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehiclePlanner.java
  type VehiclePlanner (line 8) | public interface VehiclePlanner {
    method addVehicle (line 10) | void addVehicle(Vehicle vehicle);
    method removeVehicle (line 12) | void removeVehicle(Vehicle vehicle);
    method removeAllVehicles (line 14) | void removeAllVehicles();
    method changeCapacity (line 16) | void changeCapacity(Vehicle vehicle);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehicleRepository.java
  type VehicleRepository (line 12) | public interface VehicleRepository {
    method createVehicle (line 20) | Vehicle createVehicle(int capacity);
    method createVehicle (line 28) | Vehicle createVehicle(VehicleData vehicleData);
    method vehicles (line 35) | List<Vehicle> vehicles();
    method removeVehicle (line 43) | Vehicle removeVehicle(long id);
    method removeAll (line 48) | void removeAll();
    method find (line 56) | Optional<Vehicle> find(long vehicleId);
    method changeCapacity (line 58) | Vehicle changeCapacity(long vehicleId, int capacity);

FILE: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehicleService.java
  class VehicleService (line 15) | @ApplicationScoped
    method VehicleService (line 23) | @Inject
    method createVehicle (line 29) | @Transactional
    method createVehicle (line 36) | @Transactional
    method addVehicle (line 43) | public void addVehicle(Vehicle vehicle) {
    method removeVehicle (line 47) | @Transactional
    method removeAnyVehicle (line 53) | public synchronized void removeAnyVehicle() {
    method removeAll (line 58) | @Transactional
    method changeCapacity (line 64) | @Transactional

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/TestConfig.java
  class TestConfig (line 14) | @Dependent
    method graphHopper (line 22) | @IfBuildProfile(Profiles.TEST)
    method routeListener (line 33) | @IfBuildProfile(Profiles.TEST)

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/CoordinatesTest.java
  class CoordinatesTest (line 10) | class CoordinatesTest {
    method constructor_params_must_not_be_null (line 12) | @Test
    method coordinates_should_be_equals_when_numerically_equal (line 18) | @Test
    method should_not_equal (line 37) | @Test
    method valueOf_and_getters (line 46) | @Test
    method toString_should_contain_latitude_and_longitude (line 55) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/CountryCodeValidatorTest.java
  class CountryCodeValidatorTest (line 13) | class CountryCodeValidatorTest {
    method should_fail_on_invalid_country_codes (line 15) | @Test
    method should_ignore_case_and_convert_to_upper_case (line 26) | @Test
    method should_allow_multiple_values (line 31) | @Test
    method should_allow_empty_list (line 36) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/DistanceTest.java
  class DistanceTest (line 9) | class DistanceTest {
    method distance_millis_should_be_same_as_the_given_value (line 11) | @Test
    method toString_should_contain_units_and_be_human_readable (line 17) | @Test
    method time_must_be_positive_or_zero (line 24) | @Test
    method equals_hashCode (line 30) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/LocationDataTest.java
  class LocationDataTest (line 10) | class LocationDataTest {
    method constructor_params_must_not_be_null (line 12) | @Test
    method locations_are_equal_if_they_have_same_properties (line 18) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/LocationTest.java
  class LocationTest (line 10) | class LocationTest {
    method constructor_params_must_not_be_null (line 12) | @Test
    method locations_are_identified_based_on_id (line 18) | @Test
    method equal_locations_must_have_same_hashcode (line 44) | @Test
    method constructor_without_description_should_create_empty_description (line 51) | @Test
    method toString_should_contain_id_and_description (line 56) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RouteTest.java
  class RouteTest (line 14) | class RouteTest {
    method constructor_args_not_null (line 21) | @Test
    method visits_should_not_contain_depot (line 28) | @Test
    method no_visit_should_be_visited_twice_by_the_same_vehicle (line 38) | @Test
    method cannot_modify_visits_externally (line 45) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RouteWithTrackTest.java
  class RouteWithTrackTest (line 14) | class RouteWithTrackTest {
    method constructor_args_not_null (line 21) | @Test
    method cannot_modify_track_externally (line 28) | @Test
    method when_route_is_empty_track_must_be_empty (line 39) | @Test
    method when_route_is_nonempty_track_must_be_nonempty (line 48) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RoutingPlanTest.java
  class RoutingPlanTest (line 17) | class RoutingPlanTest {
    method constructor_args_not_null (line 28) | @Test
    method no_visits_without_a_depot (line 42) | @Test
    method no_routes_without_a_depot (line 50) | @Test
    method there_must_be_one_route_per_vehicle_when_there_is_a_depot (line 56) | @Test
    method routes_vehicle_references_must_be_consistent_with_vehicles_in_routing_plan (line 64) | @Test
    method routes_visit_references_must_be_consistent_with_visits_in_routing_plan (line 74) | @Test
    method cannot_modify_collections_externally (line 115) | @Test
    method empty_routing_plan_should_be_empty (line 135) | @Test
    method isEmpty (line 145) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleDataTest.java
  class VehicleDataTest (line 8) | class VehicleDataTest {
    method constructor_params_must_not_be_null (line 10) | @Test
    method vehicles_are_equal_if_they_have_same_properties (line 15) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleFactoryTest.java
  class VehicleFactoryTest (line 7) | class VehicleFactoryTest {
    method createVehicle (line 9) | @Test
    method vehicleData (line 22) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleTest.java
  class VehicleTest (line 8) | class VehicleTest {
    method constructor_params_must_not_be_null (line 10) | @Test
    method vehicles_are_identified_based_on_id (line 15) | @Test
    method equal_vehicles_must_have_same_hashcode (line 39) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceEntityTest.java
  class DistanceEntityTest (line 8) | class DistanceEntityTest {
    method constructor_params_must_not_be_null (line 10) | @Test
    method equals (line 17) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryImplTest.java
  class DistanceRepositoryImplTest (line 21) | @ExtendWith(MockitoExtension.class)
    method should_save_distance (line 34) | @Test
    method should_return_distance_when_entity_is_found (line 45) | @Test
    method should_return_negative_number_when_distance_not_found (line 54) | @Test
    method should_delete_distance_by_location_id (line 60) | @Test
    method should_delete_all_distances (line 66) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryIntegrationTest.java
  class DistanceRepositoryIntegrationTest (line 16) | @QuarkusTest
    method setUp (line 24) | @BeforeEach
    method panache_repository_should_persist_and_delete_distances (line 29) | @Test
    method distance (line 44) | static DistanceEntity distance(long fromId, long toId) {
    method delete_by_fromId_or_toId (line 48) | @Test
    method should_return_saved_distance (line 67) | @Test
    method should_return_negative_number_when_distance_not_found (line 78) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationEntityTest.java
  class LocationEntityTest (line 10) | class LocationEntityTest {
    method constructor_params_must_not_be_null (line 12) | @Test
    method getters (line 19) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryImplTest.java
  class LocationRepositoryImplTest (line 22) | @ExtendWith(MockitoExtension.class)
    method locationEntity (line 34) | private static LocationEntity locationEntity(Location location) {
    method should_create_location (line 42) | @Test
    method remove_created_location_by_id (line 64) | @Test
    method removing_nonexistent_location_should_fail (line 75) | @Test
    method remove_all_locations (line 86) | @Test
    method get_all_locations (line 92) | @Test
    method find_by_id (line 99) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryIntegrationTest.java
  class LocationRepositoryIntegrationTest (line 18) | @QuarkusTest
    method setUp (line 25) | @BeforeEach
    method db_schema (line 30) | @Test
    method remove_created_location (line 51) | @Test
    method get_and_remove_all_locations (line 72) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleEntityTest.java
  class VehicleEntityTest (line 7) | class VehicleEntityTest {
    method getters (line 9) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleRepositoryImplTest.java
  class VehicleRepositoryImplTest (line 23) | @ExtendWith(MockitoExtension.class)
    method vehicleEntity (line 35) | private static VehicleEntity vehicleEntity(Vehicle vehicle) {
    method should_create_vehicle (line 39) | @Test
    method create_vehicle_from_given_data (line 59) | @Test
    method remove_created_vehicle_by_id (line 74) | @Test
    method removing_nonexistent_vehicle_should_fail (line 85) | @Test
    method remove_all_vehicles (line 96) | @Test
    method get_all_vehicles (line 102) | @Test
    method find_by_id (line 109) | @Test
    method update (line 116) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/DistanceMapImplTest.java
  class DistanceMapImplTest (line 12) | class DistanceMapImplTest {
    method matrix_row_must_not_be_null (line 14) | @Test
    method distance_map_should_return_value_from_distance_matrix_row (line 19) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/MockSolver.java
  class MockSolver (line 12) | public class MockSolver<Solution_> {
    method build (line 17) | public static <Solution_> MockSolver<Solution_> build(Solution_ soluti...
    method MockSolver (line 22) | private MockSolver(Solution_ workingSolution, MockProblemChangeDirecto...
    method addProblemChange (line 31) | public void addProblemChange(ProblemChange<Solution_> problemChange) {
    method whenLookingUp (line 39) | public MockProblemChangeDirector.LookUpMockBuilder whenLookingUp(Objec...
    method verifyEntityAdded (line 47) | public void verifyEntityAdded(Object entity) {
    method verifyEntityRemoved (line 51) | public void verifyEntityRemoved(Object entity) {
    method verifyVariableChanged (line 55) | public void verifyVariableChanged(Object entity, String variableName) {
    method verifyProblemFactAdded (line 59) | public void verifyProblemFactAdded(Object fact) {
    method verifyProblemFactRemoved (line 63) | public void verifyProblemFactRemoved(Object fact) {
    method verifyProblemPropertyChanged (line 67) | public void verifyProblemPropertyChanged(Object entityOrFact) {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisherTest.java
  class RouteChangedEventPublisherTest (line 32) | @ExtendWith(MockitoExtension.class)
    method should_covert_solution_to_event_and_publish_it (line 40) | @Test
    method empty_solution_should_have_zero_routes_vehicles_etc (line 46) | @Test
    method solution_with_vehicles_and_no_depot_should_have_zero_routes (line 59) | @Test
    method nonempty_solution_without_vehicles_should_have_zero_routes_but_contain_visits (line 74) | @Test
    method initialized_solution_should_have_one_route_per_vehicle (line 92) | @Test
    method fail_fast_if_vehicles_next_visit_doesnt_exist (line 148) | @Test
    method vehicle_without_a_depot_is_illegal_if_depot_exists (line 163) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerImplTest.java
  class RouteOptimizerImplTest (line 35) | @ExtendWith(MockitoExtension.class)
    method solution_with_depot_and_no_visits_should_be_published (line 55) | @Test
    method solution_with_vehicles_and_no_depot_should_be_published (line 75) | @Test
    method removing_wrong_vehicle_should_fail_fast (line 105) | @Test
    method removing_wrong_location_should_fail_fast (line 119) | @Test
    method added_vehicle_should_be_moved_to_the_depot_even_if_solver_is_not_yet_solving (line 139) | @Test
    method solver_should_start_when_vehicle_is_added_and_there_is_at_least_one_visit (line 162) | @Test
    method each_location_should_have_a_distance_map_after_it_is_added (line 178) | @Test
    method solver_should_start_when_two_locations_added_and_there_is_at_least_one_vehicle (line 188) | @Test
    method solver_should_not_start_nor_stop_when_modifying_location_and_there_are_no_vehicles (line 204) | @Test
    method solver_should_stop_and_publish_when_last_vehicle_is_removed (line 234) | @Test
    method solver_should_stop_when_locations_reduced_to_one (line 249) | @Test
    method removing_depot_impossible_when_there_are_other_locations (line 269) | @Test
    method when_depot_is_added_all_vehicles_should_be_moved_to_it (line 282) | @Test
    method adding_location_to_running_solver_must_happen_through_problem_fact_change (line 317) | @Test
    method removing_location_from_solver_with_more_than_two_locations_must_happen_through_problem_fact_change (line 330) | @Test
    method adding_vehicle_to_running_solver_must_happen_through_problem_fact_change (line 354) | @Test
    method removing_vehicle_from_running_solver_with_more_than_one_vehicle_must_happen_through_problem_fact_change (line 371) | @Test
    method changing_vehicle_capacity_should_take_effect_when_solver_is_started_or_be_published (line 391) | @Test
    method changing_vehicle_capacity_must_happen_through_problem_fact_change_when_solver_is_running (line 415) | @Test
    method changing_vehicle_capacity_must_fail_fast_if_the_vehicle_does_not_exist (line 430) | @Test
    method remove_all_locations_should_stop_solver_and_publish_preliminary_solution (line 441) | @Test
    method remove_all_vehicles_should_stop_solver_and_publish_preliminary_solution (line 462) | @Test
    method removing_all_locations_should_not_fail_when_solver_is_not_solving (line 482) | @Test
    method removing_all_vehicles_should_not_fail_when_solver_is_not_solving (line 487) | @Test
    method verifyPublishingPreliminarySolution (line 492) | private VehicleRoutingSolution verifyPublishingPreliminarySolution() {
    method verifySolverStartedWithSolution (line 497) | private VehicleRoutingSolution verifySolverStartedWithSolution() {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverExceptionTest.java
  class SolverExceptionTest (line 32) | @ExtendWith(MockitoExtension.class)
    method should_publish_error_if_solver_stops_solving_without_being_terminated (line 46) | @Test
    method should_not_publish_error_if_solver_is_terminated_early (line 63) | @Test
    method should_propagate_any_exception_from_solver (line 80) | @Test
    method assertTestExceptionThrownDuringOperation (line 112) | private static void assertTestExceptionThrownDuringOperation(ThrowingC...
    method assertTestExceptionThrownWhenStoppingSolver (line 116) | private static void assertTestExceptionThrownWhenStoppingSolver(Solver...
    method assertTestExceptionThrownDuring (line 120) | private static void assertTestExceptionThrownDuring(ThrowingCallable r...
    class TestException (line 127) | private static class TestException extends RuntimeException {
      method TestException (line 129) | TestException(String message) {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverIntegrationTest.java
  class SolverIntegrationTest (line 39) | class SolverIntegrationTest {
    method setUp (line 50) | @BeforeEach
    method tearDown (line 58) | @AfterEach
    method solver_in_daemon_mode_should_not_fail_on_empty_solution (line 64) | @Disabled("Solver fails fast on empty value ranges") // TODO file an O...
    method removing_visits_should_not_fail (line 74) | @Test
    method startSolver (line 114) | private void startSolver(Solver<VehicleRoutingSolution> solver, Vehicl...
    method terminateSolver (line 118) | private VehicleRoutingSolution terminateSolver(Solver<VehicleRoutingSo...
    class ProblemChangeProcessingMonitor (line 131) | static class ProblemChangeProcessingMonitor implements SolverEventList...
      method beforeProblemChange (line 137) | void beforeProblemChange() {
      method awaitAllProblemChanges (line 142) | boolean awaitAllProblemChanges(int milliseconds) {
      method bestSolutionChanged (line 158) | @Override

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverManagerIntegrationTest.java
  class SolverManagerIntegrationTest (line 30) | @QuarkusTest
    method mockDistanceMap (line 39) | private static DistanceMap mockDistanceMap() {
    method solver_should_be_in_daemon_mode (line 43) | @Test
    class RouteChangedEventSemaphore (line 68) | @ApplicationScoped
      method onApplicationEvent (line 74) | public void onApplicationEvent(@Observes RouteChangedEvent event) {
      method waitForRouteUpdate (line 79) | void waitForRouteUpdate() throws InterruptedException {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverManagerTest.java
  class SolverManagerTest (line 41) | @ExtendWith(MockitoExtension.class)
    method returnSolverFutureWhenSolverIsStarted (line 64) | private void returnSolverFutureWhenSolverIsStarted() {
    method should_listen_for_best_solution_events (line 74) | @Test
    method ignore_new_best_solutions_when_unprocessed_fact_changes (line 79) | @Test
    method publish_new_best_solution_if_all_fact_changes_processed (line 92) | @Test
    method startSolver_should_start_solver (line 105) | @Test
    method stopSolver_should_terminate_solver (line 116) | @Test
    method reset_interrupted_flag (line 130) | @Test
    method change_operations_should_fail_if_solver_has_not_started_yet (line 148) | @Test
    method change_operations_should_fail_is_solver_has_died (line 167) | @Test
    method change_operations_should_submit_problem_fact_changes_to_solver (line 191) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverTestProfile.java
  class SolverTestProfile (line 8) | public class SolverTestProfile implements QuarkusTestProfile {
    method getConfigOverrides (line 10) | @Override

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/VehicleRoutingConstraintProviderTest.java
  class VehicleRoutingConstraintProviderTest (line 17) | class VehicleRoutingConstraintProviderTest {
    method distanceToAll (line 26) | private static DistanceMap distanceToAll(long distance) {
    method route (line 30) | private static void route(PlanningVehicle vehicle, PlanningVisit... vi...
    method vehicle_capacity_penalized_1vehicle_1visit (line 41) | @Test
    method vehicle_capacity_penalized_1vehicle_3visits (line 58) | @Test
    method capacity_not_penalized_when_greater_or_equal_to_demand (line 79) | @Test
    method vehicles_capacity_constraint_should_work_for_multiple_vehicles (line 106) | @Test
    method distance_2vehicles (line 146) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicleTest.java
  class AddVehicleTest (line 12) | class AddVehicleTest {
    method add_vehicle_should_add_vehicle (line 14) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisitTest.java
  class AddVisitTest (line 12) | class AddVisitTest {
    method add_visit_should_add_location_and_create_visit (line 14) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/ChangeVehicleCapacityTest.java
  class ChangeVehicleCapacityTest (line 12) | class ChangeVehicleCapacityTest {
    method change_vehicle_capacity (line 14) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVehicleTest.java
  class RemoveVehicleTest (line 21) | class RemoveVehicleTest {
    method remove_vehicle (line 23) | @Test
    method fail_fast_if_working_solution_vehicle_list_does_not_contain_working_vehicle (line 60) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVisitTest.java
  class RemoveVisitTest (line 15) | class RemoveVisitTest {
    method remove_last_visit (line 17) | @Test
    method remove_middle_visit (line 41) | @Test
    method fail_fast_if_working_solution_visit_list_does_not_contain_working_visit (line 78) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationFactoryTest.java
  class PlanningLocationFactoryTest (line 10) | class PlanningLocationFactoryTest {
    method planning_location_should_have_same_properties_as_domain_location (line 12) | @Test
    method test_locations_distance_map_should_work (line 27) | @Test
    method test_location_without_distance_map_should_throw_exception (line 34) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationTest.java
  class PlanningLocationTest (line 16) | class PlanningLocationTest {
    method distance_to_location_should_equal_value_in_distance_map (line 18) | @Test
    method angle_from_depot_at_zero_should_be_atan2_of_latitude_longitude (line 34) | @Test
    method angle_from_depot_on_real_coordinates_should_be_atan2_of_latitude_longitude (line 46) | @Test
    method locationAt (line 55) | private static PlanningLocation locationAt(double latitude, double lon...

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleFactoryTest.java
  class PlanningVehicleFactoryTest (line 10) | class PlanningVehicleFactoryTest {
    method planning_vehicle (line 12) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleTest.java
  class PlanningVehicleTest (line 11) | class PlanningVehicleTest {
    method get_future_visits_should_return_an_iterable_that_iterates_over_all_visits (line 13) | @Test
    method get_future_visits_should_throw_a_NoSuchElementException_when_there_are_no_more_visits (line 30) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisitFactoryTest.java
  class PlanningVisitFactoryTest (line 7) | class PlanningVisitFactoryTest {
    method visit_should_have_same_id_as_location_and_default_demand (line 9) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactoryTest.java
  class SolutionFactoryTest (line 10) | class SolutionFactoryTest {
    method empty_solution_should_be_empty (line 12) | @Test
    method solution_created_from_vehicles_depot_and_visits_should_be_consistent (line 21) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/weight/DepotAngleVisitDifficultyWeightFactoryTest.java
  class DepotAngleVisitDifficultyWeightFactoryTest (line 25) | class DepotAngleVisitDifficultyWeightFactoryTest {
    method DepotAngleVisitDifficultyWeightFactoryTest (line 35) | DepotAngleVisitDifficultyWeightFactoryTest() {
    method location (line 41) | private PlanningLocation location(long id, double latitude, double lon...
    method location (line 45) | private PlanningLocation location(
    method weight (line 58) | private DepotAngleVisitDifficultyWeight weight(PlanningLocation locati...
    method visit_weights_should_be_ordered_by_angle_then_by_distance_then_by_id (line 62) | @Test
    method locations_with_asymmetrical_distances_should_be_sorted_by_round_trip_time (line 97) | @Test
    method equals (line 111) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/ClearResourceTest.java
  class ClearResourceTest (line 13) | @ExtendWith(MockitoExtension.class)
    method clear (line 23) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/DataSetDownloadResourceTest.java
  class DataSetDownloadResourceTest (line 19) | @ExtendWith(MockitoExtension.class)
    method export (line 27) | @Test
    method content_length_should_be_number_of_bytes (line 51) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/DemoResourceTest.java
  class DemoResourceTest (line 12) | @ExtendWith(MockitoExtension.class)
    method demo (line 20) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/LocationResourceTest.java
  class LocationResourceTest (line 14) | @ExtendWith(MockitoExtension.class)
    method addLocation (line 22) | @Test
    method removeLocation (line 31) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/ServerInfoResourceTest.java
  class ServerInfoResourceTest (line 27) | @ExtendWith(MockitoExtension.class)
    method serverInfo (line 37) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/VehicleResourceTest.java
  class VehicleResourceTest (line 12) | @ExtendWith(MockitoExtension.class)
    method addVehicle (line 20) | @Test
    method removeVehicle (line 26) | @Test
    method removeAnyVehicle (line 32) | @Test
    method changeCapacity (line 38) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableCoordinatesTest.java
  class PortableCoordinatesTest (line 12) | class PortableCoordinatesTest {
    method marshal_to_json (line 14) | @Test
    method conversion_from_domain (line 23) | @Test
    method should_reduce_scale_if_needed (line 35) | @Test
    method equals_hashCode_toString (line 46) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableDistanceTest.java
  class PortableDistanceTest (line 10) | class PortableDistanceTest {
    method marshal_to_json (line 12) | @Test
    method from_distance (line 19) | @Test
    method equals_hashCode_toString (line 24) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableErrorMessageTest.java
  class PortableErrorMessageTest (line 10) | class PortableErrorMessageTest {
    method marshal_to_json (line 12) | @Test
    method factory_method (line 20) | @Test
    method equals_hashCode_toString (line 29) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableLocationTest.java
  class PortableLocationTest (line 14) | class PortableLocationTest {
    method marshal_to_json (line 22) | @Test
    method unmarshal_from_json (line 27) | @Test
    method constructor_params_must_not_be_null (line 32) | @Test
    method fromLocation (line 42) | @Test
    method equals_hashCode_toString (line 56) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRouteTest.java
  class PortableRouteTest (line 13) | class PortableRouteTest {
    method marshal_to_json (line 15) | @Test
    method visit (line 36) | private static PortableLocation visit(long id, double latitude, double...
    method coordinates (line 40) | private static PortableCoordinates coordinates(double latitude, double...

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlanFactoryTest.java
  class PortableRoutingPlanFactoryTest (line 19) | class PortableRoutingPlanFactoryTest {
    method portable_routing_plan_empty (line 21) | @Test
    method portable_routing_plan_with_two_routes (line 30) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableVehicleTest.java
  class PortableVehicleTest (line 10) | class PortableVehicleTest {
    method marshall_to_json (line 12) | @Test
    method constructor_params_must_not_be_null (line 23) | @Test
    method fromVehicle (line 28) | @Test
    method equals_hashCode_toString (line 43) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouterTest.java
  class AirDistanceRouterTest (line 9) | class AirDistanceRouterTest {
    method travel_time_should_be_distance_divided_by_speed (line 11) | @Test
    method bounding_box_is_the_whole_globe (line 23) | @Test
    method path_from_a_to_b_should_be_the_line_ab (line 30) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperIntegrationTest.java
  class GraphHopperIntegrationTest (line 13) | class GraphHopperIntegrationTest {
    method graphhopper_should_import_and_load_osm_file_successfully (line 17) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperRouterTest.java
  class GraphHopperRouterTest (line 26) | @ExtendWith(MockitoExtension.class)
    method whenRouteReturnResponse (line 41) | private void whenRouteReturnResponse() {
    method whenBestReturnPath (line 45) | private void whenBestReturnPath() {
    method travel_time_should_return_graphhopper_time (line 49) | @Test
    method getDistance_should_throw_exception_when_no_route_exists (line 61) | @Test
    method getRoute_should_return_graphhopper_route (line 76) | @Test
    method should_return_graphHopper_bounds (line 99) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/RoutingConfigTest.java
  class RoutingConfigTest (line 10) | class RoutingConfigTest {
    method should_throw_exception_when_url_is_malformed (line 12) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/demo/DemoServiceTest.java
  class DemoServiceTest (line 36) | @ExtendWith(MockitoExtension.class)
    method demos_should_return_routing_problems (line 65) | @Test
    method loadDemo (line 75) | @Test
    method retry_when_adding_location_fails (line 90) | @Test
    method export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository (line 100) | @Test
    method export_should_marshal_empty_routing_plan_when_repositories_empty (line 119) | @Test
    method verifyAndCaptureMarshalledProblem (line 135) | private RoutingProblem verifyAndCaptureMarshalledProblem() {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/demo/RoutingProblemListTest.java
  class RoutingProblemListTest (line 18) | class RoutingProblemListTest {
    method should_validate_constructor_arguments (line 20) | @Test
    method should_fail_on_duplicate_problem_names (line 25) | @Test
    method all_by_name_should_return_expected_problems (line 35) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetMarshallerTest.java
  class DataSetMarshallerTest (line 31) | class DataSetMarshallerTest {
    method unmarshal_data_set (line 33) | @Test
    method marshal_data_set (line 58) | @Test
    method should_rethrow_exception_from_object_mapper (line 85) | @Test
    method location_conversion (line 99) | @Test
    method routing_problem_conversion (line 116) | @Test
    method should_convert_empty_data_set_correctly (line 142) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/distance/DistanceMatrixImplTest.java
  class DistanceMatrixImplTest (line 23) | @ExtendWith(MockitoExtension.class)
    method should_calculate_distance_map (line 31) | @Test
    method should_calculate_distance_only_once (line 86) | @Test
    method should_remove_distance_row_from_matrix_and_repository_when_location_removed (line 114) | @Test
    method get_distance_after_put (line 133) | @Test
    method location (line 143) | private static Location location(long id, int longitude) {
    class MockDistanceCalculator (line 147) | private static class MockDistanceCalculator implements DistanceCalcula...
      method travelTimeMillis (line 149) | @Override

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/error/ErrorListenerTest.java
  class ErrorListenerTest (line 15) | @ExtendWith(MockitoExtension.class)
    method should_pass_error_message_to_consumer (line 21) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/location/LocationServiceIntegrationTest.java
  class LocationServiceIntegrationTest (line 19) | @QuarkusTest
    method location_service_should_be_transactional (line 27) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/location/LocationServiceTest.java
  class LocationServiceTest (line 31) | @ExtendWith(MockitoExtension.class)
    method createLocation_should_validate_arguments (line 50) | @Test
    method createLocation (line 56) | @Test
    method addLocation_should_validate_arguments (line 76) | @Test
    method addLocation (line 81) | @Test
    method removing_depot_should_be_successful_when_it_is_the_last_location (line 93) | @Test
    method removing_nonexistent_location_should_publish_error (line 107) | @Test
    method removing_depot_when_there_are_other_locations_should_publish_error (line 119) | @Test
    method removing_visit_should_be_successful (line 135) | @Test
    method clear (line 151) | @Test
    method should_not_optimize_and_roll_back_if_distance_calculation_fails (line 160) | @Test
    method populate_matrix_should_read_all_distances (line 174) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/region/BoundingBoxTest.java
  class BoundingBoxTest (line 10) | class BoundingBoxTest {
    method validate_southwest_and_northeast_arguments (line 12) | @Test
    method should_fail_if_bounding_box_has_zero_dimension (line 37) | @Test
    method constructor_args_not_null (line 53) | @Test
    method should_work_with_southwest_and_northeast (line 59) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/region/RegionPropertiesTest.java
  class RegionPropertiesTest (line 13) | @QuarkusTest
    method test (line 19) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/region/RegionServiceTest.java
  class RegionServiceTest (line 17) | @ExtendWith(MockitoExtension.class)
    method should_return_country_codes_from_properties (line 27) | @Test
    method should_return_graphHopper_bounds (line 35) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/reload/ReloadServiceTest.java
  class ReloadServiceTest (line 26) | @ExtendWith(MockitoExtension.class)
    method should_reload_on_startup (line 48) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/route/RouteListenerTest.java
  class RouteListenerTest (line 35) | @ExtendWith(MockitoExtension.class)
    method new_listener_should_return_empty_best_route (line 51) | @Test
    method event_with_no_routes_should_be_consumed_as_an_empty_routing_plan (line 56) | @Test
    method event_with_no_visits_and_a_depot_should_be_consumed_as_plan_with_empty_routes (line 78) | @Test
    method listener_should_pass_routing_plan_to_consumer_when_an_update_event_occurs (line 111) | @Test
    method should_discard_update_gracefully_if_one_of_the_locations_no_longer_exist (line 157) | @Test
    method should_discard_update_gracefully_if_one_of_the_vehicles_no_longer_exist (line 187) | @Test
    method verifyAndCaptureConsumedPlan (line 216) | private RoutingPlan verifyAndCaptureConsumedPlan() {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/route/ShallowRouteTest.java
  class ShallowRouteTest (line 9) | class ShallowRouteTest {
    method shallow_route_to_string (line 11) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/vehicle/VehicleServiceIntegrationTest.java
  class VehicleServiceIntegrationTest (line 11) | @QuarkusTest
    method vehicle_service_should_be_transactional (line 17) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/vehicle/VehicleServiceTest.java
  class VehicleServiceTest (line 21) | @ExtendWith(MockitoExtension.class)
    method create_default_vehicle (line 33) | @Test
    method createVehicle (line 52) | @Test
    method addVehicle_should_validate_arguments (line 67) | @Test
    method addVehicle (line 72) | @Test
    method removeVehicle (line 82) | @Test
    method removeAnyVehicle_should_remove_oldest_vehicle (line 94) | @Test
    method removeAll (line 111) | @Test
    method changeCapacity (line 118) | @Test

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/util/jackson/JacksonAssertions.java
  class JacksonAssertions (line 3) | public class JacksonAssertions {
    method assertThat (line 5) | public static <T> ObjectAssert<T> assertThat(T actual) {
    method assertThat (line 9) | public static JsonAssert assertThat(String actual) {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/util/jackson/JsonAssert.java
  class JsonAssert (line 9) | public class JsonAssert extends StringAssert {
    method JsonAssert (line 13) | protected JsonAssert(String actual) {
    method deserializedIsEqualTo (line 17) | public void deserializedIsEqualTo(Object expected) {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/util/jackson/ObjectAssert.java
  class ObjectAssert (line 9) | public class ObjectAssert<T> extends AbstractAssert<ObjectAssert<T>, T> {
    method ObjectAssert (line 13) | protected ObjectAssert(T actual) {
    method serializedIsEqualToJson (line 17) | public void serializedIsEqualToJson(String expected) {

FILE: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/util/junit/FileContentExtension.java
  class FileContentExtension (line 14) | public class FileContentExtension implements ParameterResolver {
    method supportsParameter (line 16) | @Override
    method resolveParameter (line 23) | @Override

FILE: optaweb-vehicle-routing-frontend/src/@types/eventsourcemock.d.ts
  type EventSource (line 4) | interface EventSource {

FILE: optaweb-vehicle-routing-frontend/src/registerServiceWorker.ts
  function register (line 21) | function register() {
  function registerValidSW (line 58) | function registerValidSW(swUrl: string) {
  function checkValidServiceWorker (line 89) | function checkValidServiceWorker(swUrl: string) {
  function unregister (line 116) | function unregister() {

FILE: optaweb-vehicle-routing-frontend/src/store/client/types.ts
  type ActionType (line 4) | enum ActionType {
  type UpdateViewportAction (line 9) | interface UpdateViewportAction extends Action<ActionType.UPDATE_VIEWPORT> {
  type ResetViewportAction (line 13) | interface ResetViewportAction extends Action<ActionType.RESET_VIEWPORT> {
  type UserViewport (line 16) | interface UserViewport {
  type ViewportAction (line 22) | type ViewportAction =

FILE: optaweb-vehicle-routing-frontend/src/store/demo/types.ts
  type ActionType (line 3) | enum ActionType {
  type RequestDemoAction (line 8) | interface RequestDemoAction extends Action<ActionType.REQUEST_DEMO> {
  type FinishLoadingAction (line 12) | interface FinishLoadingAction extends Action<ActionType.FINISH_LOADING> {
  type DemoAction (line 15) | type DemoAction =
  type Demo (line 19) | interface Demo {

FILE: optaweb-vehicle-routing-frontend/src/store/message/types.ts
  type ActionType (line 3) | enum ActionType {
  type ReceiveMessageAction (line 8) | interface ReceiveMessageAction extends Action<ActionType.RECEIVE_MESSAGE> {
  type ReadMessageAction (line 12) | interface ReadMessageAction extends Action<ActionType.READ_MESSAGE> {
  type MessageAction (line 16) | type MessageAction = ReceiveMessageAction | ReadMessageAction;
  type MessagePayload (line 18) | interface MessagePayload {
  type Message (line 23) | interface Message extends MessagePayload {

FILE: optaweb-vehicle-routing-frontend/src/store/mockStore.ts
  type DispatchExts (line 14) | type DispatchExts = ThunkDispatch<AppState, WebSocketClient, WebSocketAc...

FILE: optaweb-vehicle-routing-frontend/src/store/route/types.ts
  type LatLng (line 3) | interface LatLng {
  type LatLngWithDescription (line 8) | interface LatLngWithDescription extends LatLng {
  type Location (line 12) | interface Location extends LatLng {
  type Vehicle (line 18) | interface Vehicle {
  type Route (line 24) | interface Route {
  type LatLngTuple (line 29) | type LatLngTuple = [number, number];
  type RouteWithTrack (line 31) | interface RouteWithTrack extends Route {
  type RoutingPlan (line 35) | interface RoutingPlan {
  type ActionType (line 43) | enum ActionType {
  type AddLocationAction (line 52) | interface AddLocationAction extends Action<ActionType.ADD_LOCATION> {
  type AddVehicleAction (line 56) | interface AddVehicleAction extends Action<ActionType.ADD_VEHICLE> {
  type ClearRouteAction (line 59) | interface ClearRouteAction extends Action<ActionType.CLEAR_SOLUTION> {
  type DeleteLocationAction (line 62) | interface DeleteLocationAction extends Action<ActionType.DELETE_LOCATION> {
  type DeleteVehicleAction (line 66) | interface DeleteVehicleAction extends Action<ActionType.DELETE_VEHICLE> {
  type VehicleCapacity (line 70) | interface VehicleCapacity {
  type UpdateRouteAction (line 75) | interface UpdateRouteAction extends Action<ActionType.UPDATE_ROUTING_PLA...
  type RouteAction (line 79) | type RouteAction =

FILE: optaweb-vehicle-routing-frontend/src/store/server/types.ts
  type ActionType (line 4) | enum ActionType {
  type ServerInfoAction (line 8) | interface ServerInfoAction extends Action<ActionType.SERVER_INFO> {
  type Demo (line 12) | interface Demo {
  type BoundingBox (line 17) | type BoundingBox = [LatLng, LatLng];
  type ServerInfo (line 19) | interface ServerInfo {

FILE: optaweb-vehicle-routing-frontend/src/store/store.ts
  type StoreConfig (line 16) | interface StoreConfig {
  function configureStore (line 20) | function configureStore(

FILE: optaweb-vehicle-routing-frontend/src/store/types.ts
  type ThunkCommand (line 18) | type ThunkCommand<A extends Action> = ThunkAction<void, AppState, WebSoc...
  type ActionFactory (line 26) | type ActionFactory<V, A extends Action> = V extends void ?
  type ThunkCommandFactory (line 37) | type ThunkCommandFactory<V, A extends Action> = V extends void ?
  type AppState (line 41) | interface AppState {

FILE: optaweb-vehicle-routing-frontend/src/store/websocket/operations.ts
  type ConnectClientThunkAction (line 13) | type ConnectClientThunkAction =

FILE: optaweb-vehicle-routing-frontend/src/store/websocket/types.ts
  type WebSocketConnectionStatus (line 3) | enum WebSocketConnectionStatus {
  type ActionType (line 9) | enum ActionType {
  type InitWsConnectionAction (line 15) | interface InitWsConnectionAction extends Action<ActionType.WS_CONNECT> {
  type WsConnectionSuccessAction (line 18) | interface WsConnectionSuccessAction extends Action<ActionType.WS_CONNECT...
  type WsConnectionFailureAction (line 21) | interface WsConnectionFailureAction extends Action<ActionType.WS_CONNECT...
  type WebSocketAction (line 25) | type WebSocketAction =

FILE: optaweb-vehicle-routing-frontend/src/ui/components/Alerts.tsx
  type StateProps (line 8) | interface StateProps {
  type DispatchProps (line 16) | interface DispatchProps {
  type Props (line 24) | type Props = StateProps & DispatchProps;

FILE: optaweb-vehicle-routing-frontend/src/ui/components/DemoDropdown.tsx
  type Props (line 5) | interface Props {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/Location.tsx
  type LocationProps (line 5) | interface LocationProps {
  function shorten (line 22) | function shorten(text: string) {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/LocationList.tsx
  type LocationListProps (line 7) | interface LocationListProps {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/LocationMarker.tsx
  type Props (line 18) | interface Props {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/RouteMap.tsx
  type Omit (line 9) | type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
  type Props (line 11) | interface Props {
  function color (line 26) | function color(index: number) {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/SearchBox.tsx
  type Result (line 10) | interface Result {
  type Props (line 16) | interface Props {
  type State (line 23) | interface State {
  type ViewBox (line 30) | type ViewBox = [number, number, number, number];
  class SearchBox (line 42) | class SearchBox extends React.Component<Props, State> {
    method constructor (line 55) | constructor(props: Props) {
    method componentDidUpdate (line 71) | componentDidUpdate() {
    method componentWillUnmount (line 75) | componentWillUnmount() {
    method handleTextInputChange (line 81) | handleTextInputChange(query: string) {
    method handleClick (line 115) | handleClick(index: number) {
    method render (line 125) | render() {

FILE: optaweb-vehicle-routing-frontend/src/ui/components/Vehicle.tsx
  type VehicleProps (line 14) | interface VehicleProps {

FILE: optaweb-vehicle-routing-frontend/src/ui/connection/ConnectionError.tsx
  type ConnectionErrorProps (line 13) | interface ConnectionErrorProps {

FILE: optaweb-vehicle-routing-frontend/src/ui/connection/ConnectionManager.tsx
  type StateProps (line 8) | interface StateProps {
  type DispatchProps (line 12) | interface DispatchProps {
  type Props (line 16) | type Props = StateProps & DispatchProps;
  class ConnectionManager (line 26) | class ConnectionManager extends React.Component<Props> {
    method componentDidMount (line 27) | componentDidMount() {
    method render (line 31) | render() {

FILE: optaweb-vehicle-routing-frontend/src/ui/pages/Demo.tsx
  type StateProps (line 31) | interface StateProps {
  type DispatchProps (line 46) | interface DispatchProps {
  type DemoProps (line 83) | type DemoProps = DispatchProps & StateProps;
  type DemoState (line 85) | interface DemoState {
  class Demo (line 89) | class Demo extends React.Component<DemoProps, DemoState> {
    method constructor (line 90) | constructor(props: DemoProps) {
    method handleMapClick (line 102) | handleMapClick(e: LeafletMouseEvent) {
    method handleSearchResultClick (line 106) | handleSearchResultClick(result: Result) {
    method handleDemoLoadClick (line 110) | handleDemoLoadClick(demoName: string) {
    method onSelectLocation (line 114) | onSelectLocation(id: number) {
    method render (line 118) | render() {

FILE: optaweb-vehicle-routing-frontend/src/ui/pages/InfoBlock.tsx
  type InfoBlockProps (line 12) | interface InfoBlockProps {
  type CapacityInfoProps (line 40) | interface CapacityInfoProps {
  type DistanceInfoProps (line 57) | interface DistanceInfoProps {
  type VisitInfoProps (line 73) | interface VisitInfoProps {

FILE: optaweb-vehicle-routing-frontend/src/ui/pages/Route.tsx
  type StateProps (line 22) | interface StateProps {
  type DispatchProps (line 30) | interface DispatchProps {
  type RouteProps (line 50) | type RouteProps = DispatchProps & StateProps;
  type RouteState (line 52) | interface RouteState {
  class Route (line 57) | class Route extends React.Component<RouteProps, RouteState> {
    method constructor (line 58) | constructor(props: RouteProps) {
    method handleMapClick (line 69) | handleMapClick(e: LeafletMouseEvent) {
    method onSelectLocation (line 73) | onSelectLocation(id: number) {
    method render (line 77) | render() {

FILE: optaweb-vehicle-routing-frontend/src/ui/pages/Vehicles.tsx
  type StateProps (line 15) | interface StateProps {
  type DispatchProps (line 19) | interface DispatchProps {
  type Props (line 25) | type Props = StateProps & DispatchProps;

FILE: optaweb-vehicle-routing-frontend/src/ui/pages/Visits.tsx
  type StateProps (line 9) | interface StateProps {
  type DispatchProps (line 19) | interface DispatchProps {
  type Props (line 27) | type Props = StateProps & DispatchProps;

FILE: optaweb-vehicle-routing-frontend/src/websocket/WebSocketClient.ts
  class WebSocketClient (line 5) | class WebSocketClient {
    method constructor (line 10) | constructor(backendUrl: string) {
    method connect (line 15) | connect(successCallback: () => void, errorCallback: (err: Event) => vo...
    method addLocation (line 33) | addLocation(latLng: LatLngWithDescription): Promise<Response> {
    method addVehicle (line 43) | addVehicle(): Promise<Response> {
    method loadDemo (line 47) | loadDemo(name: string): Promise<Response> {
    method deleteLocation (line 51) | deleteLocation(locationId: number): Promise<Response> {
    method deleteAnyVehicle (line 56) | deleteAnyVehicle(): Promise<Response> {
    method deleteVehicle (line 60) | deleteVehicle(vehicleId: number): Promise<Response> {
    method changeVehicleCapacity (line 64) | changeVehicleCapacity(vehicleId: number, capacity: number): Promise<Re...
    method clear (line 71) | clear(): Promise<Response> {
    method subscribeToServerInfo (line 75) | subscribeToServerInfo(subscriptionCallback: (serverInfo: ServerInfo) =...
    method subscribeToRoute (line 81) | subscribeToRoute(subscriptionCallback: (plan: RoutingPlan) => void): v...
    method subscribeToErrorTopic (line 89) | subscribeToErrorTopic(subscriptionCallback: (errorMessage: MessagePayl...
Condensed preview — 399 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (853K chars).
[
  {
    "path": ".gitattributes",
    "chars": 350,
    "preview": "# Default to linux endings\n* text eol=lf\n\n# OS specific files\n###################\n\n*.sh eol=lf\n*.bat eol=crlf\n\n# Binary "
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 497,
    "preview": "version: 2\nupdates:\n- package-ecosystem: maven\n  directory: \"/\"\n  schedule:\n    interval: daily\n    time: '03:00'\n  open"
  },
  {
    "path": ".gitignore",
    "chars": 302,
    "preview": "/.DATA_DIR_LAST\n\n/target\n/local\n\n# Maven Profiler reports\n.profiler\n\n# IntelliJ\n.idea\n*.ipr\n*.iws\n*.iml\n\n# NetBeans\nnbpr"
  },
  {
    "path": ".mvn/extensions.xml",
    "chars": 643,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<extensions>\n  <extension>\n    <groupId>fr.jcgay.maven</groupId>\n    <artifactId>"
  },
  {
    "path": ".mvn/wrapper/MavenWrapperDownloader.java",
    "chars": 4941,
    "preview": "/*\n * Copyright 2007-present the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": ".mvn/wrapper/maven-wrapper.properties",
    "chars": 218,
    "preview": "distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip\nwrap"
  },
  {
    "path": "CONTRIBUTING.adoc",
    "chars": 510,
    "preview": "= Developing Drools, OptaPlanner and jBPM\n\n*If you want to build or contribute to a kiegroup project,\nhttps://github.com"
  },
  {
    "path": "CREDITS.adoc",
    "chars": 265,
    "preview": "\"link:https://www.iconfinder.com/icons/2222740/big_building_construction_home_house_icon[Big, building, construction, ho"
  },
  {
    "path": "LICENSE.txt",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.adoc",
    "chars": 1864,
    "preview": ":projectKey: org.optaweb.vehiclerouting:optaweb-vehicle-routing\n\n*This project is no longer maintained.*\nVisit https://g"
  },
  {
    "path": "mvnw",
    "chars": 10069,
    "preview": "#!/bin/sh\n# ----------------------------------------------------------------------------\n# Licensed to the Apache Softwa"
  },
  {
    "path": "mvnw.cmd",
    "chars": 6607,
    "preview": "@REM ----------------------------------------------------------------------------\n@REM Licensed to the Apache Software F"
  },
  {
    "path": "optaweb-vehicle-routing-backend/.dockerignore",
    "chars": 77,
    "preview": "*\n!target/*-runner\n!target/*-runner.jar\n!target/lib/*\n!target/quarkus-app*/*\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/.env-example",
    "chars": 619,
    "preview": "APP_DEMO_DATA_SET_DIR=${user.home}/.optaweb-vehicle-routing/dataset\nAPP_PERSISTENCE_H2_DIR=${user.home}/.optaweb-vehicle"
  },
  {
    "path": "optaweb-vehicle-routing-backend/.gitignore",
    "chars": 80,
    "preview": "!.mvn/wrapper/maven-wrapper.jar\n\n/.env\n\n/panache-archive.marker\n\n/target\n/local\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/Dockerfile",
    "chars": 244,
    "preview": "FROM docker.io/adoptopenjdk/openjdk15:ubi-minimal-jre\nENV APP_ROUTING_ENGINE air\nCOPY target/*-exec.jar /opt/app/optaweb"
  },
  {
    "path": "optaweb-vehicle-routing-backend/README.adoc",
    "chars": 175,
    "preview": "= OptaWeb Vehicle Routing back end\n\nSee the <<../optaweb-vehicle-routing-docs/src/main/asciidoc/development-guide#backen"
  },
  {
    "path": "optaweb-vehicle-routing-backend/pom.xml",
    "chars": 10608,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.jvm",
    "chars": 5506,
    "preview": "####\n# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode\n#\n# Before bu"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.legacy-jar",
    "chars": 5107,
    "preview": "####\n# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode\n#\n# Before bu"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.native",
    "chars": 723,
    "preview": "####\n# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/docker/Dockerfile.native-micro",
    "chars": 948,
    "preview": "####\n# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/Profiles.java",
    "chars": 195,
    "preview": "package org.optaweb.vehiclerouting;\n\npublic class Profiles {\n\n    public static final String TEST = \"test\";\n\n    private"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Coordinates.java",
    "chars": 1873,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport java.math.BigDecimal;\nimport java.util.Objects;\n\n/**\n * Horizontal ge"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/CountryCodeValidator.java",
    "chars": 1872,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.util.List;\nim"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Distance.java",
    "chars": 1612,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\n/**\n * Travel cost (distance between two {@link Location locations} or the l"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Location.java",
    "chars": 1322,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\n/**\n * A unique location significant to the user.\n */\npublic class Location "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/LocationData.java",
    "chars": 1757,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport java.util.Objects;\n\n/**\n * Location properties. It's not an entity ye"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Route.java",
    "chars": 2938,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.util.ArrayLis"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RouteWithTrack.java",
    "chars": 1454,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.L"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingPlan.java",
    "chars": 5369,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static java.util.Collections.emptyList;\nimport static java.util.strea"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/RoutingProblem.java",
    "chars": 1866,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/Vehicle.java",
    "chars": 909,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\n/**\n * Vehicle that can be used to deliver cargo to visits.\n */\npublic class"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleData.java",
    "chars": 1176,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport java.util.Objects;\n\n/**\n * Data about a vehicle.\n */\npublic class Veh"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/VehicleFactory.java",
    "chars": 1152,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\n/**\n * Creates {@link Vehicle} instances.\n */\npublic class VehicleFactory {\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/domain/package-info.java",
    "chars": 237,
    "preview": "/**\n * Domain model. Contains vehicles, depots, visits and so on.\n * The code in this package only depends on {@link jav"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceCrudRepository.java",
    "chars": 599,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport javax.enterprise.context.ApplicationScoped;\n\nimport io.qu"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceEntity.java",
    "chars": 1102,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport java.util.Objects;\n\nimport javax.persistence.EmbeddedId;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceKey.java",
    "chars": 1190,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport java.io.Serializable;\nimport java.util.Objects;\n\nimport j"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryImpl.java",
    "chars": 1396,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport java.util.Optional;\n\nimport javax.enterprise.context.Appl"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationCrudRepository.java",
    "chars": 305,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport javax.enterprise.context.ApplicationScoped;\n\nimport io.qu"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationEntity.java",
    "chars": 1557,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport java.math.BigDecimal;\nimport java.util.Objects;\n\nimport j"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryImpl.java",
    "chars": 2521,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.u"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleCrudRepository.java",
    "chars": 302,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport javax.enterprise.context.ApplicationScoped;\n\nimport io.qu"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleEntity.java",
    "chars": 1167,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport javax.persistence.Entity;\nimport javax.persistence.Genera"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleRepositoryImpl.java",
    "chars": 3286,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.u"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/persistence/package-info.java",
    "chars": 94,
    "preview": "/**\n * Persistence infrastructure.\n */\npackage org.optaweb.vehiclerouting.plugin.persistence;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/Constants.java",
    "chars": 233,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\npublic class Constants {\n\n    public static final String SOLVER_CONF"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/DistanceMapImpl.java",
    "chars": 807,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.plugin."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisher.java",
    "chars": 5009,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.util."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerConfig.java",
    "chars": 1190,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport java.util.concurrent.ExecutorService;\nimport java.util.concur"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerImpl.java",
    "chars": 6616,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport javax.ent"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/SolverManager.java",
    "chars": 8557,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport java.util.concurrent.Callable;\nimport java.util.concurrent.Ex"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/VehicleRoutingConstraintProvider.java",
    "chars": 2094,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.optaplanner.core.api.score.stream.ConstraintCollec"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicle.java",
    "chars": 830,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport java.util.Objects;\n\nimport org.optaplanner.core.api.so"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisit.java",
    "chars": 803,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport java.util.Objects;\n\nimport org.optaplanner.core.api.so"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/ChangeVehicleCapacity.java",
    "chars": 1202,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport java.util.Objects;\n\nimport org.optaplanner.core.api.so"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVehicle.java",
    "chars": 2179,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport java.util.Objects;\n\nimport org.optaplanner.core.api.so"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVisit.java",
    "chars": 2179,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport java.util.Objects;\n\nimport org.optaplanner.core.api.so"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/package-info.java",
    "chars": 437,
    "preview": "/**\n * {@link org.optaplanner.core.api.solver.change.ProblemChange} implementations.\n * <p>\n * Problem fact changes are "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/DistanceMap.java",
    "chars": 601,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\n/**\n * Contains travel distances from a reference location to"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningDepot.java",
    "chars": 580,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport java.util.Objects;\n\npublic class PlanningDepot {\n\n    "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocation.java",
    "chars": 1980,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport java.util.Objects;\n\npublic class PlanningLocation {\n\n "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationFactory.java",
    "chars": 2191,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport org.optaweb.vehiclerouting.domain.Location;\n\n/**\n * Cr"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicle.java",
    "chars": 2154,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport java.util.Iterator;\nimport java.util.NoSuchElementExce"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleFactory.java",
    "chars": 1333,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport org.optaweb.vehiclerouting.domain.Vehicle;\n\n/**\n * Cre"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisit.java",
    "chars": 4271,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport org.optaplanner.core.api.domain.entity.PlanningEntity;"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisitFactory.java",
    "chars": 1375,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\n/**\n * Creates {@link PlanningVisit} instances.\n */\npublic cl"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactory.java",
    "chars": 2299,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport or"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/Standstill.java",
    "chars": 645,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport org.optaplanner.core.api.domain.entity.PlanningEntity;"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/VehicleRoutingSolution.java",
    "chars": 2109,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport java.util.List;\n\nimport org.optaplanner.core.api.domai"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/package-info.java",
    "chars": 108,
    "preview": "/**\n * Domain model adjusted for OptaPlanner.\n */\npackage org.optaweb.vehiclerouting.plugin.planner.domain;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/package-info.java",
    "chars": 82,
    "preview": "/**\n * Route optimization.\n */\npackage org.optaweb.vehiclerouting.plugin.planner;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/weight/DepotAngleVisitDifficultyWeightFactory.java",
    "chars": 3310,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.weight;\n\nimport static java.util.Comparator.comparingDouble;\nimport st"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/weight/package-info.java",
    "chars": 692,
    "preview": "/**\n * Implements\n * <a href=\"https://docs.optaplanner.org/latest/optaplanner-docs/html_single/#planningEntityDifficulty"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ClearResource.java",
    "chars": 798,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport javax.inject.Inject;\nimport javax.ws.rs.POST;\nimport javax.ws.rs"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DataSetDownloadResource.java",
    "chars": 1420,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/DemoResource.java",
    "chars": 626,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport javax.inject.Inject;\nimport javax.ws.rs.POST;\nimport javax.ws.rs"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/LocationResource.java",
    "chars": 1265,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport javax.inject.Inject;\nimport javax.transaction.Transactional;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/RouteEventResource.java",
    "chars": 3002,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport javax.annotation.PreDestroy;\nimport javax.enterprise.context.App"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/ServerInfoResource.java",
    "chars": 1781,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.util.Arr"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/VehicleResource.java",
    "chars": 1091,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport javax.inject.Inject;\nimport javax.ws.rs.DELETE;\nimport javax.ws."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableCoordinates.java",
    "chars": 2204,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\nimpor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableDistance.java",
    "chars": 1251,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.doma"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableErrorMessage.java",
    "chars": 1277,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.serv"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableLocation.java",
    "chars": 2611,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.math.BigDecimal;\nimport java.util.Objects;\n\nimport or"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoute.java",
    "chars": 1268,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.List;\nimport java.util.Objects;\n\nimport org.opta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlan.java",
    "chars": 1283,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.List;\n\nimport org.optaweb.vehiclerouting.domain."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlanFactory.java",
    "chars": 2419,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.ut"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableVehicle.java",
    "chars": 1608,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.doma"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/RoutingProblemInfo.java",
    "chars": 772,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.doma"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/rest/model/ServerInfo.java",
    "chars": 803,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport java.util.List;\n\n/**\n * Server info suitable for network t"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouter.java",
    "chars": 1888,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.ut"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/Constants.java",
    "chars": 148,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\npublic class Constants {\n\n    public static final String GRAPHHOPPER"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperRouter.java",
    "chars": 2786,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.util."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingConfig.java",
    "chars": 6701,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\nimport java.io.IOException;\nimport java.net.HttpURLConnection;\nimpor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingEngineException.java",
    "chars": 217,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\npublic class RoutingEngineException extends RuntimeException {\n\n    "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/RoutingProperties.java",
    "chars": 766,
    "preview": "package org.optaweb.vehiclerouting.plugin.routing;\n\nimport java.util.Optional;\n\nimport io.smallrye.config.ConfigMapping;"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/package-info.java",
    "chars": 173,
    "preview": "/**\n * Provides information based on geographical data, for example fastest and shortest distances between locations.\n *"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/DemoProperties.java",
    "chars": 282,
    "preview": "package org.optaweb.vehiclerouting.service.demo;\n\nimport java.util.Optional;\n\nimport io.smallrye.config.ConfigMapping;\n\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/DemoService.java",
    "chars": 3420,
    "preview": "package org.optaweb.vehiclerouting.service.demo;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.u"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/RoutingProblemConfig.java",
    "chars": 4303,
    "preview": "package org.optaweb.vehiclerouting.service.demo;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java.io.File"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/RoutingProblemList.java",
    "chars": 1212,
    "preview": "package org.optaweb.vehiclerouting.service.demo;\n\nimport static java.util.function.Function.identity;\nimport static java"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSet.java",
    "chars": 1333,
    "preview": "package org.optaweb.vehiclerouting.service.demo.dataset;\n\nimport java.util.List;\n\n/**\n * Data set representation used fo"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetLocation.java",
    "chars": 1452,
    "preview": "package org.optaweb.vehiclerouting.service.demo.dataset;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\n/**\n * "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetMarshaller.java",
    "chars": 4643,
    "preview": "package org.optaweb.vehiclerouting.service.demo.dataset;\n\nimport static java.util.stream.Collectors.toList;\n\nimport java"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/DataSetVehicle.java",
    "chars": 498,
    "preview": "package org.optaweb.vehiclerouting.service.demo.dataset;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport co"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/dataset/package-info.java",
    "chars": 108,
    "preview": "/**\n * Data set marshalling and unmarshalling.\n */\npackage org.optaweb.vehiclerouting.service.demo.dataset;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/package-info.java",
    "chars": 97,
    "preview": "/**\n * Demo data set loading and exporting.\n */\npackage org.optaweb.vehiclerouting.service.demo;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceCalculator.java",
    "chars": 528,
    "preview": "package org.optaweb.vehiclerouting.service.distance;\n\nimport org.optaweb.vehiclerouting.domain.Coordinates;\n\n/**\n * Calc"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceMatrixImpl.java",
    "chars": 4749,
    "preview": "package org.optaweb.vehiclerouting.service.distance;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.c"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/DistanceRepository.java",
    "chars": 477,
    "preview": "package org.optaweb.vehiclerouting.service.distance;\n\nimport java.util.Optional;\n\nimport org.optaweb.vehiclerouting.doma"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/RoutingException.java",
    "chars": 291,
    "preview": "package org.optaweb.vehiclerouting.service.distance;\n\npublic class RoutingException extends RuntimeException {\n\n    publ"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/distance/package-info.java",
    "chars": 93,
    "preview": "/**\n * Distance matrix calculation.\n */\npackage org.optaweb.vehiclerouting.service.distance;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorEvent.java",
    "chars": 527,
    "preview": "package org.optaweb.vehiclerouting.service.error;\n\nimport java.util.Objects;\n\npublic class ErrorEvent {\n\n    public fina"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorListener.java",
    "chars": 713,
    "preview": "package org.optaweb.vehiclerouting.service.error;\n\nimport java.util.UUID;\n\nimport javax.enterprise.context.ApplicationSc"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorMessage.java",
    "chars": 731,
    "preview": "package org.optaweb.vehiclerouting.service.error;\n\nimport java.util.Objects;\n\npublic class ErrorMessage {\n\n    /**\n     "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/ErrorMessageConsumer.java",
    "chars": 269,
    "preview": "package org.optaweb.vehiclerouting.service.error;\n\n/**\n * Consumes error messages.\n */\npublic interface ErrorMessageCons"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/error/package-info.java",
    "chars": 179,
    "preview": "/**\n * Handles error events. For example an uncaught exception can be turned into an error event that is sent to the cli"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/DistanceMatrix.java",
    "chars": 486,
    "preview": "package org.optaweb.vehiclerouting.service.location;\n\nimport org.optaweb.vehiclerouting.domain.Distance;\nimport org.opta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/DistanceMatrixRow.java",
    "chars": 487,
    "preview": "package org.optaweb.vehiclerouting.service.location;\n\nimport org.optaweb.vehiclerouting.domain.Distance;\n\n/**\n * Contain"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationPlanner.java",
    "chars": 401,
    "preview": "package org.optaweb.vehiclerouting.service.location;\n\nimport org.optaweb.vehiclerouting.domain.Location;\n\n/**\n * Optimiz"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationRepository.java",
    "chars": 1213,
    "preview": "package org.optaweb.vehiclerouting.service.location;\n\nimport java.util.List;\nimport java.util.Optional;\n\nimport org.opta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/LocationService.java",
    "chars": 5760,
    "preview": "package org.optaweb.vehiclerouting.service.location;\n\nimport static java.util.Comparator.comparingLong;\n\nimport java.uti"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/location/package-info.java",
    "chars": 149,
    "preview": "/**\n * Use cases that involve {@link org.optaweb.vehiclerouting.domain.Location locations}.\n */\npackage org.optaweb.vehi"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/BoundingBox.java",
    "chars": 1987,
    "preview": "package org.optaweb.vehiclerouting.service.region;\n\nimport java.util.Objects;\n\nimport org.optaweb.vehiclerouting.domain."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/Region.java",
    "chars": 110,
    "preview": "package org.optaweb.vehiclerouting.service.region;\n\npublic interface Region {\n\n    BoundingBox getBounds();\n}\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/RegionProperties.java",
    "chars": 493,
    "preview": "package org.optaweb.vehiclerouting.service.region;\n\nimport java.util.List;\nimport java.util.Optional;\n\nimport io.smallry"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/RegionService.java",
    "chars": 955,
    "preview": "package org.optaweb.vehiclerouting.service.region;\n\nimport java.util.List;\n\nimport javax.enterprise.context.ApplicationS"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/region/package-info.java",
    "chars": 123,
    "preview": "/**\n * Provides information about the application's working region.\n */\npackage org.optaweb.vehiclerouting.service.regio"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/reload/ReloadService.java",
    "chars": 1521,
    "preview": "package org.optaweb.vehiclerouting.service.reload;\n\nimport javax.enterprise.context.ApplicationScoped;\nimport javax.ente"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/reload/package-info.java",
    "chars": 124,
    "preview": "/**\n * Loads the application state from repositories when it starts.\n */\npackage org.optaweb.vehiclerouting.service.relo"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/RouteChangedEvent.java",
    "chars": 2240,
    "preview": "package org.optaweb.vehiclerouting.service.route;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/RouteListener.java",
    "chars": 5228,
    "preview": "package org.optaweb.vehiclerouting.service.route;\n\nimport static java.util.stream.Collectors.toList;\nimport static java."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/Router.java",
    "chars": 477,
    "preview": "package org.optaweb.vehiclerouting.service.route;\n\nimport java.util.List;\n\nimport org.optaweb.vehiclerouting.domain.Coor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/ShallowRoute.java",
    "chars": 1863,
    "preview": "package org.optaweb.vehiclerouting.service.route;\n\nimport static java.util.stream.Collectors.joining;\n\nimport java.util."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/route/package-info.java",
    "chars": 138,
    "preview": "/**\n * Handles {@link org.optaweb.vehiclerouting.domain.RoutingPlan route} updates.\n */\npackage org.optaweb.vehiclerouti"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehiclePlanner.java",
    "chars": 396,
    "preview": "package org.optaweb.vehiclerouting.service.vehicle;\n\nimport org.optaweb.vehiclerouting.domain.Vehicle;\n\n/**\n * Optimizes"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehicleRepository.java",
    "chars": 1346,
    "preview": "package org.optaweb.vehiclerouting.service.vehicle;\n\nimport java.util.List;\nimport java.util.Optional;\n\nimport org.optaw"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/VehicleService.java",
    "chars": 2069,
    "preview": "package org.optaweb.vehiclerouting.service.vehicle;\n\nimport static java.util.Comparator.comparingLong;\n\nimport java.util"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/vehicle/package-info.java",
    "chars": 105,
    "preview": "/**\n * Performs use cases that involve vehicles.\n */\npackage org.optaweb.vehiclerouting.service.vehicle;\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/resources/.gitignore",
    "chars": 30,
    "preview": "/application-local.properties\n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/resources/application.properties",
    "chars": 3213,
    "preview": "# App configuration\napp.demo.data-set-dir=local/dataset\napp.region.country-codes=BE\napp.routing.osm-dir=local/openstreet"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/resources/org/optaweb/vehiclerouting/service/demo/belgium-cities.yaml",
    "chars": 2502,
    "preview": "---\nname: \"Belgium cities\"\nvehicles:\n  - name: \"Vehicle 1\"\n    capacity: 10\n  - name: \"Vehicle 2\"\n    capacity: 10\n  - n"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/main/resources/solverConfig.xml",
    "chars": 1553,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<solver>\n  <!--<environmentMode>FULL_ASSERT</environmentMode>--><!-- To slowly pr"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/TestConfig.java",
    "chars": 975,
    "preview": "package org.optaweb.vehiclerouting;\n\nimport javax.enterprise.context.Dependent;\nimport javax.enterprise.inject.Produces;"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/CoordinatesTest.java",
    "chars": 2343,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/CountryCodeValidatorTest.java",
    "chars": 1596,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/DistanceTest.java",
    "chars": 1532,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/LocationDataTest.java",
    "chars": 1724,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/LocationTest.java",
    "chars": 2407,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RouteTest.java",
    "chars": 2172,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThatExceptionOfType;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RouteWithTrackTest.java",
    "chars": 2231,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static java.util.Collections.emptyList;\nimport static org.assertj.cor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/RoutingPlanTest.java",
    "chars": 7464,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Collections.e"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleDataTest.java",
    "chars": 1195,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleFactoryTest.java",
    "chars": 865,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport org.junit."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/domain/VehicleTest.java",
    "chars": 1559,
    "preview": "package org.optaweb.vehiclerouting.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceEntityTest.java",
    "chars": 1247,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryImplTest.java",
    "chars": 2668,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/DistanceRepositoryIntegrationTest.java",
    "chars": 2795,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimpor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationEntityTest.java",
    "chars": 1286,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryImplTest.java",
    "chars": 4043,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/LocationRepositoryIntegrationTest.java",
    "chars": 3713,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleEntityTest.java",
    "chars": 567,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimpor"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/persistence/VehicleRepositoryImplTest.java",
    "chars": 4744,
    "preview": "package org.optaweb.vehiclerouting.plugin.persistence;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/DistanceMapImplTest.java",
    "chars": 1111,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport sta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/MockSolver.java",
    "chars": 2701,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.mockito.ArgumentMatchers.any;\nimport static org.mo"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisherTest.java",
    "chars": 7222,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Colle"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/RouteOptimizerImplTest.java",
    "chars": 21267,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport sta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverExceptionTest.java",
    "chars": 5647,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport sta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverIntegrationTest.java",
    "chars": 7680,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static java.util.Collections.singletonList;\nimport static org"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverManagerIntegrationTest.java",
    "chars": 3964,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static java.util.Collections.singletonList;\nimport static org"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverManagerTest.java",
    "chars": 9196,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport sta"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/SolverTestProfile.java",
    "chars": 470,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport io.quarkus.t"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/VehicleRoutingConstraintProviderTest.java",
    "chars": 9388,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner;\n\nimport static org.optaweb.vehiclerouting.plugin.planner.domain.Plann"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicleTest.java",
    "chars": 1028,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nim"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisitTest.java",
    "chars": 1014,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nim"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/ChangeVehicleCapacityTest.java",
    "chars": 1282,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nim"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVehicleTest.java",
    "chars": 3586,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/RemoveVisitTest.java",
    "chars": 3952,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.change;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationFactoryTest.java",
    "chars": 1749,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningLocationTest.java",
    "chars": 2512,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleFactoryTest.java",
    "chars": 804,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVehicleTest.java",
    "chars": 1661,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimp"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/PlanningVisitFactoryTest.java",
    "chars": 668,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nim"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactoryTest.java",
    "chars": 2008,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.domain;\n\nimport static java.util.Collections.emptyList;\nimport static "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/weight/DepotAngleVisitDifficultyWeightFactoryTest.java",
    "chars": 6227,
    "preview": "package org.optaweb.vehiclerouting.plugin.planner.weight;\n\nimport static java.util.stream.Collectors.toList;\nimport stat"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/ClearResourceTest.java",
    "chars": 808,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.mockito.Mockito.verify;\n\nimport org.junit.jupiter.api"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/DataSetDownloadResourceTest.java",
    "chars": 2555,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/DemoResourceTest.java",
    "chars": 679,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.mockito.Mockito.verify;\n\nimport org.junit.jupiter.api"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/LocationResourceTest.java",
    "chars": 1179,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.mockito.Mockito.verify;\n\nimport org.junit.jupiter.api"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/ServerInfoResourceTest.java",
    "chars": 2900,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/VehicleResourceTest.java",
    "chars": 1174,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest;\n\nimport static org.mockito.Mockito.verify;\n\nimport org.junit.jupiter.api"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableCoordinatesTest.java",
    "chars": 3048,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableDistanceTest.java",
    "chars": 1561,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableErrorMessageTest.java",
    "chars": 1968,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableLocationTest.java",
    "chars": 3693,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport "
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRouteTest.java",
    "chars": 1967,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static java.util.Arrays.asList;\nimport static org.optaweb."
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableRoutingPlanFactoryTest.java",
    "chars": 6163,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Co"
  },
  {
    "path": "optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/rest/model/PortableVehicleTest.java",
    "chars": 2699,
    "preview": "package org.optaweb.vehiclerouting.plugin.rest.model;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport "
  }
]

// ... and 199 more files (download for full content)

About this extraction

This page contains the full source code of the kiegroup/optaweb-vehicle-routing GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 399 files (761.0 KB), approximately 194.9k tokens, and a symbol index with 1104 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!