Here in VRPTW, the depot is labeled with index To represent the time windows constraint and eliminate subtour, we have the following code:
where But why I am always faced up this error:
I am confused, and want to know how to represent the time windows constraint. Thanks very much! |
A quick search on the web shows that this is a MS Visual Studio error, not a CPLEX error. There are some discussion of relevant questions on IBM CPLEX forums, so you should check as well. In particular, check the webpages here, here, and here. It seems that it could be a memory problem or a debug/release mode configuration problem. Thanks, later I find that if I add the condition i!=j, the program run perfectly. But I don't know why.
(25 Apr '13, 09:11)
LinYuan
|
In addition, I think that your loops are not well defined... They should be:
|
I guess this is not a Cplex problem. You might be using an outdated operating system like XP or some of essential libraries in Visual Studio are not included. Try updating your working system as much as possible. For example, a better configuration would be:
Make sure that you install the Visual Studio with all libraries. Your block of code should work well, however, if the code got any logical problem, then the Error message had to do with the Syntax or the Logic of your program. |