This macro will move orders forward that did not start up on time and repair invalid areas of the schedule.

The current sequence of the jobs on the resources will if possible be kept, but it cannot be guaranteed.

Operations with status complete or being locked will never be moved by this macro.

The macro will respect Material Calendar when updating the plan.

In addition this macro has advanced features for:

  • Optional if started operations should be moved forward or if started operations should keep current start time.
  • Optional if future planned orders that does not interfer with orders being rescheduled, should be included in the re-planning or not.
  • Optional if operations can be moved past their delivery date. If they cannot be moved past the delivery date it is optional if the macro should automatically increase the operation efficiency to meet the required delivery date (i.e. squeeze operations to visualize what effort is required to meet the delivery time).

Typical uses of this macro are:

  • Automatic update of the plan due to updated progress / completion of started operations.
  • Automatic update of the plan to move delayed operations forward in time
  • Automatic update of the plan to close gaps occurring because of operations starting ahead of planned start time or being executed with higher processing rate than originally planned
  • Select one or more operations in the plan and use this macro to startup these operations immediately.

List of steps executed by this macro:

  1. Search out resources to update according to settings “resourceIds” and “resourceTypes”. Resources are sorted in the following order of priority
    • as specified in resourceIds parameter
    • as specified in resourceTypes parameter
    • according to the active resource view
  2. If “selectionStrategy”=30 (SELECTED_COMPONENTS) use selected operations to choose resources to analyze (ignoring resources found in step 1)
  3. On included resources search out “must be moved” operations. The parameter “selectionStategy” is used in determining the criteria of what “must be moved”.
  4. For all included resources the first of “must be moved” operation is located. On this resource all operations after this first operation are now planned forward from “Now”.

All resources searched out in previous steps are updated this way – one by one – before moving on to next step.

  1. Analyze routes and resources that needs to be “repaired” due to broken routing links or lack of capacity, as a result of executing point 4 above. Only areas (resources) of the schedule being invalid because of executing point 4 are analyzed, other invalid areas of the schedule are not considered.

For each of the resources that need to be repaired, the same steps as described in step 4 are followed (i.e. find first “invalid” operation and re-plan everything on that resource from the first operation and forward).

  1. Repeat steps 5-6 until all invalid parts of the schedule has been straightened out. To make sure the macro does not enter an infinite loop in case the schedule will never be valid, steps 5-6 are repeated a max number of times as specified by parameter “maxRetriesForSteadyState”

Example parameter configuration

Parameter descriptions

(* = configuration required)

allowMovePastDeliveryDate
false = an operation is never moved past the delivery date. Notice this may result in invalid routings and operations placed before time now. Also see “shrinkOnMovePastDeliveryDate” option.
true = operation is moved forward with no regard to the delivery date

allowStartBeforeNow
false = prevents any operations to be updated to start before now.
true = will not check if operations might be updated to start before now.

daysBeforeNowInclusionWindow
When searching out resources to initially update (steps 1-3 in List of steps above) an operation with planned end prior to this window will not be considered as needed to be updated. The window will be back from midnight 00:00 of the day the macro runs.

Note: this setting will only have any effect when used in combination with selectionStrategy=*10*, or 20

excludeOperationStatusLevel

Exclude operations with the given status level from being updated. By default status levels 10, 50, 60 and 70 will always be excluded, this cannot be changed. Multiple status level values can be specified. E.g..: 15,20
10 = New
15 = Forecast
20 = Planned
30 = Start Possible
40= Started
50 = Paused
60 = Cancelled
70 = Completed

maxRetriesForSteadyState
To make sure the macro does not enter an infinite loop in case the schedule will never become valid, steps 5-6 in List of steps are repeated a max number of times as specified by this parameter. In case your schedule has invalid areas in it after running this macro, try increasing this value in steps of e.g. 20 until all invalid areas have been solved.

pausedOperationStrategy
Same as startedOperationStrategy for paused operations.

preserveGapsIfPossible
If = true gaps between operations will be retained.

preserveResourceOperationSequence
Default = false. If true, the ordering of the operations will be kept e.g. the 3rd operation will never be placed before the 1st or 2nd operation.

referenceTime
Default = now.
Supported 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’). Please notice that ‘m’ corresponds to month and NOT minute.

resourceIds
comma-separated list of resource id’s to analyze. Leave blank to analyze all resources in the currently active view.

