Skip to main content

Model infeasible for with general constraint genConsrSin

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • David Torres Sanchez
    • Gurobi Staff

    Hi Zhizhen,

    The error comes from the bounds of the resulting sin variables, the ones containing \(\texttt{out}\).
    The constraints imply these variables must be negative, but the default LB of a variable is 0 (e.g. see model.addVar).
    If you explicitly set the lower bound to -1 and the upper bound to 1, for these variables, the problem should be feasible.

    Cheers, 
    David

    1
  • Zhizhen Qin
    • Gurobi-versary
    • First Comment
    • First Question

    Hi David:

     

    The problem indeed is due to the range of variables. After setting the variables to correct ranges I am now able to find a feasible solution to the posted instance, and to minimize the Levy function which is my original task. Thanks a lot!


    Best,

    Zhizhen

    0

Post is closed for comments.