java.lang.Object
org.maxicp.modeling.DecisionVarCollector
Walks the full constraint / expression graph of a
ModelDispatcher
and collects candidate decision variables (IntExpression and IntervalVar).
Results are deduplicated by identity, preserving first-seen order.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<IntExpression> collect(ModelDispatcher model) Collects all candidate integer/boolean decision variables inferred from the model's constraint graph.static List<IntExpression> collectAllIntVars(ModelDispatcher model, Objective objective) Collects all integer/boolean variables relevant for black-box search on the model, starting with primary decision variables fromcollect(ModelDispatcher), followed by any leafIntVarin the objective and any remaining registeredIntVaron theModelDispatcher.static List<IntervalVar> collectIntervals(ModelDispatcher model) Collects allIntervalVarinstances from the model's constraint graph and registered interval variables.
-
Method Details
-
collect
Collects all candidate integer/boolean decision variables inferred from the model's constraint graph.- Parameters:
model- the model to inspect- Returns:
- ordered, identity-deduplicated, unmodifiable list of decision variables
-
collectAllIntVars
Collects all integer/boolean variables relevant for black-box search on the model, starting with primary decision variables fromcollect(ModelDispatcher), followed by any leafIntVarin the objective and any remaining registeredIntVaron theModelDispatcher.- Parameters:
model- the model to inspectobjective- optional objective- Returns:
- ordered, identity-deduplicated, unmodifiable list of integer variables
-
collectIntervals
Collects allIntervalVarinstances from the model's constraint graph and registered interval variables.- Parameters:
model- the model to inspect- Returns:
- ordered, identity-deduplicated, unmodifiable list of interval variables
-