saealib.Constraint¶
- class saealib.Constraint(func, threshold=0.0)[source]¶
Bases:
objectA single inequality constraint: g(x) <= threshold.
- Parameters:
func (callable) – Constraint function g(x). Should return a scalar float.
threshold (float, optional) – Right-hand side of the constraint g(x) <= threshold. Default: 0.0.
Methods
Return the raw constraint value g(x). |
|
Return constraint violation: max(0, g(x) - threshold). |
Method Details