jobshoplab.types package¶
Submodules¶
jobshoplab.types.action_types module¶
- class ComponentTransition[source]¶
Bases:
object
ComponentTransition(component_id: str, new_state: jobshoplab.types.state_types.TransportStateState | jobshoplab.types.state_types.MachineStateState | jobshoplab.types.state_types.BufferStateState, job_id: Optional[str])
- new_state : TransportStateState | MachineStateState | BufferStateState¶
- __init__(component_id, new_state, job_id)¶
- Parameters:¶
- component_id : str¶
- new_state : TransportStateState | MachineStateState | BufferStateState¶
- job_id : str | None¶
- Return type:¶
None
- class ActionFactoryInfo[source]¶
Bases:
Enum
-
Valid =
'Valid'
¶
-
NoMoreOperations =
'NoMoreOperations'
¶
-
NoOperation =
'NoOperation'
¶
-
Dummy =
'Dummy'
¶
-
Valid =
- class Action[source]¶
Bases:
object
Action(transitions: tuple[jobshoplab.types.action_types.ComponentTransition, …], action_factory_info: jobshoplab.types.action_types.ActionFactoryInfo, time_machine: Callable)
- transitions : tuple[ComponentTransition, ...]¶
- action_factory_info : ActionFactoryInfo¶
- __init__(transitions, action_factory_info, time_machine)¶
- Parameters:¶
- transitions : tuple[ComponentTransition, ...]¶
- action_factory_info : ActionFactoryInfo¶
- time_machine : Callable¶
- Return type:¶
None
jobshoplab.types.instance_config_types module¶
- class TransportTypeConfig[source]¶
Bases:
Enum
Enumeration for transport type configuration.
-
AGV =
'agv'
¶
-
CONVEYOR =
'conveyor'
¶
-
TELEPORTER =
'teleporter'
¶
-
AGV =
- class BufferTypeConfig[source]¶
Bases:
Enum
Enumeration for buffer type configuration.
-
FIFO =
'fifo'
¶
-
LIFO =
'lifo'
¶
-
DUMMY =
'dummy'
¶
-
FLEX_BUFFER =
'flex_buffer'
¶
-
FIFO =
- class ProblemInstanceTypeConfig[source]¶
Bases:
Enum
Enum class representing the problem instance types for job shop, flow shop, and open shop.
-
JOB_SHOP =
'job_shop'
¶
-
FLOW_SHOP =
'flow_shop'
¶
-
OPEN_SHOP =
'open_shop'
¶
-
JOB_SHOP =
- class ConsumptionConfig[source]¶
Bases:
object
Data class representing the configuration for consumption.
- class DeterministicTimeConfig[source]¶
Bases:
object
Data class representing the configuration for deterministic time.
- class OutageTypeConfig[source]¶
Bases:
Enum
Enumeration for outage configuration types. .. attribute:: FAIL
The fail type.
- type:
str
-
FAIL =
'fail'
¶
-
MAINTENANCE =
'maintenance'
¶
-
RECHARGE =
'recharge'
¶
- class OutageConfig[source]¶
Bases:
object
Data class representing an outage.
- frequency¶
The frequency of the outage.
- Type:¶
DeterministicTimeConfig | StochasticFrequency
- duration¶
The duration of the outage.
- frequency : DeterministicTimeConfig | StochasticTimeConfig¶
- duration : DeterministicTimeConfig | StochasticTimeConfig¶
- type : OutageTypeConfig¶
- __init__(id, frequency, duration, type)¶
- Parameters:¶
- id : str¶
- frequency : DeterministicTimeConfig | StochasticTimeConfig¶
- duration : DeterministicTimeConfig | StochasticTimeConfig¶
- type : OutageTypeConfig¶
- Return type:¶
None
- class BufferConfig[source]¶
Bases:
object
Data class representing the configuration for a buffer.
- type : BufferTypeConfig¶
- class TransportConfig[source]¶
Bases:
object
Data class representing the configuration for a transport.
- type : TransportTypeConfig¶
- outages : tuple[OutageConfig, ...]¶
- buffer : BufferConfig¶
- class MachineConfig[source]¶
Bases:
object
Data class representing the configuration for a machine.
- setup_times¶
The setup times for different product pairs.
- Type:¶
dict[tuple[Product, Product], DeterministicTimeConfig | StochasticTimeConfig]
- outages : tuple[OutageConfig, ...]¶
- setup_times : Mapping[tuple[str, str], DeterministicTimeConfig | StochasticTimeConfig]¶
- prebuffer : BufferConfig¶
- postbuffer : BufferConfig¶
- buffer : BufferConfig¶
-
__init__(id, outages, setup_times, prebuffer, postbuffer, batches, resources, buffer, description=
None
)¶ - Parameters:¶
- id : str¶
- outages : tuple[OutageConfig, ...]¶
- setup_times : Mapping[tuple[str, str], DeterministicTimeConfig | StochasticTimeConfig]¶
- prebuffer : BufferConfig¶
- postbuffer : BufferConfig¶
- batches : int¶
- resources : tuple[Literal['EnergyConsumption', 'Waste', 'C02Emission', 'FinancialCost'], ...]¶
- buffer : BufferConfig¶
- description : str | None¶
- Return type:¶
None
- class TwinMachineConfig[source]¶
Bases:
object
Data class representing the configuration for twin machines.
- machines : tuple[MachineConfig, ...]¶
- class OperationConfig[source]¶
Bases:
object
Data class representing the configuration for an operation.
- duration¶
The duration configuration for the operation.
- duration : DeterministicTimeConfig | StochasticTimeConfig¶
- class JobConfig[source]¶
Bases:
object
Data class representing the configuration for a job.
- operations : tuple[OperationConfig, ...]¶
- class ProblemInstanceConfig[source]¶
Bases:
object
Data class representing the configuration for a problem instance.
- type¶
The type of the problem instance.
- type : ProblemInstanceTypeConfig¶
- __init__(type, specification)¶
- class LogisticsConfig[source]¶
Bases:
object
LogisticsConfig(capacity: int, travel_times: Mapping[tuple[str, str], jobshoplab.types.instance_config_types.DeterministicTimeConfig | jobshoplab.types.stochasticy_models.StochasticTimeConfig])
- travel_times : Mapping[tuple[str, str], DeterministicTimeConfig | StochasticTimeConfig]¶
- __init__(capacity, travel_times)¶
- class InstanceConfig[source]¶
Bases:
object
Data class representing the configuration for an instance.
- instance : ProblemInstanceConfig¶
- logistics : LogisticsConfig¶
- machines : tuple[MachineConfig, ...]¶
- buffers : tuple[BufferConfig, ...]¶
- transports : tuple[TransportConfig, ...]¶
- __init__(description, instance, logistics, machines, buffers, transports)¶
- Parameters:¶
- description : str¶
- instance : ProblemInstanceConfig¶
- logistics : LogisticsConfig¶
- machines : tuple[MachineConfig, ...]¶
- buffers : tuple[BufferConfig, ...]¶
- transports : tuple[TransportConfig, ...]¶
- Return type:¶
None
jobshoplab.types.state_types module¶
- Action¶
alias of
ActionProtocol
- class OperationStateState[source]¶
Bases:
Enum
-
IDLE =
'Idle'
¶
-
PROCESSING =
'Processing'
¶
-
DONE =
'Done'
¶
-
TRANSPORT =
'Transport'
¶
-
IDLE =
- class OperationState[source]¶
Bases:
object
OperationState(id: str, start_time: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, end_time: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, machine_id: str, operation_state_state: jobshoplab.types.state_types.OperationStateState)
- operation_state_state : OperationStateState¶
- __init__(id, start_time, end_time, machine_id, operation_state_state)¶
- class JobState[source]¶
Bases:
object
JobState(id: str, operations: tuple[jobshoplab.types.state_types.OperationState, …], location: str)
- operations : tuple[OperationState, ...]¶
- class BufferState[source]¶
Bases:
object
BufferState(id: str, state: jobshoplab.types.state_types.BufferStateState, store: tuple[str, …])
- state : BufferStateState¶
- class MachineStateState[source]¶
Bases:
Enum
-
IDLE =
'Idle'
¶
-
SETUP =
'Setup'
¶
-
WORKING =
'Working'
¶
-
OUTAGE =
'Outage'
¶
-
IDLE =
- class TransportStateState[source]¶
Bases:
Enum
-
IDLE =
'Idle'
¶
-
WORKING =
'Working'
¶
-
PICKUP =
'Pickup'
¶
-
TRANSIT =
'Transit'
¶
-
OUTAGE =
'Outage'
¶
-
WAITINGPICKUP =
'WaitingPickup'
¶
-
IDLE =
- class OutageActive[source]¶
Bases:
object
OutageActive(start_time: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, end_time: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime)
- class OutageInactive[source]¶
Bases:
object
OutageInactive(last_time_active: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime)
- class OutageState[source]¶
Bases:
object
OutageState(id: str, active: jobshoplab.types.state_types.OutageActive | jobshoplab.types.state_types.OutageInactive)
- active : OutageActive | OutageInactive¶
- __init__(id, active)¶
- Parameters:¶
- id : str¶
- active : OutageActive | OutageInactive¶
- Return type:¶
None
- class MachineState[source]¶
Bases:
object
MachineState(id: str, buffer: jobshoplab.types.state_types.BufferState, occupied_till: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, prebuffer: jobshoplab.types.state_types.BufferState, postbuffer: jobshoplab.types.state_types.BufferState, state: jobshoplab.types.state_types.MachineStateState, mounted_tool: str, outages: tuple[jobshoplab.types.state_types.OutageState, …], resources: tuple[typing.Union[jobshoplab.types.state_types.EnergyConsumptionType, jobshoplab.types.state_types.WasteType, jobshoplab.types.state_types.C02EmissionType, jobshoplab.types.state_types.FinancialCostType], …])
- buffer : BufferState¶
- prebuffer : BufferState¶
- postbuffer : BufferState¶
- state : MachineStateState¶
- outages : tuple[OutageState, ...]¶
- resources : tuple[EnergyConsumptionType | WasteType | C02EmissionType | FinancialCostType, ...]¶
- __init__(id, buffer, occupied_till, prebuffer, postbuffer, state, mounted_tool, outages, resources)¶
- Parameters:¶
- id : str¶
- buffer : BufferState¶
- occupied_till : Time | NoTime¶
- prebuffer : BufferState¶
- postbuffer : BufferState¶
- state : MachineStateState¶
- mounted_tool : str¶
- outages : tuple[OutageState, ...]¶
- resources : tuple[EnergyConsumptionType | WasteType | C02EmissionType | FinancialCostType, ...]¶
- Return type:¶
None
- class TransportLocation[source]¶
Bases:
object
TransportLocation(progress: float, location: str | tuple[str, str, str])
- class TransportState[source]¶
Bases:
object
TransportState(state: jobshoplab.types.state_types.TransportStateState, id: str, occupied_till: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, buffer: jobshoplab.types.state_types.BufferState, location: jobshoplab.types.state_types.TransportLocation, outages: tuple[jobshoplab.types.state_types.OutageState, …], transport_job: str | None)
- state : TransportStateState¶
- buffer : BufferState¶
- location : TransportLocation¶
- outages : tuple[OutageState, ...]¶
- __init__(state, id, occupied_till, buffer, location, outages, transport_job)¶
- Parameters:¶
- state : TransportStateState¶
- id : str¶
- occupied_till : Time | NoTime¶
- buffer : BufferState¶
- location : TransportLocation¶
- outages : tuple[OutageState, ...]¶
- transport_job : str | None¶
- Return type:¶
None
- class State[source]¶
Bases:
object
State(jobs: tuple[jobshoplab.types.state_types.JobState, …], time: jobshoplab.types.state_types.Time | jobshoplab.types.state_types.NoTime, machines: tuple[jobshoplab.types.state_types.MachineState, …], transports: tuple[jobshoplab.types.state_types.TransportState, …], buffers: tuple[jobshoplab.types.state_types.BufferState, …])
- machines : tuple[MachineState, ...]¶
- transports : tuple[TransportState, ...]¶
- buffers : tuple[BufferState, ...]¶
- class StateMachineResult[source]¶
Bases:
object
StateMachineResult(state: jobshoplab.types.state_types.State, sub_states: tuple[jobshoplab.types.state_types.State, …], action: jobshoplab.types.state_types.ActionProtocol, success: bool, message: str, possible_transitions: tuple[~ComponentTransition, …])
- action : ActionProtocol¶