def constrained_by(self):
"""
returns a list of parameters that constrain this parameter
"""
if self._is_constraint is None:
return []
params = []
for var in self.is_constraint._vars:
param = var.get_parameter()
if param.uniqueid != self.uniqueid:
params.append(param)
return params
#~ @property
#~ def in_constraints(self):
#~ """
#~ returns a list the labels of the constraints in which this parameter constrains another
#~
#~ you can then access all of the parameters of a given constraint via bundle.get_constraint(constraint)
#~ """
#~ return [param.uniquetwig for param in self.in_constraints_expressions]
评论列表
文章目录