Beispiel #1
0
 def __init__(self, **kwargs):
     """Constructor"""
     args = (Set(dimen=1), )
     if 'expr' in kwargs:
         raise ValueError(
             "ObjectiveList does not accept the 'expr' keyword")
     Objective.__init__(self, *args, **kwargs)
Beispiel #2
0
 def __init__(self, **kwargs):
     """Constructor"""
     args = (Set(), )
     if 'expr' in kwargs:
         raise ValueError(
             "LogicalConstraintList does not accept the 'expr' keyword")
     LogicalConstraint.__init__(self, *args, **kwargs)
Beispiel #3
0
    def __init__(self, **kwargs):
        """Constructor"""
        if 'expr' in kwargs:
            raise ValueError(
                "ObjectiveList does not accept the 'expr' keyword")
        _rule = kwargs.pop('rule', None)

        args = (Set(dimen=1),)
        super().__init__(*args, **kwargs)

        self.rule = Initializer(_rule, allow_generators=True)
        # HACK to make the "counted call" syntax work.  We wait until
        # after the base class is set up so that is_indexed() is
        # reliable.
        if self.rule is not None and type(self.rule) is IndexedCallInitializer:
            self.rule = CountedCallInitializer(self, self.rule)
Beispiel #4
0
 def __init__(self, **kwds):
     args = (Set(),)
     IndexedBooleanVar.__init__(self, *args, **kwds)
Beispiel #5
0
 def __init__(self, **kwds):
     #kwds['dense'] = False
     args = (Set(dimen=1), )
     IndexedVar.__init__(self, *args, **kwds)
Beispiel #6
0
 def __init__(self, **kwargs):
     self._starting_index = kwargs.pop('starting_index', 1)
     args = (Set(dimen=1),)
     IndexedVar.__init__(self, *args, **kwargs)
Beispiel #7
0
 def __init__(self, **kwargs):
     self._starting_index = kwargs.pop('starting_index', 1)
     args = (Set(), )
     IndexedBooleanVar.__init__(self, *args, **kwargs)