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

MVars and MConstrs in feasRelax

回答済み

コメント

2件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi Jonathan,

    You can get your code to work using

    m.feasRelax(
        0,
        False,
        None,
        None,
        None,
        c.tolist(),
      [1]*c.size,
    )

    It may alternatively be worth using feasRelaxS too, which avoids the requirement of specifying which constraints to relax.

    - Riley

    1
  • Jonathan Baker
    • Gurobi-versary
    • First Comment
    • First Question

    Ah, thanks so much! I had tried "list(c)" but I guess tolist() does something fancier.

    My actual application is more complicated that this example, and I need to specify the relaxable constraints. feasRelax will be much better than feasRelaxS for me.

    0

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