Skip to main content

code(logic) works with CVXPY using the Gurobi solver, but not in Gurobi himself

Ongoing

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three 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 why not try our AI Gurobot?.
  • Maliheh Aramon
    • Gurobi Staff Gurobi Staff

    Hi Saeed, 

    Would it be possible to send us the csv file or a minimal working example such that we can reproduce the issue? You can find the instruction for sharing files in our Posting to the Community Forum article.

    Two points to consider:

    • Can the variables \(\texttt{Pimport}\) be negative? The constraints below imply that the variables \(\texttt{Pimport}\) can be negative otherwise there is no need for such constraints. However, \(\texttt{Pimport}\) variables are defined with the default lower bound of 0. 
    Pimportmax[i] == gp.max_([Pimport[i],0.0]) 
    • Furthermore, the above constraints as well as the constraints defining \(\texttt{Pimport}\) need to be explicitly added to the model by the model.addConstrs() method to be in effect.


    Best regards,

    Maliheh

    1

Post is closed for comments.