This can take producing and consuming operations on a resource group and balance them out to the resource group members based on available warehouse capacity and product shelf life (among others!). Simultaneously filling and emptying is considered (overlap between producing and consuming operations) as well as multiple parallel producing and/or consuming operations. The warehouse max. limits are respected thus no overfilling can take place. A warehouse is always emptied, so the produced and consumed amount put on a resource will always be the same, except the case where there is an existing amount in a warehouse (a counting), where the consumed amount must match the sum of the producing operations and the counting. CIP orders can be generated based on CIP rules setup per resource.

Example parameter configuration

Example 1 – Strategy = balanceOutFromResourceGroup

Starting point:

In below example producing and consuming operations are put on a resource group “Storage tanks”. The purple ones are producing and the blue ones are consuming. This is also indicated by the ‘P’ or ‘C’ letter after the order no. In this example there are two parallel producing operations and one consuming operation. This is reflecting the scenario where two different processing resources are producing to the same tank at the same time and a third processing resource are consuming from the same tank.

The result:

Producing and consuming operations have been split and moved to specific resources and CIP orders have been generated. The BOM graph shows the inventory of T201 where it can be seen that the warehouse is filled to the limit of 150 and then emptied again – and then cleaned. Suborder links are created between producing and consuming operations, and to CIP operations.

Example 2 – Strategy = fitInExistingCIPInterval

Starting point:

Producing (dark green) and consuming (light green) operations are put on a resource group and CIP orders have been created on some of the specific resources (see the CreateCIP macro to see how to create CIP orders with fixed interval automatically).

The approach is to select the CIP operation “closing” the CIP interval (the one highlighted with the red box below) and then run the function. This CIP interval is illustrated with a red and a blue line. The selection sequence must be “from left to right”, thus the oldest operations are split first. In below example the highlighted CIP on T10 must be selected first and then the one on T11 (the macro command selectComponents can do the selection automatically). The producing operations will be split a while before the CIP in time for the warehouse to be emptied before CIP start. The consuming operations will be split just at CIP start. Notice that with this strategy (fitinExistingCIPInterval) the warehouse max. limit is NOT checked!

The result:

The operations are split and/or moved to T10 and T11 ensuring that the warehouses are empty when the CIP’s are scheduled to start.

BOM graph for T11. Warehouse is emptied at CIP start.


  1. The relevant warehouses must be created and assigned to resources.
  2. A “Min/_*max*_ stock level” must be created for each warehouse – defining the capacity.
  3. There must be only one producing or consuming BOM line on the operations to split.
  4. A license to the Batch module is needed.
  5. The list of possible resources must be specified on the template operations (the specific resources where the operations can be moved/split to). The sequence of the resources is respected.
  6. Both producing AND consuming operations must exist on the resource group. If no consumption an error message is shown and operations are left on the group.
  7. The consumption must not be greater than the production – otherwise an error message is shown.
  8. The production/consumption method must be linear.
  9. Material/Pegging links are not supported.If those exist on the operations to split, remove those before running the macro. Note that the IDS/Demand satisfier will create Pegging links.


  1. Identify if an operation is producing or consuming: Set up a view layout so the transaction type (producing or consuming) can be seen above the operation bar in the Gantt chart. In the Material->Transaction category in the field chooser add the “Type” field and set “Max characters” to 1.
  1. Use macro “joinOperations” in order to reset a split, delete CIP orders and put operations back to the group.
  2. Multiple products can be put on the same resource group. This is handled by the split function so each product is processed independently.
  3. When is a warehouse considered empty:
    Is a warehouse considered empty if there is a small amount left in it? Use this to handle rounding issues. Insert below in to allow a certain amount left in a warehouse. Default value is zero.

Parameter descriptions

(* = configuration required)

If = true the macro will continue to next material even though it encounters an error.
Default = false.

If greater than zero it will put queue time after producing operations – after moved/split to specific resources. This will ensure rest time in tank before consumed and thus not allow simultaneously filling and emptying.
Source anchor = opr end, dest anchor = opr start.

This is only relevant to strategy ‘balanceOutFromResourceGroup’.

Default is 0 (zero).

When searching for available warehouses and resources, this setting indicates how far ahead should the resource be unused (no operations on it).
This is related to point 5 in the preconditions.

Default is 24 hours.

If ‘true’ is specified it will run CIP after a split.

If parameter ‘splitAllOnResourceGroup’ is filled out with a resource group name the split function is performed multiple time and thus the CIP will be performed after each split (each time a warehouse is emptied).

Notice that CIP parameters must be specified per resource in “Edit -> Resource” on the Scheduling tab.

Default is false

“Orchestrator” function. If a resource group name is specified it will take all producing and consuming operations on that resource group and try to move/split to specific resources.

If left blank producing and consuming operations have to be selected manually – in selection sequence from left-to-right!

See also parameter ‘startCut’.

Default empty

This is only relevant to strategy ‘balanceOutFromResourceGroup’.
The amounts of the selected producing and consuming operations are only analyzed after the specified startCut. Operations intersecting with the startCut will be split at the startCut time.

This is needed in order to handle feedback from production – i.e. that the actual warehouse inventory is different from planned.

When splitting operations intersecting with start cut two cases exist:

Split in two parts (enough space in one warehouse to take all of the remaining part after startCut): First part = Leave on resource group Last part = Move to specific resource

Split in three parts (not enough space in one warehouse): First part = Leave on resource group Middle part = move to specific resource Last part = Leave on group

Notation: “now” or “this week”- , y/year(s), m/mon/month(s), w/week(s), d/day(s), h/hour(s), min/minute(s) and s/sec/second(s).

The keyword “this week” corresponds to Monday morning at 00:00 in the current week.

It is possible to add and subtract by specifying for instance ‘this w-3w+2d’ (or ‘this week – 3weeks + 2days’).

OBS: In this notation, ‘m’ corresponds to month and NOT minute

Default is now.

Two strategies exist.
balanceOutFromResourceGroup and fitInExistingCIPInterval


Takes producing and consuming operations from a resource group and balancing them out on group members – ensuring tanks are emptied at scheduled CIP operations. This will not respect max limits.


Takes producing and consuming operations from a resource group and balancing them out to the resource group members based on available warehouse capacity and product shelf life (among others!).

See the examples further up for more description.

Default is balanceOutFromResourceGroup

Allow a certain negative amount (if there is consumed slightly more than produced) before the macro will stop and show an error message. SI unit of the material, i.e. kg or liters.

Default is 0 (zero)


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment