Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CP: Quadratic Assignment Problem with floating-point numbers

    Posted 12/23/12 02:43 PM

    Originally posted by: SystemAdmin


    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
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: CP: Quadratic Assignment Problem with floating-point numbers

    Posted 12/24/12 09:47 AM

    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


  • 3.  Re: CP: Quadratic Assignment Problem with floating-point numbers

    Posted 12/27/12 03:46 PM

    Originally posted by: SystemAdmin


    Dear 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
    #ConstraintProgramming-General
    #DecisionOptimization