Topic
  • 3 replies
  • Latest Post - ‏2013-01-25T19:24:44Z by SystemAdmin
SystemAdmin
SystemAdmin
7929 Posts

Pinned topic Solving MIQCP in CPLEX

‏2013-01-13T05:34:43Z |
Dear All,

I really need your help regarding a MIQCP in CPLEX. I formulated the problem and then tried to solve it in CPLEX but I am getting the following error:

"CPLEX Error 5002: Q in 'id182' is not positive semi-definite."

Is there any way to deal with this issue. I mean, if the constraints are not positive semi-definite, can we still solve the problem in CPLEX?

I really appreciate your help. If you want me to send the code, I will send it. Here are some of the constraints:

sum (t in Periods) X[t] Y[t]== sum (t in Periods) N[t];* where X[t] is a binary decision variable and Y[t] is an integer decision variable.
Updated on 2013-01-25T19:24:44Z at 2013-01-25T19:24:44Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Solving MIQCP in CPLEX

    ‏2013-01-13T07:34:58Z  
    The model in CPLEX is attached, any help will be appreciated.
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Solving MIQCP in CPLEX

    ‏2013-01-15T12:19:28Z  
    The model in CPLEX is attached, any help will be appreciated.
    Is it OK to have this constraint in your model:
    If X[i] is zero then Y[i] must be zero.
    If X[i] is one then Y[i] must not be larger than 4.
    

    If this is correct for your model you can just add
    forall (t in Periods) Y[i] <= 4 * X[i];
    

    and replace the offending constraint by
    sum (t in Periods) Y[t]== sum (t in Periods) N[t];
    
    Updated on 2014-03-24T22:41:56Z at 2014-03-24T22:41:56Z by iron-man
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Solving MIQCP in CPLEX

    ‏2013-01-25T19:24:44Z  
    Is it OK to have this constraint in your model:
    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">If X[i] is zero then Y[i] must be zero. If X[i] is one then Y[i] must not be larger than 4. </pre>
    If this is correct for your model you can just add
    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">forall (t in Periods) Y[i] <= 4 * X[i]; </pre>
    and replace the offending constraint by
    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">sum (t in Periods) Y[t]== sum (t in Periods) N[t]; </pre>
    Thank you for help. I just figured it out.
    I have another question now: I have created a model in CPLEX 12.5 and want to call and solve the model from VBA in Excel, any idea?