def get_dual_value(self, constr_id): """ Retrieve dual variable for queried constraint. Arguments: constr_id (:obj:`str`): ID of queried constraint. Returns: ``None`` if ``constr_id`` does not correspond to a registered dual variable. Value of dual variable otherwise. """ if constr_id in self.__constraint_indices: dual_var = self.problem.constraints[ self.__constraint_indices[constr_id]].dual_value if dual_var is not None: if not isinstance(dual_var, float): return conrad_vec(dual_var) else: return dual_var else: return None
def x_dual(self): """ Dual variable corresponding to constraint x >= 0. """ try: return conrad_vec(self.problem.constraints[0].dual_value) except: return None
def x(self): """ Vector variable of beam intensities, x. """ return conrad_vec(self.__x.value)