Skip to main content

my code doesnt work well

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Please note that your code is not reproducible because a minimal set of data is missing.

    It looks like

    ( gp.quicksum(outputs[h][r]*wout[r] - u_vrs[target]  for r in outattr ) 

    should be

    ( gp.quicksum(outputs[h][r]*wout[r]  for r in outattr )  + u_vrs[target]

    in your \(\texttt{ratios}\) constraints. The same applies to your \(\texttt{normalization}\) constraint.

    It is best to write out the LP file

    model.write("myModel.lp")

    to check whether the constraints look what they should like. This is the easiest way to debug issues like this one.

    1
  • Jiwook Sung
    • Gurobi-versary
    • First Comment
    • First Question

    i update the post so now you could access the data that i use

    and i solve the problem thank you!

    0

Post is closed for comments.