public class ViolationSummary extends Object implements IViolationSummary
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.Constructor and Description |
---|
ViolationSummary()
Instantiates a new violation summary.
|
Modifier and Type | Method and Description |
---|---|
static IViolationSummary |
connectViolationSummaries(IViolationSummary s1,
IViolationSummary s2,
boolean doAddUp) |
static IViolationSummary |
diffViolationSummaries(IViolationSummary s1,
IViolationSummary s2) |
double |
getCostAfterEndAnchor()
Gets the costs after the
AnchorNode that were caused by the Optimizer putting Nodes after the anchor Node ,
which might happen because the Route is very full. |
double |
getCostBannedResource()
Gets the cost banned resource.
|
double |
getCostCapacity()
Gets the total cost added by
capacity violations in pickup and delivery optimizations, usually for not having loaded
enough or for having loaded too much. |
double |
getCostCapacityOverload() |
double |
getCostColorCapacityUsage()
Gets the cost for
color capacity usage . |
double |
getCostDistance()
Gets the total cost added for the distance.
|
double |
getCostEarly()
Gets the total cost added for being too early.
|
double |
getCostGeoUnclustered()
Gets the cost geo unclustered.
|
double |
getCostInjectedRestriction()
Gets the cost injected restriction.
|
double |
getCostLate()
Gets the total cost added for being too late.
|
double |
getCostMandatoryResource()
Gets the cost mandatory resource.
|
double |
getCostMaxRouteDistance()
Gets the cost for being above
max route distance |
double |
getCostMaxRouteTime()
Gets the cost for being above
max route time . |
double |
getCostMisc()
Gets the cost misc.
|
double |
getCostMissedServiceHour() |
double |
getCostNodeType()
Gets cost caused by
Node type . |
double |
getCostPreferredResource()
Gets cost for
preferred Resource constraints . |
double |
getCostRelationship()
Gets total cost added by
relationship violations . |
double |
getCostResourceOutOfWork()
Gets the cost resource out of work.
|
double |
getCostRouteDistancePattern() |
double |
getCostRouteTime()
Gets the cost route time.
|
double |
getCostStayOvertime()
Gets the cost stay overtime.
|
double |
getCostTimeCompactness()
Gets the cost time compactness.
|
double |
getCostUnPreferredResource()
Gets the cost un preferred resource.
|
static String |
getDesc(IViolationSummary summary,
double minValue) |
static List<String> |
getDesc(List<IViolationSummary> vioSummaries,
double minValue) |
static IViolationSummary |
getDiffViolationSummary(List<IViolationSummary> summaries) |
double |
getIMoveCost()
Gets the i move cost.
|
static IViolationSummary |
getJoinedViolationSummary(List<IViolationSummary> summaries) |
double |
getNodeFixCost()
Gets the node fix cost.
|
int |
getNumViolations()
Gets the number of
IViolation , the default value is 0. |
int |
getNumViolationsAfterEndAnchor()
Gets the number of
IViolation that were caused by the Optimizer putting Nodes after the anchor Node ,
which might happen because the Route is very full. |
int |
getNumViolationsColorNodeCapacity()
Gets the number of
IViolation that were caused by INodeColor capacity. |
int |
getNumViolationsDailyBreak()
Gets the number of
IViolation that were caused by breaks, the default value is 0. |
int |
getNumViolationsMissedServiceHours() |
int |
getNumViolationsNodeTimewindow()
Gets the number of
IViolation that were caused by the Node time window, the default value is 0. |
int |
getNumViolationsNodeTimewindowEarly()
Gets the number of
IViolation that were caused by being too early, the default value is 0. |
int |
getNumViolationsNodeTimewindowLate()
Gets the number of
IViolation that were caused by being too late, the default value is 0. |
int |
getNumViolationsNodeType()
Gets the number of
IViolation that were caused by the Node type , the default value is 0. |
int |
getNumViolationsRelationships()
Gets the number of
IViolation that were caused by relationships , the default value is 0. |
int |
getNumViolationsRouteCapacity()
Gets the number of
IViolation that were caused by route capacity , the default value is 0. |
int |
getNumViolationsRouteDistance()
Gets the number of
IViolation that were caused by route distance, the default value is 0. |
int |
getNumViolationsRouteTime()
Gets the number of
IViolation that were caused when the Resource was working
longer than the allowed maximal working time . |
double |
getResourceFixCost()
Gets the resource fix cost.
|
double |
getStayOutFixCost()
Gets the stay out fix cost.
|
static double |
getTotalCost(IViolationSummary summary) |
int |
getTotalEarlyTime()
Gets total time that a
Resource was early in seconds . |
int |
getTotalLateTime()
Gets total time that a
Resurce was late in seconds . |
static IViolationSummary |
joinViolationSummaries(IViolationSummary s1,
IViolationSummary s2) |
void |
setCostAfterEndAnchor(double costAfterEndAnchor) |
void |
setCostBannedResource(double costBannedResource)
Sets the cost banned resource.
|
void |
setCostCapacity(double costCapacity)
Sets the cost (capacity).
|
void |
setCostCapacityOverload(double costCapacityOverload) |
void |
setCostColorCapacityUsage(double costColorCapacityUsage) |
void |
setCostDistance(double costDistance)
Sets the cost (distance).
|
void |
setCostEarly(double costEarly)
Sets the cost (early).
|
void |
setCostGeoUnclustered(double costGeoUnclustered)
Sets the cost geo unclustered.
|
void |
setCostInjectedRestriction(double costInjectedRestriction)
Sets the cost injected restriction.
|
void |
setCostLate(double costLate)
Sets the cost (late).
|
void |
setCostMandatoryResource(double costMandatoryResource)
Sets the cost mandatory resource.
|
void |
setCostMaxRouteDistance(double costMaxRouteDistance)
Sets the cost (max route distance).
|
void |
setCostMaxRouteTime(double costMaxRouteTime)
Sets the cost (max route time).
|
void |
setCostMisc(double miscCost)
Sets the cost misc.
|
void |
setCostMissedServiceHour(double costMissedServiceHour) |
void |
setCostNodeType(double costNodeType)
Sets the cost (node type).
|
void |
setCostPreferredResource(double costPreferredResource)
Sets the cost (preferred resource).
|
void |
setCostRelationship(double costRelationship)
Sets the cost (relationship).
|
void |
setCostResourceOutOfWork(double costResourceOutOfWork)
Sets the cost resource out of work.
|
void |
setCostRouteDistancePattern(double costRouteDistancePattern)
Sets the costRouteDistancePattern.
|
void |
setCostRouteTime(double costRouteTime)
Sets the cost route time.
|
void |
setCostStayOvertime(double costStayOvertime)
Sets the cost stay overtime.
|
void |
setCostTimeCompactness(double costTimeCompactness)
Sets the cost time compactness.
|
void |
setCostUnPreferredResource(double costUnPreferredResource)
Sets the cost un preferred resource.
|
void |
setIMoveCost(double costIMove)
Sets the i move cost.
|
void |
setNodeFixCost(double nodeFixCost)
Sets the node fix cost.
|
void |
setNumViolations(int numViolations) |
void |
setNumViolationsAfterEndAnchor(int numViolationsAfterEndAnchor) |
void |
setNumViolationsColorNodeCapacity(int numViolationsColorNodeCapacity) |
void |
setNumViolationsDailyBreak(int numViolationsDailyBreak)
Sets the number of violations (daily break).
|
void |
setNumViolationsMissedServiceHours(int numViolationsMissedServiceHours) |
void |
setNumViolationsNodeTimewindow(int numViolationsNodeTimewindow)
Sets the number of violations (node timewindow).
|
void |
setNumViolationsNodeTimewindowEarly(int numViolationsNodeTimewindowEarly)
Sets the number of violations node (timewindow early).
|
void |
setNumViolationsNodeTimewindowLate(int numViolationsNodeTimewindowLate)
Sets the number of violations node (timewindow late).
|
void |
setNumViolationsNodeType(int numViolationsNodeType)
Sets the number of violations (node type).
|
void |
setNumViolationsRelationships(int numViolationsRelationships)
Sets the number of violations (relationships).
|
void |
setNumViolationsRouteCapacity(int numViolationsRouteCapacity)
Sets the number of violations (route capacity).
|
void |
setNumViolationsRouteDistance(int numViolationsRouteDistance)
Sets the number of violations (route distance).
|
void |
setNumViolationsRouteTime(int numViolationsRouteTime)
Sets the number of violations (route time).
|
void |
setResourceFixCost(double resourceFixCost)
Sets the resource fix cost.
|
void |
setStayOutFixCost(double stayOutFixCost)
Sets the stay out fix cost.
|
void |
setTotalEarlyTime(int totalEarlyTime)
Sets the total early time.
|
void |
setTotalLateTime(int totalLateTime)
Sets the total late time.
|
double |
setTotalLoadViolationAmount()
Sets the total load violation amount.
|
void |
setTotalLoadViolationAmount(double totalLoadViolationAmount)
Sets the total load violation amount.
|
String |
toString() |
public void setNumViolationsRouteTime(int numViolationsRouteTime)
numViolationsRouteTime
- the new number of violations (route time)public int getNumViolationsRouteTime()
IViolationSummary
IViolation
that were caused when the Resource
was working
longer than the allowed maximal working time
.getNumViolationsRouteTime
in interface IViolationSummary
IBasicResource.setMaxWorkingTime(Duration)
public void setNumViolationsRouteDistance(int numViolationsRouteDistance)
numViolationsRouteDistance
- the new number of violations (route distance)public int getNumViolationsRouteDistance()
IViolationSummary
IViolation
that were caused by route distance, the default value is 0.getNumViolationsRouteDistance
in interface IViolationSummary
public void setNumViolationsNodeType(int numViolationsNodeType)
numViolationsNodeType
- the new number of violations (node type)public int getNumViolationsNodeType()
IViolationSummary
IViolation
that were caused by the Node type
, the default value is 0.getNumViolationsNodeType
in interface IViolationSummary
public void setNumViolationsNodeTimewindow(int numViolationsNodeTimewindow)
numViolationsNodeTimewindow
- the new number of violations (node timewindow)public int getNumViolationsNodeTimewindow()
IViolationSummary
IViolation
that were caused by the Node
time window, the default value is 0.getNumViolationsNodeTimewindow
in interface IViolationSummary
public void setNumViolationsRouteCapacity(int numViolationsRouteCapacity)
numViolationsRouteCapacity
- the new number of violations (route capacity)public int getNumViolationsRouteCapacity()
IViolationSummary
IViolation
that were caused by route capacity
, the default value is 0.getNumViolationsRouteCapacity
in interface IViolationSummary
public void setNumViolations(int numViolations)
public int getNumViolations()
IViolationSummary
IViolation
, the default value is 0.getNumViolations
in interface IViolationSummary
public void setNumViolationsNodeTimewindowEarly(int numViolationsNodeTimewindowEarly)
numViolationsNodeTimewindowEarly
- the new number of violations node (timewindow early)public int getNumViolationsNodeTimewindowEarly()
IViolationSummary
IViolation
that were caused by being too early, the default value is 0.getNumViolationsNodeTimewindowEarly
in interface IViolationSummary
public void setNumViolationsNodeTimewindowLate(int numViolationsNodeTimewindowLate)
numViolationsNodeTimewindowLate
- the new number of violations node (timewindow late)public int getNumViolationsNodeTimewindowLate()
IViolationSummary
IViolation
that were caused by being too late, the default value is 0.getNumViolationsNodeTimewindowLate
in interface IViolationSummary
public void setNumViolationsRelationships(int numViolationsRelationships)
numViolationsRelationships
- the new number of violations (relationships)public int getNumViolationsRelationships()
IViolationSummary
IViolation
that were caused by relationships
, the default value is 0.getNumViolationsRelationships
in interface IViolationSummary
public void setNumViolationsDailyBreak(int numViolationsDailyBreak)
numViolationsDailyBreak
- the new number of violations (daily break)public int getNumViolationsDailyBreak()
IViolationSummary
IViolation
that were caused by breaks, the default value is 0.getNumViolationsDailyBreak
in interface IViolationSummary
public void setTotalLateTime(int totalLateTime)
totalLateTime
- the new total late timepublic int getTotalLateTime()
IViolationSummary
Resurce
was late in seconds
.getTotalLateTime
in interface IViolationSummary
public void setTotalEarlyTime(int totalEarlyTime)
totalEarlyTime
- the new total early timepublic int getTotalEarlyTime()
IViolationSummary
Resource
was early in seconds
.getTotalEarlyTime
in interface IViolationSummary
public void setTotalLoadViolationAmount(double totalLoadViolationAmount)
totalLoadViolationAmount
- the new total load violation amountpublic double setTotalLoadViolationAmount()
public double getCostEarly()
IViolationSummary
getCostEarly
in interface IViolationSummary
public void setCostEarly(double costEarly)
costEarly
- the new cost (early)public double getCostLate()
IViolationSummary
getCostLate
in interface IViolationSummary
public void setCostLate(double costLate)
costLate
- the new cost (late)public double getCostCapacity()
IViolationSummary
capacity violations
in pickup and delivery optimizations, usually for not having loaded
enough or for having loaded too much.getCostCapacity
in interface IViolationSummary
public void setCostCapacity(double costCapacity)
costCapacity
- the new cost (capacity)public double getCostCapacityOverload()
getCostCapacityOverload
in interface IViolationSummary
public void setCostCapacityOverload(double costCapacityOverload)
public double getCostRelationship()
IViolationSummary
relationship violations
.getCostRelationship
in interface IViolationSummary
public void setCostRelationship(double costRelationship)
costRelationship
- the new cost (relationship)public double getCostRouteDistancePattern()
getCostRouteDistancePattern
in interface IViolationSummary
public void setCostRouteDistancePattern(double costRouteDistancePattern)
costRouteDistancePattern
- the new cost route distance patternpublic double getCostDistance()
IViolationSummary
getCostDistance
in interface IViolationSummary
public void setCostDistance(double costDistance)
costDistance
- the new cost (distance)public double getCostMaxRouteDistance()
IViolationSummary
max route distance
getCostMaxRouteDistance
in interface IViolationSummary
public void setCostMaxRouteDistance(double costMaxRouteDistance)
costMaxRouteDistance
- the new cost (max route distance)public double getCostMaxRouteTime()
IViolationSummary
max route time
.getCostMaxRouteTime
in interface IViolationSummary
public void setCostMaxRouteTime(double costMaxRouteTime)
costMaxRouteTime
- the new cost (max route time)public double getCostNodeType()
IViolationSummary
Node type
.getCostNodeType
in interface IViolationSummary
public void setCostNodeType(double costNodeType)
costNodeType
- the new cost (node type)public double getCostPreferredResource()
IViolationSummary
preferred Resource constraints
.getCostPreferredResource
in interface IViolationSummary
public void setCostPreferredResource(double costPreferredResource)
costPreferredResource
- the new cost (preferred resource)public void setCostRouteTime(double costRouteTime)
costRouteTime
- the new cost route timepublic double getCostRouteTime()
getCostRouteTime
in interface IViolationSummary
public void setResourceFixCost(double resourceFixCost)
resourceFixCost
- the new resource fix costpublic double getResourceFixCost()
getResourceFixCost
in interface IViolationSummary
public void setNumViolationsColorNodeCapacity(int numViolationsColorNodeCapacity)
public int getNumViolationsColorNodeCapacity()
IViolationSummary
IViolation
that were caused by INodeColor
capacity.getNumViolationsColorNodeCapacity
in interface IViolationSummary
public void setCostColorCapacityUsage(double costColorCapacityUsage)
public double getCostColorCapacityUsage()
IViolationSummary
color capacity usage
.getCostColorCapacityUsage
in interface IViolationSummary
public void setNumViolationsAfterEndAnchor(int numViolationsAfterEndAnchor)
public int getNumViolationsAfterEndAnchor()
IViolationSummary
IViolation
that were caused by the Optimizer
putting Nodes
after the anchor Node
,
which might happen because the Route
is very full.getNumViolationsAfterEndAnchor
in interface IViolationSummary
public void setCostAfterEndAnchor(double costAfterEndAnchor)
public double getCostAfterEndAnchor()
IViolationSummary
AnchorNode
that were caused by the Optimizer
putting Nodes
after the anchor Node
,
which might happen because the Route
is very full.getCostAfterEndAnchor
in interface IViolationSummary
public int getNumViolationsMissedServiceHours()
getNumViolationsMissedServiceHours
in interface IViolationSummary
public void setNumViolationsMissedServiceHours(int numViolationsMissedServiceHours)
public double getCostMissedServiceHour()
getCostMissedServiceHour
in interface IViolationSummary
public void setCostMissedServiceHour(double costMissedServiceHour)
public static List<String> getDesc(List<IViolationSummary> vioSummaries, double minValue)
public static String getDesc(IViolationSummary summary, double minValue)
public double getCostTimeCompactness()
getCostTimeCompactness
in interface IViolationSummary
public void setCostTimeCompactness(double costTimeCompactness)
costTimeCompactness
- the new cost time compactnesspublic double getCostGeoUnclustered()
getCostGeoUnclustered
in interface IViolationSummary
public void setCostGeoUnclustered(double costGeoUnclustered)
costGeoUnclustered
- the new cost geo unclusteredpublic double getIMoveCost()
getIMoveCost
in interface IViolationSummary
public void setIMoveCost(double costIMove)
costIMove
- the new i move costpublic double getStayOutFixCost()
getStayOutFixCost
in interface IViolationSummary
public void setStayOutFixCost(double stayOutFixCost)
stayOutFixCost
- the new stay out fix costpublic double getNodeFixCost()
getNodeFixCost
in interface IViolationSummary
public void setNodeFixCost(double nodeFixCost)
nodeFixCost
- the new node fix costpublic double getCostMisc()
getCostMisc
in interface IViolationSummary
public void setCostMisc(double miscCost)
miscCost
- the new cost miscpublic double getCostResourceOutOfWork()
getCostResourceOutOfWork
in interface IViolationSummary
public void setCostResourceOutOfWork(double costResourceOutOfWork)
costResourceOutOfWork
- the new cost resource out of workpublic double getCostStayOvertime()
getCostStayOvertime
in interface IViolationSummary
public void setCostStayOvertime(double costStayOvertime)
costStayOvertime
- the new cost stay overtimepublic double getCostInjectedRestriction()
getCostInjectedRestriction
in interface IViolationSummary
public void setCostInjectedRestriction(double costInjectedRestriction)
costInjectedRestriction
- the new cost injected restrictionpublic double getCostUnPreferredResource()
getCostUnPreferredResource
in interface IViolationSummary
public void setCostUnPreferredResource(double costUnPreferredResource)
costUnPreferredResource
- the new cost un preferred resourcepublic void setCostBannedResource(double costBannedResource)
costBannedResource
- the new cost banned resourcepublic double getCostBannedResource()
getCostBannedResource
in interface IViolationSummary
public void setCostMandatoryResource(double costMandatoryResource)
costMandatoryResource
- the new cost mandatory resourcepublic double getCostMandatoryResource()
getCostMandatoryResource
in interface IViolationSummary
public static double getTotalCost(IViolationSummary summary)
public static IViolationSummary getJoinedViolationSummary(List<IViolationSummary> summaries)
public static IViolationSummary getDiffViolationSummary(List<IViolationSummary> summaries)
public static IViolationSummary joinViolationSummaries(IViolationSummary s1, IViolationSummary s2)
public static IViolationSummary diffViolationSummaries(IViolationSummary s1, IViolationSummary s2)
public static IViolationSummary connectViolationSummaries(IViolationSummary s1, IViolationSummary s2, boolean doAddUp)
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.