Sepasoft MES Module Suite
BatchAllocationObject
This object holds information about Units, as defined in the Equipment Model for Batch, that are allocated or will be allocated during a batch execution.
The BatchAllocationRequest object returned by system.mes.batch.unit.getAllocationList:
Python |
system.mes.batch.unit.getAllocationList(0, 100, '', True, True) |
Output
Python |
>>> [Batch ID: 101b, Requested Unit: Enterprise\El Dorado Hills\Packaging Area\Chocolate Production\White Chocolate, Priority: 1, Requested At: Wed Dec 07 13:29:44 PST 2022, Allocated At: Wed Dec 07 13:29:44 PST 2022, Allocated Unit: Enterprise\El Dorado Hills\Packaging Area\Chocolate Production\White Chocolate, Batch ID: 101b, Requested Unit Class: My Unit Class, Priority: 50, Requested At: Wed Dec 07 13:29:43 PST 2022, Allocated At: , Allocated Unit: ] >>> |
BatchAllocationRequest contains: Returned in this order | |
|---|---|
Batch Name | The name entered in Batch Recipe Editor or created via script. |
Equipment Path for the Requested Unit | For example: Enterprise\El Dorado Hills\Packaging Area\Chocolate Production\White Chocolate |
Priority | The priority as an integer entered when a new batch is created in Batch Execution or set via script. |
Requested At | Time and Date of request with a default date format: Wed Dec 07 13:29:44 PST 2022 |
Allocated At | Time and Date of allocation |
Allocated Unit | Name of Unit that was allocated |
BatchAllocationRequest Methods and Property Values
hasUnitClassRef()
Description
Returns True if the allocation request is for a Unit Class (as opposed for a specific unit)
MESObjectLink getUnitClassRef()
Syntax
boolean hasUnitClassRef()
- Parameters
None
- Returns
Boolean
hasEquipmentPath()
Description
Returns True if the allocation request is for a specific Unit (as opposed for a Unit Class)
Syntax
boolean hasEquipmentPath()
- Parameters
None
- Returns
Boolean
getEstimatedDuration()
Description
Returns the estimated duration of how long the allocation will be required for.
Syntax
long getEstimatedDuration()
- Parameters
None
- Returns
Duration of time
isIncludeDescendants()
Description
Returns True if descendant Unit Class can be used in determining the Unit to be allocated.
For example:
Suppose there are a Mixer Unit Class and a Mixer with Heat Unit Class (that inherits Mixer Unit Class functionality). A recipe that requires a Mixer Unit can run on a Mixer and a Mixer with Heat Unit. In some cases, customers don't want to do this so that they can keep the Mixer with Heat Units free incase a recipe comes along that requires a Mixer
with Heat (which cannot use a Mixer Unit because it doesn't have heat).
Syntax
boolean isIncludeDescendants()
- Parameters
None
- Returns
Boolean
isDeferredAllocation()
Description
Returns True if the allocation request will be needed for a recipe in the future but currently doesn't need it. The priority of allocations is determined by two factors of priority setting and date and time requested. By adding allocation requests as soon as the recipe starts, it puts it in the queue by the requested date and time.
Syntax
boolean isDeferredAllocation()
- Parameters
None
- Returns
Boolean
| Date getRequestDateTime() | Return the date and time the allocation request was put into the list. |
| boolean isAllocated() | Return True if a Unit has been assigned to the allocation request. |
| Date getAllocatedDateTime() | Return the date and time a Unit was allocated for the allocation request. |
| int getPriority() | Return the priority of the allocation request. |
| Date getEstimatedDateTime() | Based on the estimated duration of the allocation requests that are ahead of this allocation request, this is the estimated date and time that to expect a Unit to be assigned. Keep in mind that any delays in requests ahead of this one will delay this estimate. |
| String getAllocatedEquipmentUUID() | Return the UUID of the Unit assigned to this allocation request. |
| String getAllocatedEquipmentPath() | Return the equipment path for the Unit assigned to this allocation request. |
| MESObjectLink getRequestedByRef() | Return the MESObjectLink of the BatchControlLogic object that made the allocation request. |
Inherits AbstractMESObject
Note some of the inherited object functions may not make sense to use with this object.
Sepasoft MES Module Suite