Show TOC

  Genetic Algorithm (Single-Lines)

Use

This complex procedure is based on the principles of evolution. You can use it in the short-term planning horizon if you want to create an order sequence for a line within a period (day or shift) that takes into account all customer preferred dates as well as all restrictions. This procedure provides good results despite the complexity of the tasks.

You can also use the genetic algorithm after the LP procedure so that in the short-term planning horizon the system uses the period packages already assigned to the lines of the line network, and creates planned orders with lot size 1 and then sequences these planned orders.

During this process, the system creates several sequences which it then evaluates. Only the sequences with the best evaluation appear in the next iteration where they are further improved.

If you use the genertic algorithm with a requirements-oriented planning basis , you must make sure that there are sufficient orders available for dispatching. In so doing, you can make sure that the positions of an order sequence can be filled with orders from the beginning of the planning horizon. You have to do this as the genetic algorithm terminates if there are no orders to occupy all positions in an order sequence.

Integration

You can carry out this procedure by:

Integrating it in a procedure package for the model mix planning run in Customizing for Model Mix Planning.

Accessing it from interactive sequencing.See also: Optimization in Sequencing

The procedure is defined in the function module /SAPAPO/SEQO_GA01_CALL and uses the table /SAPAPO/SEQC_GAV.

Parameters

The procedure can take all restriction categories into account. Note that position restrictions are first converted to quantity restrictions before being passed on for optimization. When you call up the procedure, you can determine which restriction categories should be taken into account and up to which weight. For example, you can determine that only quantity restrictions weighted with priority 4 or higher should be taken into account.See also: Including Restrictions in Planning

In restriction maintenance, you should bear in mind the following guidelines so that you make the optimal use of system resources:

Quantity restriction

Reasonable values for minimum: No entry or a value greater than 0

Reasonable values for maximum: No entry or a value greater than or equal to 0

If the number of orders to be scheduled per day/shift is less than the minimum quantity stipulated per day/shift, the system can respond as follows, depending on how the restriction is weighted:

If the restriction is a hard one (weighting 0), the optimization process terminates.

If you have not set a hard weighting, a shortfall below the minimum quantities only leads to penalty points.

If the minimum quantity that you defined per day or shift exceeds the line capacity, the system automatically uses the largest quantity possible as the minimum quantity. If the maximum quantity you defined per day or shift exceeds the line capacity, the system also uses the maximum possible quantity in terms of capacity.

Block restriction

Reasonable values for minimum: No entry or a value greater than 1

Reasonable values for maximum: No entry or a value greater than 1

Spacing restriction

Reasonable values for minimum: No entry or a value greater than 0

K-in-M restriction

Reasonable values for maximum: No entry or a value greater than 1

Equal distribution restriction

Can only be defined as a soft restriction

The procedure can take into account a date earlier or later than the customer’s preferred date. When you call up the procedure for make-to-order production and for make-to-stock production, you can define whether you want to tolerate an earlier or later date.

If you defined a date earlier or later than the customer’s requested date as a hard restriction the system firms the orders for the customer’s requested date. Then, in the short-term planning horizon when splitting a planned order into several planned orders with lot size 1 the result is negative as all orders receive the same date. Therefore, you should choose the weighting soft (priority 1) when taking the customer’s requested date into account.

You can limit the maximum runtime of the procedure. Although the procedure usually reaches a good result after just a short time, you can improve the result with a longer runtime, if necessary. You can also define a maximum runtime for the slotting heuristic that is integrated in the genetic algorithm to create an initial sequence for the orders in a first step. If you do not make any time specifications, the system automatically uses 10% of the runtime you defined for the genetic algorithm to execute the slotting heuristic.

You can save the parameters in a processing profile in Customizing for model mix planning, or you can enter them every time you call up the procedure.

Activities

The system proceeds as follows when planning:

The genetic algorithm starts at the beginning of the planning horizon and determines the given orders and relevant characteristics. The characteristics for which you have defined restrictions are relevant.

As well as creating the transferred start sequence, the system also creates as many other sequences as necessary and evaluates them using penalty points. The evaluation depends on the number of soft restrictions which are not respected or the observance of the customer’s preferred dates. For example, an interval restriction that has been exceeded of the maximum interval of 2, receives more penalty points than an interval restriction that has only been exceeded by one item. The number of penalty points grows quadratically with each item not respected.

The system retains the sequences with the best evaluation and tries to improve on them. It does this by creating part sequences from the sequences it has transferred, and arranges these in different ways.

From the newly created sequences, it again transfers those with the best evaluation and repeats step 3, as long as the maximum runtime of the procedure has not yet been reached.

The procedure is terminated when a hard restriction cannot be respected and the genetic algorithm cannot solve the problem. The sequence of the orders remains as it was before the procedure. If this happens in the model mix planning run, the system continues with the next planning horizon.