TSM or VRP?

53 views
Skip to first unread message

Oleg Kokhanchyk

unread,
Sep 28, 2023, 1:17:12 AM9/28/23
to OptaPlanner development
HI. 

I'm new to optaplanner,
and want to build MVP EV route planner. 
where I have:
- one car with a range of km that it can drive.
- start location
- end location 
- startlocation != end location. 
- and list of charging locations, where the car will refill range. 
- the car can visit one or two or all charger locations.
and the problem is that if the car visits the first (or second, ....) charger location it may have enough range to the end location, and there is no need to visit other charging locations. 

I was experimenting with quick starters of VRP, but after a few days, it seems that my problem is more look like TSM but with optional locations. 
is there are some examples of TSM, because in quick starters there are no such examples?

I thought that I could use a shadow variable to change the range of the car at each charging location, but then I needed to calculate the distance not from the start location, but from this charger location to the end location and save visiting this location, and I'm little confusing how to implement this logic. 

please help if you can with advice and examples.
I will be very thankful for any help. 

muhammed hassan

unread,
Sep 29, 2023, 10:27:11 AM9/29/23
to OptaPlanner development
Hi Oleg,

Do you mean TSP (traveling salesman problem)?

If there is only very few charger locations, then you probably do not need Optaplanner in the first place.

Best,

Oleg Kokhanchyk

unread,
Sep 29, 2023, 10:48:09 AM9/29/23
to OptaPlanner development
Hi Muhammed. 

Thanks for your answer. 

yes, I mean the traveling salesman problem. 

It's not a few charger locations, it could be a lot of them. 
And it seems that Optaplanner is a good fit because when planning a road,
I want to check the power of charger locations (if the charger location has more power, then this charge location will be preferable in choice) 
also other constraints, when choosing the charger. 
so I thought that Optaplanner was a good choice.

пʼятниця, 29 вересня 2023 р. о 17:27:11 UTC+3 muhammed hassan пише:

muhammed hassan

unread,
Oct 1, 2023, 6:50:54 PM10/1/23
to OptaPlanner development
Hi Oleg,

It doesn't fit exactly with one approach. But this looks like a TSP with a more complex score function. 
You can add more constraints to fit your exact model.
Reply all
Reply to author
Forward
0 new messages