def __init__(self, *args, **kwargs):
     super(Response, self).__init__(*args, **kwargs)
     self._pseudo = None
     self._pseudo = PseudoComponent(self.scope,
                                    self,
                                    pseudo_type='objective')
     self.pcomp_name = self._pseudo.name
示例#2
0
 def activate(self):
     """Make this constraint active by creating the appropriate
     connections in the dependency graph.
     """
     if self.pcomp_name is None:
         pseudo = PseudoComponent(self.scope, self, pseudo_type='objective')
         self.pcomp_name = pseudo.name
         self.scope.add(pseudo.name, pseudo)
     getattr(self.scope, self.pcomp_name).make_connections(self.scope)