PySCIPOpt  5.1.1
Python Interface for the SCIP Optimization Suite
logical Namespace Reference

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")
 

Function Documentation

◆ and_constraint()

def logical.and_constraint (   v = 1,
  sense = "minimize" 
)
AND constraint 

Definition at line 42 of file logical.py.

◆ or_constraint()

def logical.or_constraint (   v = 0,
  sense = "maximize" 
)
OR constraint

Definition at line 53 of file logical.py.

◆ printFunc()

def logical.printFunc (   name,
  m 
)
prints results

Definition at line 21 of file logical.py.

◆ xorc_constraint()

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().

◆ xors_constraint()

def logical.xors_constraint (   v = 1)
XOR (r as boolean) standard constraint

Definition at line 64 of file logical.py.

Variable Documentation

◆ model

model = Model()

Definition at line 35 of file logical.py.

◆ n

n = model.addVar("n", "I")

Definition at line 79 of file logical.py.

◆ r

bool r = model.addVar("r", "B")

Definition at line 40 of file logical.py.

◆ sense

sense

Definition at line 43 of file logical.py.

◆ x

x = model.addVar("x", "B")

Definition at line 37 of file logical.py.

◆ y

y = model.addVar("y", "B")

Definition at line 38 of file logical.py.

◆ z

z = model.addVar("z", "B")

Definition at line 39 of file logical.py.