java.lang.Object
org.maxicp.modeling.DecisionVarCollector
Walks the full constraint / expression graph of a
ModelDispatcher
and collects all candidate decision variables declared by
DecisionVarsProvider nodes.
Walk strategy:
- For every
Constraint: if it implementsDecisionVarsProvider, harvest itsdecisionVariables(). - Descend the expression sub-tree of every scope expression via
Expression.subexpressions(), collecting from anyDecisionVarsProvidernode found (e.g. anElement1Dembedded inside a sum).
Results are deduplicated by identity, preserving first-seen order.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<IntExpression> collect(ModelDispatcher model) Collects all candidate decision variables inferred from the model's constraint graph.
-
Method Details
-
collect
Collects all candidate decision variables inferred from the model's constraint graph.- Parameters:
model- the model to inspect- Returns:
- ordered, identity-deduplicated, unmodifiable list of decision variables
-