Class ZoneNumberConstraint
java.lang.Object
com.dna.jopt.member.unit.condition.workinghour.zone.AbstractZoneCodeConstraint<ZoneNumber,ZoneNumberQualification>
com.dna.jopt.member.unit.condition.workinghour.zone.zonenumber.ZoneNumberConstraint
- All Implemented Interfaces:
IConstraint
,IWorkingHoursLevelConstraint
,IZoneCodeConstraint<ZoneNumber,
,ZoneNumberQualification> Serializable
public class ZoneNumberConstraint
extends AbstractZoneCodeConstraint<ZoneNumber,ZoneNumberQualification>
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult
assessConstraint
(IEntity en, ILogicEntityRoute route, INode node, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, boolean resultRequested) Assesses the route, checking if the appropriatequalifications
for theconstraints
are present.getTitle()
Gets the title of the constraint.matchCodesAndPenalize
(ZoneNumberQualification quali, List<ZoneNumber> masterCodes, ILogicEntityRoute route, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, boolean resultRequested) boolean
matchZoneCodes
(ZoneNumberQualification quali, List<ZoneNumber> masterCodes) static Optional<IViolation>
setNoMatchCost
(ILogicEntityRoute route, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, int zoneNumberDelta, boolean resultRequested) toString()
Methods inherited from class com.dna.jopt.member.unit.condition.workinghour.zone.AbstractZoneCodeConstraint
addZoneCode, getZoneCodes, hasMembers, isHard, isSatisfied, setCodes, setIsHard
-
Field Details
-
MAX_ASSUMED_DELTA
public static final int MAX_ASSUMED_DELTA- See Also:
-
MY_TITLE
- See Also:
-
-
Constructor Details
-
ZoneNumberConstraint
public ZoneNumberConstraint()
-
-
Method Details
-
getTitle
Description copied from interface:IConstraint
Gets the title of the constraint.- Returns:
- the title
-
matchZoneCodes
-
getNodeZoneQualification
-
toString
-
setNoMatchCost
public static Optional<IViolation> setNoMatchCost(ILogicEntityRoute route, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, int zoneNumberDelta, boolean resultRequested) -
matchCodesAndPenalize
public Optional<IViolation> matchCodesAndPenalize(ZoneNumberQualification quali, List<ZoneNumber> masterCodes, ILogicEntityRoute route, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, boolean resultRequested) -
assessConstraint
public com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult assessConstraint(IEntity en, ILogicEntityRoute route, INode node, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, boolean resultRequested) Description copied from interface:IConstraint
Assesses the route, checking if the appropriatequalifications
for theconstraints
are present.The
boolean true
saves the data.- Parameters:
en
- entityroute
- the iLogicEntityRoutenode
- nodecad
- iEntityCostAdjusterca
- capropertyProvider
- iPropertyProviderresultRequested
- the boolean whether to save the results of the route- Returns:
- Entity Restriction Result
-