This commit is contained in:
dabreegster 2021-07-25 17:39:53 +00:00
parent 5cff734072
commit aa9542f773
14 changed files with 26 additions and 22 deletions

View File

@ -1,6 +1,6 @@
<!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 game::pregame::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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><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">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</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)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b46195c1bf7e0216/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = r&quot;Sun, 25 Jul 2021 17:28:41 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</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)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b46195c1bf7e0216/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = r&quot;Sun, 25 Jul 2021 17:38:42 +0000&quot;;</pre><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -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 `pick_mode` fn in crate `popdat`."><meta name="keywords" content="rust, rustlang, rust-lang, pick_mode"><title>pick_mode in popdat::make_person - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</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"><p class="location"><a href="../index.html">popdat</a>::<wbr><a href="index.html">make_person</a></p><div id="sidebar-vars" data-name="pick_mode" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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">make_person</a>::<wbr><a class="fn" href="">pick_mode</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/popdat/make_person.rs.html#220-290" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn pick_mode(<br>&nbsp;&nbsp;&nbsp;&nbsp;from: <a class="enum" href="../../sim/make/spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: <a class="enum" href="../../sim/make/spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;config: &amp;<a class="struct" href="../struct.Config.html" title="struct popdat::Config">Config</a><br>) -&gt; <a class="enum" href="../../sim/trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a></pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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">make_person</a>::<wbr><a class="fn" href="">pick_mode</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/popdat/make_person.rs.html#223-293" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn pick_mode(<br>&nbsp;&nbsp;&nbsp;&nbsp;from: <a class="enum" href="../../sim/make/spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: <a class="enum" href="../../sim/make/spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;config: &amp;<a class="struct" href="../struct.Config.html" title="struct popdat::Config">Config</a><br>) -&gt; <a class="enum" href="../../sim/trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a></pre></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>
<script src="../../main.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!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 `make_person` mod in crate `popdat`."><meta name="keywords" content="rust, rustlang, rust-lang, make_person"><title>popdat::make_person - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</div><a href='../../popdat/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module make_person</p><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><p class="location"><a href="../index.html">popdat</a></p><div id="sidebar-vars" data-name="make_person" 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"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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="">make_person</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/popdat/make_person.rs.html#1-290" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></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="">make_person</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/popdat/make_person.rs.html#1-293" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.PersonFactory.html" title="popdat::make_person::PersonFactory struct">PersonFactory</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.make_people.html" title="popdat::make_person::make_people fn">make_people</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.pick_mode.html" title="popdat::make_person::pick_mode fn">pick_mode</a></td><td class="docblock-short"></td></tr></table></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>
<script src="../../main.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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 `create_prole` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, create_prole"><title>create_prole in sim::make::activity_model - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><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">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a></p><div id="sidebar-vars" data-name="create_prole" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">create_prole</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#205-279" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn create_prole(<br>&nbsp;&nbsp;&nbsp;&nbsp;home: <a class="enum" href="../spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;work: <a class="enum" href="../spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../scenario/struct.PersonSpec.html" title="struct sim::make::scenario::PersonSpec">PersonSpec</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">create_prole</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#204-278" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn create_prole(<br>&nbsp;&nbsp;&nbsp;&nbsp;home: <a class="enum" href="../spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;work: <a class="enum" href="../spawner/enum.TripEndpoint.html" title="enum sim::make::spawner::TripEndpoint">TripEndpoint</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../scenario/struct.PersonSpec.html" title="struct sim::make::scenario::PersonSpec">PersonSpec</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -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 `rand_time` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, rand_time"><title>rand_time in sim::make::activity_model - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><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">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a></p><div id="sidebar-vars" data-name="rand_time" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">rand_time</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#320-323" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn rand_time(rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, low: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, high: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>) -&gt; <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">rand_time</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#319-322" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn rand_time(rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, low: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, high: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>) -&gt; <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -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 `select_trip_mode` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, select_trip_mode"><title>select_trip_mode in sim::make::activity_model - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><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">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a></p><div id="sidebar-vars" data-name="select_trip_mode" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">select_trip_mode</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#281-318" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn select_trip_mode(distance: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>) -&gt; <a class="enum" href="../../trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">activity_model</a>::<wbr><a class="fn" href="">select_trip_mode</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#280-317" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn select_trip_mode(distance: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>) -&gt; <a class="enum" href="../../trips/enum.TripMode.html" title="enum sim::trips::TripMode">TripMode</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="sim" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!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="An activity model creates “people” that follow a set schedule of activities through the day. Each activity (like shopping, working, sleeping) lasts some time, and requires the person to go somewhere at some time. This is an extremely simple activity model that just uses data inferred from OSM."><meta name="keywords" content="rust, rustlang, rust-lang, activity_model"><title>sim::make::activity_model - 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><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><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">&#9776;</div><a href='../../../sim/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module activity_model</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a></p><div id="sidebar-vars" data-name="activity_model" 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"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></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" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a class="mod" href="">activity_model</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#1-323" title="goto source code">[src]</a></span></h1><div class="docblock"><p>An activity model creates “people” that follow a set schedule of activities through the day.
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">sim</a>::<wbr><a href="../index.html">make</a>::<wbr><a class="mod" href="">activity_model</a><button id="copy-path" onclick="copy_path(this)"></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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#1-322" title="goto source code">[src]</a></span></h1><div class="docblock"><p>An activity model creates “people” that follow a set schedule of activities through the day.
Each activity (like shopping, working, sleeping) lasts some time, and requires the person to go
somewhere at some time. This is an extremely simple activity model that just uses data inferred
from OSM.</p>

