public ProbabilityValueSelector( ValueSelector childValueSelector, SelectionCacheType cacheType, SelectionProbabilityWeightFactory valueProbabilityWeightFactory) { this.childValueSelector = childValueSelector; this.cacheType = cacheType; this.valueProbabilityWeightFactory = valueProbabilityWeightFactory; if (childValueSelector.isNeverEnding()) { throw new IllegalStateException( "The selector (" + this + ") has a childValueSelector (" + childValueSelector + ") with neverEnding (" + childValueSelector.isNeverEnding() + ")."); } solverPhaseLifecycleSupport.addEventListener(childValueSelector); if (cacheType.isNotCached()) { throw new IllegalArgumentException( "The selector (" + this + ") does not support the cacheType (" + cacheType + ")."); } solverPhaseLifecycleSupport.addEventListener( new SelectionCacheLifecycleBridge(cacheType, this)); }
public PlanningVariableDescriptor getVariableDescriptor() { return childValueSelector.getVariableDescriptor(); }