Optimization properties

Illustration on a dark street grid: a settings panel with three sliders, a toggle and a gear stands beside a lime route through three pins

This page lists the optimization properties of JOpt: each property key with its default, its allowed values and a description, grouped by category. It is the reference for developers who tune an optimization run, and the one page of the hub that states property defaults. To see where properties fit into a run, start with First optimization.

Properties change how the optimizer searches for a solution. The defaults suit most use cases, so keep them where you can. The properties for the runtime and for filtering are the ones you usually set at startup and adjust to your requirements.

Setting properties

Set the properties before the optimization starts: put them into a Properties object and add it to the optimization with addElement:

  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 you usually adjust

These properties control the runtime of a run. Each of them also appears in its category table below.

Property keyDefaultAllowed valuesDescription
JOpt.NumCPUCores4[> 0]NumCPUCores defines the number of cores JOpt will use.
JOptExitCondition.JOptGenerationCount5000[> 0]After a certain number of generations JOpt terminates the optimization.
JOpt.Algorithm.PreOptimization.SA.NumIterations150000[> 0]SA.NumIterations defines the number of iterations for simulated annealing.

To shift the result toward what matters in your use case, tune the weights.

Where the values come from

The tables below come from the output of the example ReadOutDefaultPropertiesExample.java. The example reads every property item from the property provider and prints its category, description, key, default value and allowed values. The tables hold the values of the JOpt core version that the examples pom sets, and each section below is one category of that output.

  • An empty list [] in the column Allowed values means that the value is free-form or validated in another way.
  • The tables do not list every property item of the output. Run the example to get the complete list for your JOpt version, including the deprecated properties. The output marks deprecated properties with -== DEPRECATED PROPERTY ==-; avoid them in new code.

AutoFilter properties

The properties in the AutoFilter category of the output: those of the AutoFilter, which removes nodes that cause violations too often (see the AutoFilter feature guide), and two switches for cluster algorithms.

