jijzepttools.modeling.algorithm.series_decomposition.replace

jijzepttools.modeling.algorithm.series_decomposition.replace#

Functions#

replace_expression_with_separated_indices(...)

replace expression with separated indices

Module Contents#

replace_expression_with_separated_indices(expr: jijzepttools.modeling.utils.type.Expr, disjoint_forall_holder: jijzepttools.modeling.algorithm.series_decomposition.utils.DisjointForallHolder) List[jijzepttools.modeling.utils.type.Expr]#

replace expression with separated indices the input expr is assume to be:

  • expression that containts only single type of decision variable

  • expression that is either a single term or SumOp term

this function returns a list of expressions that are separated by disjoint_forall_holder the strategy is as follows:

  • validate expr. if more than one decision variable is detected, raise ValueError

  • validate expr. if ProdOp is detected, raise ValueError

Parameters:
  • expr (Expr) – expression to be replaced

  • disjoint_forall_holder (DisjointForallHolder) – disjoint forall holder

Returns:

replaced expressions

Return type:

tp.List[Expr]