The Optimization Profile is structured into multiple tabs. The first tab is the Basic Settings tab. Here you can define the weights of the objective function.

The objective function of the DS Optimizer is a weighted sum of the following criteria:
- Makespan
- Total setup times
- Total setup costs
- Maximum delay costs
- Total delay costs
- Total mode costs
You can define the weights of the objective function in the Optimization Profile. The weights define how the trade off between different objectives is evaluated by the DS Optimizer. During optimization, the algorithm tries to minimize the objective function, that is, it tries to find a schedule in which the heavily weighted times and costs are as small as possible.
How the optimization algorithm is calculating different solutions and how these are evaluated is illustrated in the subsequent figure.

In this example, six orders A - F must be scheduled. The objectives are the minimization of setup times and total delay and both objective criteria have an equal weight (it is assumed that the weight is 1 for simplicity). The basic logic of the optimization algorithm is to schedule all activities as early as possible on any of the resources.
In the first solution, the orders are scheduled in the sequence A-B-D-C-E-F (indicated by the number inside the order). The setup time should be 100 and the delay of this solution is 50. Considering the weight, this amounts to a total objective function value of 150. In the second solution, the orders are scheduled in the sequence D-C-F-E-B-A (indicated by the number inside the order). The setup time should be 60 and the delay of this solution is 80. Considering the weight, this amounts to a total objective function value of 140. In the third solution, the orders are scheduled in the sequence D-F-B-E-C-A (indicated by the number inside the order). The setup time should be 80 and the delay of this solution is 90. Considering the weight, this amounts to a total objective function value of 170.
The algorithm continues to create more solutions as described in the previous lesson on genetic algorithms and always keep the best solution (solution 2 in this example).
This process continues for the specified maximum runtime. The Maximum Runtime is also defined in the optimization profile on the Basic Settings tab.
You can specify that the optimization run is to be ended once the first solution is found. If you set this indicator, the optimizer completes the run after finding the first valid solution. You can use this option to restrict the runtime for an optimization problem to the absolute minimum.

There is no simple way to estimate a reasonable run time for a specific planning scenario in theory. The run time depends very much on scenario-specific details. Internally, each optimization run is a search process. It is very hard to estimate how long it needs to search, until it finds a pleasant solution. Therefore, in a project you should run the optimizer on a realistic (in terms of volume of data and complexity) test set in order to analyze the run time behavior of the algorithm.
For many scenarios, the runtime behavior of the algorithm shows an asymptotic shape like in the figure Runtime/Termination Criteria. In the beginning of the process, the improvements concerning the minimization of the objective function are significant, whereas after some time the curve gets flat, presumably because the algorithm has come close to the optimal solution. A reasonable estimate for the optimizer runtime can be obtained from this graph (some (buffer) time into the flat part of the curve). This is what you can then define as Maximum Runtime for productive use.
You can obtain this information either visually from an interactive optimization run or by looking at the explanation log of an optimization run (on the Solutions tab). In general, a recommendation is to use whatever time is available for optimization, since the solution will never get worse.
Furthermore, you can also specify on the Basic Settings tab how optimization handles operations that are late. You have the following options:
- Schedule late operations
If you choose this option, the optimization schedules all operations.
- Deallocate late operations, if they end after the end of the optimization horizon.
If you choose this option, the optimization deallocates operations that end after the end of the optimization horizon, and positions them as late as possible within the optimization horizon.
- Deallocate all late operations.
If you choose this option, the optimization deallocates all operations that are late for the requirement date/time or end after the end of the horizon.
If you choose the second or the third option, the optimization shows the deallocation costs as part of the objective function and displays them as a curve in the optimization diagram. Even though the algorithm does not delay operations due to capacity restrictions by doing this, delay costs can occur due to receipts being too late or demand being too early. For both options, the optimization tries to minimize the number of deallocated orders.
On the Additional Strategies tab, you can enter a threshold value to specify the exact hour/minute starting from which you want optimization to deallocate the delayed operation. For example, if you enter a threshold value of 48 hours and an operation is delayed by more than 48 hours, it is deallocated. If the operation is delayed by less than 48 hours, it will not be deallocated. You can also force the optimizer to Deallocate Successors of Deallocated Operations on the Additional Strategies tab. In this case, the algorithm uses the activity and pegging relationships to determine the succeeding operations and deallocates them also.
A use case for the deallocation functionality is to highlight capacity overloads in the medium term, while planning in a planning or simulation version. In the active planning version, deallocation is typically not helpful, because the plan is not feasible as long as operations are deallocated. However, in a planning version, deallocation of operations can highlight when and where, that is on which resources more capacity would be required to get a feasible plan that meets the order due dates. As a result of this insight, available capacity can be increased in the active version/productive environment.
Note that the deallocation functionality cannot be used if campaigns are in the scope of optimization, or if bottleneck optimization is used as a decomposition method.
There are two strategies available at the end of the optimization run. Using backward scheduling the system tries to schedule the activities that were scheduled too early as close as possible to the requirement dates. Forward optimization minimizes setups and delays, but all activities are scheduled as early as possible. During backward scheduling activities are scheduled as late as possible without violating due dates based on the result of forward scheduling.
Using compact scheduling the system tries to reduce the lead time of the orders that is to plan each order with the smallest possible amount of time between the activities. The objective function criteria setup or delay are not worsened by this logic. With compact scheduling, no additional orders are delayed.
In general, the DS Optimizer tries to schedule all activities as early as possible. There are only these two mechanisms that deviate from this principle: Compact Scheduling and Backwards Scheduling. Even if compact scheduling and/or backwards scheduling are used, most of the runtime and optimization process is used to schedule all activities as early as possible, the compact scheduling/backwards scheduling is only used as a mechanism at the end of the optimization process to address these two objectives. The compact scheduling mechanism tries to minimize the total duration of an order by reducing gaps between activities. The backwards scheduling mechanism tries to minimize the earliness of an order by moving it closer to its requirement date. Both mechanisms are applied (if selected) on the intermediate optimization result that has been created in forward scheduling mode, that is, all activities being scheduled as early as possible.

