Class TerminationConfig
- java.lang.Object
-
- org.optaplanner.core.config.AbstractConfig<TerminationConfig>
-
- org.optaplanner.core.config.solver.termination.TerminationConfig
-
public class TerminationConfig extends AbstractConfig<TerminationConfig>
-
-
Constructor Summary
Constructors Constructor Description TerminationConfig()
-
Method Summary
-
Methods inherited from class org.optaplanner.core.config.AbstractConfig
deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList, toString
-
-
-
-
Method Detail
-
getTerminationClass
public Class<? extends Termination> getTerminationClass()
-
setTerminationClass
public void setTerminationClass(Class<? extends Termination> terminationClass)
-
getTerminationCompositionStyle
public TerminationCompositionStyle getTerminationCompositionStyle()
-
setTerminationCompositionStyle
public void setTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)
-
getSpentLimit
public Duration getSpentLimit()
-
setSpentLimit
public void setSpentLimit(Duration spentLimit)
-
getMillisecondsSpentLimit
public Long getMillisecondsSpentLimit()
-
setMillisecondsSpentLimit
public void setMillisecondsSpentLimit(Long millisecondsSpentLimit)
-
getSecondsSpentLimit
public Long getSecondsSpentLimit()
-
setSecondsSpentLimit
public void setSecondsSpentLimit(Long secondsSpentLimit)
-
getMinutesSpentLimit
public Long getMinutesSpentLimit()
-
setMinutesSpentLimit
public void setMinutesSpentLimit(Long minutesSpentLimit)
-
getHoursSpentLimit
public Long getHoursSpentLimit()
-
setHoursSpentLimit
public void setHoursSpentLimit(Long hoursSpentLimit)
-
getDaysSpentLimit
public Long getDaysSpentLimit()
-
setDaysSpentLimit
public void setDaysSpentLimit(Long daysSpentLimit)
-
getUnimprovedSpentLimit
public Duration getUnimprovedSpentLimit()
-
setUnimprovedSpentLimit
public void setUnimprovedSpentLimit(Duration unimprovedSpentLimit)
-
getUnimprovedMillisecondsSpentLimit
public Long getUnimprovedMillisecondsSpentLimit()
-
setUnimprovedMillisecondsSpentLimit
public void setUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)
-
getUnimprovedSecondsSpentLimit
public Long getUnimprovedSecondsSpentLimit()
-
setUnimprovedSecondsSpentLimit
public void setUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)
-
getUnimprovedMinutesSpentLimit
public Long getUnimprovedMinutesSpentLimit()
-
setUnimprovedMinutesSpentLimit
public void setUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)
-
getUnimprovedHoursSpentLimit
public Long getUnimprovedHoursSpentLimit()
-
setUnimprovedHoursSpentLimit
public void setUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)
-
getUnimprovedDaysSpentLimit
public Long getUnimprovedDaysSpentLimit()
-
setUnimprovedDaysSpentLimit
public void setUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)
-
getUnimprovedScoreDifferenceThreshold
public String getUnimprovedScoreDifferenceThreshold()
-
setUnimprovedScoreDifferenceThreshold
public void setUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)
-
getBestScoreLimit
public String getBestScoreLimit()
-
setBestScoreLimit
public void setBestScoreLimit(String bestScoreLimit)
-
getBestScoreFeasible
public Boolean getBestScoreFeasible()
-
setBestScoreFeasible
public void setBestScoreFeasible(Boolean bestScoreFeasible)
-
getStepCountLimit
public Integer getStepCountLimit()
-
setStepCountLimit
public void setStepCountLimit(Integer stepCountLimit)
-
getUnimprovedStepCountLimit
public Integer getUnimprovedStepCountLimit()
-
setUnimprovedStepCountLimit
public void setUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)
-
getCalculateCountLimit
@Deprecated public Long getCalculateCountLimit()
Deprecated.UsegetScoreCalculationCountLimit()
instead. Will be removed in 8.0.
-
setCalculateCountLimit
@Deprecated public void setCalculateCountLimit(Long calculateCountLimit)
Deprecated.UsesetScoreCalculationCountLimit(Long)
instead. Will be removed in 8.0.
-
getScoreCalculationCountLimit
public Long getScoreCalculationCountLimit()
-
setScoreCalculationCountLimit
public void setScoreCalculationCountLimit(Long scoreCalculationCountLimit)
-
getTerminationConfigList
public List<TerminationConfig> getTerminationConfigList()
-
setTerminationConfigList
public void setTerminationConfigList(List<TerminationConfig> terminationConfigList)
-
withTerminationClass
public TerminationConfig withTerminationClass(Class<? extends Termination> terminationClass)
-
withTerminationCompositionStyle
public TerminationConfig withTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)
-
withSpentLimit
public TerminationConfig withSpentLimit(Duration spentLimit)
-
withMillisecondsSpentLimit
public TerminationConfig withMillisecondsSpentLimit(Long millisecondsSpentLimit)
-
withSecondsSpentLimit
public TerminationConfig withSecondsSpentLimit(Long secondsSpentLimit)
-
withMinutesSpentLimit
public TerminationConfig withMinutesSpentLimit(Long minutesSpentLimit)
-
withHoursSpentLimit
public TerminationConfig withHoursSpentLimit(Long hoursSpentLimit)
-
withDaysSpentLimit
public TerminationConfig withDaysSpentLimit(Long daysSpentLimit)
-
withUnimprovedSpentLimit
public TerminationConfig withUnimprovedSpentLimit(Duration unimprovedSpentLimit)
-
withUnimprovedMillisecondsSpentLimit
public TerminationConfig withUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)
-
withUnimprovedSecondsSpentLimit
public TerminationConfig withUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)
-
withUnimprovedMinutesSpentLimit
public TerminationConfig withUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)
-
withUnimprovedHoursSpentLimit
public TerminationConfig withUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)
-
withUnimprovedDaysSpentLimit
public TerminationConfig withUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)
-
withUnimprovedScoreDifferenceThreshold
public TerminationConfig withUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)
-
withBestScoreLimit
public TerminationConfig withBestScoreLimit(String bestScoreLimit)
-
withBestScoreFeasible
public TerminationConfig withBestScoreFeasible(Boolean bestScoreFeasible)
-
withStepCountLimit
public TerminationConfig withStepCountLimit(Integer stepCountLimit)
-
withUnimprovedStepCountLimit
public TerminationConfig withUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)
-
withScoreCalculationCountLimit
public TerminationConfig withScoreCalculationCountLimit(Long scoreCalculationCountLimit)
-
withTerminationConfigList
public TerminationConfig withTerminationConfigList(List<TerminationConfig> terminationConfigList)
-
buildTermination
public Termination buildTermination(HeuristicConfigPolicy configPolicy, Termination chainedTermination)
-
buildTermination
public Termination buildTermination(HeuristicConfigPolicy configPolicy)
- Parameters:
configPolicy
- never null- Returns:
- sometimes null
-
overwriteSpentLimit
public void overwriteSpentLimit(Duration spentLimit)
-
calculateTimeMillisSpentLimit
public Long calculateTimeMillisSpentLimit()
-
shortenTimeMillisSpentLimit
public void shortenTimeMillisSpentLimit(long timeMillisSpentLimit)
-
overwriteUnimprovedSpentLimit
public void overwriteUnimprovedSpentLimit(Duration unimprovedSpentLimit)
-
calculateUnimprovedTimeMillisSpentLimit
public Long calculateUnimprovedTimeMillisSpentLimit()
-
inherit
public TerminationConfig inherit(TerminationConfig inheritedConfig)
Description copied from class:AbstractConfig
Inherits each property of theinheritedConfig
unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this
AbstractConfig
composition is replaced, it should not affect the inherited composition instance.- Specified by:
inherit
in classAbstractConfig<TerminationConfig>
- Parameters:
inheritedConfig
- never null- Returns:
- this
-
copyConfig
public TerminationConfig copyConfig()
Description copied from class:AbstractConfig
Typically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)
on it- Specified by:
copyConfig
in classAbstractConfig<TerminationConfig>
- Returns:
- new instance
-
-