Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement piecewise linear costs ? #90

Open
tcokyasar44 opened this issue May 13, 2021 · 4 comments
Open

How to implement piecewise linear costs ? #90

tcokyasar44 opened this issue May 13, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tcokyasar44
Copy link

This is something between a question and a feature update, rather than an issue. With the trendiness of new vehicles, we may have the first x miles costing less than the x+ miles. Assume, a hybrid vehicle runs the first 50 miles on electric and has a cost of y per mile. After the 50 miles, it starts running on an alternative fuel that costs z per mile. First, is it possible to consider this problem in the current release?

Next, consider that I am talking about the DCHVRP version of the above problem. To make things (possibly) easier, assume the second vehicle type has the same cost regardless of the distance traveled. It is possible to address this problem?

@Kuifje02
Copy link
Owner

This would be a nice feature. I don't think its possible right now.

Just to be sure, what exactly do you call DCHVRP ? Heterogeneous fleet, with simultaneous distribution and collection ? This should be possible.

@tcokyasar44
Copy link
Author

tcokyasar44 commented May 13, 2021

Heterogeneous fleet with distance/travel time constrained and capacitated VRP. Say, one fleet type has two cost parameters as explained above, and this fleet has capacity and travel time constraints. Then, there is another vehicle type with a single cost parameter, and this is also capacity and travel time-constrained. If I am defining a new problem (to the best of your knowledge), please let me know :)

@tcokyasar44
Copy link
Author

Explaining with the code:

G.add_edge(1, 2, cost = [[3,5], 6], time = [10])

Both vehicles traverse the same edge with the same time. The per unit travel time cost is fixed (6) for vehicle type 2. But, in type 1, we charge 3 cost unit for the first say 100 time units, but 5 cost units after 100 time units of travel.

@Kuifje02 Kuifje02 added the enhancement New feature or request label May 13, 2021
@Kuifje02
Copy link
Owner

Unfortunately this is not possible with the current version. I am not sure what this problem is refered to in the literature.

@Kuifje02 Kuifje02 changed the title Two cost parameters for the same vehicle type How to implement piecewise linear costs ? Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants