Constraints

Constraints may be of the following types:

The set of constraints is represented as an ArrayList. All constraints are elements of the list.

Example 6.7.  Creating a list of constraints

from biz.sc.math.opt.constraint import *
from java.util import ArrayList

bc = BoundConstraint([1,1,2],[2,3,4])

lineq = LinearInequality([[1,1,2],[1,-1,3]], [2,3], FALSE)

constraints =  ArrayList()

constraints.add(bc)
constraints.add(lineq)