Skip to main content

Is there a better solution than IntegralityFocus to ensure integrality of variables?

Awaiting user input

Comments

2 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.
  • Eli Towle
    • Gurobi Staff

    How exactly do you define your \(\texttt{t}\) variables? It looks like at least some of them are not defined as integer variables:

    (0, 4): 23.558825610628386
    (0, 7): 64.52817997001554
    (0, 8): 89.45054879258372
    (0, 11): 29.558825610628386
    (0, 15): 76.74705379564192
    (0, 21): 52.52817997001554
    (0, 22): 64.5158780897043
    (0, 28): 83.45054879258372
    (0, 32): 20.514940870192838
    (0, 34): 58.52817997001554
    (0, 40): 26.558825610628386
    (0, 44): 95.45054879258372
    (0, 52): 32.55882561062839
    (0, 55): 35.558825610628446

    You can define integer variables by adding the keyword argument \(\texttt{vtype=GRB.INTEGER}\) to your call to Model.addVars() or Model.addVar().

    0

Post is closed for comments.