# Time windows constraints in CPLEX via concert C++

 0 Here in VRPTW, the depot is labeled with index 0, customers are 1..n, and vehicles are 1..K. Decision variable y[i][k] denotes the time when customer i is visited by vehicle k. Binary decision variable x[i][j][k]=1, if vehicle k travles from node i to node j. To represent the time windows constraint and eliminate subtour, we have the following code: for(IloInt i=0;i

 2 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. answered 25 Apr '13, 09:03 Ehsan ♦ 4.8k●3●11●22 accept rate: 16% 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 3 I bet Distance[i][i] or x[i][i]isn't well defined (25 Apr '13, 09:26) jfpuget
 1 In addition, I think that your loops are not well defined... They should be: for(IloInt i=0;i
 0 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: Windows 8.1 + Visual Studio 2013 (Ultimate Ver.) + IBM Ilog Cplex 12.6 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. answered 02 Mar '15, 05:47 monash 37●2●4●11 accept rate: 0%
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×191
×8
×5
×1