|
| | SolVSSGeneralPerformanceOptimizationInstance (const GeneralPerformanceOptimizationInstance &instance) |
| | Constructs a solution instance with VSS support from a performance optimization instance.
|
| | SolVSSGeneralPerformanceOptimizationInstance (const GeneralPerformanceOptimizationInstance &instance, SolutionStatus status, double obj, bool has_sol) |
| void | add_vss_pos (cda_rail::Network::EdgeInput const &edge_input, double pos, bool reverse_edge=true) |
| void | set_vss_pos (cda_rail::Network::EdgeInput const &edge_input, std::vector< double > pos) |
| void | reset_vss_pos (cda_rail::Network::EdgeInput const &edge_input) |
| std::vector< double > | get_vss_pos (cda_rail::Network::EdgeInput const &edge_input) const |
| std::vector< double > | get_valid_border_stops (const std::string &train_name) const |
| void | export_solution (const std::filesystem::path &working_directory, std::string_view solution_subdirectory, bool export_instance, std::optional< std::string > const ¶meter_identifier) const override |
| | Exports the solution, optionally including the instance data.
|
| bool | check_consistency () const override |
| | Checks whether the stored performance-optimization solution is consistent.
|
| void | load_solution (const std::filesystem::path &working_directory, std::string_view solution_subdirectory, std::optional< std::string > const ¶meter_identifier) override |
| void | export_solution (const std::filesystem::path &working_directory, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier) const override |
| | Exports the solution without saving the instance.
|
| void | export_solution (const std::filesystem::path &working_directory, std::string_view const solutionSubdirectory) const override |
| | Exports the solution without saving the problem instance.
|
| void | load_solution (const std::filesystem::path &working_directory, std::string_view const solutionSubdirectory) override |
| | Loads a solution from the specified working directory and solution subdirectory.
|
| | SolGeneralPerformanceOptimizationInstance (const GeneralPerformanceOptimizationInstance &instance) |
| | Initializes a solution object for a performance optimization problem instance.
|
| | SolGeneralPerformanceOptimizationInstance (const GeneralPerformanceOptimizationInstance &instance, SolutionStatus status, double obj, bool has_sol) |
| | Constructs a solution instance with metadata for the given optimization problem.
|
| | SolGeneralPerformanceOptimizationInstance (SolGeneralPerformanceOptimizationInstance const &)=default |
| | Constructs a copy of an existing solution instance.
|
| SolGeneralPerformanceOptimizationInstance & | operator= (SolGeneralPerformanceOptimizationInstance const &)=default |
| | SolGeneralPerformanceOptimizationInstance (SolGeneralPerformanceOptimizationInstance &&) noexcept=default |
| SolGeneralPerformanceOptimizationInstance & | operator= (SolGeneralPerformanceOptimizationInstance &&) noexcept=default |
| | ~SolGeneralPerformanceOptimizationInstance () override=default |
| | Virtual destructor.
|
| GeneralPerformanceOptimizationInstance const * | get_instance () const override |
| | Retrieves the underlying problem instance.
|
| double | get_train_pos (const std::string &tr_name, double t) const |
| | Returns the stored position of a train at a given time.
|
| EdgeTimeBound | get_edge_and_time_bounds (const std::string &tr_name, double t) const |
| | Returns the containing edge and surrounding time bounds.
|
| PosVelBound | get_exact_pos_and_vel_bounds (const std::string &tr_name, double t) const |
| | Returns exact lower and upper bounds on position and velocity.
|
| std::optional< PosVel > | get_approximate_train_pos_and_vel (const std::string &tr_name, double t) const |
| | Returns an approximate position/velocity pair if available.
|
| double | get_train_speed (const std::string &tr_name, double t) const |
| | Returns the stored train speed at a given time.
|
| std::vector< double > | get_train_times (const std::string &tr_name) const |
| | Returns all recorded times for one train.
|
| cda_rail::index_vector | get_train_order (size_t edge_index) const |
| | Returns train order on a given edge.
|
| std::vector< TrainDirection > | get_train_order_with_reverse (size_t edge_index) const |
| | Returns train order on a given edge together with orientation.
|
| double | get_time_at_pos (const std::string &tr_name, double pos, bool ub=false) const |
| | Returns the time at which a train reaches a route position.
|
| double | get_exit_time (const std::string &tr_name) const |
| | Returns the stored exit time of a train.
|
| std::vector< double > | get_stop_times (const std::string &tr_name) const |
| | Returns all stored stop times of a train.
|
| double | get_stop_time (const std::string &tr_name, const std::string &station_name) const |
| | Returns one stored stop time identified by station name.
|
| double | get_stop_time (const std::string &tr_name, size_t stop_index) const |
| | Returns one stored stop time identified by stop index.
|
| void | add_train_pos (const std::string &tr_name, double t, double pos) |
| | Stores a train position sample.
|
| void | add_train_speed (const std::string &tr_name, double t, double speed) |
| | Stores a train speed sample.
|
| void | set_train_exit_time (const std::string &tr_name, double t) |
| | Stores the exit time of a train.
|
| void | set_train_stop_time (const std::string &tr_name, size_t stop_idx, double stop_time) |
| | Stores one stop time identified by stop index.
|
| void | set_train_stop_time (const std::string &tr_name, std::string const &station_name, double stop_time) |
| | Stores one stop time identified by station name.
|
| void | set_train_stop_times (const std::string &tr_name, std::vector< double > stop_times) |
| | Replaces all stop times of one train.
|
| void | set_exit_times (const std::vector< double > &exit_times) |
| | Replaces all stored exit times.
|
| void | set_stop_times (const std::vector< std::vector< double > > &stop_times) |
| | Replaces all stored stop times.
|
| void | evaluate (double dt) |
| | Simulates the decisions of this solution greedily and stores the resulting delays, which are exported with the solution.
|
| const std::optional< SolutionEvaluation > & | get_evaluation () const |
| | Returns the result of the last evaluate(), if any.
|
| Public Member Functions inherited from cda_rail::instances::SolGeneralProblemInstanceWithScheduleAndRoutes |
| | SolGeneralProblemInstanceWithScheduleAndRoutes (GeneralProblemInstanceWithScheduleAndRoutes const &instance) |
| | Creates a solution wrapper from a problem instance.
|
| | SolGeneralProblemInstanceWithScheduleAndRoutes (GeneralProblemInstanceWithScheduleAndRoutes const &instance, SolutionStatus status, double obj, bool has_sol) |
| | Initializes a solution wrapper around a copy of the provided instance.
|
| | SolGeneralProblemInstanceWithScheduleAndRoutes (const SolGeneralProblemInstanceWithScheduleAndRoutes &)=default |
| SolGeneralProblemInstanceWithScheduleAndRoutes & | operator= (const SolGeneralProblemInstanceWithScheduleAndRoutes &)=default |
| | SolGeneralProblemInstanceWithScheduleAndRoutes (SolGeneralProblemInstanceWithScheduleAndRoutes &&) noexcept=default |
| SolGeneralProblemInstanceWithScheduleAndRoutes & | operator= (SolGeneralProblemInstanceWithScheduleAndRoutes &&) noexcept=default |
| | ~SolGeneralProblemInstanceWithScheduleAndRoutes () override=default |
| GeneralProblemInstanceWithScheduleAndRoutes const * | get_instance () const override |
| | Accesses the underlying schedule-and-routes problem instance.
|
| RouteMap const & | get_const_solution_routes () const |
| | Retrieves the solution routes.
|
| double | route_length (const std::string &train_name) const |
| | Computes the total length of a train's solution route.
|
| void | reset_routes () |
| | Resets solution routes to the instance's fixed routes.
|
| void | add_empty_route (const std::string &train_name) |
| | Adds an empty solution 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 solution route.
|
| void | push_front_edge_to_route (const std::string &train_name, Network::EdgeInput const &edge_input) |
| | Adds an edge to the front of the solution route for a train.
|
| void | remove_first_edge_from_route (const std::string &train_name) |
| | Removes the first edge from a train's route in the solution.
|
| void | remove_last_edge_from_route (const std::string &train_name) |
| | Removes the last edge from a train's route in the solution.
|
| 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 solution route.
|
| void | export_solution (const std::string &path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) const |
| | Exports the solution to the specified directory.
|
| void | export_solution (const char *path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) const |
| | Exports the solution to the specified directory and subdirectory.
|
| void | load_solution (const std::string &path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) |
| | Loads a solution from the specified path.
|
| void | load_solution (const char *path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) |
| | Loads a solution from the specified location.
|
| std::filesystem::path | get_export_path (const std::filesystem::path &working_directory, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier) const |
| | Computes the file path for exporting a solution.
|
| SolutionStatus | get_status () const |
| | Retrieves the current solution status.
|
| double | get_obj () const |
| | Gets the objective value of the solution.
|
| double | get_lower_bound () const |
| | Gets the lower bound on the objective value of the solution.
|
| bool | has_solution () const |
| | Indicates whether a solution has been found.
|
| void | set_status (SolutionStatus new_status) |
| | Sets the solution status.
|
| void | set_obj (double new_obj) |
| | Sets the objective value of the solution.
|
| void | set_lower_bound (double new_lb) |
| | Sets the lower bound of the objective value of the solution.
|
| void | set_solution_found () |
| | Marks the solution as found.
|
| void | set_solution_not_found () |
| | Marks that no solution has been found.
|
| void | load_solution (const std::string &path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) |
| | Loads a solution from the specified path.
|
| void | load_solution (const char *path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) |
| | Loads a solution from the specified location.
|
| void | export_solution (const std::string &path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) const |
| | Exports the solution to the specified directory.
|
| void | export_solution (const char *path, std::string_view const solutionSubdirectory, std::optional< std::string > const ¶meter_identifier={}) const |
| | Exports the solution to the specified directory and subdirectory.
|
| virtual | ~SolGeneralProblemInstance ()=default |
| | Virtual destructor.
|
| | SolGeneralProblemInstance (SolGeneralProblemInstance const &)=default |
| SolGeneralProblemInstance & | operator= (SolGeneralProblemInstance const &)=default |
| | SolGeneralProblemInstance (SolGeneralProblemInstance &&) noexcept=default |
| SolGeneralProblemInstance & | operator= (SolGeneralProblemInstance &&) noexcept=default |
The same solution, together with the VSS borders it needs.
This is what the VSS generation solvers return: in addition to the trajectories, the positions of the VSS borders are stored per edge, measured from the source vertex of that edge.