Skip to main content

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

Awaiting user input

Comments

1 comment

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

Please sign in to leave a comment.