View File

@ -7,7 +7,7 @@
pub spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;,
pub border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;,
}</pre></div><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/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</code></span><span id="structfield.spawn_over_time" class="structfield small-section-header"><a href="#structfield.spawn_over_time" class="anchor field"></a><code>spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;</code></span><span id="structfield.border_spawn_over_time" class="structfield small-section-header"><a href="#structfield.border_spawn_over_time" class="anchor field"></a><code>border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;</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><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#20-203" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.proletariat_robot" class="method"><code>pub fn <a href="#method.proletariat_robot" class="fnname">proletariat_robot</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="../scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.proletariat_robot" class="anchor"></a><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#22-202" title="goto source code">[src]</a></h4><div class="docblock"><p>Designed in https://github.com/a-b-street/abstreet/issues/154</p>
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/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</code></span><span id="structfield.spawn_over_time" class="structfield small-section-header"><a href="#structfield.spawn_over_time" class="anchor field"></a><code>spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;</code></span><span id="structfield.border_spawn_over_time" class="structfield small-section-header"><a href="#structfield.border_spawn_over_time" class="anchor field"></a><code>border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;</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><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#20-202" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.proletariat_robot" class="method"><code>pub fn <a href="#method.proletariat_robot" class="fnname">proletariat_robot</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="../scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.proletariat_robot" class="anchor"></a><a class="srclink" href="../../../src/sim/make/activity_model.rs.html#22-201" title="goto source code">[src]</a></h4><div class="docblock"><p>Designed in https://github.com/a-b-street/abstreet/issues/154</p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#56-147" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.generate" class="method"><code>pub fn <a href="#method.generate" class="fnname">generate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="../scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.generate" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#58-93" title="goto source code">[src]</a></h4><h4 id="method.small_run" class="method"><code>pub fn <a href="#method.small_run" class="fnname">small_run</a>(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.small_run" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#95-137" title="goto source code">[src]</a></h4><h4 id="method.empty" class="method"><code>pub fn <a href="#method.empty" class="fnname">empty</a>(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.empty" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#139-146" title="goto source code">[src]</a></h4></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><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>

View File

@ -7,7 +7,7 @@
pub spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;,
pub border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;,
}</pre></div><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/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</code></span><span id="structfield.spawn_over_time" class="structfield small-section-header"><a href="#structfield.spawn_over_time" class="anchor field"></a><code>spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;</code></span><span id="structfield.border_spawn_over_time" class="structfield small-section-header"><a href="#structfield.border_spawn_over_time" class="anchor field"></a><code>border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;</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><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/sim/make/activity_model.rs.html#20-203" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.proletariat_robot" class="method"><code>pub fn <a href="#method.proletariat_robot" class="fnname">proletariat_robot</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="make/scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.proletariat_robot" class="anchor"></a><a class="srclink" href="../src/sim/make/activity_model.rs.html#22-202" title="goto source code">[src]</a></h4><div class="docblock"><p>Designed in https://github.com/a-b-street/abstreet/issues/154</p>
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/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</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/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;</code></span><span id="structfield.spawn_over_time" class="structfield small-section-header"><a href="#structfield.spawn_over_time" class="anchor field"></a><code>spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.SpawnOverTime.html" title="struct sim::make::generator::SpawnOverTime">SpawnOverTime</a>&gt;</code></span><span id="structfield.border_spawn_over_time" class="structfield small-section-header"><a href="#structfield.border_spawn_over_time" class="anchor field"></a><code>border_spawn_over_time: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="make/generator/struct.BorderSpawnOverTime.html" title="struct sim::make::generator::BorderSpawnOverTime">BorderSpawnOverTime</a>&gt;</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><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/sim/make/activity_model.rs.html#20-202" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.proletariat_robot" class="method"><code>pub fn <a href="#method.proletariat_robot" class="fnname">proletariat_robot</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="make/scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.proletariat_robot" class="anchor"></a><a class="srclink" href="../src/sim/make/activity_model.rs.html#22-201" title="goto source code">[src]</a></h4><div class="docblock"><p>Designed in https://github.com/a-b-street/abstreet/issues/154</p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#56-147" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.generate" class="method"><code>pub fn <a href="#method.generate" class="fnname">generate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="make/scenario/struct.Scenario.html" title="struct sim::make::scenario::Scenario">Scenario</a></code><a href="#method.generate" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#58-93" title="goto source code">[src]</a></h4><h4 id="method.small_run" class="method"><code>pub fn <a href="#method.small_run" class="fnname">small_run</a>(map: &amp;<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.small_run" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#95-137" title="goto source code">[src]</a></h4><h4 id="method.empty" class="method"><code>pub fn <a href="#method.empty" class="fnname">empty</a>(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.empty" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#139-146" title="goto source code">[src]</a></h4></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><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="make/generator/struct.ScenarioGenerator.html" title="struct sim::make::generator::ScenarioGenerator">ScenarioGenerator</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../src/sim/make/generator.rs.html#19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>

