Interface IViolationSummary
- All Known Implementing Classes:
ViolationSummary
public interface IViolationSummary
This interface provides methods which allow to get information on the summary about the
IViolation, time, distance, type
and cost.
An instance of the class ViolationSummary will capture all violations of an
ILogicEntityRoute. For example if
the maximal allowed distance of a CapacityResource
is violated the number of total violations (numViolations) and the number of distance violations
(numViolationsRouteDistance) will be incremented. In addition, a normalized cost will be calculated. It is important
to calculate this normalized cost to add up the costs of different violations to a total cost. The higher this
total cost is the lower is the likeness that this route is the optimal route. The optimization
process always tries to minimize this total cost.
- Since:
- 26/07/2018
- Version:
- 14/10/2019
- Author:
- DNA
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the costs after theAnchorNodethat were caused by theOptimizerputtingNodesafter theanchor Node, which might happen because theRouteis very full.doubleGets the cost for banningResources.doubleGets the total cost added bycapacity violationsin pickup and delivery optimizations, usually for not having loaded enough or for having loaded too much.doubledoubleGets the cost forcolor capacity usage.doubleGets the total cost added for the distance.doubleGets the total cost added for being too early.doubleDeprecated.doubleGets the cost forrestrictionsthat do not have their own violation.doubleGets the total cost added for being too late.doubleGets the cost for not getting themandatory Resource.doubleGets the cost for being abovemax route distancedoubleGets the cost for being abovemax route time.doubleGets miscellaneous costs.doubledoubleGets cost caused byNode type.doubleGets cost forpreferred Resource constraints.doubleGets total cost added byrelationship violations.doubleGets the cost forResourcesbeing out of workdoubledoubleGets the cost forroute time.doubleGets the cost for staying overtimedoubleGets thecostoftime compactness.doubleGets the cost for not getting thepreferred Resource.doubleDeprecated.doubleGets theNode fix costs.intGets the number of unassigned nodes.intGets the number ofIViolation, the default value is 0.intGets the number ofIViolationthat were caused by theOptimizerputtingNodesafter theanchor Node, which might happen because theRouteis very full.intGets the number ofIViolationthat were caused byINodeColorcapacity.intDeprecated.intintGets the number ofIViolationthat were caused by theNodetime window, the default value is 0.intGets the number ofIViolationthat were caused by being too early, the default value is 0.intGets the number ofIViolationthat were caused by being too late, the default value is 0.intGets the number ofIViolationthat were caused by theNode type, the default value is 0.intGets the number ofIViolationthat were caused byrelationships, the default value is 0.intGets the number ofIViolationthat were caused by routecapacity, the default value is 0.intGets the number ofIViolationthat were caused by route distance, the default value is 0.intGets the number ofIViolationthat were caused when theResourcewas working longer than the allowedmaximal working time.doubleGets theResource fix costs.doubleGets the fix cost forResourcesthat have to do aovernight stay.intGets total time that aResourcewas early inseconds.intGets total time that aResurcewas late inseconds.booleanisZero()Checks if is zero.
-
Method Details
-
getNumViolations
int getNumViolations()Gets the number ofIViolation, the default value is 0.- Returns:
- the numViolations
-
getNumViolationsRouteTime
int getNumViolationsRouteTime()Gets the number ofIViolationthat were caused when theResourcewas working longer than the allowedmaximal working time.- Returns:
- the int number of route time violations
- See Also:
-
getNumViolationsRouteDistance
int getNumViolationsRouteDistance()Gets the number ofIViolationthat were caused by route distance, the default value is 0.- Returns:
- the int number of route distance violations
-
getNumViolationsRouteCapacity
int getNumViolationsRouteCapacity()Gets the number ofIViolationthat were caused by routecapacity, the default value is 0.- Returns:
- int number of route capacity violations
-
getNumViolationsNodeTimewindow
int getNumViolationsNodeTimewindow()Gets the number ofIViolationthat were caused by theNodetime window, the default value is 0.- Returns:
- int number of node time window violations
-
getNumViolationsNodeTimewindowEarly
int getNumViolationsNodeTimewindowEarly()Gets the number ofIViolationthat were caused by being too early, the default value is 0.- Returns:
- int number of violations for being too early
-
getNumViolationsNodeTimewindowLate
int getNumViolationsNodeTimewindowLate()Gets the number ofIViolationthat were caused by being too late, the default value is 0.- Returns:
- int number of violations for being too late
-
getNumViolationsNodeType
int getNumViolationsNodeType()Gets the number ofIViolationthat were caused by theNode type, the default value is 0.- Returns:
- int number of violations because of the node type
-
getNumViolationsRelationships
int getNumViolationsRelationships()Gets the number ofIViolationthat were caused byrelationships, the default value is 0.- Returns:
- int number of relationship violations
-
getNumViolationsDailyBreak
Deprecated.Gets the number ofIViolationthat were caused by breaks, the default value is 0.- Returns:
- int number of break violations
-
getNumViolationsColorNodeCapacity
int getNumViolationsColorNodeCapacity()Gets the number ofIViolationthat were caused byINodeColorcapacity.- Returns:
- the int number of nodeColorCapacity violations
-
getNumViolationsAfterEndAnchor
int getNumViolationsAfterEndAnchor()Gets the number ofIViolationthat were caused by theOptimizerputtingNodesafter theanchor Node, which might happen because theRouteis very full.- Returns:
- the int number of violations after the anchor node
-
getNumViolationsMissedServiceHours
int getNumViolationsMissedServiceHours() -
getCostMissedServiceHour
double getCostMissedServiceHour() -
getTotalLateTime
int getTotalLateTime()Gets total time that aResurcewas late inseconds.- Returns:
- the int total late time
-
getTotalEarlyTime
int getTotalEarlyTime()Gets total time that aResourcewas early inseconds.- Returns:
- int total early time
-
getCostEarly
double getCostEarly()Gets the total cost added for being too early.- Returns:
- the double early cost
-
getCostLate
double getCostLate()Gets the total cost added for being too late.- Returns:
- the double late cost
-
getCostCapacity
double getCostCapacity()Gets the total cost added bycapacity violationsin pickup and delivery optimizations, usually for not having loaded enough or for having loaded too much.- Returns:
- the double cost for capacity violations
-
getCostRelationship
double getCostRelationship()Gets total cost added byrelationship violations.- Returns:
- the double cost for relationship violations
-
getCostDistance
double getCostDistance()Gets the total cost added for the distance.- Returns:
- the double cost for distance
-
getCostMaxRouteDistance
double getCostMaxRouteDistance()Gets the cost for being abovemax route distance- Returns:
- the costMaxRouteDistance
-
getCostMaxRouteTime
double getCostMaxRouteTime()Gets the cost for being abovemax route time.- Returns:
- the costMaxRouteTime
-
getCostNodeType
double getCostNodeType()Gets cost caused byNode type.- Returns:
- the double cost
-
getCostPreferredResource
double getCostPreferredResource()Gets cost forpreferred Resource constraints.- Returns:
- the double cost
-
getCostRouteTime
double getCostRouteTime()Gets the cost forroute time.- Returns:
- the double cost
-
getCostUnPreferredResource
double getCostUnPreferredResource()Gets the cost for not getting thepreferred Resource.- Returns:
- the double cost
-
getCostMandatoryResource
double getCostMandatoryResource()Gets the cost for not getting themandatory Resource.- Returns:
- the double cost
-
getCostBannedResource
double getCostBannedResource()Gets the cost for banningResources.- Returns:
- the costBannedResource
-
getCostTimeCompactness
double getCostTimeCompactness()Gets thecostoftime compactness.Time compactnessis when theOptimizerstries to make Resources visitNodesat the beginning of theirOpeningHours.- Returns:
- the costTimeCompactness
-
getResourceFixCost
double getResourceFixCost()Gets theResource fix costs.- Returns:
- the double cost
-
getCostGeoUnclustered
Deprecated.GetsViolationSummary.costGeoUnclustered, the default value is 0.0.- Returns:
- the costGeoUnclustered
-
getIMoveCost
Deprecated.Gets theViolationSummary.costIMove, the default value is 0.0.- Returns:
- the costIMove
-
getStayOutFixCost
double getStayOutFixCost()Gets the fix cost forResourcesthat have to do aovernight stay.- Returns:
- the double cost
-
getNodeFixCost
double getNodeFixCost()Gets theNode fix costs.- Returns:
- the double cost
-
getCostResourceOutOfWork
double getCostResourceOutOfWork()Gets the cost forResourcesbeing out of work- Returns:
- the double cost
-
getCostStayOvertime
double getCostStayOvertime()Gets the cost for staying overtime- Returns:
- the double cost
-
getCostInjectedRestriction
double getCostInjectedRestriction()Gets the cost forrestrictionsthat do not have their own violation. This is used as a bucket forrestriction costs.- Returns:
- the double cost
-
getCostMisc
double getCostMisc()Gets miscellaneous costs.- Returns:
- the double cost
-
getCostColorCapacityUsage
double getCostColorCapacityUsage()Gets the cost forcolor capacity usage.- Returns:
- the double cost
-
getCostAfterEndAnchor
double getCostAfterEndAnchor()Gets the costs after theAnchorNodethat were caused by theOptimizerputtingNodesafter theanchor Node, which might happen because theRouteis very full.- Returns:
- the double cost
-
getCostRouteDistancePattern
double getCostRouteDistancePattern() -
getCostCapacityOverload
double getCostCapacityOverload() -
getNumUnassignedNodes
int getNumUnassignedNodes()Gets the number of unassigned nodes.- Returns:
- the number of unassigned nodes
-
isZero
boolean isZero()Checks if is zero. Zero means no cost, violations etc. Makes sense in the context of the difference of violation summaries.- Returns:
- true, if is zero
-