jsprit

How to use vehicle types with own cost matrix in JSprit

若如初见. 提交于 2021-01-28 18:15:33
问题 Is it possible to define a seperate cost matrix for every vehicle type in Jsprit? I have a number of very different vehicle types (trucks, bikes, cars, electrical pickups etc.) and every type has its own cost matrix. The matrices are not linearly dependent, therefore working with different cost factors for distance and time is not an option. The VRP has infinite fleet size. I use JSprit 1.6.2 and implemented the AbstractForwardVehicleRoutingTransportCosts -Interface. Both of its methods have

How to add time constraints in jsprit?

坚强是说给别人听的谎言 提交于 2020-01-07 02:56:06
问题 setTimeWindow(new TimeWindow(start_time, end_time)) Is used to add time constraints for a task/shipment. But I want to have a complete example. Is there any complete example of jsprit on time bound shipment? 回答1: You can set pickup and delivery time windows of shipments this way: Shipment shipment = Shipment.Builder.newInstance("1") .addSizeDimension(0,1) .setPickupLocation(Location.newInstance(5,7)) .setPickupTimeWindow(TimeWindow.newInstance(0,1200)) .setDeliveryLocation(Location

Optoplanner/jsprit TSPTW with real road distance

我们两清 提交于 2019-12-25 09:17:50
问题 Is it possible to solve asymmetric -travelling sales man problem with time window (with the real road distances) with optoplanner or jsprit? if you are able to provide any documentation or pointer in this regard that is highly appreciated. thanks. 回答1: With OptaPlanner, there is a Vehicle Routing Problem example that supports asymmetric distances and time windows. So just give it only 1 vehicle and you got the Traveling Sales Man variant of that. Look for the code in this directory: see

JSPrit deliver sooner rather than later if at destination

霸气de小男生 提交于 2019-12-25 07:50:57
问题 Picking up multiple shipments, dropping off at central location. Problem is, sometimes the vehicle fills up and drops things off at central location, but only enough to finish the route. I'd like it to drop off everything it has if it is already at the depot. See below, it delivers job #3 to the depot, leaving 4 other items in the vehicle (which has a capacity of 5). Then picks up the final thing, before delivering everything. +-----------------------------------------------------------------

Jsprit : Can't add multiple related jobs

两盒软妹~` 提交于 2019-12-06 13:17:23
问题 I'm using JSPRIT to solve routing and travelsman problems. It is actually working for simple constraints (time, capacity, etc.). But I tried to implement the "Related jobs" constaints. I succeeded for the simple case like the 7th job to be served before the 1st in the list. I want to group and optimize some services. I would like to force the 7th to be served before the 1st AND the 21st before the 13th for exemple. And maybe some more. When I try this, the result order only the 7th before the

Jsprit : Can't add multiple related jobs

冷暖自知 提交于 2019-12-04 15:41:01
I'm using JSPRIT to solve routing and travelsman problems. It is actually working for simple constraints (time, capacity, etc.). But I tried to implement the "Related jobs" constaints. I succeeded for the simple case like the 7th job to be served before the 1st in the list. I want to group and optimize some services. I would like to force the 7th to be served before the 1st AND the 21st before the 13th for exemple. And maybe some more. When I try this, the result order only the 7th before the 1st but the 21st is not before the 13th and sometimes not even in the same route. It's a more complex

Related jobs in JSprit

两盒软妹~` 提交于 2019-11-29 04:49:35
Is it possible to handle relations between jobs (in this case services) in jsprit? For instance one job has to start at the same time with one or more other jobs. Or one job must not start before the end of another job (normal sequence). If not, do you know other java libraries that can handle such kind of restrictions? Thank you! Yes you can handle such relations with jsprit . It is a bit of coding, but - I think - easy to implement. To illustrate it, I prepared you five examples that are based on the Vehicle Routing Problems (VRP) developed by Christofides-Mingozzi-Toth's* (first

Related jobs in JSprit

浪子不回头ぞ 提交于 2019-11-27 18:44:54
问题 Is it possible to handle relations between jobs (in this case services) in jsprit? For instance one job has to start at the same time with one or more other jobs. Or one job must not start before the end of another job (normal sequence). If not, do you know other java libraries that can handle such kind of restrictions? Thank you! 回答1: Yes you can handle such relations with jsprit . It is a bit of coding, but - I think - easy to implement. To illustrate it, I prepared you five examples that