@PlanningVariable(valueRangeProviderRefs = {"executionModeRange"}, strengthWeightFactoryClass = ExecutionModeStrengthWeightFactory.class) public ExecutionMode getExecutionMode() { return executionMode; }
private void processNullable(DescriptorPolicy descriptorPolicy, PlanningVariable planningVariableAnnotation) { nullable = planningVariableAnnotation.nullable(); if (nullable && variableMemberAccessor.getType().isPrimitive()) { throw new IllegalArgumentException("The entityClass (" + entityDescriptor.getEntityClass() + ") has a PlanningVariable annotated property (" + variableMemberAccessor.getName() + ") with nullable (" + nullable + "), which is not compatible with the primitive propertyType (" + variableMemberAccessor.getType() + ")."); } Class<? extends SelectionFilter> reinitializeVariableEntityFilterClass = planningVariableAnnotation.reinitializeVariableEntityFilter(); if (reinitializeVariableEntityFilterClass == PlanningVariable.NullReinitializeVariableEntityFilter.class) { reinitializeVariableEntityFilterClass = null; } if (reinitializeVariableEntityFilterClass != null) { reinitializeVariableEntityFilter = ConfigUtils.newInstance(this, "reinitializeVariableEntityFilterClass", reinitializeVariableEntityFilterClass); } else { reinitializeVariableEntityFilter = new NullValueReinitializeVariableEntityFilter(this); } }
private void processStrength(DescriptorPolicy descriptorPolicy, PlanningVariable planningVariableAnnotation) { Class<? extends Comparator> strengthComparatorClass = planningVariableAnnotation.strengthComparatorClass(); if (strengthComparatorClass == PlanningVariable.NullStrengthComparator.class) { strengthComparatorClass = null; = planningVariableAnnotation.strengthWeightFactoryClass(); if (strengthWeightFactoryClass == PlanningVariable.NullStrengthWeightFactory.class) { strengthWeightFactoryClass = null;
private void processChained(DescriptorPolicy descriptorPolicy, PlanningVariable planningVariableAnnotation) { chained = planningVariableAnnotation.graphType() == PlanningVariableGraphType.CHAINED; if (chained && !variableMemberAccessor.getType().isAssignableFrom( entityDescriptor.getEntityClass())) { throw new IllegalArgumentException("The entityClass (" + entityDescriptor.getEntityClass() + ") has a PlanningVariable annotated property (" + variableMemberAccessor.getName() + ") with chained (" + chained + ") and propertyType (" + variableMemberAccessor.getType() + ") which is not a superclass/interface of or the same as the entityClass (" + entityDescriptor.getEntityClass() + ").\n" + "If an entity's chained planning variable cannot point to another entity of the same class," + " then it is impossible to make chain longer than 1 entity and therefore chaining is useless."); } if (chained && nullable) { throw new IllegalArgumentException("The entityClass (" + entityDescriptor.getEntityClass() + ") has a PlanningVariable annotated property (" + variableMemberAccessor.getName() + ") with chained (" + chained + "), which is not compatible with nullable (" + nullable + ")."); } }
@PlanningVariable(valueRangeProviderRefs = {"vehicleRange", "customerRange"}, graphType = PlanningVariableGraphType.CHAINED) public Standstill getPreviousStandstill() { return previousStandstill; }
@PlanningVariable(valueRangeProviderRefs = {"roomRange"}, strengthWeightFactoryClass = RoomStrengthWeightFactory.class) public Room getRoom() { return room; }
@PlanningVariable(nullable = true, valueRangeProviderRefs = {"bedRange"}, strengthComparatorClass = BedStrengthComparator.class) public Bed getBed() { return bed; }
@PlanningVariable(valueRangeProviderRefs = {"periodRange"}, strengthWeightFactoryClass = PeriodStrengthWeightFactory.class) public Period getPeriod() { return period; }
@Override @PlanningVariable(valueRangeProviderRefs = {"periodRange"}) public Period getPeriod() { return period; }
@PlanningVariable(valueRangeProviderRefs = {"computerRange"}, strengthComparatorClass = CloudComputerStrengthComparator.class) public CloudComputer getComputer() { return computer; }
@PlanningVariable(valueRangeProviderRefs = {"roomRange"}, strengthWeightFactoryClass = RoomStrengthWeightFactory.class) public Room getRoom() { return room; }
@PlanningVariable(valueRangeProviderRefs = {"domicileRange", "visitRange"}, graphType = PlanningVariableGraphType.CHAINED, strengthWeightFactoryClass = DomicileDistanceStandstillStrengthWeightFactory.class) public Standstill getPreviousStandstill() { return previousStandstill; }
@PlanningVariable(valueRangeProviderRefs = {"rowRange"}, strengthWeightFactoryClass = RowStrengthWeightFactory.class) public Row getRow() { return row; }
@Override @PlanningVariable(valueRangeProviderRefs = {"stopRange", "hubRange"}) public StopOrHub getDestination() { return destination; }
@PlanningVariable(valueRangeProviderRefs = {"coachRange", "shuttleRange", "stopRange"}, graphType = PlanningVariableGraphType.CHAINED) public BusOrStop getPreviousBusOrStop() { return previousBusOrStop; }
@PlanningVariable(valueRangeProviderRefs = {"delayRange"}, strengthComparatorClass = DelayStrengthComparator.class) public Integer getDelay() { return delay; }
@PlanningVariable(valueRangeProviderRefs = {"roomRange"}) public Room getRoom() { return room; }
@PlanningVariable(valueRangeProviderRefs = {"seatRange"}) public Seat getSeat() { return seat; }
@PlanningVariable(valueRangeProviderRefs = {"timeGrainRange"}) public TimeGrain getStartingTimeGrain() { return startingTimeGrain; }
@PlanningVariable(valueRangeProviderRefs = {"quantityMillisRange"}) public Long getQuantityMillis() { return quantityMillis; }