Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX Error 5002: Q is not positive semi-definite.

    Posted Thu May 31, 2018 06:37 AM

    Originally posted by: Marko_Obert


    Hi,


    I have issues with the constraint "ctROCOF":


    // Decision Variables
    dvar float+ Pg[UnitID][subset];                  
    dvar boolean ug[UnitID][subset];          
    dvar float TotalInertia[subset];  
    dvar float TotalInertiaTrip[UnitID][subset];

     

        forall(h in subset, u in UnitID)
               ctROCOF:
                     Pg[u][h] * c >= TotalInertiaTrip[u][h];

     

    Result in: CPLEX Error  5002: Q in ''ctROCOF#0#-1'' is not positive semi-definite.   

    I think this error is indirectly caused by the constraints to calculate "TotalInertiaTrip":

        forall(h in subset)
             calcInertia:
                 TotalInertia[h] == sum(u in UnitID)(Inertia[u] * ug[u][h]);
        
        forall(h in subset, u in UnitID)
             calcDeltaInertia:
                 TotalInertiaTrip[u][h] == (TotalInertia[h] - Inertia[u])*ug[u][h]

     

    Observation: If up[u][h] is zero Pg[u][h] and TotalInertiaTrip[u][h] is zero, too.

     

    What can I do to solve this issue?

     

    Kind regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: CPLEX Error 5002: Q is not positive semi-definite.



  • 3.  Re: CPLEX Error 5002: Q is not positive semi-definite.

    Posted Thu May 31, 2018 10:18 AM

    Originally posted by: Marko_Obert


    Hi Mr. Fleischer,

     

    thank you for the link. I tried option 2. Now, error 5002 disappeared, but the constraint still does not work as expected:

        forall(h in subset)
             calcInertia:
                 TotalInertia[h] == sum(u in UnitID)(Inertia[u] * ug[u][h]);
        
        // Calculate total inertia, after a generator trips
        forall(h in subset, u in UnitID)
             (ug[u][h]==1) => (TotalInertiaTrip[u][h] == TotalInertia[h] - Inertia[u]);
                 
        forall(h in subset, u in UnitID)
             (ug[u][h]==0) => (TotalInertiaTrip[u][h] == 0);

       // Calculate the rate of change of frequency, when a generaotr trips
        forall(h in subset, u in UnitID)
               ctROCOF:
                  TotalInertiaTrip[u][h] >= Pg[u][h] * c;

     

    Is my implementation of option 2 correct?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: CPLEX Error 5002: Q is not positive semi-definite.

    Posted Thu May 31, 2018 10:28 AM