Originally posted by: rdumeur
Dear 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 Non-fixed 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,
#ConstraintProgramming-General#DecisionOptimization