resourceNextOpStrategy
This is the rule used for subsequent operations on the same resource not selected in the selectionStrategy (used in steps 4-6 in List of steps outlined at the top).

0 = Do nothing, only update operations found in selection strategy
10 = PUSH: All non-selected operations that overlap will be moved to the first available time on the resource
20 = PUSH and PULL: as above but will also pull in subsequent operations on the same resource (left adjust)

resourceTypes
comma-separated list of resource types to analyze. Leave blank to analyze all resources in the currently active view

selectionStrategy

The selection strategy to use when collecting the initial operations to update (used in step 1-2 in List of repair steps outlined at the top):

10 = Select planned operations starting before NOW. Use this to automatically move forward anything that did not start on time.
20 = Select operations after started operations. This can be used if progress on started operations were updated and subsequent planned operations needs to be adjusted accordingly.
30 = Use selected resources in the plan. The user can select the operations to update in the plan or use the “SelectComponent” macro. All operations after the first selected operation on each resource will be updated
40 = Same as 30 but only operations within the first and last selected operation on the resource will be updated.

sequenceNextOpStrategy

This specifies how the next operation in the route of the selected operations should be handled (used in steps 4-6 in List of steps outlined at the top):

0 = Next operation in route is ignored
10 = If constraint to the next operation in the route is broken, then set start of the next operation to end of the current operation.
20 = Same as above but will also set start of the next operation to end of the current operation even if the constraint was not broken.

shrinkOnMovePastDeliveryDate
false = never try to “shrink” operation
true = If an operation is moved past the delivery date, the macro will automatically increase the operation efficiency to meet the required delivery date (i.e. squeeze operations to visualize what effort is required to meet the delivery time).

sortOnStrategy
Determines the order in which the operations will be moved. Default = start.

Start = Operations will be sorted on their start time before being moved.
End = Operations will be sorted on their end time before being moved.

startedFirst
Default = true. If true, operation with status=started will be planned first. OBS: The setting startedOperationStrategy determines whether or not started operation will be moved at all.

startedOperationStrategy

Extra option to fine tune in what circumstances a started operation is moved or not.

10 = Never move started operation – leave them at current start time
20 = Only move started operations where progress not (e.g. setup time or actual amount produced) has been registered on the operation
30 = Move operation if they have status started

stopIfGapInMinutes
Option used in combination with the resourceNextOpStrategy = PUSH
If a gap between operations of more than x minutes is reached the update plan macro will stop. This can be used if you only want the macro to update overlapping operation right after now and ignore later overlap.

-1 means disabled.

updateResourcesOneByOne
When updateResourcesOneByOne=true then resources are updated one by one. This is the default behavior and works well for plans that does not incorporate sub-operations. However for situations where the resource of a primary operation is also booking a secondary sub-operation resource, then operations on the sub-operation resource will be in each other’s way when updating two primary operations booking different resources but booking the same sub-operation resource.
For plans incorporating repair of operations with sub-operations use the updateResourcesOneByOne=false setting. Then all affected resources are analyzed up-front, i.e. it is seen as one big scheduling problem where operations not yet schedule will not get in the way of the current operation being scheduled.

Default value is true

Example 1

This example demonstrates a common use case for the UpdatePlan macro. During the night progress on some operations has been registered – some operations did start late, some didn’t start at all and some may have started earlier than planned. The job is to repair the schedule to make sure that operations that did not start are replanned forward from now and to ensure a valid schedule on resources that did start as planned.

Configuration used:

Before: color mode is by operation status (green = “started”, blue = “start possible”)

After: notice that order 2000 is not pulled in, since it doesn’t conflict in any way with the rest of the operations on resource “Saw 1”. This can be changed by setting resourceNextOpStrategy=20.

Also notice that the started operation is not replanned. If started operations should also be replanned forward from now then change parameter startedOperationStrategy=30

Example 2

Same use case as in Example 1 – however in this scenario only replan resources with started operations – leave anything else untouched (selectionStategy=20). Also in this case replan any started operation forward from now (startedOperationStrategy=30).

Configuration used:

Before: color mode is by operation status (green = “started”, blue = “start possible”)

After: notice that resource “Saw 1” is not replanned, since this resource does not have any started operations on it. This can be changed by setting selectionStrategy=10.

Also notice that the started operation is replanned since startedOperationStrategy=30

Feedback

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