Skip to main content

How to combine decision variables?

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.
  • Maliheh Aramon
    • Gurobi Staff

    Hi, 

    Yes, you can define different variable types for matrix variables. See below where the first three MVar variables are binary and the last four are integers.

    m.addMVar(7, vtype=["B" for _ in range(3)] + ["I" for _ in range(4)])

    Best regards,

    Maliheh

    0
  • Md Raqibul Hasan PRINCE
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you!

    0

Post is closed for comments.