simulation.src.simulation_evaluation.src.state_machine.states.parking module

States used in the ParkingStateMachine.

Summary

Classes:

FailureInLeftLane

This end state occurs when the car drives onto the left lane.

FailureInRightLane

This end state occurs when the car drives onto the right lane.

InParkingZone

This state occurs when the car drives into the parking zone.

Off

This state is the default state.

Parking

This state occurs when the car drives a parking space.

ParkingAttempt

This state occurs when the car starts an attempt to park in.

ParkingOut

This state occurs when the car drives out of the parking space.

ParkingState

SuccessfullyParked

This state occurs when the car successfully parks inside a parking space.

Reference

class ParkingState(description: str, value: int)[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.state.State

next(state_machine, input_msg: int)[source]

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.

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.

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.

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.

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.

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.

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.