Esempio n. 1
0
    def __init__(self,
                 nrows,
                 ncols,
                 nnz,
                 prows,
                 jcols,
                 vals,
                 ranges,
                 range_types,
                 varmap):

        assert len(prows) == nrows + 1
        assert len(jcols) == nnz
        assert len(vals) == nnz
        assert len(ranges) == 2 * nrows
        assert len(range_types) == nrows
        assert len(varmap) == ncols

        IndexedConstraint.__init__(self,
                                   Any)

        self._prows = prows
        self._jcols = jcols
        self._vals = vals
        self._ranges = ranges
        self._range_types = range_types
        self._varmap = varmap
Esempio n. 2
0
    def __init__(self,
                 nrows,
                 ncols,
                 nnz,
                 prows,
                 jcols,
                 vals,
                 ranges,
                 range_types,
                 varmap):

        assert len(prows) == nrows + 1
        assert len(jcols) == nnz
        assert len(vals) == nnz
        assert len(ranges) == 2 * nrows
        assert len(range_types) == nrows
        assert len(varmap) == ncols

        IndexedConstraint.__init__(self,
                                   Any)

        self._prows = prows
        self._jcols = jcols
        self._vals = vals
        self._ranges = ranges
        self._range_types = range_types
        self._varmap = varmap
Esempio n. 3
0
 def __init__(self, *args, **kwds):
     IndexedConstraint.__init__(self, Any, **kwds)
     # Constructor for ComponentDict needs to
     # go last in order to handle any initialization
     # iterable as an argument
     ComponentDict.__init__(self,
                            _ConstraintData,
                            *args,
                            **kwds)
Esempio n. 4
0
    def __init__(self, A_data, A_indices, A_indptr, lb, ub, x):

        m = len(lb)
        n = len(x)
        nnz = len(A_data)
        assert len(A_indices) == nnz
        assert len(A_indptr) == m + 1
        assert len(ub) == m
        IndexedConstraint.__init__(self, Any)

        self._A_data = A_data
        self._A_indices = A_indices
        self._A_indptr = A_indptr
        self._lower = lb
        self._upper = ub
        self._x = tuple(x)