public interface IConstraint extends Serializable
Constraints
are limits set on the INode
which require the servicing IResource
to have the fitting IQualification
. This
interface provides methods to inquire about certain properties of constraints like the title,
whether they are hard constraints or methods to set them hard.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 iEntityCostAdjuster,
com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca,
com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider iPropertyProvider,
boolean resultRequested)
Assesses the route, checking if the appropriate
qualifications for the constraints are present. |
String |
getTitle()
Gets the title of the constraint.
|
boolean |
hasMembers() |
boolean |
isHard()
Checks the parameter or directly returns
true where this must be the case. |
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. |
void |
setIsHard(boolean isHard)
Sets the constraint to
hard if the respective parameter is given or returns an IllegalStateException if this is expected but not the case. |
com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult assessConstraint(IEntity en, ILogicEntityRoute route, INode node, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster iEntityCostAdjuster, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider iPropertyProvider, boolean resultRequested)
qualifications
for the constraints
are present.
The boolean true
saves the data.
en
- entityroute
- the iLogicEntityRoutenode
- nodeca
- caiEntityCostAdjuster
- iEntityCostAdjusteriPropertyProvider
- iPropertyProviderresultRequested
- the boolean whether to save the results of the routevoid setIsHard(boolean isHard)
hard
if the respective parameter is given or returns an IllegalStateException
if this is expected but not the case.isHard
- the boolean to be setboolean isHard()
true
where this must be the case.boolean isSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route)
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.ca
- the iEntityCostAssessornode
- the iNoderoute
- the iLogicEntityRouteTrue
means no problems detectedString getTitle()
boolean hasMembers()
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.