ConstraintIfc

Properties

Link copied to clipboard

Used to turn greater than inequalities to less than inequalities

Link copied to clipboard

The type of inequality less than or greater than

Link copied to clipboard
open val ltRHSValue: Double

The right-hand side of the constraint adjusted for the direction of the inequality to ensure a less-than constraint

Link copied to clipboard
abstract val rhsValue: Double

The right-hand side of the constraint

Functions

Link copied to clipboard
abstract fun computeLHS(values: Map<String, Double>): Double

Computes the value of the left-hand side of the constraint based on the supplied values for each input variable in the equation. The calculation should take into account the direction of the inequality such that the inequality is interpreted as less than.

Link copied to clipboard
abstract fun isSatisfied(values: Map<String, Double>): Boolean

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.

Link copied to clipboard
open fun slack(inputs: Map<String, Double>): Double

The slack associated with the constraint based on the provided inputs. This is the difference between the right-hand side value and the left-hand side value.

Link copied to clipboard
open fun violation(inputs: Map<String, Double>): Double