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.
source
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'.

source
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'.

source