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

Unbounded Ray

回答済み

コメント

1件のコメント

  • Mario Ruthmair
    • Gurobi Staff

    Hi Mina,

    I guess your question is how to obtain the unbounded ray for one particular variable, right?
    You can access the UnbdRay attribute directly for each variable via

    var.UnbdRay

    In your code, it seems you want to access the UnbdRay attribute for the whole variable array (sp1?) in one step.
    How did you create your variables? If you created them via addVars() like

    r = model.addVars(J, ...)
    p = model.addVars(I, J, ...)
    q = model.addVars(I, J, ...)

    with I and J being the index sets for your constraints, then you can access the attribute via

    q[i,j].UnbdRay

    for one particular index i and index j. With this, you can build your feasibility cut.

    Best regards,
    Mario

    0

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