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:

FailureCollision()

This end state occurs when the car crashed into an obstacle.

FailureBlockedArea()

This end state occurs when the car drives onto a blocked area.

FailureOffRoad()

This end state occurs when the car drives of the road.

LaneState(description, value)

State that recognizes off road/collision failures.

Right()

The car drives in the right lane.

ParkingRight()

The car parks on the right side.

Left()

The car drives in the left lane.

ParkingLeft()

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.

next(state_machine, input_msg: int)[source]

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.

next(state_machine, input_msg: int)[source]

Return new state.

class ParkingLeft[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.lane.LaneState

The car parks on the left side.

Methods:

next(state_machine, input_msg)

Return new state.

next(state_machine, input_msg: int)[source]

Return new state.

simulation.src.simulation_evaluation.src.state_machine.states.overtaking module

States used in the OvertakingStateMachine.

Classes:

OvertakingState(description, value)

Off()

This state is the default state.

Right()

This state occurs when the car drives into the overtaking zone and is on the right line.

Left()

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.

next(state_machine, input_msg: int)[source]

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.

next(state_machine, 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 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:

ParkingState(description, value)

Off()

This state is the default state.

InParkingZone()

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

ParkingAttempt()

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

Parking()

This state occurs when the car drives a parking space.

SuccessfullyParked()

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

ParkingOut()

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

FailureInRightLane()

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

FailureInLeftLane()

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.

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.

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:

Off()

This state is the default state.

InHaltZone()

This state occurs when the car drives inside a halt zone.

InStopZone()

This state occurs when the car drives into a stop zone.

SuccessfullyStopped()

This state occurs when the car stops in the stop zone.

FailureInStopZone()

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:

BeforeStart()

This state is the default state.

Running()

This state occurs when the drive has started.

Finished()

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:

SpeedLimitIgnored()

SpeedLimit(limit)

SpeedNoLimit()

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:

State(description, value)

Base class State used for StateMachine.

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

Bases: object

Base class State used for StateMachine.

Methods:

next(state_machine, input_msg)

Next state.

next(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)

Module contents