Property keyDefaultAllowed valuesDescription
JOpt.Algorithm.tryUseCluster2OptFALSE[TRUE, FALSE]In case joined-visit-nodes are in use, a special cluster2Opt Algorithm can be used. This algorithm gives better results but uses comparably high computational effort. However, if no joined-visit-nodes are present this Operator is deactivated automatically.
JOpt.Algorithm.tryUseClusterInsertionFALSE[TRUE, FALSE]In case joined-visit-nodes are in use, a special cluster insertion Algorithm can be used. This algorithm gives better results but uses comparably high computational effort. However, if no joined-visit-nodes are present this Operator is deactivated automatically.
JOpt.AutoFilterFALSE[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.afterFilteringResultFALSE[TRUE, FALSE]Throw a result after filtering nodes.
JOpt.AutoFilter.beforeFilteringResultFALSE[TRUE, FALSE]Throw a result before attempting to filter nodes.
JOpt.AutoFilter.canDisableNodeProtectionTRUE[TRUE, FALSE]The AutoFilter is allowed to remove the AutoFilterProtection of the nodes after the number of protected executions is reached.
JOpt.AutoFilter.collectivePenalization.maxImportance5[]When a route exceeds its maximal working time or its maximal distance, all nodes of the route can be penalized, which leads to a higher probability of not being assigned. For nodes with Importance above collectivePenalization.maxImportance this penalty is not added.
JOpt.AutoFilter.EarlyArrivalMargin0[]No description available
JOpt.AutoFilter.LateArrivalMargin0[]No description available
JOpt.AutoFilter.RouteDistanceExceedMargin0[]Margin for overdistance in meter
JOpt.AutoFilter.tryAvoidSplittingJoinedClustersFALSE[TRUE, FALSE]The AutoFilter will try to keep nodes that are marked with joined visit duration, and part of a cluster, in the Optimization.
JOpt.AutoFilter.tryGracefulNodeFilteringTRUE[TRUE, FALSE]After finding nodes to be filtered, the AutoFilter checks if already unassigning a subset is sufficient to solve a violation. This way, the number of nodes getting unassigned can be reduced.
JOpt.AutoFilter.usePostOptimizationAfterStrictFilteringTRUE[TRUE, FALSE]When false, jumps to the end of the currently running optimization algorithm after strict filtering.
JOpt.AutoFilter.useStrictFilterOnLastExecutionTRUE[TRUE, FALSE]Enables the strict mode for the last execution of the autoFilter.
JOpt.AutoFilter.WorkingHoursExceedMargin0[]Margin for overtime in seconds
JOpt.AutoForceFilter.EarlyArrivalMargin0[]No description available
JOpt.AutoForceFilter.LateArrivalMargin0[]No description available
JOpt.AutoForceFilter.RouteDistanceExceedMargin0[]Margin for AutoForceFilter overdistance in meter
JOpt.AutoForceFilter.WorkingHoursExceedMargin0[]Margin for AutoForceFilter overtime in seconds
JOpt.SelectiveAutoFilterFALSE[TRUE, FALSE]Turns on or off the selective AutoFilter. The selective AutoFilter is able to sort out nodes that are violating the optimization too often. In addition to this property the desired violations that should be considered need to be defined.
JOpt.SelectiveAutoFilter.AfterEndAnchorFALSE[TRUE, FALSE]Nodes which are positioned after an end anchor are filtered out.
JOpt.SelectiveAutoFilter.CapacityOverloadFALSE[TRUE, FALSE]Nodes that are causing an overload of the resources are filtered out.
JOpt.SelectiveAutoFilter.DoubleBookingFALSE[TRUE, FALSE]Nodes that are potentially double booked in too many optimization steps are filtered out.
JOpt.SelectiveAutoFilter.MaximalRouteDistanceExceededFALSE[TRUE, FALSE]Nodes that are causing the maximal allowed route distance to be exceeded are filtered out.
JOpt.SelectiveAutoFilter.NodeTypeFALSE[TRUE, FALSE]Nodes that are visited by the wrong type of resource are filtered out.
JOpt.SelectiveAutoFilter.RelationShipFALSE[TRUE, FALSE]Nodes that have wrong relations to other nodes.
JOpt.SelectiveAutoFilter.ResourceMismatchFALSE[TRUE, FALSE]Nodes that are visited too often by wrong resources (either preferred or mandatory) are filtered out.
JOpt.SelectiveAutoFilter.TimeWindow.EarlyFALSE[TRUE, FALSE]Nodes that are visited too early in too many optimization steps are filtered out.
JOpt.SelectiveAutoFilter.TimeWindow.LateFALSE[TRUE, FALSE]Nodes that are visited too late in too many optimization steps are filtered out.
JOpt.SelectiveAutoFilter.WorkingHoursExceededFALSE[TRUE, FALSE]Nodes that make a route exceed the maximal working time of its resource are filtered out.

Construction properties

Property keyDefaultAllowed valuesDescription
JOpt.AssistedTRUE[TRUE, FALSE]Turns on or off the assisted constructor. The assisted constructor is creating a starting solution for JOpt.
JOpt.Clustering.AutoZoneCodeClustersFALSE[TRUE, FALSE]When using Clustering algorithms for construction, found clusters are automatically transformed to Zones.
JOpt.Clustering.AutoZoneCodeClusters.isHardFALSE[TRUE, FALSE]When using Clustering algorithms for construction, and automatically transformation to Zones is enabled, either Zones can be hard or soft constrained.
JOpt.Clustering.JointVisitDuration.doUseDistanceDividerFALSE[TRUE, FALSE]If true, nodes of a joint visit duration cluster are splitting their distances during clustering construction.
JOpt.Clustering.MaxDistanceUtilization200.0[]During clustering, cluster refuse accepting new elements above this value.
JOpt.Clustering.MaxDurationUtilization80.0[]During clustering, cluster refuse accepting new elements above this value.
JOpt.Clustering.ReassignOrphanedNodesTRUE[TRUE, FALSE]When using Clustering algorithms for construction, nodes that are orphaned after construction are reassigned.
JOpt.Clustering.ResourceDutyHoursSplitValue10[]The split value defines the maximal number of dutyhours that can be part of a single deputy resource inside a cluster during the clustering construction. This number should be as high as possible (default 10). If the clustering seems to be stuck, this number should be reduced (>0).
JOpt.Clustering.ResourceSplitValue30[]The split value defines the maximal number of resources that can be part of a single cluster during the clustering construction. This number should be as high as possible (default 30). If the clustering seems to be stuck, this number should be reduced (>0).
JOpt.Clustering.ShowDebugOutputFALSE[TRUE, FALSE]When using Clustering algorithms for construction, debug output will be show as status event when enabling with true.
JOpt.PerformanceModeFALSE[TRUE, FALSE]Turns on or off the performance mode.
JOpt.ReassignNodesOnStartupFALSE[TRUE, FALSE]True: If a snapshot/json with an existing solution is loaded, additional nodes in the json-node definition are reassigned.

General setup properties

Property keyDefaultAllowed valuesDescription
JOpt.CapacityDegradation.TreatSameLocationsAsOneFALSE[TRUE, FALSE]TRUE: if multiple nodes in the same route share the same location (same matrix ID), the capacity degradation is calculated as if they were one node.
JOpt.Clustering.PenalizeZoneCodeCrossingFALSE[TRUE, FALSE]When nodes of different zones are visited in direct succession, a penalty might be assigned.
JOpt.Clustering.PenalizeZoneCodeCrossingMultiplier1.0[]When nodes of different zones are visited in direct succession, a penalty might be assigned. PenalizeZoneCodeCrossingMultiplier acts as factor for the assigned penalty cost.
JOpt.CostAssessment.useAverageCostFALSE[TRUE, FALSE]The fitness cost of the Optimization is based on the average cost of all routes, instead of the sum if true.
JOpt.IntermediateStage.ThrowResultsFALSE[TRUE, FALSE]Do we want to have a result after each optimization stage?
JOpt.JointVisitDuration.maxRadiusMeter10.0[]Below the maxRadius a joint visitDuration is triggered if this concept is enabled for a Node.
JOpt.JointVisitDuration.routeTimeBonusFactor0.0[]If a joint node is successfully scheduled, decrease usual RouteTimeCost by routeTimeFactor.
JOpt.KeepZeroDriveForEventNodesFALSE[FALSE]True: When an EventNode is allowed to move, distance and drivingtime stays at the subsequent node.
JOpt.MovingEventNodesTRUE[TRUE, FALSE]True: Any EventNode (a node without a geo location) can move between nodes to avoid lateness and idle time.
JOpt.Multicore1[0, 1]Enables or disables the JOpt multicore functionality. Enabling multicore only works if the used license is supporting this.
JOpt.NumCPUCores4[]NumCPUCores defines the number of cores JOpt will use.
JOpt.plausibility.doInputCheckTRUE[TRUE, FALSE]Property to turn on the structural integrity of the system created or user provided initial solution.
JOpt.plausibility.doInputCheck.doCapacityCheckTRUE[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.PlausibilityGuard.PropertyChecker.ActiveTRUE[TRUE, FALSE]TRUE: The propertychecker is activated. This is the default behaviour.
JOpt.PropertyChecker.ShowWarningsTRUE[TRUE, FALSE]Property for enabling and disabling the output of the propertyChecker.
JOpt.UnlocatedIdleTimeFALSE[TRUE, FALSE]True: Idle time is not arising at a particular node.

Genetic setup properties

Property keyDefaultAllowed valuesDescription
JOpt.JOptPopulationSize100[]PopulationSize defines the fixed number of individuals that will be used during the optimization.
JOptExitCondition.JOptGenerationCount5000[]After a certain number of generations JOpt terminates the optimization.

Pre-optimization setup properties

Property keyDefaultAllowed valuesDescription
JOpt.Algorithm.GE.OnProgressOutPercentage1.0[]By default the optimization reports an onProgress after 1.0% of progress. Setting this property to 0.1, will cause the optimizer to report at every 0.1% percentage of progress.
JOpt.Algorithm.Operator.2Opt.Threshold10[]Defines the threshold for the 2Opt Operator. As the 2Opt Operator is quite performance hungry, the number of elements that are invoked in a common execution is limited to the 'Threshold'. A higher value than the default of 10 is beneficial in problems where the average number of nodes in a route is high. For example, a lot of nodes with short durations and short driving times.
JOpt.Algorithm.Operator.GE.doForceReselectFALSE[TRUE, FALSE]True: If an operator during GE phase does not modify an existing solution another operator will be selected additionally.
JOpt.Algorithm.Operator.GE.numReselects3[]Number of operator reselects (if reselect is allowed) during GE phase.
JOpt.Algorithm.Operator.RequireHoursOverlapTRUE[TRUE, FALSE]Operators only allow moves of nodes to different resources, if the workinghours of the target resource and the opening hours of the nodes is overlapping.
JOpt.Algorithm.Operator.SA.doForceReselectFALSE[TRUE, FALSE]True: If an operator during SA phase does not modify an existing solution another operator will be selected additionally.
JOpt.Algorithm.Operator.SA.numReselects5[]Number of operator reselects (if reselect is allowed) during SA phase.
JOpt.Algorithm.PreOptimization.SA.CoolingRate0.999985[]SA.CoolingRate defines the cooling of simulated annealing after each iteration.
JOpt.Algorithm.PreOptimization.SA.NumIterations150000[]SA.NumIterations defines the number of iterations for simulated annealing.
JOpt.Algorithm.PreOptimization.SA.NumRepetitions1[]SA.NumRepetitions defines the number of cycles for simulated annealing.
JOpt.Algorithm.PreOptimization.SA.OnProgressOutPercentage1.0[]By default the optimization reports an onProgress after 1.0% of progress. Setting this property to 0.1, will cause the optimizer to report at every 0.1% percentage of progress.
JOpt.Algorithm.PreOptimization.SA.StartingTemperature10.0[]SA.StartingTemperature defines the starting temperature for simulated annealing.
JOpt.Algorithm.PreOptimization.SA.StartingTemperatureLoadedSnapshot0.1[]SA.StartingTemperatureLoadedSnapshot defines the starting temperature for simulated annealing after snapshot loading.
JOpt.Algorithm.Relation.NestingLimit100[]During the evaluation of Network relations, a maximal nesting limit can be set (default 100). In case an illegal cycle occurs, or the relation nesting is simply too deep, the limit kicks in.

Weight properties

The weights set how much each cost or violation counts in the optimization cost.

Property keyDefaultAllowed valuesDescription
JOptWeight.Capacity50.0[]JOpt weight for 'Capacity' during the optimization.
JOptWeight.CO2Emission0.0[]JOpt weight for 'CO2Emission' during the optimization. A higher value results in a higher optimization cost penalty for using Resources with high CO2 emission.
JOptWeight.ColorCapacity10.0[]JOpt weight for 'ColorCapacity' during the optimization.
JOptWeight.CompactingFactor1.0[]JOpt weight for 'CompactingFactor' during the optimization.
JOptWeight.DistanceExceeded10.0[]JOpt weight for exceedance of 'RouteDistance' during the optimization.
JOptWeight.DistanceVariationPattern0.0[]JOpt weight for 'distance variation pattern'. A higher value, triggers a higher importance of matching a desired distance pattern of each individual route.
JOptWeight.ExpertiseLevelPreference1.0[]JOpt weight for 'ExpertiseLevelPreference' during the optimization.
JOptWeight.NodeCompactingFactor0.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.NodeImportance1.0[]JOpt weight for nodeImportance during the optimization. A higher value results in a higher optimization cost penalty for violating nodes with higher importance.
JOptWeight.NodeType1.0[]JOpt weight for 'NodeType' during the optimization.
JOptWeight.PreferableResource1.0[]JOpt weight for 'PreferableResource' during the optimization.
JOptWeight.Relationships100.0[]JOpt weight for 'Relationships' during the optimization.
JOptWeight.ResourceActive0.0[]JOpt weight for 'ResourceActive' during the optimization.
JOptWeight.ResourceLocationBias0.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.ResourceRadiusDrivingDistance1.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.ResourceRadiusDrivingTime1.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.ResourceWorkingTimeBalance0.0[]JOpt weight for 'ResourceWorkingTimeBalance' during the optimization. A higher value will lead to a higher balance in terms of the working time for each route.
JOptWeight.RouteDistance1.0[]JOpt weight for 'RouteDistance' during the optimization.
JOptWeight.RouteTime1.0[]JOpt weight for 'RouteTime' during the optimization.
JOptWeight.TimeExceeded100.0[]JOpt weight for exceedance of 'TimeExceeded' during the optimization.
JOptWeight.TimeWindow1.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.TimeWindow.AfterEndPillarAnchor1000.0[]JOpt weight for preventing elements from being placed after an end anchor pillar.
JOptWeight.TimeWindow.FlexTimePenalizeFactor0.0[]FlexTimePenalizeFactor during the optimization. Flex time will get penalized to motivate the Optimizer to start the route close to the official working hours start
JOptWeight.TimeWindow.OfferedNodeCostMultiplier2.0[]JOpt global OfferedNodeCostMultiplier for TimeWindows. If an offered node's timewindow is violated the usual optimization cost is multiplied by this multiplier.
JOptWeight.TimeWindow.ServiceHours10.0[]JOpt weight for meeting 'ServiceHours' during the optimization.
JOptWeight.TimeWindow.TimeWindowEarlyFactor10.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.TimeWindowEarlyFactorAtFirstNode1.0[]JOpt weight for 'TimeWindowEarlyFactorAtFirstNode' during the optimization.
JOptWeight.TimeWindow.TimeWindowLateFactor100.0[]JOpt weight for 'TimeWindowLateFactor' during the optimization.
JOptWeight.TotalDistance1.0[]JOpt weight for 'TotalDistance' during the optimization.
JOptWeight.TotalTime1.0[]JOpt weight for 'TotalTime' during the optimization.
JOptWeight.UnPreferableResource1.0[]JOpt weight for 'UnPreferableResource' during the optimization.
JOptWeight.UselessUnloadAllVisitation1.0[]JOpt weight for 'UselessUnloadAllVisitation' during the optimization.
JOptWeight.WorkingTime5.0[]JOpt weight for 'WorkingTime' during the optimization.
JOptWeight.ZoneCode10.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.

Authors

DNA Evolutions GmbH


Added: 2026-01-03 (JOpt core 7.5.2-j17) | Last updated: 2026-10-23