Version 12.0.0 of the Gurobi Optimizer, Gurobi Optimization, LLC.
The Gurobi Optimizer is a mathematical optimization software library for solving mixed-integer linear and quadratic optimization problems.
This package comes with a trial license that allows you to solve problems of limited size. As a student or staff member of an academic institution you qualify for a free, full product license. For more information, see:
For a commercial evaluation, you can request an evaluation license.
Other useful resources to get started:
# Solve the following MIP:
# maximize
# x + y + 2 z
# subject to
# x + 2 y + 3 z <= 4
# x + y >= 1
# x, y, z binary
import gurobipy as gp
# Create a new model
m = gp.Model()
# Create variables
x = m.addVar(vtype="B", name="x")
y = m.addVar(vtype="B", name="y")
z = m.addVar(vtype="B", name="z")
# Set objective function
m.setObjective(x + y + 2 * z, gp.GRB.MAXIMIZE)
# Add constraints
m.addConstr(x + 2 * y + 3 * z <= 4)
m.addConstr(x + y >= 1)
# Solve it!
m.optimize()
print(f"Optimal objective value: {m.objVal}")
print(f"Solution values: x={x.X}, y={y.X}, z={z.X}")