MTCT
Design Automation and Optimization for ETCS Railway Networks
Loading...
Searching...
No Matches
cda_rail::simulator::SimulatorState Struct Reference

Everything a simulation run needs beyond the instance itself. More...

#include <GeneralSimulator.hpp>

Public Member Functions

bool operator== (const SimulatorState &other) const
 Compares two simulator states for equality.
bool operator> (const SimulatorState &other) const
 Provides a strict ordering between simulator states.

Public Attributes

std::vector< cda_rail::index_vector > train_edges
std::vector< cda_rail::index_vector > ttd_orders
std::vector< cda_rail::index_vector > vertex_orders
std::vector< std::vector< double > > stop_positions

Detailed Description

Everything a simulation run needs beyond the instance itself.

These are the decisions a solver makes, namely which edges every train uses, in which order the trains pass the TTD sections and the vertices, and where on its route every train serves its stops. A state is compared and hashed as a whole, since a search algorithm has to recognize states it has seen before.

Member Function Documentation

◆ operator==()

bool cda_rail::simulator::SimulatorState::operator== ( const SimulatorState & other) const

Compares two simulator states for equality.

Parameters
otherState to compare against.
Returns
true if all state components match, otherwise false.

◆ operator>()

bool cda_rail::simulator::SimulatorState::operator> ( const SimulatorState & other) const

Provides a strict ordering between simulator states.

Parameters
otherState to compare against.
Returns
true if this state is ordered after other.

Member Data Documentation

◆ stop_positions

std::vector<std::vector<double> > cda_rail::simulator::SimulatorState::stop_positions

◆ train_edges

std::vector<cda_rail::index_vector> cda_rail::simulator::SimulatorState::train_edges

◆ ttd_orders

std::vector<cda_rail::index_vector> cda_rail::simulator::SimulatorState::ttd_orders

◆ vertex_orders

std::vector<cda_rail::index_vector> cda_rail::simulator::SimulatorState::vertex_orders

The documentation for this struct was generated from the following files: