Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  3 summations for the equation

    Posted 04/21/10 05:25 PM

    Originally posted by: JennyKid


    Hi all,

    I get stuck with this code:

    The 3 summations I use for this code can not be extracted.

    //Data
    int m = ...;
    {string} ObjectN = ...;
    {string} ClusterK= ...;
    {string} VariableP= ...;
    float SampleObjectNVariableP = ...;

    //Variables
    dvar boolean GradeBelongObjectNClusterK;
    dvar float ElementMatrixClusterKVariableP;

    //Objective
    dexpr float Sum1 = sum( i in ObjectN )
    sum( k in ClusterK )
    sum( a in VariableP )
    GradeBelong[i][k]*(Sample[i][a]-ElementMatrix[k][a])^2;

    minimize Sum1;

    //Constraints
    subject to {
    forall( i in ObjectN )
    ctUik:
    sum( k in ClusterK )
    GradeBelong[i][k] == 1;

    }
    The error is "Cannot extract model".

    Could anyone please help me?

    Thanks in advance.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: 3 summations for the equation

    Posted 04/22/10 02:17 AM

    Originally posted by: SystemAdmin


    Your expression
    GradeBelong[i][k]*(Sample[i][a]-ElementMatrix[k][a])^2;
    

    is cubic, which is not supported by CPLEX.

    If you formulate with
    dvar int GradeBelong
    
    you can use CP, adding the 'using CP' clause.

    Tschau, Frank
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: 3 summations for the equation

    Posted 04/22/10 09:37 AM

    Originally posted by: doilangthang


    Thank you, Frank!

    It helps but I have to change my variable of ElementMatrixClusterKVariableP to integer while it's not boolean.

    "Using CP" just helps for int var.

    Thank so much!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer