Skip to main content

MVars and MConstrs in feasRelax

Answered

Comments

2 comments

  • Riley Clement
    Gurobi Staff 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
    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

Please sign in to leave a comment.