メインコンテンツへスキップ

Model infeasible for with general constraint genConsrSin

回答済み

コメント

2件のコメント

  • 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

サインインしてコメントを残してください。