pub struct LuaTrainManagerRequestTrainPathParams {
pub goals: Vec<LuaAny>,
pub in_chain_signal_section: bool,
pub return_path: bool,
pub search_direction: LuaTrainManagerSearchDirection,
pub shortest_path: bool,
pub starts: Vec<RailEndStart>,
pub steps_limit: u32,
pub train: LuaTrain,
pub type: TrainPathRequestType,
}Expand description
Direct access to train pathfinder. Allows to search rail paths or querying which stops are accessible
Fields§
§goals: Vec<LuaAny>§in_chain_signal_section: boolDefaults to false. If set to true, pathfinder will not return a path that cannot have its start immediately reserved. A path that cannot have its start immediately reserved could cause a train to stop inside of an intersection.
return_path: boolOnly relevant if request type is "path". Returning a full path is expensive due to multiple LuaEntity created. In order for path to be returned, true must be provided here. Defaults to false in which case a path will not be provided.
search_direction: LuaTrainManagerSearchDirectionOnly relevant if starts was not provided in which case 2 starts (front and back) are deduced from the train. Selects which train ends should be considered as starts. Defaults to "any-direction-with-locomotives".
shortest_path: boolDefaults to false. If set to true, only length of rails is added to penalties causing search to look for shortest path (not smallest penalty)
starts: Vec<RailEndStart>Manually provided starting positions.
steps_limit: u32Maximum amount of steps pathfinder is allowed to perform.
train: LuaTrainMandatory if starts is not provided, optional otherwise. Selects a context for the pathfinder to decide which train to exclude from penalties and which signals are considered possible to reacquire. If starts is not provided, then it is also used to collect front and back ends for the search
type: TrainPathRequestTypeRequest type. Determines the return type of the method. Defaults to "path".
Trait Implementations§
Source§impl Clone for LuaTrainManagerRequestTrainPathParams
impl Clone for LuaTrainManagerRequestTrainPathParams
Source§fn clone(&self) -> LuaTrainManagerRequestTrainPathParams
fn clone(&self) -> LuaTrainManagerRequestTrainPathParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more