Constraints module
OpenSEFA.ConstraintsModule — Module
Variables and equations which are used to represent model constraints, typically:
- Mass-balance equations.
- Transfer coefficients.
- Coupling between different substance layers.
- Coupling between different time periods.
OpenSEFA.ConstraintsModule.BilinearTerm — Type
A bilinear term is one of the form factor * variable1 * variable2.
OpenSEFA.ConstraintsModule.ConstantTerm — Type
A constant term is one of the form factor. The name is optional.
OpenSEFA.ConstraintsModule.Equation — Type
A (possibly nonlinear) equation of the form C + ∑ᵢ L[i] + ∑ᵢ B[i] = 0 where:
C[i]are constant termsL[i]are linear termsB[i]are nonlinear terms
OpenSEFA.ConstraintsModule.FixedVariable — Type
Variable (or parameter) for which there is a certain and fixed value.
OpenSEFA.ConstraintsModule.Label — Type
Label used for variable names.
OpenSEFA.ConstraintsModule.LinearTerm — Type
A linear term is one of the form factor * variable.
OpenSEFA.ConstraintsModule.MeasuredVariable — Type
Variable that is measured with an associated uncertainty. Normality assumption is impicit.
OpenSEFA.ConstraintsModule.Term — Type
Represents a term (typically a multivariate monomial) as part of an equation.
OpenSEFA.ConstraintsModule.UnmeasuredVariable — Type
Variable for which there is no data available.
OpenSEFA.ConstraintsModule.Variable — Type
Variables with their respective uncertainties, if available.
OpenSEFA.ConstraintsModule.assign_mean! — Function
Assign measured variables to their mean.
OpenSEFA.ConstraintsModule.delete_unobservable_variable_values! — Method
Remove values of unobservable variables from the solution dictionary.
OpenSEFA.ConstraintsModule.evaluate — Method
Evaluate the bilinear term.
OpenSEFA.ConstraintsModule.evaluate — Method
Evaluate a term consisting of a ConstantTerm and a vector of LinearTerms.
OpenSEFA.ConstraintsModule.evaluate — Method
Evaluate the constant term.
OpenSEFA.ConstraintsModule.evaluate — Method
Evaluate the equation.
OpenSEFA.ConstraintsModule.evaluate — Method
Evaluate the linear term.
OpenSEFA.ConstraintsModule.get_index — Method
Return index of a BilinearTerm with product variables 'var1' and 'var2' within a list of BilinearTerms 'terms'. Terminate when the first BilinearTerm with variables 'var1' and 'var2' (i.e. 'var1 * var2' or 'var2 * var1') is found (i.e. assume that there aren't several bilinear terms with the same variables). Return 'nothing' if there is no BilinearTerm with variables 'var1' and 'var2'.
OpenSEFA.ConstraintsModule.get_index — Method
Return index of a LinearTerm with variable 'var' within a list of LinearTerms 'terms'. Terminate when the first LinearTerm with variable 'var' is found (i.e. assume that there aren't several linear terms with the same variable). Return 'nothing' if there is no LinearTerm with variable 'var'.
OpenSEFA.ConstraintsModule.is_maximal — Method
Check if factor * value is the maximal value that factor * var can attain (due to variable bounds).
OpenSEFA.ConstraintsModule.is_minimal — Method
Check if factor * value is the minimal value that factor * var can attain (due to variable bounds).
OpenSEFA.ConstraintsModule.matches_bound — Method
Check if a value matches the upper or the lower bound of a variable (if given).
OpenSEFA.ConstraintsModule.matches_lower_bound — Method
Check if a value matches the lower bound of a variable (if given).
OpenSEFA.ConstraintsModule.matches_upper_bound — Method
Check if a value matches the upper bound of a variable (if given).
OpenSEFA.ConstraintsModule.satisfies_bounds — Method
Check if a value satisfies the upper and lower bounds of a variable (if given).
OpenSEFA.ConstraintsModule.satisfies_lower_bound — Method
Check if a value satisfies the lower bound of a variable (if given).
OpenSEFA.ConstraintsModule.satisfies_upper_bound — Method
Check if a value satisfies the upper bound of a variable (if given).
OpenSEFA.ConstraintsModule.term_names — Method
Return the label for each named term in the equation.
OpenSEFA.ConstraintsModule.term_names — Method
Return the label for each named term in the vector of linear terms.