Techniques for detecting errors when receiving unexpected infeasible solutions

Hi all. I’m pretty new to GAMS and I started using it in an OR course
at university – I have, anyway, some programming experience.

I have been requested to write a GAMS program to solve the Vehicle
Routing Problem with Time Windows; I wrote some code that I thought
should have worked, but unfortunately it gives me a model status of
infeasible, when given as input some data that defines a feasible
problem.

Clearly I must have written something wrong; the problem is how to
detect the error and debug the code. Given that GAMS programming is in
many aspects different from regular programming, in which you can
control the “flow” of execution step by step, I find myself a little
bit lost in this task.

So I am looking for suggestions from experienced GAMS user, on how do
they check their code and debug it. I thought that one of the first
things I could have done was to simplify the input data to have an
almost trivial scenario and I noticed that even this simple scenario
is failing; but again, I have no clue on where the problem lies.

For the completeness of information, the problem I am stuck with
(VRPTW) is the following: you have a warehouse and want to serve N
customers with a set of vehicles of capacity Q. The warehouse is
always open, but the customers have opening and closing time. Every
customer has a demand of good but all the demands are <Q. Moreover,
the vehicles need some time to go from a location to another and also
need some time to unload their cargo, once they are at the location.
The constraints for this problems are, a part from the time windows,
that each customer must be visited by exactly one vehicle, that the
capacity of the vehicles is not exceeded, that all the vehicles must
start at the warehouse (in the model, node 0) and after having visited
some customer (or no customer, if there are more available vehicles
than those needed) come back to the warehouse (in the model, node N
+1).

Here is the GAMS file I used for the case with 4 customers:
http://pastebin.com/Ux2hAiTh and the corresponding LST: http://pastebin.com/S42wREJ6
Here is the simplified version with only one customer: http://pastebin.com/Ru44zRAm
and the LST: http://pastebin.com/Z8bisvXT

I would much appreciate any help.
Thanks.

\

Alberto,

Look at the Cplex message:

Reading data…
Starting Cplex…
Row ‘dont_travel_back_in_time(0.0.1)’ implies binary variable ‘x(0.0.1)’ is greater than 1.
Presolve time = 0.00 sec.

It seems like there is something wrong in the formulation with x(i,j,k) if i=j or with the values of the parameters in that case.

Regards,

Fabián


2011/10/15 Alberto Santini

Hi all. I’m pretty new to GAMS and I started using it in an OR course
at university – I have, anyway, some programming experience.

I have been requested to write a GAMS program to solve the Vehicle
Routing Problem with Time Windows; I wrote some code that I thought
should have worked, but unfortunately it gives me a model status of
infeasible, when given as input some data that defines a feasible
problem.

Clearly I must have written something wrong; the problem is how to
detect the error and debug the code. Given that GAMS programming is in
many aspects different from regular programming, in which you can
control the “flow” of execution step by step, I find myself a little
bit lost in this task.

So I am looking for suggestions from experienced GAMS user, on how do
they check their code and debug it. I thought that one of the first
things I could have done was to simplify the input data to have an
almost trivial scenario and I noticed that even this simple scenario
is failing; but again, I have no clue on where the problem lies.

For the completeness of information, the problem I am stuck with
(VRPTW) is the following: you have a warehouse and want to serve N
customers with a set of vehicles of capacity Q. The warehouse is
always open, but the customers have opening and closing time. Every
customer has a demand of good but all the demands are <Q. Moreover,
the vehicles need some time to go from a location to another and also
need some time to unload their cargo, once they are at the location.
The constraints for this problems are, a part from the time windows,
that each customer must be visited by exactly one vehicle, that the
capacity of the vehicles is not exceeded, that all the vehicles must
start at the warehouse (in the model, node 0) and after having visited
some customer (or no customer, if there are more available vehicles
than those needed) come back to the warehouse (in the model, node N
+1).

Here is the GAMS file I used for the case with 4 customers:
http://pastebin.com/Ux2hAiTh and the corresponding LST: http://pastebin.com/S42wREJ6
Here is the simplified version with only one customer: http://pastebin.com/Ru44zRAm
and the LST: http://pastebin.com/Z8bisvXT

I would much appreciate any help.
Thanks.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thanks Fabian! It’s easy to get lost in the enormous amount of output
it produces if you don’t know where to look. And I didn’t! :slight_smile:

\

