Hello,
I am new to CPLEX. I want to find a solution for the quadratic assignment problem. I have read that I have to use constraint programming and I have checked the example called "quadassign".
My Problem is that my starting values are not integers. Therefore I have changed the variable type to float as presented below:
//
using CP;
int nbPerm = ...;
range r = 1..nbPerm;
float dist[r][r] = ...;
float flow[r][r] =...;
execute {
cp.param.timeLimit=30;
}
dvar int permhttp://1..nbPerm in r;
dexpr float costi in rj in r = dist[i][j]*flow[permi][permj];
minimize sum(i in r, j in r) cost[i][j];
subject to {
allDifferent(perm);
};
//
When I execute the solver I get the error message: "IloAlgorithm cannot extract extractable."
So i'll be very happy and thankful if anyone can help me with my problem.
Tommy
Topic
NOTICE: developerWorks Community will be offline May 2930, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies
Latest Post
 20121227T20:46:26Z by SystemAdmin
ACCEPTED ANSWER
Pinned topic CP: Quadratic Assignment Problem with floatingpoint numbers
20121223T19:42:32Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Updated on 20121227T20:46:26Z at 20121227T20:46:26Z by SystemAdmin

ACCEPTED ANSWER
Re: CP: Quadratic Assignment Problem with floatingpoint numbers
20121224T14:46:39Z in response to SystemAdminDear Tommy24,
What version of IBM ILOG CPLEX Studio are you using?
I tried your example with dummy data :
using CP; int nbPerm = 2; range r = 1..nbPerm; float dist[r][r] = [ [2, 3], [4, 5] ]; float flow[r][r] = [ [6,7], [8,9 ] ]; execute { cp.param.timeLimit=30; } dvar int perm[1..nbPerm] in r; dexpr float cost[i in r][j in r] = dist[i][j]*flow[perm[i]][perm[j]]; minimize sum(i in r, j in r) cost[i][j]; subject to { allDifferent(perm); };
and it executes without problem using version 12.5
!  ! Minimization problem  2 variables, 1 constraint ! TimeLimit = 30 ! Initial process time : 0,00s (0,00s extraction + 0,00s propagation) ! . Log search space : 2,0 (before), 2,0 (after) ! . Memory usage : 333,8 kB (before), 333,8 kB (after) ! Using parallel search with 2 workers. !  ! Best Branches Nonfixed W Branch decision * 100 1 0,04s 1  !  ! Search terminated normally, 1 solution found. ! Best objective : 100 (optimal  effective tol. is 0,01) ! Number of branches : 43 ! Number of fails : 54 ! Total memory usage : 1,3 MB (1,1 MB CP Optimizer + 0,2 MB Concert) ! Time spent in solve : 0,12s (0,12s engine + 0,00s extraction) ! Search speed (br. / s) : 344,0 ! 
Cheers,
ACCEPTED ANSWER
Re: CP: Quadratic Assignment Problem with floatingpoint numbers
20121227T20:46:26Z in response to rdumeurDear rdumeur,
Thank you very much for your reply. I have used version 12.3 with wich it is not working.
So I've tried it with version 12.5 and it runs without an error.
Tommy
