Functions | |
def | and_constraint (v=1, sense="minimize") |
def | or_constraint (v=0, sense="maximize") |
def | printFunc (name, m) |
def | xorc_constraint (v=0, sense="maximize") |
def | xors_constraint (v=1) |
Variables | |
model = Model() | |
n = model.addVar("n", "I") | |
r = model.addVar("r", "B") | |
sense | |
x = model.addVar("x", "B") | |
y = model.addVar("y", "B") | |
z = model.addVar("z", "B") | |
def logical.and_constraint | ( | v = 1 , |
|
sense = "minimize" |
|||
) |
AND constraint
Definition at line 42 of file logical.py.
def logical.or_constraint | ( | v = 0 , |
|
sense = "maximize" |
|||
) |
OR constraint
Definition at line 53 of file logical.py.
def logical.printFunc | ( | name, | |
m | |||
) |
prints results
Definition at line 21 of file logical.py.
def logical.xorc_constraint | ( | v = 0 , |
|
sense = "maximize" |
|||
) |
XOR (r as variable) custom constraint
Definition at line 74 of file logical.py.
References and_constraint(), or_constraint(), pyscipopt.expr.quicksum(), and xors_constraint().
def logical.xors_constraint | ( | v = 1 | ) |
XOR (r as boolean) standard constraint
Definition at line 64 of file logical.py.
model = Model() |
Definition at line 35 of file logical.py.
n = model.addVar("n", "I") |
Definition at line 79 of file logical.py.
bool r = model.addVar("r", "B") |
Definition at line 40 of file logical.py.
sense |
Definition at line 43 of file logical.py.
x = model.addVar("x", "B") |
Definition at line 37 of file logical.py.
y = model.addVar("y", "B") |
Definition at line 38 of file logical.py.
z = model.addVar("z", "B") |
Definition at line 39 of file logical.py.