Class BitTypeWithExpertiseConstraint
java.lang.Object
com.dna.jopt.member.unit.condition.autodict.GenericAbstractAutoDictItemWithMap<TypeLevelRequirement>
com.dna.jopt.member.unit.condition.bittypewithexpertise.BitTypeWithExpertiseConstraint
- All Implemented Interfaces:
IAutoDict,IAutoDictWithMap<TypeLevelRequirement>,IConstraint,Serializable
public class BitTypeWithExpertiseConstraint
extends GenericAbstractAutoDictItemWithMap<TypeLevelRequirement>
implements IConstraint
- See Also:
-
Field Summary
FieldsFields inherited from class com.dna.jopt.member.unit.condition.autodict.GenericAbstractAutoDictItemWithMap
dictTypes, manager -
Constructor Summary
ConstructorsConstructorDescriptionBitTypeWithExpertiseConstraint(BitSet reqSkills, BitSet reqSkillsWithExpertise, Map<Integer, TypeLevelRequirement> skillExpertiseLevels) -
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.static com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResultassessConstraintHelper(BitSet requiredSkills, Map<Integer, TypeLevelRequirement> skillExpertiseLevels, boolean isHard, boolean isHardLevel, boolean evaluateWithLevels, Function<List<Integer>, String> violationFunc, TypeLevelRequirement.SkillInfoCostModel myCostingModel, 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) extractMissingBits(BitSet required, BitSet actual) Class<?>static intgetLevelDelta(TypeLevelOffering info, TypeLevelRequirement requiredInfo) static doublegetLevelDeltaMatchCost(TypeLevelOffering info, boolean isMin, int delta, TypeLevelRequirement.SkillInfoCostModel model, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, INode node, ILogicEntityRoute route, double globalMaxLevel) getTitle()Gets the title of the constraint.getTypes()booleanvoidinvokeTypesFromDict(ITypeDictionary dic, Set<String> myDictTypes, Map<String, TypeLevelRequirement> dictTypeMap) booleanisHard()Checks the parameter or directly returnstruewhere this must be the case.booleanbooleanisSatisfied(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.static booleanisSatisfiedHelper(BitSet requiredSkills, Map<Integer, TypeLevelRequirement> skillExpertiseLevels, boolean isHard, boolean isHardLevel, boolean evaluateWithLevels, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route) voidvoidsetIsHard(boolean isHard) Sets the constraint tohardif the respective parameter is given or returns anIllegalStateExceptionif this is expected but not the case.voidsetIsHardLevel(boolean isHardLevel) voidvoidtoString()Methods inherited from class com.dna.jopt.member.unit.condition.autodict.GenericAbstractAutoDictItemWithMap
addDictType, addDictType, getAsViolationValue, getDictTypeMap, getDictTypes, getTypeDictionaryManager, needsTranformation, setTypeDictionaryManager
-
Field Details
-
MY_TITLE
- See Also:
-
-
Constructor Details
-
BitTypeWithExpertiseConstraint
public BitTypeWithExpertiseConstraint() -
BitTypeWithExpertiseConstraint
public BitTypeWithExpertiseConstraint(BitSet reqSkills, BitSet reqSkillsWithExpertise, Map<Integer, TypeLevelRequirement> skillExpertiseLevels)
-
-
Method Details
-
getExtendedClass
- Specified by:
getExtendedClassin interfaceIAutoDict
-
getTitle
Description copied from interface:IConstraintGets the title of the constraint.- Specified by:
getTitlein interfaceIConstraint- Returns:
- the title
-
isHard
public boolean isHard()Description copied from interface:IConstraintChecks the parameter or directly returnstruewhere this must be the case.- Specified by:
isHardin interfaceIConstraint- Returns:
- the value of the checked boolean
-
isHardLevel
public boolean isHardLevel() -
setIsHard
public void setIsHard(boolean isHard) Description copied from interface:IConstraintSets the constraint tohardif the respective parameter is given or returns anIllegalStateExceptionif this is expected but not the case.- Specified by:
setIsHardin interfaceIConstraint- Parameters:
isHard- the boolean to be set
-
setIsHardLevel
public void setIsHardLevel(boolean isHardLevel) -
getSkillExpertiseLevels
-
setSkillCostingModel
-
getSkillCostingModel
-
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
-
isSatisfiedHelper
public static boolean isSatisfiedHelper(BitSet requiredSkills, Map<Integer, TypeLevelRequirement> skillExpertiseLevels, boolean isHard, boolean isHardLevel, boolean evaluateWithLevels, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route) -
extractMissingBits
-
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
-
assessConstraintHelper
public static com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult assessConstraintHelper(BitSet requiredSkills, Map<Integer, TypeLevelRequirement> skillExpertiseLevels, boolean isHard, boolean isHardLevel, boolean evaluateWithLevels, Function<List<Integer>, String> violationFunc, TypeLevelRequirement.SkillInfoCostModel myCostingModel, 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) -
getLevelDelta
-
getLevelDeltaMatchCost
public static double getLevelDeltaMatchCost(TypeLevelOffering info, boolean isMin, int delta, TypeLevelRequirement.SkillInfoCostModel model, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, INode node, ILogicEntityRoute route, double globalMaxLevel) -
toString
-
getTypes
-
getTypesWithExpertise
-
setTypes
-
hasMembers
public boolean hasMembers()- Specified by:
hasMembersin interfaceIConstraint
-
invokeTypesFromDict
public void invokeTypesFromDict(ITypeDictionary dic, Set<String> myDictTypes, Map<String, TypeLevelRequirement> dictTypeMap) - Specified by:
invokeTypesFromDictin interfaceIAutoDictWithMap<TypeLevelRequirement>
-
resetBitTypeNature
public void resetBitTypeNature()- Specified by:
resetBitTypeNaturein interfaceIAutoDict- Overrides:
resetBitTypeNaturein classGenericAbstractAutoDictItemWithMap<TypeLevelRequirement>
-