Skip to main content

MVars and MConstrs in feasRelax

Answered

Comments

3 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.
  • 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

Post is closed for comments.