Base class to represent an active entity in a manufacturing system,
such as machines, splits, or joints.
Parameters: |
-
id
(str )
–
-
node_setup_time
( int, or float , default:
0
)
–
Initial setup time for the node. Can be:
- int or float: Used as a constant delay.
-
in_edges
(list , default:
None
)
–
List of input edges connected to the node.
-
out_edges
(list , default:
None
)
–
List of output edges connected to the node.
|
Raises: |
-
TypeError
–
If the type of env or id is incorrect.
-
ValueError
–
If node_setup_time input is invalid.
|
get_delay(delay)
Returns value based on the type of parameter delay
provided.
Parameters: |
-
delay
(int, float, generator, or callable )
–
The delay time, which can be:
- int or float: Used as a constant delay.
- generator: A generator instance yielding delay values.
- callable: A function that returns a delay values.
|
Returns: |
-
–
Returns a constant delay if delay is an int or float, a value yielded if delay is a generator, or the value returned from a Callable function if delay is callable.
|
update_state(new_state, current_time)
Update node state and track the time spent in the previous state.
Parameters: |
-
new_state
(str )
–
The new state to transition to. Must be one of "SETUP_STATE", "GENERATING_STATE", "BLOCKED_STATE".
-
current_time
(float )
–
The current simulation time.
|