Function ltn::filters::auto::brute_force [−][src]
fn brute_force(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
timer: &mut Timer<'_>
)
diff --git a/rustdoc/ltn/filters/auto/enum.Heuristic.html b/rustdoc/ltn/filters/auto/enum.Heuristic.html index e692f620fb..5375528cd8 100644 --- a/rustdoc/ltn/filters/auto/enum.Heuristic.html +++ b/rustdoc/ltn/filters/auto/enum.Heuristic.html @@ -14,7 +14,7 @@ step by the least resulting rat runs.
SplitCells
Find one filter that splits a cell, maximizing the number of streets in each new cell.
OnlyOneBorder
Per cell, close all borders except for one. This doesn’t affect connectivity, but prevents all rat-runs.
-Returns a copy of the value. Read more
+This method tests for self
and other
values to be equal, and is used
diff --git a/rustdoc/ltn/filters/auto/fn.brute_force.html b/rustdoc/ltn/filters/auto/fn.brute_force.html
index df89a8e855..27ba67a322 100644
--- a/rustdoc/ltn/filters/auto/fn.brute_force.html
+++ b/rustdoc/ltn/filters/auto/fn.brute_force.html
@@ -1,4 +1,4 @@
fn brute_force(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
timer: &mut Timer<'_>
)
fn brute_force(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
timer: &mut Timer<'_>
)
fn only_one_border(app: &mut SimpleApp<Session>, neighborhood: &Neighborhood)
fn only_one_border(app: &mut SimpleApp<Session>, neighborhood: &Neighborhood)
fn split_cells(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
timer: &mut Timer<'_>
)
fn split_cells(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
timer: &mut Timer<'_>
)
fn try_to_filter_road(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
r: RoadID
) -> Option<Neighborhood>
fn try_to_filter_road(
ctx: &EventCtx<'_>,
app: &mut SimpleApp<Session>,
neighborhood: &Neighborhood,
r: RoadID
) -> Option<Neighborhood>
Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs.
+pub const BUILT_TIME_UTC: &str = r"Sat, 19 Mar 2022 15:41:46 +0000";
The build time in RFC2822, UTC.
+pub const BUILT_TIME_UTC: &str = r"Sat, 19 Mar 2022 15:47:30 +0000";
The build time in RFC2822, UTC.
//! Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs.
use anyhow::Result;
@@ -258,10 +264,16 @@
impl Heuristic {
pub fn choices() -> Vec<Choice<Heuristic>> {
vec![
- Choice::new("greedy", Heuristic::Greedy),
- Choice::new("brute-force", Heuristic::BruteForce),
- Choice::new("split cells", Heuristic::SplitCells),
- Choice::new("only one border", Heuristic::OnlyOneBorder),
+ Choice::new(
+ "filter the road with the most rat-runs (greedy)",
+ Heuristic::Greedy,
+ ),
+ Choice::new(
+ "stop the most rat-runs (brute-force)",
+ Heuristic::BruteForce,
+ ),
+ Choice::new("split large cells", Heuristic::SplitCells),
+ Choice::new("only one entrance per cell", Heuristic::OnlyOneBorder),
]
}
diff --git a/rustdoc/src/ltn/lib.rs.html b/rustdoc/src/ltn/lib.rs.html
index 74c89dc13e..5282b30f46 100644
--- a/rustdoc/src/ltn/lib.rs.html
+++ b/rustdoc/src/ltn/lib.rs.html
@@ -270,7 +270,7 @@
highlight_boundary_roads: false,
draw_neighborhood_style: browse::Style::SimpleColoring,
draw_cells_as_areas: true,
- heuristic: filters::auto::Heuristic::OnlyOneBorder,
+ heuristic: filters::auto::Heuristic::SplitCells,
main_road_penalty: 1.0,
current_trip_name: None,
diff --git a/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-49fc0ec202264eb2/out/built.rs.html b/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-49fc0ec202264eb2/out/built.rs.html
index cbfde568c6..2e5502b1da 100644
--- a/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-49fc0ec202264eb2/out/built.rs.html
+++ b/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-49fc0ec202264eb2/out/built.rs.html
@@ -176,7 +176,7 @@
pub const RUSTDOC_VERSION: &str = r"rustdoc 1.59.0 (9d1b2106e 2022-02-23)";
#[doc=r#"The build time in RFC2822, UTC."#]
#[allow(dead_code)]
-pub const BUILT_TIME_UTC: &str = r"Sat, 19 Mar 2022 15:41:46 +0000";
+pub const BUILT_TIME_UTC: &str = r"Sat, 19 Mar 2022 15:47:30 +0000";
#[doc=r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#]
#[allow(dead_code)]
pub const CFG_TARGET_ARCH: &str = r"x86_64";