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.
\