Hello, I am a beginner with IBM ILOG CPLEX and i need an example for a branch and bound code who used CPLEX to resolve the pickup and delivery problem with time windows. In fact I have already written the code under CPLEX and I tried to test my code with solomon's instance ( C101_m1) and it works very well but when I try with another instance (for example: C102_m1) my code take a long time and he can't resolve the instance so I think that it is necessary to add some constraints of cups(cuttings planes) NB: I put my files .mod and .DAT as well as the instances of tests " C101 m1 " and " C102 m2 " on this link : https://www.dropbox.com/sh/c6xaf5ythvax0zf/AABKWelY30da8MaI3ZPjJgfa?dl=0 thanks in advance asked 02 Sep '15, 11:15 CPLEX1
showing 5 of 7
show 2 more comments

What did you try yourself? In what language do you want to code this? Did you write down the Integer Programming model? Did you read the examples shipped with the IBM ILOG Optimization studio suite? Have a look at the three index formulation in the paper "BranchandCutandPrice for the Pickup and Delivery Problem with Time Windows" by S. Ropke. That model is easy to implement.
In fact I have already written the code under CPLEX and I tried to test my code with solomon's instance ( C101_m1) and it works very well but when I try with another instance (for example: C102_m1) my code take a long time and he can't resolve the instance so I think that it is necessary to add some constraints of cups(cuttings planes) or to try another method as branch and bound but as I am new in cplex I have no idea how to use a branch and bound with CPLEX
NB: I put my files .mod and .DAT as well as the instances of tests " C101 m1 " and " C102 m2 " on this link : https://www.dropbox.com/sh/c6xaf5ythvax0zf/AABKWelY30da8MaI3ZPjJgfa?dl=0
thanks in advance
By default, Ilog Cplex uses BranchandBound to solve your problem. Your problem is a Integer Linear Programming problem, not just a Linear Programming problem. By specifying that your variables are binary, Ilog Cplex automatically solves it through BranchandBound. C102_m1 is a hard problem instance; you cannot expect to solve it to optimality with a simple MIP model. Either accept suboptimal results, or implement a stronger approach (e.g. BranchBoundCut or BranchPriceCut). Again, read the paper I referenced.
Btw, it seems that you solve the problem through OPL. As far as I know, you cannot implement a cutting plane procedure in OPL (I may be wrong though, never used OPL). Consider rewriting your solution in Java or C++; both of them give you access to the Cutting Plane API. I still would like to ask you to update your initial post showing what you've done and what it is exactly you are stuck with. Shouting "I need help" isn't particularly useful for other people who stumble upon this post.
Thank you for your responses and I will look at the paper (if you have a reference for a Java or C++ solution who resolve the problem, I will be appreciate if you could give me the link so I can adapt it to my problem).
and only a last question what do you mean by "a simple MIP model"? sorry but I am a beginner in using CPLEX
For Java/C++ implementations, look at the examples which ship with your IBM optimization studio installation (see examples folder under cplex). Useful links: Cplex getting started manual: http://wwweio.upc.edu/lceio/manuals/cplex11/pdf/gscplex.pdf or the user manual: ftp://public.dhe.ibm.com/software/websphere/ilog/docs/optimization/cplex/ps_usrmancplex.pdf
The think you've built is called a Mixed Integer Programming model (MIP) model. I would recommend to read some basic literature about integer linear programming.