hopsy.add_equality_constraints#

hopsy.add_equality_constraints(problem: Problem, A_eq: ndarray, b_eq: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])#

Adds equality constraints as specified. This will change hopsy.Problem.A and hopsy.Problem.b. The equality constraints are incorporated into the transformation of the original problem. :param hopsy.Problem problem: Problem which should be constrained and which contains the matrix \(A\) and vector \(b\) in \(Ax \leq b\). In order to obtain useful results, the problem is automatically simplified.

Parameters:
  • A_eq (numpy.ndarray[float64[n,m]]) – equality constraint matrix (lhs)

  • b_eq (numpy.ndarray[float64[n,1]]) – equality constraint vector (rhs)

Returns:

A hopsy.Problem which has incorporated the equality constraints into the transformation and most likely reduced the dimensionality of the problem.

Return type:

hopsy.Problem