public class BindingResourceConstraint extends AbstractResourceConstraint implements IConstraintResource
Constructor and Description |
---|
BindingResourceConstraint() |
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. |
String |
getTitle()
Gets the title of the constraint.
|
boolean |
isSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca,
INode node,
ILogicEntityRoute route)
Filters out hard constraint mismatches by checking whether a
Node demands a Qualification as a hard constraint but the Resource does not provide this one. |
String |
toString() |
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, hasMembers, isHard, removeResource, setIsHard, setMaxPriority, setResPriorityMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, removeResource
hasMembers, isHard, setIsHard
public static final String MY_TITLE
public String getTitle()
IConstraint
getTitle
in interface IConstraint
public boolean isSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route)
IConstraint
Node
demands a Qualification
as a hard constraint
but the Resource
does not provide this one.
The idea is to have only soft constraints
problems in the optimisation which can get
solved by adding cost.isSatisfied
in interface IConstraint
ca
- the iEntityCostAssessornode
- the iNoderoute
- the iLogicEntityRouteTrue
means no problems detectedpublic 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.
assessConstraint
in interface IConstraint
en
- entityroute
- the iLogicEntityRoutenode
- nodecad
- iEntityCostAdjusterca
- capropertyProvider
- iPropertyProviderresultRequested
- the boolean whether to save the results of the routeCopyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.