Skip to content

Optimization Properties

Setting properties will influence the way the Optimizer is finding a solution to a problem set. By default, the optimization properties are tuned to solve most of the use-cases. It is recommended to keep the default properties as much as possible. However, some properties need to be set. Especially, properties that influence the runtime or the filtering ability of the Optimizer are set usually on startup and are adjusted to meet the user requirements.


Setting properties

Setting properties is done before the optimization starts, like:

  private static void addProperties(IOptimization opti) {

     // Create an empty properties object
    Properties props = new Properties();

    props.setProperty("JOpt.Algorithm.PreOptimization.SA.NumIterations", "10000");
    props.setProperty("JOptExitCondition.JOptGenerationCount", "2000");

    // Adding the properties to the optimization
    opti.addElement(props);
  }

Properties that should be adjusted

Key Default Value Allowed Values Description
JOpt.NumCPUCores 4 [] NumCPUCores defines the number of cores JOpt will use.
JOptExitCondition.
JOptGenerationCount
5000 [] After a certain number of generation JOpt terminates the Optimization
JOpt.Algorithm.PreOptimization.
SA.NumIterations
150000 [] SA.NumIterations defines the number of iterations for simulated annealing.

Further, optimization weights might be tuned to achieve the desired outcome.


Overview of available properties

Category: General Setup

Key Default Value Allowed Values Description
JOpt.PropertyChecker.
ShowWarnings
TRUE [TRUE, FALSE] Property for enabling and disabling the output of the property checker.
JOpt.NumCPUCores 4 [] NumCPUCores defines the number of cores JOpt will use.
JOpt.UnlocatedIdleTime FALSE [TRUE, FALSE] True: Idle time is not arising at a particular node.
JOpt.plausibility.doInputCheck TRUE [TRUE, FALSE] Property to turn on the structural integrity of the system created or user-provided initial solution.
JOpt.plausibility.
doInputCheck.doCapacityCheck
TRUE [TRUE, FALSE] In case doInputCheck is true, this setting can disable the capacity check of the available workingHours vs. the necessary total duration of all nodes.
JOpt.IntermediateStage.
ThrowResults
FALSE [TRUE, FALSE] Do we want to have a result after each Optimization stage?
JOpt.PlausibilityGuard.
PropertyChecker.Active
TRUE [TRUE, FALSE] TRUE: The property checker is activated (default behavior).

Category: Construction

Key Default Value Allowed Values Description
JOpt.Assisted TRUE [TRUE, FALSE] Turning on or off the assisted constructor. The assisted constructor is creating a starting solution for JOpt.

Category: Pre-Optimization

Key Default Value Allowed Values Description
JOpt.Algorithm.PreOptimization.
SA.NumIterations
150000 [] SA.NumIterations defines the number of iterations for simulated annealing.
JOpt.Algorithm.PreOptimization.
SA.StartingTemperature
10.0 [] SA.StartingTemperature defines the starting temperature for simulated annealing.
JOpt.Algorithm.PreOptimization.
SA.CoolingRate
0.999985 [] SA.CoolingRate defines the cooling of simulated annealing after each iteration.
JOpt.Algorithm.PreOptimization.
SA.NumRepetions
1 [] SA.NumRepetions defines the number of cycles for simulated annealing.

Category: Genetic Setup

Key Default Value Allowed Values Description
JOptExitCondition.
JOptGenerationCount
5000 [] After a certain number of generation JOpt terminates the Optimization

Category: Optimization Weights

