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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResultassessConstraint(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 appropriatequalificationsfor theconstraintsare 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) booleanmatchZoneCodes(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:IConstraintGets 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:IConstraintAssesses the route, checking if the appropriatequalificationsfor theconstraintsare present.The
boolean truesaves 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
-