INV_UPDATE_WI_ESTIMATED_MOVE_TIME
Description: Use this code extension type to customize logic that provides visibility for when a given container will be loaded or discharged from/to Rail or Yard, as well as to provide an estimate for when the planned work will be completed. Setting the estimated move times (EMT) for rail load or discharge Work instructions (WI) requires knowing, or at least making a reasonable projection of, which rail crane (CHE of type RMG, RTG, FRK, RSK, or STR) will be performing the move, or 'nominating the CHE', since the EMT for a move is based on the EMT of the previous move for the same CHE. This is to be used for WIs where CHEs are assigned to transfer zones covering parts of the track.
Starting with N4 release 3.02, the WI EMT generator functionality has been enhanced to run any extension of type InventoryExtensionTypes.INV_UPDATE_WI_ESTIMATED_MOVE_TIME rather than only an extension named UpdateWIEstimatedMoveTime. The main advantage of this is that you can define multiple EMT generators that run independently as different background jobs to update Work Instructions associated with different POWs. The usual scoping rules are observed.
You do not need the code extension when CHEs are assigned to the POW. This is because in that scenario, the EMT is simply based on the planned work sequence and the specified shift productivity. Hence, there is no need to assign a rail crane to the work instruction to compute EMT. As an example, a POW with a shift productivity of 15 mph would increment EMT by 4 minutes per move.
Abstract Base Class: AbstractUpdateWIEstimatedMoveTime
Methods: updateMoveTime() and getApplicablePowsForMoveTimeUpdate()
Module: Rail
Version Added: 2.6
Requires Code Extension Name or Name Pattern: Yes
Code Extension Name or Name Pattern: UpdateYardWIEstimatedMoveTime, UpdateRailWIEstimatedMoveTime
Where to Specify Code Extensions of this Type: Modify the system-seeded sample (see below), then create a Job Group called WI_EMT_UPDATE_JOB, launch the job using the Actions menu in the Background Jobs view, then check the Background Jobs view for the WI_EMT_UPDATE_JOB. For more information, see Set up to view rail Estimate Move Times in the Navis N4: Rail: Administrator and User Guide.
System-Seeded Code Extensions Using this Type: UpdateYardWIEstimatedMoveTime, ( UpdateRailWIEstimatedMoveTime.
You can override the UpdateYardWIEstimatedMoveTime code extension only at the facility level and it must use the exact same name.
Additional Method Information: The updateWIEstimatedMoveTime() method on the EUpdateWIEstimatedMoveTime interface has been deprecated in favor of two methods which allow for validation on the inputs (the Point of Work objects) & outputs (the Work Instruction objects) of the generators. Clients implementing multiple EMT generators are highly encouraged to implement these two new methods to ensure the validations are run. Existing implementations using the earlier (now legacy) method still work, but no validations are run.
/**
* Update the EMTs on the WorkInstruction instances for the supplied PointOfWork instances
*
* @param inPOWs a list of PointOfWork instances that should be considered
* @return a List of WorkInstruction instances that were affected
*/
List<WorkInstruction> updateMoveTime(@NotNull final List<PointOfWork> inPOWs);
/**
* returns the list of PointOfWork instances that should be considered for the EMT updates; the results are fed to updateMoveTime()
* @return a list of PointOfWork instances that should be considered for the EMT updates
*/
List<PointOfWork> getApplicablePowsForMoveTimeUpdate();
Validation: Input validation includes ensuring that no POWs are declared as being applicable for multiple EMT generators, and that none of the POWs are vessel POWs.
Output validations include asserting various properties of the Work Instructions & related objects, including:
that the WI EMT is not null, is within the Work Shift start & end time; and, if the WI hasn't been dispatched, that the EMT is in the future.
that the WI Work Queue is active.
If input validation fails, the user receives a error message and none of the EMT generator jobs are launched. If output validations fail, any changes are not committed for that generator and the error is logged.
Code example
You can use the UpdateYardWIEstimatedMoveTime and the UpdateRailWIEstimatedMoveTime system-seeded code extensions as a starting point from which to customize the logic to calculate work instruction (WI) estimated move times (EMT) based on the Nominated CHE (WINC (for 'Work Instruction Nominated CHE')).
Prerequisites
The Background Jobs Actions - Launch Update Yard WI Estimated Move Time (BACKGROUND_JOB_LAUNCH_UPDATE_WI_ESTIMATED_MOVE_TIME) privilege to run the UpdateYardWIEstimatedMoveTime code extension.
The Background Jobs Actions - Launch Update Rail WI Estimated Move Time (BACKGROUND_JOB_LAUNCH_UPDATE_RAIL_WI_ESTIMATED_MOVE_TIME) privilege to run the UpdateRailWIEstimatedMoveTime code extension.
When you launch the following background jobs, they execute the UpdateWiEstimatedMoveTime()method in the UpdateYardWIEstimatedMoveTime or the UpdateRailWIEstimatedMoveTime code extension:
Background jobs view Actions
Launch Update Yard WI Estimated Move Time Job
Background jobs view Actions
Launch Update Rail WI Estimated Move Time Job
These background jobs do not use the ARGOECN4002 (UPDATE_WI_ESTIMATED_MOVE_TIME_JOB_FREQ) setting. The frequency at which these jobs run is defined within the respective code extensions. The default frequency for these code extensions is two minutes. These code extensions run and persist the EMTs for the relevant WI.
To halt one or more of the background jobs, select the appropriate job or jobs in the Background Jobs view, and then click Actions Halt Job. When you halt a background job, any EMT about yard or rail WIs that have been calculated will be retained, although no further jobs are processed. The Yard EMT generator reviews all active queues that are associated with Yard POWs. All bypassed WIs or WIs beyond the Planned move stage are ignored, and the EMT for those stages are not updated.