simulation.src.simulation_evaluation.src.state_machine.states package¶
Submodules¶
simulation.src.simulation_evaluation.src.state_machine.states.lane module¶
States used in the LaneStateMachine.
Classes:
This end state occurs when the car crashed into an obstacle. |
|
This end state occurs when the car drives onto a blocked area. |
|
This end state occurs when the car drives of the road. |
|
|
State that recognizes off road/collision failures. |
|
The car drives in the right lane. |
The car parks on the right side. |
|
|
The car drives in the left lane. |
The car parks on the left side. |
- class FailureCollision[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car crashed into an obstacle.
Once the state machine receives this state, the state can no longer change into a new one.
- class FailureBlockedArea[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car drives onto a blocked area.
- class FailureOffRoad[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car drives of the road.
Once the state machine receives this state, the state can no longer change into a new one.
- class LaneState(description: str, value: int)[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
State that recognizes off road/collision failures.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next failure state or defaults to self if no failure state was detected.
- class Right[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.lane.LaneState
The car drives in the right lane.
Methods:
next
(state_machine, input_msg)Return new state.
- next(state_machine, input_msg: int) → simulation.src.simulation_evaluation.src.state_machine.states.state.State[source]¶
Return new state.
- class ParkingRight[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.lane.LaneState
The car parks on the right side.
Methods:
next
(state_machine, input_msg)Return new state.
- class Left[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.lane.LaneState
The car drives in the left lane.
Methods:
next
(state_machine, input_msg)Return new state.
simulation.src.simulation_evaluation.src.state_machine.states.overtaking module¶
States used in the OvertakingStateMachine.
Classes:
|
|
|
This state is the default state. |
|
This state occurs when the car drives into the overtaking zone and is on the right line. |
|
This state occurs when the car is in the overtaking zone and in the left line. |
- class OvertakingState(description: str, value: int)[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
Methods:
next
(state_machine, input_msg)Return updated state.
- class Off[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState
This state is the default state.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class Right[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState
This state occurs when the car drives into the overtaking zone and is on the right line.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- class Left[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState
This state occurs when the car is in the overtaking zone and in the left line.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
simulation.src.simulation_evaluation.src.state_machine.states.parking module¶
States used in the ParkingStateMachine.
Classes:
|
|
|
This state is the default state. |
This state occurs when the car drives into the parking zone. |
|
This state occurs when the car starts an attempt to park in. |
|
|
This state occurs when the car drives a parking space. |
This state occurs when the car successfully parks inside a parking space. |
|
This state occurs when the car drives out of the parking space. |
|
This end state occurs when the car drives onto the right lane. |
|
This end state occurs when the car drives onto the left lane. |
- class ParkingState(description: str, value: int)[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
Methods:
next
(state_machine, input_msg)Return updated state.
- class Off[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state is the default state.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class InParkingZone[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state occurs when the car drives into the parking zone.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class ParkingAttempt[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state occurs when the car starts an attempt to park in.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class Parking[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state occurs when the car drives a parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class SuccessfullyParked[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state occurs when the car successfully parks inside a parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class ParkingOut[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingState
This state occurs when the car drives out of the parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class FailureInRightLane[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car drives onto the right lane.
Once the state machine receives this state, the state can no longer change into a new one.
- class FailureInLeftLane[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car drives onto the left lane.
Once the state machine receives this state, the state can no longer change into a new one.
simulation.src.simulation_evaluation.src.state_machine.states.priority module¶
States used in the PriorityStateMachine.
Classes:
|
This state is the default state. |
This state occurs when the car drives inside a halt zone. |
|
This state occurs when the car drives into a stop zone. |
|
This state occurs when the car stops in the stop zone. |
|
This end state occurs when the car does not stop inside the stop zone. |
- class Off[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state is the default state.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class InHaltZone[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state occurs when the car drives inside a halt zone.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class InStopZone[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state occurs when the car drives into a stop zone.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class SuccessfullyStopped[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state occurs when the car stops in the stop zone.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class FailureInStopZone[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This end state occurs when the car does not stop inside the stop zone.
Once the state machine receives this state, the state can no longer change into a new one.
simulation.src.simulation_evaluation.src.state_machine.states.progress module¶
States used in the ProgressStateMachine.
Classes:
This state is the default state. |
|
|
This state occurs when the drive has started. |
|
This state occurs when the drive has finished. |
- class BeforeStart[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state is the default state.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class Running[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state occurs when the drive has started.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
- class Finished[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
This state occurs when the drive has finished.
Once the state machine receives this state, the state can no longer change into a new one.
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
simulation.src.simulation_evaluation.src.state_machine.states.speed module¶
Classes:
|
|
- class SpeedLimitIgnored[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
- class SpeedLimit(limit)[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
self (–> state can no longer change)
- class SpeedNoLimit[source]¶
Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
Methods:
next
(state_machine, input_msg)Next state.
- next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶
Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
self (–> state can no longer change)
simulation.src.simulation_evaluation.src.state_machine.states.state module¶
Base class State.
Classes:
|
Base class State used for StateMachine. |