Key Default Value Allowed Values Description
JOptWeight.TimeWindow 1.0 [] JOpt weight for 'timeWindow' during the Optimization. A higher value results in a higher Optimization cost penalty for violating a time window of a node.
JOptWeight.
ResourceRadiusDrivingDistance
1.0 [] JOpt weight for 'distance' radius during the Optimization. If a maximal driving radius (distance) for a certain resource is defined as a soft constraint, a higher value of this property results in a higher cost penalty if the resource is violating its maximal allowed radius.
JOptWeight.
ResourceRadiusDrivingTime
1.0 [] JOpt weight for 'driving time' radius during the Optimization.If a maximal driving radius (time) for a certain resource is defined as a soft constraint, a higher value of this property results in a higher cost penalty if the resource is violating its maximal allowed radius.
JOptWeight.TimeWindow.
TimeWindowEarlyFactor
10.0 [] JOpt weight for 'TimeWindowEarlyFactor' during the Optimization. If a resource is early at a node (creating idle time) an Optimization cost is assigned taking this value as cost multiplier.
JOptWeight.TimeWindow.
TimeWindowLateFactor
100.0 [] JOpt weight for 'TimeWindowLateFactor' during the Optimization.
JOptWeight.TimeWindow.
ServiceHours
10.0 [] JOpt weight for meeting 'ServiceHours' during the Optimization.
JOptWeight.TimeWindow.
TimeWindowEarlyFactorAtFirstNode
1.0 [] JOpt weight for 'TimeWindowEarlyFactorAtFirstNode' during the Optimization.
JOptWeight.Relationships 100.0 [] JOpt weight for 'Relationships' during the Optimization.
JOptWeight.TotalDistance 1.0 [] JOpt weight for 'TotalDistance' during the Optimization.
JOptWeight.Capacity 1.0 [] JOpt weight for 'Capacity' during the Optimization.
JOptWeight.
UselessUnloadAllVisitation
1.0 [] JOpt weight for 'UselessUnloadAllVisitation' during the Optimization.
JOptWeight.RouteDistance 1.0 [] JOpt weight for 'RouteDistance' during the Optimization.
JOptWeight.DistanceExceeded 10.0 [] JOpt weight for exceedance of 'RouteDistance' during the Optimization.
JOptWeight.TimeExceeded 100.0 [] JOpt weight for exceedance of 'TimeExceeded' during the Optimization.
JOptWeight.ResourceLocationBias 1.0 [] JOpt weight for 'ResourceLocationBias' during the Optimization. For, the last element of a previous route and the first element of the current route the distance is extracted. The higher this distance is, the more cost will be assigned. Therefore,a global clustering (over different route of the same resource) is motivated.
JOptWeight.RouteTime 1.0 [] JOpt weight for 'RouteTime' during the Optimization.
JOptWeight.TotalTime 1.0 [] JOpt weight for 'TotalTime' during the Optimization.
JOptWeight.ResourceActive 0.0 [] JOpt weight for 'ResourceActive' during the Optimization.
JOptWeight.NodeType 1.0 [] JOpt weight for 'NodeType' during the Optimization.
JOptWeight.PreferableResource 1.0 [] JOpt weight for 'PreferableResource' during the Optimization.
JOptWeight.UnPreferableResource 1.0 [] JOpt weight for 'UnPreferableResource' during the Optimization.
JOptWeight.WorkingTime 5.0 [] JOpt weight for 'WorkingTime' during the Optimization.
JOptWeight.CompactingFactor 1.0 [] JOpt weight for 'CompactingFactor' during the Optimization.
JOptWeight.NodeCompactingFactor 0.0 [] JOpt weight for 'NodeCompactingFactor' during the Optimization. In case a node is visited in time but not at the beginning of its opening hours a cost is arising the later it is visited.
JOptWeight.ZoneCode 10.0 [] JOpt weight for 'ZoneCode' during the Optimization. A higher value results in a higher Optimization cost penalty for violating a ZoneCode of a node.

Category: AutoFilter

Key Default Value Allowed Values Description
JOpt.AutoFilter.
LateArrivalMargin
0 [] No description available
JOpt.AutoFilter.
EarlyArrivalMargin
0 [] No description available
JOpt.AutoFilter.
WorkingHoursExceedMargin
0 [] Margin for overtime in seconds
JOpt.AutoFilter.
RouteDistanceExceedMargin
0 [] Margin for over-distance in meter
JOpt.SelectiveAutoFilter FALSE [TRUE, FALSE] Turns on or off the selective AutoFilter. The selective AutoFilter is able to sort out nodes that are violating the Optimization to often. In addition to this property the desired violations that should be considered need to be defined.
JOpt.SelectiveAutoFilter.
TimeWindow.Early
FALSE [TRUE, FALSE] Nodes that are visited to early in too many Optimization steps are filtered out.
JOpt.SelectiveAutoFilter.
TimeWindow.Late
FALSE [TRUE, FALSE] Nodes that are visited to late in too many Optimization steps are filtered out.
JOpt.SelectiveAutoFilter.
DoubleBooking
FALSE [TRUE, FALSE] Nodes that are potentially double booked in to many Optimization steps are filtered out.
JOpt.SelectiveAutoFilter.
ResourceMismatch
FALSE [TRUE, FALSE] Nodes that are visited to often by wrong resources (either preferred or mandatory) are filtered out.
JOpt.SelectiveAutoFilter.
NodeType
FALSE [TRUE, FALSE] Nodes that are visited by the wrong type of resource are filtered out.
JOpt.SelectiveAutoFilter.
RelationShip
FALSE [TRUE, FALSE] Nodes that have wrong relations to other nodes.
JOpt.SelectiveAutoFilter.
CapacityOverload
FALSE [TRUE, FALSE] Nodes that are causing an overload of the resources are filtered out.
JOpt.SelectiveAutoFilter.
WorkingHoursExceeded
FALSE [TRUE, FALSE] Nodes that are causing a working hours exceedance of a resource are filtered out.
JOpt.SelectiveAutoFilter.
MaximalRouteDistanceExceeded
FALSE [TRUE, FALSE] Nodes that are causing the maximal allowed route distance to be exceeded are filtered out.
JOpt.AutoFilter FALSE [TRUE, FALSE] Turns on or off the AutoFilter. The AutoFilter is able to sort out nodes that are violating the Optimization too often.
JOpt.AutoFilter.
useStrictFilterOnLastExecution
TRUE [TRUE, FALSE] Enables the strict mode for the last execution of the autoFilter.

Authors

A product by dna-evolutions ©