Skip to main content

WorkStation

A class to represent a WorkStation.

WorkStations are specialized Resources that provide designated areas for manufacturing operations. They represent manual or semi-automated work areas where operators perform specific tasks such as assembly, inspection, or processing operations. The WorkStation class extends the Resource class to include workspace-specific capabilities and capacity management.

WorkStations are connected to various components in the manufacturing system:

  • Workers assigned to the station
  • Tools used at the station
  • Products processed at the station
  • Parts handled at the station
  • Actions performed at the station
  • Sensors monitoring the station

WorkStations support various operation types:

  • Assembly operations
  • Quality control and inspection
  • Material preparation
  • Packaging and labeling
  • Testing and verification
  • Manual processing tasks

Best Practices:

  • Define clear workstation capabilities
  • Track station capacity and utilization
  • Monitor worker assignments
  • Ensure proper tool availability

Attributes:

NameData TypeDescription
namestrHuman-readable name of the WorkStation
georeferenceList[float]Physical location coordinates [x, y] or [x, y, z]
idstrUnique identifier
locationLocationLocation where the workstation is installed
workstation_typestrType of workstation (e.g., "assembly", "inspection")
capabilitiesList[str]List of operations this workstation supports
max_capacityintMaximum number of simultaneous operations
current_capacityintCurrent number of operations in progress
power_typestrPower source
power_consumptionfloatPower usage in kWh
maintenance_intervalintHours between required maintenance
last_maintenancedatetimeTimestamp of last maintenance
hours_usedfloatTotal hours of use since last maintenance
actorsList[Actor]Workers assigned to this workstation
actionsList[Action]Actions associated with this station
constraintsList[constraints]Operating constraints
sensorsList[Sensor]Sensors monitoring this workstation
statusResourceStatusCurrent operational status. See ResourceStatus
creation_datedatetimeTimestamp when workstation was created
last_modifieddatetimeTimestamp of last modification

Example Configuration:

workstation = WorkStation(
name="Assembly Station 1",
workstation_type="assembly",
capabilities=["manual_assembly", "testing"],
max_capacity=2
)
note

The WorkStation class inherits base attributes from the Resource class while adding specialized capabilities for manual and semi-automated operations. Use this class for designated work areas where operators perform specific manufacturing tasks.

Inheritance

Inherits from: Resource

Constructor

def __init__(self, name: str, georeference: List[float], id: Optional[str] = None, location: Optional[omm.Location] = None, workstation_type: Optional[str] = 'general', capabilities: Optional[List[str]] = None, max_capacity: Optional[int] = None, power_type: Optional[str] = 'manual', power_consumption: float = 0, maintenance_interval: float = 0, last_maintenance: Optional[datetime.datetime] = None, actors: Optional[List[~ActorT]] = None, actions: Optional[List[~ActionT]] = None, constraints: Optional[List[~ConstraintT]] = None, sensors: Optional[List[~SensorT]] = None, status: omm.ResourceStatus = <ResourceStatus.IDLE: 4>) -> None:

Initialize a WorkStation instance.

Properties

actions

Return a copy of the resource's actions.

@property
def actions(self):
# Returns typing.List[~ActionT]

actors

Return a copy of the resource's actors.

@property
def actors(self):
# Returns typing.List[~ActorT]

constraints

Return the resource's constraints.

@property
def constraints(self):
# Returns typing.Optional[typing.List[~ConstraintT]]

current_capacity

Return the current capacity utilization.

@property
def current_capacity(self):
# Returns <class 'int'>

entries

Return the number of entries for the resource.

@property
def entries(self):
# Returns <class 'int'>

exits

Return the number of exits for the resource.

@property
def exits(self):
# Returns <class 'int'>

georeference

Return the resource's georeference.

@property
def georeference(self):
# Returns typing.List[float]

last_modified

Return the last modified timestamp.

@property
def last_modified(self):
# Returns <class 'datetime.datetime'>

sensors

Return a copy of the resource's sensors.

@property
def sensors(self):
# Returns typing.List[~SensorT]

status

Return the status of the resource.

@property
def status(self):
# Returns <enum 'ResourceStatus'>

Methods

add_action

Add a single action to the resource's actions.

def add_action(self, action: ~ActionT) -> None:

add_actor

Add an actor to the resource.

def add_actor(self, actor: ~ActorT) -> None:

add_capability

Add a new capability to the workstation.

def add_capability(self, capability: str) -> None:

add_constraint

Add a single constraint to the resource's constraints.

def add_constraint(self, constraint: ~ConstraintT) -> None:

get_current_action

Get the current in-progress action.

def get_current_action(self) -> Optional[~ActionT]:

needs_maintenance

Check if tool needs maintenance based on usage hours.

def needs_maintenance(self) -> bool:

operate

Operate Resource.

def operate(self) -> None:

perform_maintenance

Perform maintenance on the tool.

def perform_maintenance(self) -> None:

remove_action

Remove a specific action from the resource's actions.

def remove_action(self, action: ~ActionT) -> None:

remove_actor

Remove an actor from the resource.

def remove_actor(self, actor: ~ActorT) -> None:

remove_capability

Remove a capability from the workstation.

def remove_capability(self, capability: str) -> None:

remove_constraint

Remove a specific constraint from the resource's constraints.

def remove_constraint(self, constraint: ~ConstraintT) -> None:

to_dict

Convert the workstation instance to a dictionary representation.

def to_dict(self) -> Dict[str, Any]:

update_actor

Replace an existing actor with a new actor.

def update_actor(self, old_actor: ~ActorT, new_actor: ~ActorT) -> None:

update_capacity

Update the current capacity utilization.

def update_capacity(self, new_capacity: int) -> None:

Example Usage

# Example: Creating an advanced assembly workstation
assembly_station = WorkStation(
name='Assembly_Station_01',
georeference=[15.0, 25.0, 0.0],
workstation_type='electronics_assembly',
capabilities=[
'circuit_board_assembly',
'component_soldering',
'quality_inspection'
],
max_capacity=3, # Number of simultaneous assemblies
actors=[
Worker('Emma Thompson', roles={'Electronics Assembler': ['PCB']})
],
sensors=[
Sensor('temperature'),
Sensor('humidity')
]
)

# Update station capacity and status
assembly_station.update_capacity(2)
print(f'Current occupation: {assembly_station.current_capacity}/{assembly_station.max_capacity}')

# Check environmental conditions
for sensor in assembly_station.sensors:
print(f'{sensor.name}: {sensor.get_reading()}')