Compact scheduling allows you to reduce order lead times. The lead time of an order is an important indicator for evaluating the quality of production plans that are generated automatically. You can use this function to reduce order lead times and generate an improved production plan. Shorter lead times also reduce storage costs and wait times.
The compact scheduling step can only be successful if the orders to be optimized do not contain any fixed activities. If the orders contain fixed activities, the compact scheduling logic can align the order to its fixed part only. To use compact scheduling, you must set the Compact scheduling indicator on the Basic Settings tab in the optimization profile.
The figure Compact and Backwards Scheduling illustrates the difference of both strategies.

The example consists of four orders (with different colors) with three operations each, one on each resource. The requirement dates for each order are indicated by triangles in the same color of the respective order. The first Gantt chart shows the optimization result without either compact scheduling or backwards scheduling. All operations are scheduled as early as possible, that is leftmost. Since the second operation of each order takes significantly longer to process than the first operation, there are gaps between the first and second operations of each order. This means, the leadtime for each order is larger than it should be, which means work-in-process and unnecessary waiting times.
This is changed in the second Gantt chart with compact scheduling being active. The compact scheduling mechanism aligns the first and second operations of each order. The third Gantt chart shows the influence of backwards scheduling being active. Two orders are moved to the right to better align with their requirement dates.
Compact scheduling and/or backwards scheduling can be conflicting with the optimization criteria. If the sequence of activities is determined as the optimal setup sequence, but the requirement date sequence is different, it is possible that compact scheduling and/or backward scheduling can deteriorate the optimization result. However, this is not allowed in standard as illustrated in the next figure.

The example consists of four orders (with different colors) with three operations each, one on each resource. The requirement dates for each order are indicated by triangles in the same color of the respective order. The first Gantt chart shows the optimization result without either compact scheduling or backwards scheduling. All operations are scheduled as early as possible, that is leftmost. The shown order sequence should reflect an optimal setup sequence. This would be the result of optimization, if setup times had been in the focus.
Since the second operation of each order takes significantly longer to process than the first operation, there are gaps between the first and second operations of each order. This means, the leadtime for each order is larger than it should be, which means work-in-process and unnecessary waiting times. Furthermore, all orders are scheduled ahead of their requirement dates.
By default, the backwards scheduling logic is not allowed to deteriorate any objective function criteria. Therefore, if backwards scheduling was applied to this solution, the result in the second Gantt chart would be obtained. The order sequence would be kept, but all orders are shifted right to align better with their requirement dates.
Even this solution could mean a deterioration of the objective function, if makespan had been weighted, because the second solution has a higher makespan than the first solution. Whether the makespan can be increased or not is defined on the Additional Strategies tab of the optimization profile with option Do Not Increase Makespan.
Whether solution two or three is optimal, that is whether the setup sequence (which has been defined as an objective criteria) or the avoidance of earliness (which can be achieved by sequencing orders by their requirement date in solution three) is more important, can also be influenced with special optimization parameters that are explained in a subsequent lesson. What is considered optimal in a specific planning scenario is highly dependent on business requirements.


















