Interface IViolation
- All Superinterfaces:
Cloneable, Serializable
- All Known Implementing Classes:
Violation
This interface
IViolations describes behavior the Optimizer is supposed to avoid like
Resources being too late, Nodes not being skipped etc. These Violations are being
listed after an optimization run.- Since:
- 30/09/2019
- Version:
- 30/09/2019
- Author:
- DNA
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a newViolationwith the values ofViolation.getCategory(),Violation.getAttribute(),Violation.getValue()andViolation.getCode().Gets the attribute.Gets the category.intgetCode()Gets the code that is identifying this IViolationGets theViolation.subAttribute.getValue()Deprecated.Gets the value.Gets the routes, which are triggering the violation.Gets theViolation.violationActors.Gets the violation description.Optional<com.dna.jopt.config.types.ConstraintClassInfo> Gets the violation trigger class title.Gets theViolation.violationValue, the default value is"".default voidSets a numeric value.voidSets the value.voidsetViolationActorRoutes(List<ILogicEntityRoute> routes) Sets the routes, which are triggering the violation.voidsetViolationActors(List<IOptimizationElement> elements) Gets theViolation.violationActors.voidsetViolationTriggerClassInfo(Optional<com.dna.jopt.config.types.ConstraintClassInfo> triggerClassinfo) Sets the violation trigger class title.toString()Returns thecategory, theattribute, thevalueand theviolationValue.
-
Method Details
-
getCategory
-
getAttribute
-
setValue
-
setValue
Sets a numeric value. The description isvalueDescPrefixfollowed by the number and the violation value is the number alone, both as written byDouble.toString(double): the same assetValue(valueDescPrefix + violationValue, String.valueOf(violationValue)). An implementation may build the two texts only when they are read.- Parameters:
valueDescPrefix- the text in front of the number in the descriptionviolationValue- the violation value
-
getValue
-
getViolationDescription
-
getCode
int getCode()Gets the code that is identifying this IViolation- Returns:
- the code
-
toString
String toString()Returns thecategory, theattribute, thevalueand theviolationValue. IfViolation.getViolationActors()is notemptyadds all theidsof all current actors. -
getViolationValue
String getViolationValue()Gets theViolation.violationValue, the default value is"".- Returns:
- the violationvalue
-
copy
IViolation copy()Returns a newViolationwith the values ofViolation.getCategory(),Violation.getAttribute(),Violation.getValue()andViolation.getCode().- Returns:
- a copy of the Violation with the category, attribute, value and code
-
setViolationActors
Gets theViolation.violationActors.- Parameters:
elements- the arrayList containing IOptimizationElements
-
getViolationActors
List<IOptimizationElement> getViolationActors()Gets theViolation.violationActors.- Returns:
- the arraylist violationActors containing IOptimizationElements
-
setViolationActorRoutes
Sets the routes, which are triggering the violation.- Parameters:
routes- the new violation actor routes
-
getViolationActorRoutes
List<ILogicEntityRoute> getViolationActorRoutes()Gets the routes, which are triggering the violation. This method may return an empty list even though violations are present- Returns:
- the violation actor routes
-
getSubAttribute
-
setViolationTriggerClassInfo
void setViolationTriggerClassInfo(Optional<com.dna.jopt.config.types.ConstraintClassInfo> triggerClassinfo) Sets the violation trigger class title. If for example a constraint is triggering the violation, the underlying ident of the constraint class might be provided- Parameters:
triggerClassinfo- the new violation trigger class info
-
getViolationTriggerClassInfo
Optional<com.dna.jopt.config.types.ConstraintClassInfo> getViolationTriggerClassInfo()Gets the violation trigger class title. If for example a constraint is triggering the violation, the underlying ident of the constraint class might be provided- Returns:
- the violation trigger class title
-