mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-23 22:42:32 +03:00
deploy: b93850406f
This commit is contained in:
parent
9472bd070e
commit
366c7d1c5f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><script defer src="../../../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r"Wed, 02 Feb 2022 15:04:31 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r"Wed, 02 Feb 2022 16:35:40 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-search-index-js="../../../../search-index.js" data-search-js="../../../../search.js"></div>
|
||||
</body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../popdat/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate popdat</h2><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span>
|
||||
</span>
|
||||
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.CensusArea.html">CensusArea</a></li><li><a href="struct.CensusPerson.html">CensusPerson</a></li><li><a href="struct.Config.html">Config</a></li><li><a href="struct.Schedule.html">Schedule</a></li><li><a href="make_person/struct.PersonFactory.html">make_person::PersonFactory</a></li><li><a href="od/struct.DesireLine.html">od::DesireLine</a></li><li><a href="od/struct.NormalDistribution.html">od::NormalDistribution</a></li><li><a href="od/struct.Options.html">od::Options</a></li><li><a href="od/struct.Zone.html">od::Zone</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Activity.html">Activity</a></li><li><a href="enum.PersonType.html">PersonType</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="activities/fn.hours.html">activities::hours</a></li><li><a href="activities/fn.minutes.html">activities::minutes</a></li><li><a href="activities/fn.rand_duration.html">activities::rand_duration</a></li><li><a href="activities/fn.rand_time.html">activities::rand_time</a></li><li><a href="distribute_people/fn.assign_people_to_houses.html">distribute_people::assign_people_to_houses</a></li><li><a href="distribute_people/fn.distribute_population_to_homes.html">distribute_people::distribute_population_to_homes</a></li><li><a href="fn.distribute_population_to_homes.html">distribute_population_to_homes</a></li><li><a href="fn.generate_scenario.html">generate_scenario</a></li><li><a href="make_person/fn.make_people.html">make_person::make_people</a></li><li><a href="make_person/fn.pick_mode.html">make_person::pick_mode</a></li><li><a href="od/fn.create_zones.html">od::create_zones</a></li><li><a href="od/fn.disaggregate.html">od::disaggregate</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="popdat" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.CensusArea.html">CensusArea</a></li><li><a href="struct.CensusPerson.html">CensusPerson</a></li><li><a href="struct.Config.html">Config</a></li><li><a href="struct.Schedule.html">Schedule</a></li><li><a href="make_person/struct.PersonFactory.html">make_person::PersonFactory</a></li><li><a href="od/struct.DesireLine.html">od::DesireLine</a></li><li><a href="od/struct.NormalDistribution.html">od::NormalDistribution</a></li><li><a href="od/struct.Options.html">od::Options</a></li><li><a href="od/struct.Zone.html">od::Zone</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Activity.html">Activity</a></li><li><a href="enum.PersonType.html">PersonType</a></li><li><a href="od/enum.IncludeZonePolicy.html">od::IncludeZonePolicy</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="activities/fn.hours.html">activities::hours</a></li><li><a href="activities/fn.minutes.html">activities::minutes</a></li><li><a href="activities/fn.rand_duration.html">activities::rand_duration</a></li><li><a href="activities/fn.rand_time.html">activities::rand_time</a></li><li><a href="distribute_people/fn.assign_people_to_houses.html">distribute_people::assign_people_to_houses</a></li><li><a href="distribute_people/fn.distribute_population_to_homes.html">distribute_people::distribute_population_to_homes</a></li><li><a href="fn.distribute_population_to_homes.html">distribute_population_to_homes</a></li><li><a href="fn.generate_scenario.html">generate_scenario</a></li><li><a href="make_person/fn.make_people.html">make_person::make_people</a></li><li><a href="make_person/fn.pick_mode.html">make_person::pick_mode</a></li><li><a href="od/fn.create_zones.html">od::create_zones</a></li><li><a href="od/fn.disaggregate.html">od::disaggregate</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="popdat" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||
</body></html>
|
@ -17,9 +17,9 @@ different Activities throughout the day.</li>
|
||||
<li>Pick specific buildings to visit to satisfy the Schedule.</li>
|
||||
</ol>
|
||||
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="activities/index.html" title="popdat::activities mod">activities</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="distribute_people/index.html" title="popdat::distribute_people mod">distribute_people</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="import_census/index.html" title="popdat::import_census mod">import_census</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="make_person/index.html" title="popdat::make_person mod">make_person</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="od/index.html" title="popdat::od mod">od</a></div><div class="item-right docblock-short"><p>This is an alternative pipeline for generating a Scenario, starting from origin-destination
|
||||
data (also called desire lines), which gives a count of commuters between two zones, breaking
|
||||
down by mode.</p>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="activities/index.html" title="popdat::activities mod">activities</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="distribute_people/index.html" title="popdat::distribute_people mod">distribute_people</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="import_census/index.html" title="popdat::import_census mod">import_census</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="make_person/index.html" title="popdat::make_person mod">make_person</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="od/index.html" title="popdat::od mod">od</a></div><div class="item-right docblock-short"><p>This is a standalone pipeline for generating a Scenario, starting from origin-destination data
|
||||
(also called desire lines), which gives a count of commuters between two zones, breaking down
|
||||
by mode.</p>
|
||||
</div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.CensusArea.html" title="popdat::CensusArea struct">CensusArea</a></div><div class="item-right docblock-short"><p>Represents aggregate demographic data for some part of a city. These could be census tracts or
|
||||
blocks, depending what data we find. All of the areas should roughly partition the map – we
|
||||
|
39
rustdoc/popdat/od/enum.IncludeZonePolicy.html
Normal file
39
rustdoc/popdat/od/enum.IncludeZonePolicy.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Only desire lines starting and ending in zones matching this policy will be used."><meta name="keywords" content="rust, rustlang, rust-lang, IncludeZonePolicy"><title>IncludeZonePolicy in popdat::od - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum IncludeZonePolicy</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.AllowRemote">AllowRemote</a><a href="#variant.MustOverlap">MustOverlap</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-PartialEq%3CIncludeZonePolicy%3E">PartialEq<IncludeZonePolicy></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><h2 class="location">Other items in<br><a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a></h2><div id="sidebar-vars" data-name="IncludeZonePolicy" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a>::<wbr><a class="enum" href="#">IncludeZonePolicy</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#51-59" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust enum"><code>pub enum IncludeZonePolicy {
|
||||
MustOverlap,
|
||||
AllowRemote,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Only desire lines starting and ending in zones matching this policy will be used.</p>
|
||||
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.MustOverlap" class="variant small-section-header"><a href="#variant.MustOverlap" class="anchor field"></a><code>MustOverlap</code></h3><div class="docblock"><p>Keep zones that at least partially overlap the map’s boundary. Note this doesn’t mean no
|
||||
off-map trips will occur – if a zone only partly overlaps the map, then some trips will
|
||||
snap to a border.</p>
|
||||
</div><h3 id="variant.AllowRemote" class="variant small-section-header"><a href="#variant.AllowRemote" class="anchor field"></a><code>AllowRemote</code></h3><div class="docblock"><p>Keep all zones. When looking at desire lines between two remote zones, filter by those
|
||||
whose straight-line segment between zone centroids intersects the map boundary</p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-PartialEq%3CIncludeZonePolicy%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#50" title="goto source code">[src]</a></div><a href="#impl-PartialEq%3CIncludeZonePolicy%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a>> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#50" title="goto source code">[src]</a></div><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/cmp.rs.html#218" title="goto source code">[src]</a></div><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#50" title="goto source code">[src]</a></div><a href="#impl-StructuralPartialEq" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Downcast" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Downcast" class="anchor"></a><h3 class="code-header in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></h4></div></summary><div class='docblock'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any_rc" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any_rc" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></h4></div></summary><div class='docblock'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.as_any" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.as_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</h4></div></summary><div class='docblock'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>’s vtable from <code>&Trait</code>’s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.as_any_mut" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.as_any_mut" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</h4></div></summary><div class='docblock'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>’s vtable from <code>&mut Trait</code>’s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-DowncastSync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-DowncastSync" class="anchor"></a><h3 class="code-header in-band">impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into_any_arc" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.into_any_arc" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static></h4></div></summary><div class='docblock'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#549-553" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#550" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Instrument" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></div><a href="#impl-Instrument" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.instrument" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38" title="goto source code">[src]</a></div><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.in_current_span" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74" title="goto source code">[src]</a></div><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#537-544" title="goto source code">[src]</a></div><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#541" title="goto source code">[src]</a></div><a href="#method.into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Same%3CT%3E" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Same%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> Same<T> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Output" class="type trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = T</h4></div></summary><div class='docblock'><p>Should always be <code>Self</code></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#587-596" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#593" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#573-582" title="goto source code">[src]</a></div><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/convert/mod.rs.html#579" title="goto source code">[src]</a></div><a href="#method.try_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.58.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-VZip%3CV%3E" class="impl has-srclink"><div class="rightside"></div><a href="#impl-VZip%3CV%3E" class="anchor"></a><h3 class="code-header in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></h3></div></summary><div class="impl-items"><div id="method.vzip" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.vzip" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">vzip</a>(self) -> V</h4></div></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="popdat" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `create_zones` fn in crate `popdat`."><meta name="keywords" content="rust, rustlang, rust-lang, create_zones"><title>create_zones in popdat::od - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a></h2><div id="sidebar-vars" data-name="create_zones" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a>::<wbr><a class="fn" href="#">create_zones</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#134-207" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn create_zones(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="struct.Zone.html" title="struct popdat::od::Zone">Zone</a>></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="popdat" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a></h2><div id="sidebar-vars" data-name="create_zones" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a>::<wbr><a class="fn" href="#">create_zones</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#207-322" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn create_zones(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> input: <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>>, <br> include_zones: <a class="enum" href="enum.IncludeZonePolicy.html" title="enum popdat::od::IncludeZonePolicy">IncludeZonePolicy</a>, <br> timer: &mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="struct.Zone.html" title="struct popdat::od::Zone">Zone</a>></code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="popdat" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
</body></html>
|
File diff suppressed because one or more lines are too long
@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This is an alternative pipeline for generating a Scenario, starting from origin-destination data (also called desire lines), which gives a count of commuters between two zones, breaking down by mode."><meta name="keywords" content="rust, rustlang, rust-lang, od"><title>popdat::od - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module od</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="od" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">popdat</a>::<wbr><a class="mod" href="#">od</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#1-289" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This is an alternative pipeline for generating a Scenario, starting from origin-destination
|
||||
data (also called desire lines), which gives a count of commuters between two zones, breaking
|
||||
down by mode.</p>
|
||||
<p>Maybe someday, we’ll merge the two approaches, and make the first generate DesireLines as an
|
||||
intermediate step.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This is a standalone pipeline for generating a Scenario, starting from origin-destination data (also called desire lines), which gives a count of commuters between two zones, breaking down by mode."><meta name="keywords" content="rust, rustlang, rust-lang, od"><title>popdat::od - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module od</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="od" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">popdat</a>::<wbr><a class="mod" href="#">od</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#1-404" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This is a standalone pipeline for generating a Scenario, starting from origin-destination data
|
||||
(also called desire lines), which gives a count of commuters between two zones, breaking down
|
||||
by mode.</p>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DesireLine.html" title="popdat::od::DesireLine struct">DesireLine</a></div><div class="item-right docblock-short"><p>This describes some number of commuters living in some named zone, working in another (or the
|
||||
same zone), and commuting using some mode.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.NormalDistribution.html" title="popdat::od::NormalDistribution struct">NormalDistribution</a></div><div class="item-right docblock-short"><p>A normal distribution of Durations.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Options.html" title="popdat::od::Options struct">Options</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Zone.html" title="popdat::od::Zone struct">Zone</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Options.html" title="popdat::od::Options struct">Options</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Zone.html" title="popdat::od::Zone struct">Zone</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.IncludeZonePolicy.html" title="popdat::od::IncludeZonePolicy enum">IncludeZonePolicy</a></div><div class="item-right docblock-short"><p>Only desire lines starting and ending in zones matching this policy will be used.</p>
|
||||
</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.create_zones.html" title="popdat::od::create_zones fn">create_zones</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.disaggregate.html" title="popdat::od::disaggregate fn">disaggregate</a></div><div class="item-right docblock-short"><p>Generates a scenario from aggregated origin/destination data (DesireLines). The input describes
|
||||
an exact number of people, who live in one zone and work in another (possibly the same) and
|
||||
commute using some mode. For each of them, we just need to pick a specific home and workplace
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["create_zones",""],["disaggregate","Generates a scenario from aggregated origin/destination data (DesireLines). The input describes an exact number of people, who live in one zone and work in another (possibly the same) and commute using some mode. For each of them, we just need to pick a specific home and workplace from the zones, and use the Options to pick departure times. We’ll wind up creating people who just take two trips daily: home -> work -> home."]],"struct":[["DesireLine","This describes some number of commuters living in some named zone, working in another (or the same zone), and commuting using some mode."],["NormalDistribution","A normal distribution of Durations."],["Options",""],["Zone",""]]});
|
||||
initSidebarItems({"enum":[["IncludeZonePolicy","Only desire lines starting and ending in zones matching this policy will be used."]],"fn":[["create_zones",""],["disaggregate","Generates a scenario from aggregated origin/destination data (DesireLines). The input describes an exact number of people, who live in one zone and work in another (possibly the same) and commute using some mode. For each of them, we just need to pick a specific home and workplace from the zones, and use the Options to pick departure times. We’ll wind up creating people who just take two trips daily: home -> work -> home."]],"struct":[["DesireLine","This describes some number of commuters living in some named zone, working in another (or the same zone), and commuting using some mode."],["NormalDistribution","A normal distribution of Durations."],["Options",""],["Zone",""]]});
|
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This describes some number of commuters living in some named zone, working in another (or the same zone), and commuting using some mode."><meta name="keywords" content="rust, rustlang, rust-lang, DesireLine"><title>DesireLine in popdat::od - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct DesireLine</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.home_zone">home_zone</a><a href="#structfield.mode">mode</a><a href="#structfield.number_commuters">number_commuters</a><a href="#structfield.work_zone">work_zone</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><h2 class="location">Other items in<br><a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a></h2><div id="sidebar-vars" data-name="DesireLine" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a>::<wbr><a class="struct" href="#">DesireLine</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#22-27" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct DesireLine {
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct DesireLine</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.home_zone">home_zone</a><a href="#structfield.mode">mode</a><a href="#structfield.number_commuters">number_commuters</a><a href="#structfield.work_zone">work_zone</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><h2 class="location">Other items in<br><a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a></h2><div id="sidebar-vars" data-name="DesireLine" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">popdat</a>::<wbr><a href="index.html">od</a>::<wbr><a class="struct" href="#">DesireLine</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/popdat/od.rs.html#19-24" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct DesireLine {
|
||||
pub home_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
pub work_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
pub mode: <a class="enum" href="../../synthpop/enum.TripMode.html" title="enum synthpop::TripMode">TripMode</a>,
|
||||
pub number_commuters: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This describes some number of commuters living in some named zone, working in another (or the
|
||||
same zone), and commuting using some mode.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.home_zone" class="structfield small-section-header"><a href="#structfield.home_zone" class="anchor field"></a><code>home_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.work_zone" class="structfield small-section-header"><a href="#structfield.work_zone" class="anchor field"></a><code>work_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../../synthpop/enum.TripMode.html" title="enum synthpop::TripMode">TripMode</a></code></span><span id="structfield.number_commuters" class="structfield small-section-header"><a href="#structfield.number_commuters" class="anchor field"></a><code>number_commuters: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#21" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#21" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.home_zone" class="structfield small-section-header"><a href="#structfield.home_zone" class="anchor field"></a><code>home_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.work_zone" class="structfield small-section-header"><a href="#structfield.work_zone" class="anchor field"></a><code>work_zone: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.mode" class="structfield small-section-header"><a href="#structfield.mode" class="anchor field"></a><code>mode: <a class="enum" href="../../synthpop/enum.TripMode.html" title="enum synthpop::TripMode">TripMode</a></code></span><span id="structfield.number_commuters" class="structfield small-section-header"><a href="#structfield.number_commuters" class="anchor field"></a><code>number_commuters: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#18" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/popdat/od.rs.html#18" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DesireLine.html" title="struct popdat::od::DesireLine">DesireLine</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.58.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["Activity","Different things people might do in the day. Maybe it’s more clear to call this a DestinationType or similar."],["PersonType","It might be useful to classify a CensusPerson into different categories to figure out their Schedule."]],"fn":[["distribute_population_to_homes","Starting from some number of total people living in a polygonal area, randomly distribute them to residential buildings within that area. Returns a list of homes with the number of residents in each."],["generate_scenario","Wires together all the pieces, so you can just hand this any map, and it’ll automatically find appropriate census data, and use it to produce a Scenario."]],"mod":[["activities",""],["distribute_people",""],["import_census",""],["make_person",""],["od","This is an alternative pipeline for generating a Scenario, starting from origin-destination data (also called desire lines), which gives a count of commuters between two zones, breaking down by mode."]],"struct":[["CensusArea","Represents aggregate demographic data for some part of a city. These could be census tracts or blocks, depending what data we find. All of the areas should roughly partition the map – we probably don’t need to guarantee we cover every single building, but we definitely shouldn’t have two overlapping areas."],["CensusPerson","Demographic information for a single person"],["Config","Any arbitrarily chosen parameters needed should be put here, so they can be controlled from the UI or tuned for different cities."],["Schedule","A single person’s daily schedule. It’s assumed that someone always starts at home. And for most people, the last entry should probably be Activity::Home."]]});
|
||||
initSidebarItems({"enum":[["Activity","Different things people might do in the day. Maybe it’s more clear to call this a DestinationType or similar."],["PersonType","It might be useful to classify a CensusPerson into different categories to figure out their Schedule."]],"fn":[["distribute_population_to_homes","Starting from some number of total people living in a polygonal area, randomly distribute them to residential buildings within that area. Returns a list of homes with the number of residents in each."],["generate_scenario","Wires together all the pieces, so you can just hand this any map, and it’ll automatically find appropriate census data, and use it to produce a Scenario."]],"mod":[["activities",""],["distribute_people",""],["import_census",""],["make_person",""],["od","This is a standalone pipeline for generating a Scenario, starting from origin-destination data (also called desire lines), which gives a count of commuters between two zones, breaking down by mode."]],"struct":[["CensusArea","Represents aggregate demographic data for some part of a city. These could be census tracts or blocks, depending what data we find. All of the areas should roughly partition the map – we probably don’t need to guarantee we cover every single building, but we definitely shouldn’t have two overlapping areas."],["CensusPerson","Demographic information for a single person"],["Config","Any arbitrarily chosen parameters needed should be put here, so they can be controlled from the UI or tuned for different cities."],["Schedule","A single person’s daily schedule. It’s assumed that someone always starts at home. And for most people, the last entry should probably be Activity::Home."]]});
|
File diff suppressed because one or more lines are too long
@ -116,7 +116,7 @@
|
||||
<span class="kw">let</span> <span class="ident">skip_problems</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
<span class="ident">s</span>.<span class="ident">people</span> <span class="op">=</span> <span class="ident">ExternalPerson::import</span>(<span class="kw-2">&</span><span class="ident">map</span>, <span class="ident">people</span>, <span class="ident">skip_problems</span>)<span class="question-mark">?</span>;
|
||||
<span class="comment">// Always clean up people with no-op trips (going between the same buildings)</span>
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>();
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>);
|
||||
<span class="macro">println!</span>(
|
||||
<span class="string">"Imported {}/{} people"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">s</span>.<span class="ident">people</span>.<span class="ident">len</span>()),
|
||||
|
@ -47,7 +47,7 @@
|
||||
<span class="kw">let</span> <span class="ident">orig_num</span> <span class="op">=</span> <span class="ident">input</span>.<span class="ident">people</span>.<span class="ident">len</span>();
|
||||
<span class="ident">s</span>.<span class="ident">people</span> <span class="op">=</span> <span class="ident">ExternalPerson::import</span>(<span class="kw-2">&</span><span class="ident">map</span>, <span class="ident">input</span>.<span class="ident">people</span>, <span class="ident">skip_problems</span>).<span class="ident">unwrap</span>();
|
||||
<span class="comment">// Always clean up people with no-op trips (going between the same buildings)</span>
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>();
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>);
|
||||
<span class="macro">println!</span>(
|
||||
<span class="string">"Imported {}/{} people"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">s</span>.<span class="ident">people</span>.<span class="ident">len</span>()),
|
||||
|
@ -219,7 +219,7 @@
|
||||
<span class="ident">s</span>.<span class="ident">only_seed_buses</span> <span class="op">=</span> <span class="prelude-val">None</span>;
|
||||
<span class="ident">s</span>.<span class="ident">people</span> <span class="op">=</span> <span class="ident">ExternalPerson::import</span>(<span class="ident">map</span>, <span class="ident">input</span>.<span class="ident">people</span>, <span class="ident">skip_problems</span>)<span class="question-mark">?</span>;
|
||||
<span class="comment">// Always clean up people with no-op trips (going between the same buildings)</span>
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>();
|
||||
<span class="ident">s</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>);
|
||||
<span class="ident">s</span>.<span class="ident">save</span>();
|
||||
<span class="prelude-val">Ok</span>(<span class="ident">s</span>.<span class="ident">scenario_name</span>)
|
||||
}
|
||||
|
@ -603,7 +603,7 @@
|
||||
<span class="ident">people</span>,
|
||||
<span class="ident">only_seed_buses</span>: <span class="prelude-val">None</span>,
|
||||
}
|
||||
.<span class="ident">remove_weird_schedules</span>()
|
||||
.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>)
|
||||
}
|
||||
</code></pre></div>
|
||||
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="importer" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||
|
@ -330,7 +330,7 @@
|
||||
);
|
||||
<span class="comment">// Some zones have very few buildings, and people wind up with a home and workplace that're the</span>
|
||||
<span class="comment">// same!</span>
|
||||
<span class="ident">scenario</span> <span class="op">=</span> <span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>();
|
||||
<span class="ident">scenario</span> <span class="op">=</span> <span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">false</span>);
|
||||
<span class="comment">// TODO For temporary development of the UK OD pipeline...</span>
|
||||
<span class="kw">if</span> <span class="bool-val">true</span> {
|
||||
<span class="ident">check_sensor_data</span>(<span class="ident">map</span>, <span class="kw-2">&</span><span class="ident">scenario</span>, <span class="string">"/home/dabreegster/sensors.json"</span>, <span class="ident">timer</span>);
|
||||
|
@ -175,7 +175,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.58.1 (db9d1b20b 2022-01-20)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Wed, 02 Feb 2022 15:04:31 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Wed, 02 Feb 2022 16:35:40 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -260,7 +260,7 @@
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"building people"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"removing weird schedules"</span>);
|
||||
<span class="ident">scenario</span> <span class="op">=</span> <span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>();
|
||||
<span class="ident">scenario</span> <span class="op">=</span> <span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"removing weird schedules"</span>);
|
||||
|
||||
<span class="ident">scenario</span>
|
||||
|
@ -288,12 +288,124 @@
|
||||
<span id="287">287</span>
|
||||
<span id="288">288</span>
|
||||
<span id="289">289</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! This is an alternative pipeline for generating a Scenario, starting from origin-destination</span>
|
||||
<span class="doccomment">//! data (also called desire lines), which gives a count of commuters between two zones, breaking</span>
|
||||
<span class="doccomment">//! down by mode.</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! Maybe someday, we'll merge the two approaches, and make the first generate DesireLines as an</span>
|
||||
<span class="doccomment">//! intermediate step.</span>
|
||||
<span id="290">290</span>
|
||||
<span id="291">291</span>
|
||||
<span id="292">292</span>
|
||||
<span id="293">293</span>
|
||||
<span id="294">294</span>
|
||||
<span id="295">295</span>
|
||||
<span id="296">296</span>
|
||||
<span id="297">297</span>
|
||||
<span id="298">298</span>
|
||||
<span id="299">299</span>
|
||||
<span id="300">300</span>
|
||||
<span id="301">301</span>
|
||||
<span id="302">302</span>
|
||||
<span id="303">303</span>
|
||||
<span id="304">304</span>
|
||||
<span id="305">305</span>
|
||||
<span id="306">306</span>
|
||||
<span id="307">307</span>
|
||||
<span id="308">308</span>
|
||||
<span id="309">309</span>
|
||||
<span id="310">310</span>
|
||||
<span id="311">311</span>
|
||||
<span id="312">312</span>
|
||||
<span id="313">313</span>
|
||||
<span id="314">314</span>
|
||||
<span id="315">315</span>
|
||||
<span id="316">316</span>
|
||||
<span id="317">317</span>
|
||||
<span id="318">318</span>
|
||||
<span id="319">319</span>
|
||||
<span id="320">320</span>
|
||||
<span id="321">321</span>
|
||||
<span id="322">322</span>
|
||||
<span id="323">323</span>
|
||||
<span id="324">324</span>
|
||||
<span id="325">325</span>
|
||||
<span id="326">326</span>
|
||||
<span id="327">327</span>
|
||||
<span id="328">328</span>
|
||||
<span id="329">329</span>
|
||||
<span id="330">330</span>
|
||||
<span id="331">331</span>
|
||||
<span id="332">332</span>
|
||||
<span id="333">333</span>
|
||||
<span id="334">334</span>
|
||||
<span id="335">335</span>
|
||||
<span id="336">336</span>
|
||||
<span id="337">337</span>
|
||||
<span id="338">338</span>
|
||||
<span id="339">339</span>
|
||||
<span id="340">340</span>
|
||||
<span id="341">341</span>
|
||||
<span id="342">342</span>
|
||||
<span id="343">343</span>
|
||||
<span id="344">344</span>
|
||||
<span id="345">345</span>
|
||||
<span id="346">346</span>
|
||||
<span id="347">347</span>
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
<span id="353">353</span>
|
||||
<span id="354">354</span>
|
||||
<span id="355">355</span>
|
||||
<span id="356">356</span>
|
||||
<span id="357">357</span>
|
||||
<span id="358">358</span>
|
||||
<span id="359">359</span>
|
||||
<span id="360">360</span>
|
||||
<span id="361">361</span>
|
||||
<span id="362">362</span>
|
||||
<span id="363">363</span>
|
||||
<span id="364">364</span>
|
||||
<span id="365">365</span>
|
||||
<span id="366">366</span>
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
<span id="387">387</span>
|
||||
<span id="388">388</span>
|
||||
<span id="389">389</span>
|
||||
<span id="390">390</span>
|
||||
<span id="391">391</span>
|
||||
<span id="392">392</span>
|
||||
<span id="393">393</span>
|
||||
<span id="394">394</span>
|
||||
<span id="395">395</span>
|
||||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! This is a standalone pipeline for generating a Scenario, starting from origin-destination data</span>
|
||||
<span class="doccomment">//! (also called desire lines), which gives a count of commuters between two zones, breaking down</span>
|
||||
<span class="doccomment">//! by mode.</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
|
||||
|
||||
@ -301,8 +413,8 @@
|
||||
<span class="kw">use</span> <span class="ident">rand::Rng</span>;
|
||||
<span class="kw">use</span> <span class="ident">rand_xorshift::XorShiftRng</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil::Timer</span>;
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Polygon</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Percent</span>, <span class="ident">PolyLine</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>, <span class="ident">Map</span>};
|
||||
<span class="kw">use</span> <span class="ident">synthpop</span>::{<span class="ident">IndividTrip</span>, <span class="ident">MapBorders</span>, <span class="ident">PersonSpec</span>, <span class="ident">TripEndpoint</span>, <span class="ident">TripMode</span>, <span class="ident">TripPurpose</span>};
|
||||
|
||||
@ -323,6 +435,7 @@
|
||||
<span class="kw">pub</span> <span class="ident">departure_time</span>: <span class="ident">NormalDistribution</span>,
|
||||
<span class="doccomment">/// How long should somebody work before returning home?</span>
|
||||
<span class="kw">pub</span> <span class="ident">work_duration</span>: <span class="ident">NormalDistribution</span>,
|
||||
<span class="kw">pub</span> <span class="ident">include_zones</span>: <span class="ident">IncludeZonePolicy</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Options</span> {
|
||||
@ -333,10 +446,23 @@
|
||||
<span class="ident">Duration::minutes</span>(<span class="number">30</span>),
|
||||
),
|
||||
<span class="ident">work_duration</span>: <span class="ident">NormalDistribution::new</span>(<span class="ident">Duration::hours</span>(<span class="number">9</span>), <span class="ident">Duration::hours</span>(<span class="number">1</span>)),
|
||||
<span class="ident">include_zones</span>: <span class="ident">IncludeZonePolicy::AllowRemote</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Only desire lines starting and ending in zones matching this policy will be used.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">IncludeZonePolicy</span> {
|
||||
<span class="doccomment">/// Keep zones that at least partially overlap the map's boundary. Note this doesn't mean no</span>
|
||||
<span class="doccomment">/// off-map trips will occur -- if a zone only partly overlaps the map, then some trips will</span>
|
||||
<span class="doccomment">/// snap to a border.</span>
|
||||
<span class="ident">MustOverlap</span>,
|
||||
<span class="doccomment">/// Keep all zones. When looking at desire lines between two remote zones, filter by those</span>
|
||||
<span class="doccomment">/// whose straight-line segment between zone centroids intersects the map boundary</span>
|
||||
<span class="ident">AllowRemote</span>,
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Generates a scenario from aggregated origin/destination data (DesireLines). The input describes</span>
|
||||
<span class="doccomment">/// an exact number of people, who live in one zone and work in another (possibly the same) and</span>
|
||||
<span class="doccomment">/// commute using some mode. For each of them, we just need to pick a specific home and workplace</span>
|
||||
@ -347,9 +473,6 @@
|
||||
<span class="doccomment">/// resulting in trips that begin and/or end off-map. The amount of the zone that overlaps with the</span>
|
||||
<span class="doccomment">/// map boundary determines this. If the zone and map boundary overlap 50% by area, then half of</span>
|
||||
<span class="doccomment">/// the people to/from this zone will pick buildings, and half will pick borders.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Currently, zones with no overlap with the map at all are totally filtered out. We could adjust</span>
|
||||
<span class="doccomment">/// this in the future to create more highway through-traffic.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">disaggregate</span>(
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">zones</span>: <span class="ident">HashMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Polygon</span><span class="op">></span>,
|
||||
@ -360,20 +483,42 @@
|
||||
) -> <span class="ident">Vec</span><span class="op"><</span><span class="ident">PersonSpec</span><span class="op">></span> {
|
||||
<span class="comment">// First decide which zones are relevant for our map. Match homes, shops, and border</span>
|
||||
<span class="comment">// intersections to each zone.</span>
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"match zones"</span>);
|
||||
<span class="kw">let</span> <span class="ident">zones</span> <span class="op">=</span> <span class="ident">create_zones</span>(<span class="ident">map</span>, <span class="ident">zones</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"match zones"</span>);
|
||||
<span class="kw">let</span> <span class="ident">zones</span> <span class="op">=</span> <span class="ident">create_zones</span>(<span class="ident">map</span>, <span class="ident">zones</span>, <span class="ident">opts</span>.<span class="ident">include_zones</span>, <span class="ident">timer</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">people</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"create people"</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">on_map_only</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lives_on_map</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">works_on_map</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pass_through</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start_iter</span>(<span class="string">"create people per desire line"</span>, <span class="ident">desire_lines</span>.<span class="ident">len</span>());
|
||||
<span class="kw">for</span> <span class="ident">desire</span> <span class="kw">in</span> <span class="ident">desire_lines</span> {
|
||||
<span class="ident">timer</span>.<span class="ident">next</span>();
|
||||
<span class="comment">// Skip if we filtered out either zone.</span>
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">zones</span>.<span class="ident">contains_key</span>(<span class="kw-2">&</span><span class="ident">desire</span>.<span class="ident">home_zone</span>) <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">zones</span>.<span class="ident">contains_key</span>(<span class="kw-2">&</span><span class="ident">desire</span>.<span class="ident">work_zone</span>) {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">home_zone</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">zones</span>[<span class="kw-2">&</span><span class="ident">desire</span>.<span class="ident">home_zone</span>];
|
||||
<span class="kw">let</span> <span class="ident">work_zone</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">zones</span>[<span class="kw-2">&</span><span class="ident">desire</span>.<span class="ident">work_zone</span>];
|
||||
|
||||
<span class="comment">// If both are remote, make sure the desire line intersects the map</span>
|
||||
<span class="kw">if</span> <span class="ident">home_zone</span>.<span class="ident">is_remote</span>() <span class="op">&&</span> <span class="ident">work_zone</span>.<span class="ident">is_remote</span>() {
|
||||
<span class="kw">if</span> <span class="ident">desire</span>.<span class="ident">home_zone</span> <span class="op">==</span> <span class="ident">desire</span>.<span class="ident">work_zone</span> {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">map</span>
|
||||
.<span class="ident">get_boundary_polygon</span>()
|
||||
.<span class="ident">intersects_polyline</span>(<span class="kw-2">&</span><span class="ident">PolyLine::must_new</span>(<span class="macro">vec!</span>[
|
||||
<span class="ident">home_zone</span>.<span class="ident">center</span>,
|
||||
<span class="ident">work_zone</span>.<span class="ident">center</span>,
|
||||
]))
|
||||
{
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">for</span> <span class="kw">_</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">desire</span>.<span class="ident">number_commuters</span> {
|
||||
<span class="comment">// Pick a specific home and workplace. It might be off-map, depending on how much the</span>
|
||||
<span class="comment">// zone overlaps the map.</span>
|
||||
@ -381,6 +526,28 @@
|
||||
<span class="ident">home_zone</span>.<span class="ident">pick_home</span>(<span class="ident">desire</span>.<span class="ident">mode</span>, <span class="ident">map</span>, <span class="ident">rng</span>),
|
||||
<span class="ident">work_zone</span>.<span class="ident">pick_workplace</span>(<span class="ident">desire</span>.<span class="ident">mode</span>, <span class="ident">map</span>, <span class="ident">rng</span>),
|
||||
) {
|
||||
<span class="comment">// TODO Soundcast had a bug with the off-map exit/entrance being different</span>
|
||||
<span class="comment">// sometimes; revisit that subtlety.</span>
|
||||
<span class="kw">if</span> <span class="ident">leave_home</span> <span class="op">==</span> <span class="ident">goto_work</span> {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
|
||||
<span class="kw">match</span> (<span class="ident">goto_home</span>, <span class="ident">goto_work</span>) {
|
||||
(<span class="ident">TripEndpoint::Building</span>(<span class="kw">_</span>), <span class="ident">TripEndpoint::Building</span>(<span class="kw">_</span>)) => {
|
||||
<span class="ident">on_map_only</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
(<span class="ident">TripEndpoint::Building</span>(<span class="kw">_</span>), <span class="ident">TripEndpoint::Border</span>(<span class="kw">_</span>)) => {
|
||||
<span class="ident">lives_on_map</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
(<span class="ident">TripEndpoint::Border</span>(<span class="kw">_</span>), <span class="ident">TripEndpoint::Building</span>(<span class="kw">_</span>)) => {
|
||||
<span class="ident">works_on_map</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
(<span class="ident">TripEndpoint::Border</span>(<span class="kw">_</span>), <span class="ident">TripEndpoint::Border</span>(<span class="kw">_</span>)) => {
|
||||
<span class="ident">pass_through</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
<span class="kw">_</span> => <span class="macro">unreachable!</span>(),
|
||||
}
|
||||
|
||||
<span class="comment">// Create their schedule</span>
|
||||
<span class="kw">let</span> <span class="ident">goto_work_time</span> <span class="op">=</span> <span class="ident">Time::START_OF_DAY</span> <span class="op">+</span> <span class="ident">opts</span>.<span class="ident">departure_time</span>.<span class="ident">sample</span>(<span class="ident">rng</span>);
|
||||
<span class="kw">let</span> <span class="ident">return_home_time</span> <span class="op">=</span> <span class="ident">goto_work_time</span> <span class="op">+</span> <span class="ident">opts</span>.<span class="ident">work_duration</span>.<span class="ident">sample</span>(<span class="ident">rng</span>);
|
||||
@ -406,12 +573,27 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"create people"</span>);
|
||||
<span class="kw">let</span> <span class="ident">total</span> <span class="op">=</span> <span class="ident">on_map_only</span> <span class="op">+</span> <span class="ident">lives_on_map</span> <span class="op">+</span> <span class="ident">works_on_map</span> <span class="op">+</span> <span class="ident">pass_through</span>;
|
||||
<span class="kw">for</span> (<span class="ident">x</span>, <span class="ident">label</span>) <span class="kw">in</span> [
|
||||
(<span class="ident">on_map_only</span>, <span class="string">"live and work on-map"</span>),
|
||||
(<span class="ident">lives_on_map</span>, <span class="string">"live on-map, work remote"</span>),
|
||||
(<span class="ident">works_on_map</span>, <span class="string">"live remote, work on-map"</span>),
|
||||
(<span class="ident">pass_through</span>, <span class="string">"just pass through"</span>),
|
||||
] {
|
||||
<span class="macro">info!</span>(
|
||||
<span class="string">"{} people ({}%) {}"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">x</span>),
|
||||
<span class="ident">Percent::of</span>(<span class="ident">x</span>, <span class="ident">total</span>),
|
||||
<span class="ident">label</span>
|
||||
);
|
||||
}
|
||||
|
||||
<span class="ident">people</span>
|
||||
}
|
||||
|
||||
<span class="kw">struct</span> <span class="ident">Zone</span> {
|
||||
<span class="ident">polygon</span>: <span class="ident">Polygon</span>,
|
||||
<span class="ident">center</span>: <span class="ident">Pt2D</span>,
|
||||
<span class="ident">pct_overlap</span>: <span class="ident">f64</span>,
|
||||
<span class="comment">// For each building, have a value describing how many people live or work there. The exact</span>
|
||||
<span class="comment">// value doesn't matter; it's just a relative weighting. This way, we can use a weighted sample</span>
|
||||
@ -421,39 +603,101 @@
|
||||
<span class="ident">borders</span>: <span class="ident">MapBorders</span>,
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">create_zones</span>(<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">input</span>: <span class="ident">HashMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Polygon</span><span class="op">></span>) -> <span class="ident">HashMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Zone</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">all_borders</span> <span class="op">=</span> <span class="ident">MapBorders::new</span>(<span class="ident">map</span>);
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">zones</span> <span class="op">=</span> <span class="ident">HashMap::new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">name</span>, <span class="ident">polygon</span>) <span class="kw">in</span> <span class="ident">input</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">overlapping_area</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">polygon</span>.<span class="ident">intersection</span>(<span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>()) {
|
||||
<span class="ident">overlapping_area</span> <span class="op">+</span><span class="op">=</span> <span class="ident">p</span>.<span class="ident">area</span>();
|
||||
}
|
||||
<span class="comment">// Sometimes this is slightly over 100%, because funky things happen with the polygon</span>
|
||||
<span class="comment">// intersection.</span>
|
||||
<span class="kw">let</span> <span class="ident">pct_overlap</span> <span class="op">=</span> (<span class="ident">overlapping_area</span> <span class="op">/</span> <span class="ident">polygon</span>.<span class="ident">area</span>()).<span class="ident">min</span>(<span class="number">1.0</span>);
|
||||
<span class="kw">impl</span> <span class="ident">Zone</span> {
|
||||
<span class="kw">fn</span> <span class="ident">is_remote</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">bool</span> {
|
||||
<span class="self">self</span>.<span class="ident">pct_overlap</span> <span class="op">==</span> <span class="number">0.0</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// If the zone doesn't intersect our map at all, totally skip it.</span>
|
||||
<span class="kw">if</span> <span class="ident">pct_overlap</span> <span class="op">==</span> <span class="number">0.0</span> {
|
||||
<span class="kw">continue</span>;
|
||||
}
|
||||
<span class="ident">zones</span>.<span class="ident">insert</span>(
|
||||
<span class="ident">name</span>,
|
||||
<span class="ident">Zone</span> {
|
||||
<span class="ident">polygon</span>,
|
||||
<span class="ident">pct_overlap</span>,
|
||||
<span class="ident">homes</span>: <span class="ident">Vec::new</span>(),
|
||||
<span class="ident">workplaces</span>: <span class="ident">Vec::new</span>(),
|
||||
<span class="ident">borders</span>: <span class="ident">all_borders</span>.<span class="ident">clone</span>(),
|
||||
<span class="kw">fn</span> <span class="ident">create_zones</span>(
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">input</span>: <span class="ident">HashMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Polygon</span><span class="op">></span>,
|
||||
<span class="ident">include_zones</span>: <span class="ident">IncludeZonePolicy</span>,
|
||||
<span class="ident">timer</span>: <span class="kw-2">&mut</span> <span class="ident">Timer</span>,
|
||||
) -> <span class="ident">HashMap</span><span class="op"><</span><span class="ident">String</span>, <span class="ident">Zone</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">all_borders</span> <span class="op">=</span> <span class="ident">MapBorders::new</span>(<span class="ident">map</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">normal_zones</span> <span class="op">=</span> <span class="ident">HashMap::new</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">remote_zones</span> <span class="op">=</span> <span class="ident">HashMap::new</span>();
|
||||
<span class="kw">for</span> (<span class="ident">name</span>, <span class="ident">zone</span>) <span class="kw">in</span> <span class="ident">timer</span>
|
||||
.<span class="ident">parallelize</span>(
|
||||
<span class="string">"create zones"</span>,
|
||||
<span class="ident">input</span>.<span class="ident">into_iter</span>().<span class="ident">collect</span>(),
|
||||
<span class="op">|</span>(<span class="ident">name</span>, <span class="ident">polygon</span>)<span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">overlapping_area</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">polygon</span>.<span class="ident">intersection</span>(<span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>()) {
|
||||
<span class="ident">overlapping_area</span> <span class="op">+</span><span class="op">=</span> <span class="ident">p</span>.<span class="ident">area</span>();
|
||||
}
|
||||
<span class="comment">// Sometimes this is slightly over 100%, because funky things happen with the polygon</span>
|
||||
<span class="comment">// intersection.</span>
|
||||
<span class="kw">let</span> <span class="ident">pct_overlap</span> <span class="op">=</span> (<span class="ident">overlapping_area</span> <span class="op">/</span> <span class="ident">polygon</span>.<span class="ident">area</span>()).<span class="ident">min</span>(<span class="number">1.0</span>);
|
||||
<span class="kw">let</span> <span class="ident">is_remote</span> <span class="op">=</span> <span class="ident">pct_overlap</span> <span class="op">==</span> <span class="number">0.0</span>;
|
||||
|
||||
<span class="kw">if</span> <span class="ident">is_remote</span> <span class="op">&&</span> <span class="ident">include_zones</span> <span class="op">==</span> <span class="ident">IncludeZonePolicy::MustOverlap</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="comment">// Multiple zones might all use the same border.</span>
|
||||
<span class="kw">let</span> <span class="ident">center</span> <span class="op">=</span> <span class="ident">polygon</span>.<span class="ident">center</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">borders</span> <span class="op">=</span> <span class="ident">all_borders</span>.<span class="ident">clone</span>();
|
||||
<span class="kw">for</span> <span class="ident">list</span> <span class="kw">in</span> <span class="macro">vec!</span>[
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">incoming_walking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">incoming_driving</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">incoming_biking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">outgoing_walking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">outgoing_driving</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">borders</span>.<span class="ident">outgoing_biking</span>,
|
||||
] {
|
||||
<span class="kw">if</span> <span class="ident">is_remote</span> {
|
||||
<span class="comment">// For remote zones... keep the one closest border per category?</span>
|
||||
<span class="comment">// TODO See what Soundcast does</span>
|
||||
<span class="ident">list</span>.<span class="ident">sort_by_key</span>(<span class="op">|</span>(<span class="ident">i</span>, <span class="kw">_</span>)<span class="op">|</span> {
|
||||
<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">center</span>().<span class="ident">fast_dist</span>(<span class="ident">center</span>)
|
||||
});
|
||||
<span class="ident">list</span>.<span class="ident">truncate</span>(<span class="number">1</span>);
|
||||
} <span class="kw">else</span> {
|
||||
<span class="comment">// If the zone partly overlaps, only keep borders physically in the zone polygon</span>
|
||||
<span class="ident">list</span>.<span class="ident">retain</span>(<span class="op">|</span>(<span class="ident">i</span>, <span class="kw">_</span>)<span class="op">|</span> {
|
||||
<span class="ident">polygon</span>.<span class="ident">contains_pt</span>(<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">center</span>())
|
||||
});
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Some</span>((
|
||||
<span class="ident">name</span>,
|
||||
<span class="ident">Zone</span> {
|
||||
<span class="ident">polygon</span>,
|
||||
<span class="ident">center</span>,
|
||||
<span class="ident">pct_overlap</span>,
|
||||
<span class="ident">homes</span>: <span class="ident">Vec::new</span>(),
|
||||
<span class="ident">workplaces</span>: <span class="ident">Vec::new</span>(),
|
||||
<span class="ident">borders</span>,
|
||||
},
|
||||
))
|
||||
}
|
||||
},
|
||||
);
|
||||
)
|
||||
.<span class="ident">into_iter</span>()
|
||||
.<span class="ident">flatten</span>()
|
||||
{
|
||||
<span class="kw">if</span> <span class="ident">zone</span>.<span class="ident">is_remote</span>() {
|
||||
<span class="ident">remote_zones</span>.<span class="ident">insert</span>(<span class="ident">name</span>, <span class="ident">zone</span>);
|
||||
} <span class="kw">else</span> {
|
||||
<span class="ident">normal_zones</span>.<span class="ident">insert</span>(<span class="ident">name</span>, <span class="ident">zone</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Match all buildings to a zone.</span>
|
||||
<span class="macro">info!</span>(
|
||||
<span class="string">"{} zones partly in the map boundary, {} remote zones"</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">normal_zones</span>.<span class="ident">len</span>()),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">remote_zones</span>.<span class="ident">len</span>())
|
||||
);
|
||||
|
||||
<span class="comment">// Match all buildings to a normal zone.</span>
|
||||
<span class="ident">timer</span>.<span class="ident">start_iter</span>(<span class="string">"assign buildings to zones"</span>, <span class="ident">map</span>.<span class="ident">all_buildings</span>().<span class="ident">len</span>());
|
||||
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_buildings</span>() {
|
||||
<span class="ident">timer</span>.<span class="ident">next</span>();
|
||||
<span class="kw">let</span> <span class="ident">center</span> <span class="op">=</span> <span class="ident">b</span>.<span class="ident">polygon</span>.<span class="ident">center</span>();
|
||||
<span class="comment">// We're assuming zones don't overlap each other, so just look for the first match.</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="ident">zone</span>)) <span class="op">=</span> <span class="ident">zones</span>
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="ident">zone</span>)) <span class="op">=</span> <span class="ident">normal_zones</span>
|
||||
.<span class="ident">iter_mut</span>()
|
||||
.<span class="ident">find</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">z</span>)<span class="op">|</span> <span class="ident">z</span>.<span class="ident">polygon</span>.<span class="ident">contains_pt</span>(<span class="ident">center</span>))
|
||||
{
|
||||
@ -478,22 +722,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Match border intersections to a zone.</span>
|
||||
<span class="kw">for</span> <span class="ident">zone</span> <span class="kw">in</span> <span class="ident">zones</span>.<span class="ident">values_mut</span>() {
|
||||
<span class="kw">let</span> <span class="ident">polygon</span> <span class="op">=</span> <span class="ident">zone</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>();
|
||||
<span class="kw">for</span> <span class="ident">list</span> <span class="kw">in</span> <span class="macro">vec!</span>[
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">incoming_walking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">incoming_driving</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">incoming_biking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">outgoing_walking</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">outgoing_driving</span>,
|
||||
<span class="kw-2">&mut</span> <span class="ident">zone</span>.<span class="ident">borders</span>.<span class="ident">outgoing_biking</span>,
|
||||
] {
|
||||
<span class="ident">list</span>.<span class="ident">retain</span>(<span class="op">|</span>(<span class="ident">i</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">polygon</span>.<span class="ident">contains_pt</span>(<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">center</span>()));
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">zones</span>
|
||||
<span class="ident">normal_zones</span>.<span class="ident">extend</span>(<span class="ident">remote_zones</span>);
|
||||
<span class="ident">normal_zones</span>
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Zone</span> {
|
||||
|
@ -288,7 +288,7 @@
|
||||
}
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="macro">format!</span>(<span class="string">"Generating scenario {}"</span>, <span class="self">self</span>.<span class="ident">scenario_name</span>));
|
||||
<span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>()
|
||||
<span class="ident">scenario</span>.<span class="ident">remove_weird_schedules</span>(<span class="bool-val">true</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">small_run</span>(<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) -> <span class="ident">ScenarioGenerator</span> {
|
||||
|
@ -110,10 +110,22 @@
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
<span id="122">122</span>
|
||||
<span id="123">123</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstio::MapName</span>;
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">Counter</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Counter</span>, <span class="ident">Timer</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{
|
||||
<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathRequest</span>, <span class="ident">PathStepV2</span>, <span class="ident">PathfinderCaching</span>, <span class="ident">RoadID</span>, <span class="ident">RoutingParams</span>,
|
||||
};
|
||||
@ -207,15 +219,27 @@
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sum</span> <span class="op">=</span> <span class="number">0.0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">n</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">cnt1</span>) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">per_road</span>.<span class="ident">borrow</span>() {
|
||||
<span class="kw">let</span> <span class="ident">cnt1</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">cnt1</span>;
|
||||
<span class="kw">let</span> <span class="ident">cnt2</span> <span class="op">=</span> <span class="ident">other</span>.<span class="ident">per_road</span>.<span class="ident">get</span>(<span class="kw-2">*</span><span class="ident">r</span>);
|
||||
<span class="macro">println!</span>(<span class="string">"{}: {} vs {}"</span>, <span class="ident">r</span>, <span class="ident">cnt1</span>, <span class="ident">cnt2</span>);
|
||||
<span class="ident">sum</span> <span class="op">+</span><span class="op">=</span> (<span class="kw-2">*</span><span class="ident">cnt1</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">-</span> <span class="ident">cnt2</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">powi</span>(<span class="number">2</span>);
|
||||
<span class="macro">println!</span>(
|
||||
<span class="string">"{}: {} vs {}"</span>,
|
||||
<span class="ident">r</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">cnt1</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">cnt2</span>)
|
||||
);
|
||||
<span class="ident">sum</span> <span class="op">+</span><span class="op">=</span> (<span class="ident">cnt1</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">-</span> <span class="ident">cnt2</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">powi</span>(<span class="number">2</span>);
|
||||
<span class="ident">n</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">cnt1</span>) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">per_intersection</span>.<span class="ident">borrow</span>() {
|
||||
<span class="kw">let</span> <span class="ident">cnt1</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">cnt1</span>;
|
||||
<span class="kw">let</span> <span class="ident">cnt2</span> <span class="op">=</span> <span class="ident">other</span>.<span class="ident">per_intersection</span>.<span class="ident">get</span>(<span class="kw-2">*</span><span class="ident">i</span>);
|
||||
<span class="macro">println!</span>(<span class="string">"{}: {} vs {}"</span>, <span class="ident">i</span>, <span class="ident">cnt1</span>, <span class="ident">cnt2</span>);
|
||||
<span class="ident">sum</span> <span class="op">+</span><span class="op">=</span> (<span class="kw-2">*</span><span class="ident">cnt1</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">-</span> <span class="ident">cnt2</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">powi</span>(<span class="number">2</span>);
|
||||
<span class="macro">println!</span>(
|
||||
<span class="string">"{}: {} vs {}"</span>,
|
||||
<span class="ident">i</span>,
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">cnt1</span>),
|
||||
<span class="ident">prettyprint_usize</span>(<span class="ident">cnt2</span>)
|
||||
);
|
||||
<span class="ident">sum</span> <span class="op">+</span><span class="op">=</span> (<span class="ident">cnt1</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">-</span> <span class="ident">cnt2</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">powi</span>(<span class="number">2</span>);
|
||||
<span class="ident">n</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
<span class="macro">println!</span>(<span class="string">"RMSE = {:.2}"</span>, (<span class="ident">sum</span> <span class="op">/</span> <span class="ident">n</span> <span class="kw">as</span> <span class="ident">f64</span>).<span class="ident">sqrt</span>());
|
||||
|
@ -206,6 +206,8 @@
|
||||
<span id="205">205</span>
|
||||
<span id="206">206</span>
|
||||
<span id="207">207</span>
|
||||
<span id="208">208</span>
|
||||
<span id="209">209</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
|
||||
<span class="kw">use</span> <span class="ident">std::fmt</span>;
|
||||
|
||||
@ -328,12 +330,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">remove_weird_schedules</span>(<span class="kw-2">mut</span> <span class="self">self</span>) -> <span class="ident">Scenario</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">remove_weird_schedules</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">verbose</span>: <span class="ident">bool</span>) -> <span class="ident">Scenario</span> {
|
||||
<span class="kw">let</span> <span class="ident">orig</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">people</span>.<span class="ident">len</span>();
|
||||
<span class="self">self</span>.<span class="ident">people</span>.<span class="ident">retain</span>(<span class="op">|</span><span class="ident">person</span><span class="op">|</span> <span class="kw">match</span> <span class="ident">person</span>.<span class="ident">check_schedule</span>() {
|
||||
<span class="prelude-val">Ok</span>(()) => <span class="bool-val">true</span>,
|
||||
<span class="prelude-val">Err</span>(<span class="ident">err</span>) => {
|
||||
<span class="macro">println!</span>(<span class="string">"{}"</span>, <span class="ident">err</span>);
|
||||
<span class="kw">if</span> <span class="ident">verbose</span> {
|
||||
<span class="macro">warn!</span>(<span class="string">"{}"</span>, <span class="ident">err</span>);
|
||||
}
|
||||
<span class="bool-val">false</span>
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `counts` mod in crate `synthpop`."><meta name="keywords" content="rust, rustlang, rust-lang, counts"><title>synthpop::counts - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../synthpop/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module counts</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="counts" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">synthpop</a>::<wbr><a class="mod" href="#">counts</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/synthpop/counts.rs.html#1-111" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../synthpop/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module counts</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="counts" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">synthpop</a>::<wbr><a class="mod" href="#">counts</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/synthpop/counts.rs.html#1-123" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TrafficCounts.html" title="synthpop::counts::TrafficCounts struct">TrafficCounts</a></div><div class="item-right docblock-short"><p>This represents the number of vehicles (or trips, or something else) crossing roads and
|
||||
intersections over some span of time. The data could represent real observations or something
|
||||
from a simulation.</p>
|
||||
|
@ -8,10 +8,10 @@
|
||||
intersections over some span of time. The data could represent real observations or something
|
||||
from a simulation.</p>
|
||||
<p>There’s some nice UIs in other crates to compare counts.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.description" class="structfield small-section-header"><a href="#structfield.description" class="anchor field"></a><code>description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.per_road" class="structfield small-section-header"><a href="#structfield.per_road" class="anchor field"></a><code>per_road: <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><span id="structfield.per_intersection" class="structfield small-section-header"><a href="#structfield.per_intersection" class="anchor field"></a><code>per_intersection: <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#36-111" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_path_requests" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#40-89" title="goto source code">[src]</a></div><a href="#method.from_path_requests" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_path_requests" class="fnname">from_path_requests</a>(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> params: <a class="struct" href="../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> Self</h4></div></summary><div class="docblock"><p>Run pathfinding on all of the requests, then count the throughput on every road and
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.description" class="structfield small-section-header"><a href="#structfield.description" class="anchor field"></a><code>description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.per_road" class="structfield small-section-header"><a href="#structfield.per_road" class="anchor field"></a><code>per_road: <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><span id="structfield.per_intersection" class="structfield small-section-header"><a href="#structfield.per_intersection" class="anchor field"></a><code>per_intersection: <a class="struct" href="../../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#36-123" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_path_requests" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#40-89" title="goto source code">[src]</a></div><a href="#method.from_path_requests" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_path_requests" class="fnname">from_path_requests</a>(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> params: <a class="struct" href="../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> Self</h4></div></summary><div class="docblock"><p>Run pathfinding on all of the requests, then count the throughput on every road and
|
||||
intersection. Each request has the count it should contribute – use
|
||||
<code>PathRequest::deduplicate</code> to easily generate this.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.quickly_compare" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#92-110" title="goto source code">[src]</a></div><a href="#method.quickly_compare" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.quickly_compare" class="fnname">quickly_compare</a>(&self, other: &<a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a>)</h4></div></summary><div class="docblock"><p>Print a comparison of counts. Only look at roads/intersections in <code>self</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.quickly_compare" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#92-122" title="goto source code">[src]</a></div><a href="#method.quickly_compare" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.quickly_compare" class="fnname">quickly_compare</a>(&self, other: &<a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a>)</h4></div></summary><div class="docblock"><p>Print a comparison of counts. Only look at roads/intersections in <code>self</code>.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#14" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#14" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Default" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#25-34" title="goto source code">[src]</a></div><a href="#impl-Default" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.default" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/counts.rs.html#26-33" title="goto source code">[src]</a></div><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</h4></div></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `scenario` mod in crate `synthpop`."><meta name="keywords" content="rust, rustlang, rust-lang, scenario"><title>synthpop::scenario - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../synthpop/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module scenario</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="scenario" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">synthpop</a>::<wbr><a class="mod" href="#">scenario</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/synthpop/scenario.rs.html#1-207" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../synthpop/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module scenario</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="scenario" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">synthpop</a>::<wbr><a class="mod" href="#">scenario</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/synthpop/scenario.rs.html#1-209" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndividTrip.html" title="synthpop::scenario::IndividTrip struct">IndividTrip</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PersonSpec.html" title="synthpop::scenario::PersonSpec struct">PersonSpec</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Scenario.html" title="synthpop::scenario::Scenario struct">Scenario</a></div><div class="item-right docblock-short"><p>A Scenario describes all the input to a simulation. Usually a scenario covers one day.</p>
|
||||
</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.TripPurpose.html" title="synthpop::scenario::TripPurpose enum">TripPurpose</a></div><div class="item-right docblock-short"><p>Lifted from Seattle’s Soundcast model, but seems general enough to use anyhere.</p>
|
||||
|
@ -6,7 +6,7 @@
|
||||
</div><span id="structfield.trips" class="structfield small-section-header"><a href="#structfield.trips" class="anchor field"></a><code>trips: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.IndividTrip.html" title="struct synthpop::scenario::IndividTrip">IndividTrip</a>></code></span><div class="docblock"><p>There must be continuity between trips: each trip starts at the destination of the previous
|
||||
trip. In the case of borders, the outbound and inbound border may be different. This means
|
||||
that there was some sort of “remote” trip happening outside the map that we don’t simulate.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#162-207" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.check_schedule" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#164-206" title="goto source code">[src]</a></div><a href="#method.check_schedule" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.check_schedule" class="fnname">check_schedule</a>(&self) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>></h4></div></summary><div class="docblock"><p>Verify that a person’s trips make sense</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#164-209" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.check_schedule" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#166-208" title="goto source code">[src]</a></div><a href="#method.check_schedule" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.check_schedule" class="fnname">check_schedule</a>(&self) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>></h4></div></summary><div class="docblock"><p>Verify that a person’s trips make sense</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
|
@ -6,7 +6,7 @@
|
||||
pub only_seed_buses: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>,
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A Scenario describes all the input to a simulation. Usually a scenario covers one day.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.scenario_name" class="structfield small-section-header"><a href="#structfield.scenario_name" class="anchor field"></a><code>scenario_name: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.map_name" class="structfield small-section-header"><a href="#structfield.map_name" class="anchor field"></a><code>map_name: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.people" class="structfield small-section-header"><a href="#structfield.people" class="anchor field"></a><code>people: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a>></code></span><span id="structfield.only_seed_buses" class="structfield small-section-header"><a href="#structfield.only_seed_buses" class="anchor field"></a><code>only_seed_buses: <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a><<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>></code></span><div class="docblock"><p>None means seed all buses. Otherwise the route name must be present here.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#106-160" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><div id="method.save" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#107-112" title="goto source code">[src]</a></div><a href="#method.save" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.save" class="fnname">save</a>(&self)</h4></div><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#114-121" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>(map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, name: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a>) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div><div id="method.remove_weird_schedules" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#123-138" title="goto source code">[src]</a></div><a href="#method.remove_weird_schedules" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.remove_weird_schedules" class="fnname">remove_weird_schedules</a>(self) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div><div id="method.all_trips" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#140-142" title="goto source code">[src]</a></div><a href="#method.all_trips" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.all_trips" class="fnname">all_trips</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.IndividTrip.html" title="struct synthpop::scenario::IndividTrip">IndividTrip</a>></h4></div><div id="method.default_scenario_for_map" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#144-159" title="goto source code">[src]</a></div><a href="#method.default_scenario_for_map" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.default_scenario_for_map" class="fnname">default_scenario_for_map</a>(name: &<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#106-162" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><div id="method.save" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#107-112" title="goto source code">[src]</a></div><a href="#method.save" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.save" class="fnname">save</a>(&self)</h4></div><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#114-121" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>(map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, name: &<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a>) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div><div id="method.remove_weird_schedules" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#123-140" title="goto source code">[src]</a></div><a href="#method.remove_weird_schedules" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.remove_weird_schedules" class="fnname">remove_weird_schedules</a>(self, verbose: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div><div id="method.all_trips" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#142-144" title="goto source code">[src]</a></div><a href="#method.all_trips" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.all_trips" class="fnname">all_trips</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.IndividTrip.html" title="struct synthpop::scenario::IndividTrip">IndividTrip</a>></h4></div><div id="method.default_scenario_for_map" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#146-161" title="goto source code">[src]</a></div><a href="#method.default_scenario_for_map" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.default_scenario_for_map" class="fnname">default_scenario_for_map</a>(name: &<a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.Scenario.html" title="struct synthpop::scenario::Scenario">Scenario</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deserialize" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/synthpop/scenario.rs.html#15" title="goto source code">[src]</a></div><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></div></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
@ -6,7 +6,7 @@
|
||||
</div><span id="structfield.trips" class="structfield small-section-header"><a href="#structfield.trips" class="anchor field"></a><code>trips: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="scenario/struct.IndividTrip.html" title="struct synthpop::scenario::IndividTrip">IndividTrip</a>></code></span><div class="docblock"><p>There must be continuity between trips: each trip starts at the destination of the previous
|
||||
trip. In the case of borders, the outbound and inbound border may be different. This means
|
||||
that there was some sort of “remote” trip happening outside the map that we don’t simulate.</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#162-207" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="scenario/struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.check_schedule" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#164-206" title="goto source code">[src]</a></div><a href="#method.check_schedule" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.check_schedule" class="fnname">check_schedule</a>(&self) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>></h4></div></summary><div class="docblock"><p>Verify that a person’s trips make sense</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#164-209" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="scenario/struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.check_schedule" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#166-208" title="goto source code">[src]</a></div><a href="#method.check_schedule" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.check_schedule" class="fnname">check_schedule</a>(&self) -> <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.unit.html">()</a>></h4></div></summary><div class="docblock"><p>Verify that a person’s trips make sense</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="scenario/struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="scenario/struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="scenario/struct.PersonSpec.html" title="struct synthpop::scenario::PersonSpec">PersonSpec</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/scenario.rs.html#25" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.58.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.58.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,10 +8,10 @@
|
||||
intersections over some span of time. The data could represent real observations or something
|
||||
from a simulation.</p>
|
||||
<p>There’s some nice UIs in other crates to compare counts.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.description" class="structfield small-section-header"><a href="#structfield.description" class="anchor field"></a><code>description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.per_road" class="structfield small-section-header"><a href="#structfield.per_road" class="anchor field"></a><code>per_road: <a class="struct" href="../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><span id="structfield.per_intersection" class="structfield small-section-header"><a href="#structfield.per_intersection" class="anchor field"></a><code>per_intersection: <a class="struct" href="../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#36-111" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_path_requests" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#40-89" title="goto source code">[src]</a></div><a href="#method.from_path_requests" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_path_requests" class="fnname">from_path_requests</a>(<br> map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> params: <a class="struct" href="../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> Self</h4></div></summary><div class="docblock"><p>Run pathfinding on all of the requests, then count the throughput on every road and
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.description" class="structfield small-section-header"><a href="#structfield.description" class="anchor field"></a><code>description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.per_road" class="structfield small-section-header"><a href="#structfield.per_road" class="anchor field"></a><code>per_road: <a class="struct" href="../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>></code></span><span id="structfield.per_intersection" class="structfield small-section-header"><a href="#structfield.per_intersection" class="anchor field"></a><code>per_intersection: <a class="struct" href="../abstutil/collections/struct.Counter.html" title="struct abstutil::collections::Counter">Counter</a><<a class="struct" href="../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#36-123" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_path_requests" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#40-89" title="goto source code">[src]</a></div><a href="#method.from_path_requests" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_path_requests" class="fnname">from_path_requests</a>(<br> map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> description: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> requests: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../map_model/pathfind/v1/struct.PathRequest.html" title="struct map_model::pathfind::v1::PathRequest">PathRequest</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.slice.html">]</a>, <br> params: <a class="struct" href="../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> cache_custom: <a class="enum" href="../map_model/pathfind/pathfinder/enum.PathfinderCaching.html" title="enum map_model::pathfind::pathfinder::PathfinderCaching">PathfinderCaching</a>, <br> timer: &mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a><'_><br>) -> Self</h4></div></summary><div class="docblock"><p>Run pathfinding on all of the requests, then count the throughput on every road and
|
||||
intersection. Each request has the count it should contribute – use
|
||||
<code>PathRequest::deduplicate</code> to easily generate this.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.quickly_compare" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#92-110" title="goto source code">[src]</a></div><a href="#method.quickly_compare" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.quickly_compare" class="fnname">quickly_compare</a>(&self, other: &<a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a>)</h4></div></summary><div class="docblock"><p>Print a comparison of counts. Only look at roads/intersections in <code>self</code>.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.quickly_compare" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#92-122" title="goto source code">[src]</a></div><a href="#method.quickly_compare" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.quickly_compare" class="fnname">quickly_compare</a>(&self, other: &<a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a>)</h4></div></summary><div class="docblock"><p>Print a comparison of counts. Only look at roads/intersections in <code>self</code>.</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#14" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#14" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Default" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#25-34" title="goto source code">[src]</a></div><a href="#impl-Default" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="counts/struct.TrafficCounts.html" title="struct synthpop::counts::TrafficCounts">TrafficCounts</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.default" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/synthpop/counts.rs.html#26-33" title="goto source code">[src]</a></div><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</h4></div></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.58.1/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
|
Loading…
Reference in New Issue
Block a user