View File

@ -178,7 +178,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.53.0 (53cb7b09b 2021-06-17)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</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">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Sun, 25 Jul 2021 17:28:41 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Sun, 25 Jul 2021 17:38:42 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</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">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -291,6 +291,9 @@
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
@ -490,9 +493,12 @@
<span class="self">self</span>.<span class="ident">find_building_for_activity</span>(<span class="ident">activity</span>, <span class="ident">current_location</span>, <span class="ident">map</span>, <span class="ident">rng</span>)
{
<span class="ident">TripEndpoint::Bldg</span>(<span class="ident">destination</span>)
} <span class="kw">else</span> {
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">i</span>) <span class="op">=</span> <span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>) {
<span class="comment">// No buildings satisfy the activity. Just go somewhere off-map.</span>
<span class="ident">TripEndpoint::Border</span>(<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>).<span class="ident">unwrap</span>())
<span class="ident">TripEndpoint::Border</span>(<span class="kw-2">*</span><span class="ident">i</span>)
} <span class="kw">else</span> {
<span class="comment">// Broken map without borders. Don&#39;t crash, just skip the person</span>
<span class="kw">continue</span>;
};
<span class="kw">let</span> <span class="ident">mode</span> <span class="op">=</span> <span class="ident">pick_mode</span>(<span class="ident">current_location</span>, <span class="ident">goto</span>, <span class="ident">map</span>, <span class="ident">rng</span>, <span class="ident">config</span>);

View File

@ -323,7 +323,6 @@
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! An activity model creates &quot;people&quot; that follow a set schedule of activities through the day.</span>
<span class="doccomment">//! Each activity (like shopping, working, sleeping) lasts some time, and requires the person to go</span>
@ -446,9 +445,8 @@
.<span class="ident">filter</span>(<span class="op">|</span><span class="ident">b</span><span class="op">|</span> <span class="ident">b</span>.<span class="ident">is_incoming_border</span>())
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">b</span><span class="op">|</span> <span class="ident">TripEndpoint::Border</span>(<span class="ident">b</span>.<span class="ident">id</span>))
.<span class="ident">collect</span>();
<span class="macro">assert!</span>(<span class="op">!</span><span class="ident">commuter_borders</span>.<span class="ident">is_empty</span>());
<span class="kw">let</span> <span class="ident">person_params</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">num_trips</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> {
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> {
<span class="kw">let</span> (<span class="ident">is_local_resident</span>, <span class="ident">is_local_worker</span>) <span class="op">=</span> (
<span class="ident">rng</span>.<span class="ident">gen_bool</span>(<span class="ident">prob_local_resident</span>),
<span class="ident">rng</span>.<span class="ident">gen_bool</span>(<span class="ident">prob_local_worker</span>),
@ -457,20 +455,20 @@
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">residence</span>) <span class="op">=</span> <span class="ident">residents</span>.<span class="ident">pop</span>() {
<span class="ident">TripEndpoint::Bldg</span>(<span class="ident">residence</span>)
} <span class="kw">else</span> {
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>).<span class="ident">unwrap</span>()
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>)<span class="question-mark">?</span>
}
} <span class="kw">else</span> {
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>).<span class="ident">unwrap</span>()
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>)<span class="question-mark">?</span>
};
<span class="kw">let</span> <span class="ident">work</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">is_local_worker</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">workplace</span>) <span class="op">=</span> <span class="ident">workers</span>.<span class="ident">pop</span>() {
<span class="ident">TripEndpoint::Bldg</span>(<span class="ident">workplace</span>)
} <span class="kw">else</span> {
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>).<span class="ident">unwrap</span>()
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>)<span class="question-mark">?</span>
}
} <span class="kw">else</span> {
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>).<span class="ident">unwrap</span>()
<span class="kw-2">*</span><span class="ident">commuter_borders</span>.<span class="ident">choose</span>(<span class="ident">rng</span>)<span class="question-mark">?</span>
};
<span class="kw">match</span> (<span class="kw-2">&amp;</span><span class="ident">home</span>, <span class="kw-2">&amp;</span><span class="ident">work</span>) {
@ -490,7 +488,7 @@
(<span class="kw">_</span>, <span class="ident">TripEndpoint::SuddenlyAppear</span>(<span class="kw">_</span>)) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable!</span>(),
};
(<span class="ident">home</span>, <span class="ident">work</span>, <span class="ident">fork_rng</span>(<span class="ident">rng</span>))
<span class="prelude-val">Some</span>((<span class="ident">home</span>, <span class="ident">work</span>, <span class="ident">fork_rng</span>(<span class="ident">rng</span>)))
})
.<span class="ident">collect</span>();