public class UKPostCodeConstraint extends AbstractZoneCodeConstraint<UKPostCode,UKPostCodeQualification>
Constraints
to Nodes
so that only Resources
from
certain UK postcode
areas are allowed to give them service.UKPostCodeQualification
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
MAX_ASSUMED_DISTRICT_DELTA |
static int |
MAX_ASSUMED_SECTOR_DELTA |
static String |
MY_TITLE |
Constructor and Description |
---|
UKPostCodeConstraint() |
Modifier and Type | Method and Description |
---|---|
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)
Assesses the route, checking if the appropriate
qualifications for the constraints are present. |
Optional<UKPostCodeQualification> |
getNodeZoneQualification(INode node) |
String |
getTitle()
Gets the title of the constraint.
|
Optional<IViolation> |
matchCodesAndPenalize(UKPostCodeQualification quali,
List<UKPostCode> masterCodes,
ILogicEntityRoute route,
com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad,
com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider,
boolean resultRequested) |
boolean |
matchZoneCodes(UKPostCodeQualification quali,
List<UKPostCode> masterCodes) |
addZoneCode, getZoneCodes, hasMembers, isHard, isSatisfied, setCodes, setIsHard
public static final String MY_TITLE
public static final int MAX_ASSUMED_SECTOR_DELTA
public static final int MAX_ASSUMED_DISTRICT_DELTA
public String getTitle()
IConstraint
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)
IConstraint
qualifications
for the constraints
are present.
The boolean true
saves the data.
en
- entityroute
- the iLogicEntityRoutenode
- nodecad
- iEntityCostAdjusterca
- capropertyProvider
- iPropertyProviderresultRequested
- the boolean whether to save the results of the routepublic boolean matchZoneCodes(UKPostCodeQualification quali, List<UKPostCode> masterCodes)
public Optional<IViolation> matchCodesAndPenalize(UKPostCodeQualification quali, List<UKPostCode> masterCodes, ILogicEntityRoute route, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, boolean resultRequested)
public Optional<UKPostCodeQualification> getNodeZoneQualification(INode node)
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.