Dear Alberto, could you share the final code with the correction?


El sábado, 15 de octubre de 2011 12:43:58 UTC-5, Alberto Santini escribió:

Hi all. I’m pretty new to GAMS and I started using it in an OR course
at university – I have, anyway, some programming experience.

I have been requested to write a GAMS program to solve the Vehicle
Routing Problem with Time Windows; I wrote some code that I thought
should have worked, but unfortunately it gives me a model status of
infeasible, when given as input some data that defines a feasible
problem.

Clearly I must have written something wrong; the problem is how to
detect the error and debug the code. Given that GAMS programming is in
many aspects different from regular programming, in which you can
control the “flow” of execution step by step, I find myself a little
bit lost in this task.

So I am looking for suggestions from experienced GAMS user, on how do
they check their code and debug it. I thought that one of the first
things I could have done was to simplify the input data to have an
almost trivial scenario and I noticed that even this simple scenario
is failing; but again, I have no clue on where the problem lies.

For the completeness of information, the problem I am stuck with
(VRPTW) is the following: you have a warehouse and want to serve N
customers with a set of vehicles of capacity Q. The warehouse is
always open, but the customers have opening and closing time. Every
customer has a demand of good but all the demands are <Q. Moreover,
the vehicles need some time to go from a location to another and also
need some time to unload their cargo, once they are at the location.
The constraints for this problems are, a part from the time windows,
that each customer must be visited by exactly one vehicle, that the
capacity of the vehicles is not exceeded, that all the vehicles must
start at the warehouse (in the model, node 0) and after having visited
some customer (or no customer, if there are more available vehicles
than those needed) come back to the warehouse (in the model, node N
+1).

Here is the GAMS file I used for the case with 4 customers:
http://pastebin.com/Ux2hAiTh and the corresponding LST: http://pastebin.com/S42wREJ6
Here is the simplified version with only one customer: http://pastebin.com/Ru44zRAm
and the LST: http://pastebin.com/Z8bisvXT

I would much appreciate any help.
Thanks.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Prof. Siphambe





My whole focus has been to get the CGE to run and I have all the components together. With the data adjustments that I making it should run successfully.



Thanks



Jonah





From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of tatiana usuga
Sent: Tuesday, October 22, 2013 4:44 AM
To: gamsworld@googlegroups.com
Subject: Re: Techniques for detecting errors when receiving unexpected infeasible solutions



Dear Alberto, could you share the final code with the correction?




El sábado, 15 de octubre de 2011 12:43:58 UTC-5, Alberto Santini escribió:

Hi all. I’m pretty new to GAMS and I started using it in an OR course
at university – I have, anyway, some programming experience.

I have been requested to write a GAMS program to solve the Vehicle
Routing Problem with Time Windows; I wrote some code that I thought
should have worked, but unfortunately it gives me a model status of
infeasible, when given as input some data that defines a feasible
problem.

Clearly I must have written something wrong; the problem is how to
detect the error and debug the code. Given that GAMS programming is in
many aspects different from regular programming, in which you can
control the “flow” of execution step by step, I find myself a little
bit lost in this task.

So I am looking for suggestions from experienced GAMS user, on how do
they check their code and debug it. I thought that one of the first
things I could have done was to simplify the input data to have an
almost trivial scenario and I noticed that even this simple scenario
is failing; but again, I have no clue on where the problem lies.

For the completeness of information, the problem I am stuck with
(VRPTW) is the following: you have a warehouse and want to serve N
customers with a set of vehicles of capacity Q. The warehouse is
always open, but the customers have opening and closing time. Every
customer has a demand of good but all the demands are <Q. Moreover,
the vehicles need some time to go from a location to another and also
need some time to unload their cargo, once they are at the location.
The constraints for this problems are, a part from the time windows,
that each customer must be visited by exactly one vehicle, that the
capacity of the vehicles is not exceeded, that all the vehicles must
start at the warehouse (in the model, node 0) and after having visited
some customer (or no customer, if there are more available vehicles
than those needed) come back to the warehouse (in the model, node N
+1).

Here is the GAMS file I used for the case with 4 customers:
http://pastebin.com/Ux2hAiTh and the corresponding LST: http://pastebin.com/S42wREJ6
Here is the simplified version with only one customer: http://pastebin.com/Ru44zRAm
and the LST: http://pastebin.com/Z8bisvXT

I would much appreciate any help.
Thanks.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.