|
| | GeneralPerformanceOptimizationInstance ()=default |
| | Constructs an instance with default values.
|
| | GeneralPerformanceOptimizationInstance (Network network) |
| | Constructs an instance from a network.
|
| | GeneralPerformanceOptimizationInstance (Network network, Timetable timetable, RouteMap routes) |
| | Constructs an instance with a network, timetable, and routes.
|
| | GeneralPerformanceOptimizationInstance (std::string_view instance_name, std::string_view instance_subdirectory, std::filesystem::path const &working_directory) |
| double | get_objective_val (const std::vector< double > &tr_exit_times, const std::vector< std::vector< double > > &stop_times, bool throw_error_if_not_all_stops_specified=true) const |
| | Evaluates the objective for explicit exit and stop times.
|
| std::vector< std::vector< double > > | service_start_times (const std::vector< std::vector< double > > &arrival_times) const |
| | The stop times of a solution, given the times at which the trains reach their stops, e.g., in a simulation.
|
| double | sum_of_weighted_exit_times () const |
| | Calculates the weighted sum of all (earliest) exit times.
|
| double | sum_of_train_weights () const |
| MinimumRunningTimes | minimum_running_times (size_t tr, const cda_rail::index_set &start_edges, bool include_first_edge, double start_time, size_t first_stop, bool consider_earliest_departures) const |
| | Earliest times at which train tr can serve its remaining stops and reach its exit vertex.
|
| | GeneralPerformanceOptimizationInstance (std::string_view const instanceName, std::string_view const instanceSubdirectory, std::string const &working_directory) |
| | Constructs an instance from a named subdirectory.
|
| | GeneralPerformanceOptimizationInstance (std::string_view const instanceName, std::string_view const instanceSubdirectory, char const *const workingDirectory) |
| | Constructs an instance by loading from a specified directory structure.
|
| const auto & | get_train_weights () const |
| | Accesses the per-train weights.
|
| double | get_station_delay_weight () const |
| | Gets the station delay weight.
|
| double | get_train_weight (size_t train_index) const |
| | Retrieves the weight assigned to a specific train.
|
| double | get_train_weight (const std::string &train_name) const |
| | Retrieves the weight of a train by name.
|
| double | get_train_weight (const char *train_name) const |
| | Returns the weight of a train by its name.
|
| void | set_station_delay_weight (double new_weight) |
| | Sets the station-delay weight.
|
| void | set_train_weight (size_t train_index, double weight) |
| | Assigns a weight to a specific train.
|
| void | set_train_weight (const std::string &train_name, double weight) |
| | Sets the weight for a train by its name.
|
| void | set_train_weight (const char *train_name, double weight) |
| | Sets the weight for a train by name.
|
| size_t | add_train (std::string const &train_name, double length, double max_speed, double acceleration, double deceleration, bool tim, double entry_time, double initial_velocity, Network::VertexInput const &entry_vertex, double exit_time, double exit_velocity, Network::VertexInput const &exit_vertex, double tr_weight=1) |
| | Adds a train with an associated weight to the instance.
|
| size_t | add_train (std::string const &train_name, double length, double max_speed, double acceleration, double deceleration, double entry_time, double initial_velocity, Network::VertexInput const &entry_vertex, double exit_time, double exit_velocity, Network::VertexInput const &exit_vertex, double tr_weight=1) |
| | Adds a train to the instance with specified characteristics and weight.
|
| void | export_instance (const std::filesystem::path &working_directory, bool save_network) const override |
| | Exports the instance and optionally its network.
|
| void | discretize_stops () |
| | Discretizes stop edges used by the instance timetable.
|
| bool | check_consistency () const override |
| | Checks if the instance is consistent.
|
| bool | check_consistency (bool every_train_must_have_route) const override |
| | Checks instance consistency under the chosen route-completeness rule.
|
| double | get_approximate_leaving_time (size_t train) const |
| | Returns an approximate leaving time for a train.
|
| double | get_maximal_leaving_time (size_t train, double v) const |
| | Returns a maximal leaving time under a speed bound.
|
| double | get_minimal_leaving_time (size_t train, double v) const |
| | Returns a minimal leaving time under a speed bound.
|
| double | get_approximate_leaving_time (const std::string &tr_name) const |
| | Gets the approximate leaving time for a train by name.
|
| double | get_maximal_leaving_time (const std::string &tr_name, double v) const |
| | Determines the maximum departure time for a train at a specified velocity.
|
| double | get_minimal_leaving_time (const std::string &tr_name, double v) const |
| | Gets the minimal leaving time for a train.
|
| std::pair< size_t, size_t > | time_index_interval (size_t train_index, double dt, bool tn_inclusive=true) const |
| std::pair< size_t, size_t > | time_index_interval (const std::string &train_name, double dt, bool tn_inclusive=true) const |
| cda_rail::index_set | trains_at_t (double t) const |
| cda_rail::index_set | trains_at_t (double t, const cda_rail::index_set &trains_to_consider) const |
| void | discretize (const vss::SeparationFunction &sep_func=vss::UNIFORM) |
| std::vector< std::pair< size_t, cda_rail::index_vector > > | separate_edges_at_vss (const std::vector< std::vector< double > > &vss_positions) |
| | Splits the edges at the given VSS borders, see Network::separate_edges_at_vss, and updates timetable and routes accordingly.
|
| void | export_instance (std::filesystem::path const &working_directory) const override |
| | Exports the instance to the specified working directory without saving the network.
|
| Public Member Functions inherited from cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes |
| | GeneralProblemInstanceWithScheduleAndRoutes (const GeneralProblemInstanceWithScheduleAndRoutes &)=default |
| GeneralProblemInstanceWithScheduleAndRoutes & | operator= (const GeneralProblemInstanceWithScheduleAndRoutes &)=default |
| | GeneralProblemInstanceWithScheduleAndRoutes (GeneralProblemInstanceWithScheduleAndRoutes &&) noexcept=default |
| | Move constructor.
|
| GeneralProblemInstanceWithScheduleAndRoutes & | operator= (GeneralProblemInstanceWithScheduleAndRoutes &&) noexcept=default |
| | ~GeneralProblemInstanceWithScheduleAndRoutes () override=default |
| bool | is_route_end_valid_stop_pos (size_t tr, const cda_rail::index_vector &edges, size_t next_stop_id) const |
| | Checks whether a route end is a valid stopping position.
|
| void | export_instance (std::filesystem::path const &working_directory) const override |
| | Exports the instance to the specified working directory without saving the network.
|
| const auto & | get_const_network () const |
| | Provides read-only access to the network.
|
| const auto & | get_const_timetable () const |
| | Accesses the timetable.
|
| const auto & | get_const_routes () const |
| | Provides read-only access to the routes.
|
| auto & | get_editable_network () |
| | Provides editable access to the underlying network.
|
| Train & | editable_train (size_t const index) |
| | Gets a train by its index in the schedule.
|
| Train & | editable_train (const std::string &name) |
| | Retrieves mutable access to a train by name.
|
| Schedule & | editable_schedule (size_t const index) |
| | Gets the schedule of a train by its index for editing.
|
| Schedule & | editable_schedule (const std::string &name) |
| | Retrieves mutable access to the schedule of a train by name.
|
| const StationList & | get_const_station_list () const |
| | Provides the list of all stations.
|
| const TrainList & | get_const_train_list () const |
| | Provides const access to the list of trains in the instance.
|
| const auto & | get_const_schedule (size_t index) const |
| | Retrieves the schedule for a train.
|
| const auto & | get_const_schedule (const std::string &train_name) const |
| | Retrieves the schedule for a specified train.
|
| bool | has_route_for_every_train () const |
| | Checks whether every train has an assigned route.
|
| double | route_length (const std::string &train_name) const |
| | Computes the total length of a train's route.
|
| std::vector< std::pair< size_t, std::vector< cda_rail::index_vector > > > | get_stop_tracks (size_t tr, const std::string &station_name, const cda_rail::index_set &edges_to_consider={}) const |
| | Retrieves the stop tracks for a train at a specified station.
|
| std::optional< double > | get_last_stop_position_on_route (size_t tr_id, const std::string &station_name) const |
| | Returns the last reachable stop position of a station on a route.
|
| std::vector< std::pair< size_t, std::vector< cda_rail::index_vector > > > | possible_stop_vertices (size_t tr, const std::string &station_name, const cda_rail::index_set &edges_to_consider={}) const |
| | Computes feasible stop-edge paths for a train at a station.
|
| std::vector< std::pair< size_t, std::vector< cda_rail::index_vector > > > | possible_stop_vertices (const std::string &train_name, const std::string &station_name, const cda_rail::index_set &edges_to_consider={}) const |
| | Finds possible vertices where a train can stop at a station.
|
| cda_rail::index_set | edges_used_by_train (const std::string &train_name, bool fixed_routes, bool error_if_no_route=true) const |
| | Returns the edges used by a train.
|
| cda_rail::index_set | edges_used_by_train (size_t train_id, bool fixed_routes, bool error_if_no_route=true) const |
| | Retrieves the edges used by a train identified by index.
|
| cda_rail::index_set | vertices_used_by_train (const std::string &tr_name, bool fixed_routes, bool error_if_no_route=true) const |
| | Returns the vertices used by a train.
|
| cda_rail::index_set | vertices_used_by_train (size_t tr_id, bool fixed_routes, bool error_if_no_route=true) const |
| | Retrieves all vertices used by a train identified by its index.
|
| cda_rail::index_set | sections_used_by_train (const std::string &tr_name, const std::vector< cda_rail::index_set > §ions, bool fixed_routes, bool error_if_no_route=true) const |
| | Returns the queried sections used by a train.
|
| cda_rail::index_set | sections_used_by_train (size_t tr_id, const std::vector< cda_rail::index_set > §ions, bool fixed_routes, bool error_if_no_route=true) const |
| | Retrieves sections used by a train specified by index.
|
| cda_rail::index_set | trains_in_section (const cda_rail::index_set §ion, bool fix_routes=true, bool error_if_no_route=true) const |
| | Returns the trains that use a section.
|
| cda_rail::index_set | trains_on_edge (size_t edge_id, bool fixed_routes, const cda_rail::index_set &trains_to_consider, bool error_if_not_route=true) const |
| | Identifies which trains use the specified edge.
|
| cda_rail::index_set | trains_on_edge (RouteMap const &route_map, size_t edge_id, bool fixed_routes, const cda_rail::index_set &trains_to_consider, bool error_if_not_route=true) const |
| | Identifies which trains from a subset use the specified edge.
|
| cda_rail::index_set | all_trains_on_edge (size_t edge_id, bool fixed_routes=true, bool error_if_not_route=true) const |
| | Returns the indices of all trains using a given edge.
|
| cda_rail::index_set | all_trains_on_edge (RouteMap const &route_map, size_t edge_id, bool fixed_routes=true, bool error_if_not_route=true) const |
| | Returns all trains whose routes use the specified edge.
|
| size_t | add_train (std::string const &train_name, double length, double max_speed, double acceleration, double deceleration, bool tim, double entry_time, double initial_velocity, Network::VertexInput const &entry_vertex, double exit_time, double exit_velocity, Network::VertexInput const &exit_vertex) |
| | Adds a train with the specified properties to the timetable.
|
| size_t | add_train (std::string const &train_name, double length, double max_speed, double acceleration, double deceleration, double entry_time, double initial_velocity, Network::VertexInput const &entry_vertex, double exit_time, double exit_velocity, Network::VertexInput const &exit_vertex) |
| | Adds a train to the timetable.
|
| void | add_empty_station (const std::string &name) |
| | Adds an empty station to the timetable.
|
| void | add_track_to_station (const std::string &name, Network::EdgeInput const &track) |
| | Adds a track to a station.
|
| void | insert_stop (size_t train_index, std::string const &station_name, double service_time, double service_duration) |
| | Inserts a stop into a train's schedule.
|
| void | insert_stop (std::string const &train_name, std::string const &station_name, double service_time, double service_duration) |
| | Inserts a stop for a train at a specified station.
|
| void | set_routes (RouteMap routes) |
| | Replaces all routes of the instance.
|
| void | add_empty_route (const std::string &train_name) |
| | Adds an empty route for a train.
|
| void | push_back_edge_to_route (const std::string &train_name, Network::EdgeInput const &edge_input) |
| | Appends an edge to the end of a train's route.
|
| void | push_front_edge_to_route (const std::string &train_name, Network::EdgeInput const &edge_input) |
| | Adds an edge to the front of a train's route.
|
| void | remove_first_edge_from_route (const std::string &train_name) |
| | Removes the first edge from a train's route.
|
| void | remove_last_edge_from_route (const std::string &train_name) |
| | Removes the last edge from a train's route.
|
| Route::EdgePosition | route_edge_pos (const std::string &train_name, Network::EdgeInput const &edge) const |
| | Determines the position of an edge on a train's route.
|
| Route::EdgePosition | route_edge_pos (const std::string &train_name, const cda_rail::index_vector &edges) const |
| | Determines the position of edges on a train's route.
|
| std::vector< ConflictPair > | get_parallel_overlaps (const std::string &train1, const std::string &train2) const |
| | Identifies parallel overlaps between two trains.
|
| std::vector< ConflictPair > | get_ttd_overlaps (const std::string &train1, const std::string &train2) const |
| | Identifies time-to-distance overlaps between two trains.
|
| std::vector< ConflictPair > | get_reverse_overlaps (const std::string &train1, const std::string &train2) const |
| | Identifies sections where two trains travel in opposite directions.
|
| std::vector< ConflictPair > | get_crossing_overlaps (const std::string &train1, const std::string &train2) const |
| | Identifies crossing conflicts between two trains' routes.
|
| bool | check_consistency () const override |
| | Checks that the instance is internally consistent, requiring all trains to have routes.
|
| FeasibilityCheck | is_obviously_infeasible (bool late_entry_allowed) const override |
| | Checks the instance for reasons that make it infeasible by itself.
|
| virtual void | export_instance (const std::string &working_directory) const |
| | Exports the instance to the specified working directory.
|
| virtual void | export_instance (char const *const workingDirectory) const |
| | Exports the instance to the specified working directory.
|
| virtual | ~GeneralProblemInstance ()=default |
| | Virtual destructor.
|
| | GeneralProblemInstance (const GeneralProblemInstance &)=default |
| | Copy constructor.
|
| GeneralProblemInstance & | operator= (const GeneralProblemInstance &)=default |
| | Copy assignment operator.
|
| | GeneralProblemInstance (GeneralProblemInstance &&) noexcept=default |
| | Move constructor.
|
| GeneralProblemInstance & | operator= (GeneralProblemInstance &&) noexcept=default |
| | Move assignment operator.
|
| const std::string & | get_instance_name () const |
| | Gets the instance name.
|
| const std::string & | get_instance_subdirectory () const |
| | Provides the instance subdirectory.
|
| void | set_instance_name (std::string_view const instanceName) |
| | Sets the instance name.
|
| void | set_instance_subdirectory (std::string_view const instanceSubdirectory) |
| | Sets the instance subdirectory.
|