Capacitated Vehicle Routing Problem

Problems with modeling
Post Reply
Student123
User
User
Posts: 1
Joined: 4 years ago

Capacitated Vehicle Routing Problem

Post by Student123 »

Hello there,

is there anyone in possession of a running Gams-code for the classical CVRP and would like to share it?
Thank you all in advance. I hope i dont disregard any Rules of this forum with this request.

with best regards
Liza
User
User
Posts: 7
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by Liza »

Hi,

First of all I am new within the GAMS forum. As part of my master's thesis I am currently creating a GAMS model and first tried to model the CVRP.

My model is based on the mathematical model formulation according to Fisher and Jaikumar (1981), where I would like to add a subtour elimination constraint, for example according to Miller, Tucker and Zemlin.
Without the subtour elimination constraint my model runs, but subtours are created of course.
Therefore I took a deeper look to tsp2.gms and tsp5.gms models I found in GAMS library.

Unfortunately, until now I had no success to include the subtour elimination constraint and time for my master thesis is of course running :(
Capacitated Vehicle Routing Problem.gms
CVRP - subtour elimination constraint is missing
(3.12 KiB) Downloaded 286 times
If you still need the model, feel free to have a look at my version attached.

Maybe someone has an idea of how to adjust the model so that a subtour constraint is working?

Many thanks in advance!

Best regards
Liza
Liza
User
User
Posts: 7
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by Liza »

Hi again,

In the meantime I have a CVRP model including a subtour elimination which might work:
Capacitated Vehicle Routing Problem.gms
CVRP model
(3.72 KiB) Downloaded 214 times
Nevertheless, when running the model I get an error message:
Error message when running CVRP model
Error message when running CVRP model
Can someone help me?

The questions are:
  • Is the model correct, so that it would work if the license would allow to run the model?
  • Do I need a special license to include a full solver?
At the moment I have activated GAMS/BASE licence where GAMS only uses limited CPLEX license.
In addition, I also have a licence of GAMS/GUROBI link as well as GUROBI 9 license, but until no I have no idea how to activate that.

Many thanks in advance for your help.

Best regards
Liza
Liza
User
User
Posts: 7
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by Liza »

Hi again,

Regarding my previous questions, I just wanted to let you know that I now have an appropriate model formulation of the CVRP with subtour elimination that works and provides an optimal result.

The above questions are therefore no longer relevant for me personally.

If anyone is interested in the model formulation, please feel free to get back to me.

Best regards
Lisa
gamsbart
User
User
Posts: 1
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by gamsbart »

Hi Liza,

i'm currently also working at this problem.. but with no success until now.

Would you like to share your solution with me? :)

Thx and best regards !
Liza
User
User
Posts: 7
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by Liza »

Hello Gamsbart,

If it is not too late and you are still working on the model, you will find my version of the CVRP below:
Capacitated Vehicle Routing Problem.gms
(3.81 KiB) Downloaded 353 times


Maybe it will help you. I have managed to avoid subtours and it also gives the correct optimal solution.

In case of questions, feel free to come back to me.

Best regards
Liza
suman17
User
User
Posts: 1
Joined: 1 year ago

Re: Capacitated Vehicle Routing Problem

Post by suman17 »

Hi lisa,

Thank you so much for this amazing model. I have a question.
Why should individual vehicle capacities be equal to or greater than the demands of customer points?

Thanks,
Post Reply