Class ExcludingResourceConstraint
java.lang.Object
com.dna.jopt.member.unit.condition.resource.AbstractResourceConstraint
com.dna.jopt.member.unit.condition.resource.ExcludingResourceConstraint
- All Implemented Interfaces:
IConstraint,IConstraintResource,Serializable
- Direct Known Subclasses:
BannedResourceConstraint,UnPreferredResourceConstraint
public class ExcludingResourceConstraint
extends AbstractResourceConstraint
implements IConstraintResource
- See Also:
-
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.booleanisSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route) Filters out hard constraint mismatches by checking whether aNodedemands aQualificationas ahard constraintbut theResourcedoes not provide this one.toString()Methods inherited from class com.dna.jopt.member.unit.condition.resource.AbstractResourceConstraint
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, hasMembers, isHard, removeResource, setIsHard, setMaxPriority, setResPriorityMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.dna.jopt.member.unit.condition.IConstraint
hasMembers, isHard, setIsHardMethods inherited from interface com.dna.jopt.member.unit.condition.resource.IConstraintResource
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, removeResource
-
Constructor Details
-
ExcludingResourceConstraint
public ExcludingResourceConstraint()
-
-
Method Details
-
getTitle
Description copied from interface:IConstraintGets the title of the constraint.- Specified by:
getTitlein interfaceIConstraint- Returns:
- the title
-
isSatisfied
public boolean isSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route) Description copied from interface:IConstraintFilters out hard constraint mismatches by checking whether aNodedemands aQualificationas ahard constraintbut theResourcedoes not provide this one. The idea is to have onlysoft constraintsproblems in the optimisation which can get solved by adding cost.- Specified by:
isSatisfiedin interfaceIConstraint- Parameters:
ca- the iEntityCostAssessornode- the iNoderoute- the iLogicEntityRoute- Returns:
- the boolean whether the route is satisfied.
Truemeans no problems detected
-
toString
-
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.- Specified by:
assessConstraintin interfaceIConstraint- Parameters:
en- entityroute- the iLogicEntityRoutenode- nodecad- iEntityCostAdjusterca- capropertyProvider- iPropertyProviderresultRequested- the boolean whether to save the results of the route- Returns:
- Entity Restriction Result
-