gemseo.algos.opt.core.linear_constraints module#

Build matrices from linear constraints for solvers.

build_bounds_matrices(bounds, upper)[source]#

Return the constraint matrices corresponding to bound.

Parameters:
  • bounds (ndarray) -- The value of the bounds.

  • upper (bool) -- Whether the bounds are considered as upper bounds.

Returns:

The left-hand side matrix, the right-hand side vector.

Return type:

tuple[ndarray | None, ndarray | None]

build_constraints_matrices(constraints, constraint_type)[source]#

Build the constraints matrices associated with passed linear constraints.

Parameters:
Returns:

The left-hand side matrix, the right-hand side vector

Return type:

tuple[ndarray | None, ndarray | None]