Functional Constraint
Represents a functional constraint in an optimization problem.
This class models a constraint where the left-hand side is computed using a user-defined function and is compared to a predefined right-hand side value using an inequality (less than or greater than).
The valid variable names are defined at the time of initialization, and the left-hand side function is applied to input values to compute the constraint's value.
Parameters
the input variable names that are valid for the function. The list must not be empty and must contain non-blank strings.
Constructors
Properties
Used to turn greater than inequalities to less than inequalities
The type of inequality (LESS_THAN or GREATER_THAN). Defaults to LESS_THAN.
The function used to compute the left-hand side of the equation.
The right-hand side of the constraint adjusted for the direction of the inequality to ensure a less-than constraint
Functions
Computes the value of the left-hand side of the constraint based on the supplied values for each input variable in the equation.
Computes the value of the left-hand side of the constraint based on the supplied values for each input variable in the equation and checks if the constraint is satisfied.