mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
deploy: 5dba8f5896
This commit is contained in:
parent
d8bf852d0c
commit
906e40b269
@ -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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - 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 src="../../../storage.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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</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><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><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><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Thu, 03 Dec 2020 03:36:26 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-f38555f90777146b/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Thu, 03 Dec 2020 18:37:29 +0000";</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
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="API documentation for the Rust `allow_block_the_box` fn in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, allow_block_the_box"><title>sim::mechanics::intersection::allow_block_the_box - 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 src="../../../storage.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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</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'>mechanics</a>::<wbr><a href='index.html'>intersection</a></p><script>window.sidebarCurrent = {name: 'allow_block_the_box', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><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><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/intersection.rs.html#909-935' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a>::<wbr><a class="fn" href=''>allow_block_the_box</a></span></h1><pre class='rust fn'>fn allow_block_the_box(i: &<a class="struct" href="../../../map_model/objects/intersection/struct.Intersection.html" title="struct map_model::objects::intersection::Intersection">Intersection</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/intersection.rs.html#932-958' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a href='index.html'>intersection</a>::<wbr><a class="fn" href=''>allow_block_the_box</a></span></h1><pre class='rust fn'>fn allow_block_the_box(i: &<a class="struct" href="../../../map_model/objects/intersection/struct.Intersection.html" title="struct map_model::objects::intersection::Intersection">Intersection</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "sim";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -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 `intersection` mod in crate `sim`."><meta name="keywords" content="rust, rustlang, rust-lang, intersection"><title>sim::mechanics::intersection - 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 src="../../../storage.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 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</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 intersection</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a></p><script>window.sidebarCurrent = {name: 'intersection', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><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><span class="help-button">?</span>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/intersection.rs.html#1-935' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>intersection</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" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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/sim/mechanics/intersection.rs.html#1-958' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>sim</a>::<wbr><a href='../index.html'>mechanics</a>::<wbr><a class="mod" href=''>intersection</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.IntersectionSimState.html" title='sim::mechanics::intersection::IntersectionSimState struct'>IntersectionSimState</a></td><td class='docblock-short'><p>Manages conflicts at intersections. When an agent has reached the end of a lane, they call
|
||||
maybe_start_turn to make a Request. Based on the intersection type (stop sign, traffic signal,
|
||||
or a "freeform policy"), the Request gets queued or immediately accepted. When agents finish
|
||||
|
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
||||
current_stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
stage_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>,
|
||||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.current_stage" class="structfield small-section-header"><a href="#structfield.current_stage" class="anchor field"></a><code>current_stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.stage_ends_at" class="structfield small-section-header"><a href="#structfield.stage_ends_at" class="anchor field"></a><code>stage_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#879-907' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>fn <a href='#method.new' class='fnname'>new</a>(<br> id: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> scheduler: &mut <a class="struct" href="../../../sim/scheduler/struct.Scheduler.html" title="struct sim::scheduler::Scheduler">Scheduler</a><br>) -> <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#880-906' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><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="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' 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>
|
||||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.current_stage" class="structfield small-section-header"><a href="#structfield.current_stage" class="anchor field"></a><code>current_stage: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.stage_ends_at" class="structfield small-section-header"><a href="#structfield.stage_ends_at" class="anchor field"></a><code>stage_ends_at: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#902-930' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>fn <a href='#method.new' class='fnname'>new</a>(<br> id: <a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <br> now: <a class="struct" href="../../../geom/time/struct.Time.html" title="struct geom::time::Time">Time</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> scheduler: &mut <a class="struct" href="../../../sim/scheduler/struct.Scheduler.html" title="struct sim::scheduler::Scheduler">Scheduler</a><br>) -> <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#903-929' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><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="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' 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"><code>fn <a href='https://doc.rust-lang.org/nightly/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/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-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><h3 id='impl-Deserialize%3C%27de%3E' class='impl'><code class='in-band'>impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl-Deserialize%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deserialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize' class='fnname'>deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.117/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.117/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.117/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl <a class="trait" href="https://docs.rs/serde/1.0.117/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../sim/mechanics/intersection/struct.SignalState.html" title="struct sim::mechanics::intersection::SignalState">SignalState</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method hidden"><code>fn <a href='https://docs.rs/serde/1.0.117/serde/ser/trait.Serialize.html#tymethod.serialize' class='fnname'>serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.117/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.117/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.117/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a class='srclink' href='../../../src/sim/mechanics/intersection.rs.html#71' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.117/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
|
@ -558,7 +558,7 @@
|
||||
.<span class="ident">expect</span>(<span class="kw-2">&</span><span class="macro">format</span><span class="macro">!</span>(<span class="string">"can't find {}"</span>, <span class="ident">config</span>.<span class="ident">start</span>));
|
||||
<span class="kw">let</span> <span class="ident">player</span> <span class="op">=</span> <span class="ident">Player</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">GamehState</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">config</span>);
|
||||
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">GameState</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">config</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
|
@ -114,7 +114,7 @@
|
||||
<span class="doccomment">/// The output of `rustdoc -V`</span>
|
||||
<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">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</span>;
|
||||
<span class="doccomment">/// The built-time in RFC2822, UTC</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">"Thu, 03 Dec 2020 03:36:26 +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">"Thu, 03 Dec 2020 18:37:29 +0000"</span>;
|
||||
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</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">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -936,6 +936,29 @@
|
||||
<span id="933">933</span>
|
||||
<span id="934">934</span>
|
||||
<span id="935">935</span>
|
||||
<span id="936">936</span>
|
||||
<span id="937">937</span>
|
||||
<span id="938">938</span>
|
||||
<span id="939">939</span>
|
||||
<span id="940">940</span>
|
||||
<span id="941">941</span>
|
||||
<span id="942">942</span>
|
||||
<span id="943">943</span>
|
||||
<span id="944">944</span>
|
||||
<span id="945">945</span>
|
||||
<span id="946">946</span>
|
||||
<span id="947">947</span>
|
||||
<span id="948">948</span>
|
||||
<span id="949">949</span>
|
||||
<span id="950">950</span>
|
||||
<span id="951">951</span>
|
||||
<span id="952">952</span>
|
||||
<span id="953">953</span>
|
||||
<span id="954">954</span>
|
||||
<span id="955">955</span>
|
||||
<span id="956">956</span>
|
||||
<span id="957">957</span>
|
||||
<span id="958">958</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">HashMap</span>, <span class="ident">HashSet</span>};
|
||||
|
||||
@ -947,7 +970,7 @@
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Duration</span>, <span class="ident">Time</span>};
|
||||
<span class="kw">use</span> <span class="ident">map_model</span>::{
|
||||
<span class="ident">ControlStopSign</span>, <span class="ident">ControlTrafficSignal</span>, <span class="ident">Intersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">PhaseType</span>,
|
||||
<span class="ident">Traversable</span>, <span class="ident">TurnID</span>, <span class="ident">TurnPriority</span>, <span class="ident">TurnType</span>,
|
||||
<span class="ident">Traversable</span>, <span class="ident">TurnID</span>, <span class="ident">TurnPriority</span>, <span class="ident">TurnType</span>, <span class="ident">UberTurn</span>,
|
||||
};
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">mechanics</span>::<span class="ident">car</span>::<span class="ident">Car</span>;
|
||||
@ -1579,12 +1602,15 @@
|
||||
<span class="ident">queues</span>: <span class="kw-2">&</span><span class="ident">HashMap</span><span class="op"><</span><span class="ident">Traversable</span>, <span class="ident">Queue</span><span class="op">></span>,
|
||||
) {
|
||||
<span class="comment">// Don't use self.blocked_by -- that gets complicated with uber-turns and such.</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// This also assumes default values for handle_uber_turns, disable_turn_conflicts, etc!</span>
|
||||
<span class="kw">for</span> <span class="ident">state</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">values</span>() {
|
||||
<span class="kw">for</span> (<span class="ident">req</span>, <span class="ident">started_at</span>) <span class="kw">in</span> <span class="kw-2">&</span><span class="ident">state</span>.<span class="ident">waiting</span> {
|
||||
<span class="kw">let</span> <span class="ident">turn</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_t</span>(<span class="ident">req</span>.<span class="ident">turn</span>);
|
||||
<span class="comment">// In the absence of other explanations, the agent must be pausing at a stop sign</span>
|
||||
<span class="comment">// or before making an unprotected movement, aka, in the middle of</span>
|
||||
<span class="comment">// WAIT_AT_STOP_SIGN or WAIT_BEFORE_YIELD_AT_TRAFFIC_SIGNAL.</span>
|
||||
<span class="comment">// WAIT_AT_STOP_SIGN or WAIT_BEFORE_YIELD_AT_TRAFFIC_SIGNAL. Or they're waiting for</span>
|
||||
<span class="comment">// a signal to change.</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cause</span> <span class="op">=</span> <span class="ident">DelayCause</span>::<span class="ident">Intersection</span>(<span class="ident">state</span>.<span class="ident">id</span>);
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">other</span>) <span class="op">=</span> <span class="ident">state</span>.<span class="ident">accepted</span>.<span class="ident">iter</span>().<span class="ident">find</span>(<span class="op">|</span><span class="ident">other</span><span class="op">|</span> {
|
||||
<span class="ident">turn</span>.<span class="ident">conflicts_with</span>(<span class="ident">map</span>.<span class="ident">get_t</span>(<span class="ident">other</span>.<span class="ident">turn</span>)) <span class="op">|</span><span class="op">|</span> <span class="ident">turn</span>.<span class="ident">id</span> <span class="op">=</span><span class="op">=</span> <span class="ident">other</span>.<span class="ident">turn</span>
|
||||
@ -1592,16 +1618,36 @@
|
||||
<span class="ident">cause</span> <span class="op">=</span> <span class="ident">DelayCause</span>::<span class="ident">Agent</span>(<span class="ident">other</span>.<span class="ident">agent</span>);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw">let</span> <span class="ident">AgentID</span>::<span class="ident">Car</span>(<span class="ident">car</span>) <span class="op">=</span> <span class="ident">req</span>.<span class="ident">agent</span> {
|
||||
<span class="kw">let</span> <span class="ident">queue</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">queues</span>[<span class="kw-2">&</span><span class="ident">Traversable</span>::<span class="ident">Lane</span>(<span class="ident">req</span>.<span class="ident">turn</span>.<span class="ident">dst</span>)];
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">queue</span>.<span class="ident">room_for_car</span>(<span class="ident">cars</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">car</span>).<span class="ident">unwrap</span>()) {
|
||||
<span class="kw">let</span> <span class="ident">car</span> <span class="op">=</span> <span class="ident">cars</span>.<span class="ident">get</span>(<span class="kw-2">&</span><span class="ident">car</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">queue</span>.<span class="ident">room_for_car</span>(<span class="ident">car</span>) {
|
||||
<span class="comment">// TODO Or it's reserved due to an uber turn or something</span>
|
||||
<span class="kw">let</span> <span class="ident">blocker</span> <span class="op">=</span> <span class="ident">queue</span>.<span class="ident">cars</span>.<span class="ident">back</span>().<span class="ident">cloned</span>().<span class="ident">or</span>(<span class="ident">queue</span>.<span class="ident">laggy_head</span>).<span class="ident">unwrap</span>();
|
||||
<span class="ident">cause</span> <span class="op">=</span> <span class="ident">DelayCause</span>::<span class="ident">Agent</span>(<span class="ident">AgentID</span>::<span class="ident">Car</span>(<span class="ident">blocker</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">ut</span>) <span class="op">=</span> <span class="ident">car</span>.<span class="ident">router</span>.<span class="ident">get_path</span>().<span class="ident">about_to_start_ut</span>() {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">blocker</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">check_for_conflicts_before_uber_turn</span>(<span class="ident">ut</span>, <span class="ident">map</span>) {
|
||||
<span class="ident">cause</span> <span class="op">=</span> <span class="ident">DelayCause</span>::<span class="ident">Agent</span>(<span class="ident">blocker</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="ident">graph</span>.<span class="ident">insert</span>(<span class="ident">req</span>.<span class="ident">agent</span>, (<span class="ident">now</span> <span class="op">-</span> <span class="kw-2">*</span><span class="ident">started_at</span>, <span class="ident">cause</span>));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// See if any agent is currently performing a turn that conflicts with an uber-turn. Doesn't</span>
|
||||
<span class="doccomment">/// check for room on the queues.</span>
|
||||
<span class="kw">fn</span> <span class="ident">check_for_conflicts_before_uber_turn</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ut</span>: <span class="kw-2">&</span><span class="ident">UberTurn</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">AgentID</span><span class="op">></span> {
|
||||
<span class="kw">for</span> <span class="ident">t</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="ident">ut</span>.<span class="ident">path</span> {
|
||||
<span class="kw">let</span> <span class="ident">turn</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_t</span>(<span class="kw-2">*</span><span class="ident">t</span>);
|
||||
<span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">state</span>[<span class="kw-2">&</span><span class="ident">turn</span>.<span class="ident">id</span>.<span class="ident">parent</span>];
|
||||
<span class="kw">for</span> <span class="ident">other</span> <span class="kw">in</span> <span class="ident">state</span>.<span class="ident">accepted</span>.<span class="ident">iter</span>().<span class="ident">chain</span>(<span class="ident">state</span>.<span class="ident">reserved</span>.<span class="ident">iter</span>()) {
|
||||
<span class="kw">if</span> <span class="ident">map</span>.<span class="ident">get_t</span>(<span class="ident">other</span>.<span class="ident">turn</span>).<span class="ident">conflicts_with</span>(<span class="ident">turn</span>) {
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">other</span>.<span class="ident">agent</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Stuff to support maybe_start_turn</span>
|
||||
|
Loading…
Reference in New Issue
Block a user