Hello,right now I am trying to implement a particle swarm optimization algorithm in CPLEX to solve a Vehicle Routing Problem with a large number of customers.
Firstly, I wrote an optimization model in OPL that is now able to get solutions for smaller instances. In order to now also be able to solve problems with a bigger number of customers, I want to do it using a heuristic I have from a paper (Particle Swarm Optimization).
For this, I am implementing each step of the algorithm in a main-block (control flow) in ILOG Script. In each iteration, the algorithm proposes a solution ( = values for the decision variables) that now needs to be checked if it is feasible and what the solution value is. In the next iteration, the solution then is tried to be improved. This is repeated until a certain number of iterations is reached.
I already got the algorithm to work. But now I don't know how I can do the feasibility check.
I basically now have values for the decision variables that I need to run in the model to check if all constraints hold for this solution. How does this work in CPLEX using control flow?
Obviously, I know how to trigger OPL to generate the model and run the CPLEX solver to get a solution for it, but how does it work when you want to give CPLEX the values for the decision variables and just want it to test the feasibility and not do any optimization?
Thank you for your response.
I'll try that out.