mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-27 06:52:10 +03:00
deploy: 751a353b19
This commit is contained in:
parent
9ffa3cb981
commit
f62eb34864
@ -5,6 +5,6 @@
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_gui::tools::title_screen::built_info</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../map_gui/index.html"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><div id="settings-menu" tabindex="-1">
|
||||
<a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div>
|
||||
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-75a1a9aea4e34b56/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.63.0/std/primitive.str.html">str</a> = r"Fri, 26 Aug 2022 13:31:12 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-75a1a9aea4e34b56/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.63.0/std/primitive.str.html">str</a> = r"Fri, 26 Aug 2022 16:02:24 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.63.0 (4b91a6ea7 2022-08-08)" ></div>
|
||||
</body></html>
|
@ -5,7 +5,7 @@
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_model::connectivity</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../map_model/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><div id="settings-menu" tabindex="-1">
|
||||
<a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div>
|
||||
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">map_model</a>::<wbr><a href="index.html">connectivity</a>::<wbr><a class="fn" href="#">vehicle_cost</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/map_model/pathfind/vehicles.rs.html#282-372">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn vehicle_cost(<br> dr: <a class="struct" href="../objects/road/struct.DirectedRoadID.html" title="struct map_model::objects::road::DirectedRoadID">DirectedRoadID</a>, <br> mvmnt: <a class="struct" href="../objects/movement/struct.MovementID.html" title="struct map_model::objects::movement::MovementID">MovementID</a>, <br> constraints: <a class="enum" href="../pathfind/enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> params: &<a class="struct" href="../pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.63.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This returns the pathfinding cost of crossing one road and turn, in units of time. It factors
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">map_model</a>::<wbr><a href="index.html">connectivity</a>::<wbr><a class="fn" href="#">vehicle_cost</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/map_model/pathfind/vehicles.rs.html#288-378">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn vehicle_cost(<br> dr: <a class="struct" href="../objects/road/struct.DirectedRoadID.html" title="struct map_model::objects::road::DirectedRoadID">DirectedRoadID</a>, <br> mvmnt: <a class="struct" href="../objects/movement/struct.MovementID.html" title="struct map_model::objects::movement::MovementID">MovementID</a>, <br> constraints: <a class="enum" href="../pathfind/enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> params: &<a class="struct" href="../pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.63.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This returns the pathfinding cost of crossing one road and turn, in units of time. It factors
|
||||
in the ideal time to cross the space and penalties for entering an access-restricted zone,
|
||||
taking an unprotected turn, or going up a steep hill for some vehicle types. If this returns
|
||||
<code>None</code>, then the movement isn’t actually allowed.</p>
|
||||
|
@ -5,5 +5,5 @@
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_model::pathfind::vehicles</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../map_model/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><div id="settings-menu" tabindex="-1">
|
||||
<a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div>
|
||||
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">vehicles</a>::<wbr><a class="fn" href="#">make_input_graph</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#196-276">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_input_graph(<br> constraints: <a class="enum" href="../enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> nodes: &<a class="struct" href="../node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a><<a class="enum" href="enum.Node.html" title="enum map_model::pathfind::vehicles::Node">Node</a>>, <br> uber_turns: &[<a class="struct" href="../uber_turns/struct.UberTurnV2.html" title="struct map_model::pathfind::uber_turns::UberTurnV2">UberTurnV2</a>], <br> params: &<a class="struct" href="../struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> InputGraph</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.63.0 (4b91a6ea7 2022-08-08)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">vehicles</a>::<wbr><a class="fn" href="#">make_input_graph</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#196-282">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_input_graph(<br> constraints: <a class="enum" href="../enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> nodes: &<a class="struct" href="../node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a><<a class="enum" href="enum.Node.html" title="enum map_model::pathfind::vehicles::Node">Node</a>>, <br> uber_turns: &[<a class="struct" href="../uber_turns/struct.UberTurnV2.html" title="struct map_model::pathfind::uber_turns::UberTurnV2">UberTurnV2</a>], <br> params: &<a class="struct" href="../struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> InputGraph</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.63.0 (4b91a6ea7 2022-08-08)" ></div>
|
||||
</body></html>
|
@ -5,7 +5,7 @@
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_model::pathfind::vehicles</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../map_model/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><div id="settings-menu" tabindex="-1">
|
||||
<a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div>
|
||||
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">vehicles</a>::<wbr><a class="fn" href="#">vehicle_cost</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#282-372">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn vehicle_cost(<br> dr: <a class="struct" href="../../objects/road/struct.DirectedRoadID.html" title="struct map_model::objects::road::DirectedRoadID">DirectedRoadID</a>, <br> mvmnt: <a class="struct" href="../../objects/movement/struct.MovementID.html" title="struct map_model::objects::movement::MovementID">MovementID</a>, <br> constraints: <a class="enum" href="../enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> params: &<a class="struct" href="../struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.63.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This returns the pathfinding cost of crossing one road and turn, in units of time. It factors
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">vehicles</a>::<wbr><a class="fn" href="#">vehicle_cost</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#288-378">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn vehicle_cost(<br> dr: <a class="struct" href="../../objects/road/struct.DirectedRoadID.html" title="struct map_model::objects::road::DirectedRoadID">DirectedRoadID</a>, <br> mvmnt: <a class="struct" href="../../objects/movement/struct.MovementID.html" title="struct map_model::objects::movement::MovementID">MovementID</a>, <br> constraints: <a class="enum" href="../enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a>, <br> params: &<a class="struct" href="../struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br> map: &<a class="struct" href="../../struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.63.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This returns the pathfinding cost of crossing one road and turn, in units of time. It factors
|
||||
in the ideal time to cross the space and penalties for entering an access-restricted zone,
|
||||
taking an unprotected turn, or going up a steep hill for some vehicle types. If this returns
|
||||
<code>None</code>, then the movement isn’t actually allowed.</p>
|
||||
|
@ -5,7 +5,7 @@
|
||||
</a><h2 class="location"><a href="#">Module vehicles</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../map_model/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><div id="settings-menu" tabindex="-1">
|
||||
<a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div>
|
||||
</div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="#">vehicles</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#1-372">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Pathfinding for cars, bikes, buses, and trains using contraction hierarchies</p>
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="#">vehicles</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/map_model/pathfind/vehicles.rs.html#1-378">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Pathfinding for cars, bikes, buses, and trains using contraction hierarchies</p>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.VehiclePathfinder.html" title="map_model::pathfind::vehicles::VehiclePathfinder struct">VehiclePathfinder</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Node.html" title="map_model::pathfind::vehicles::Node enum">Node</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
|
@ -180,7 +180,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.63.0 (4b91a6ea7 2022-08-08)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Fri, 26 Aug 2022 13:31:12 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Fri, 26 Aug 2022 16:02:24 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -376,6 +376,12 @@
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Pathfinding for cars, bikes, buses, and trains using contraction hierarchies</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
|
||||
@ -622,15 +628,20 @@
|
||||
<span class="kw">let</span> <span class="ident">ut</span> <span class="op">=</span> <span class="kw-2">&</span><span class="ident">uber_turns</span>[<span class="kw-2">*</span><span class="ident">idx</span>];
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sum_cost</span> <span class="op">=</span> <span class="ident">Duration::ZERO</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ok</span> <span class="op">=</span> <span class="bool-val">true</span>;
|
||||
<span class="kw">for</span> <span class="ident">mvmnt</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="ident">ut</span>.<span class="ident">path</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">cost</span>) <span class="op">=</span>
|
||||
<span class="ident">vehicle_cost</span>(<span class="ident">mvmnt</span>.<span class="ident">from</span>, <span class="kw-2">*</span><span class="ident">mvmnt</span>, <span class="ident">constraints</span>, <span class="ident">params</span>, <span class="ident">map</span>)
|
||||
{
|
||||
<span class="ident">sum_cost</span> <span class="op">+</span><span class="op">=</span> <span class="ident">cost</span>;
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">error!</span>(<span class="string">"A vehicle isn't allowed to cross {:?}, but it's part of an uber-turn and happening anyway"</span>, <span class="ident">mvmnt</span>);
|
||||
<span class="comment">// A vehicle isn't allowed to do one of the steps inside the</span>
|
||||
<span class="comment">// uber-turn. So just toss out the entire uber-turn from the graph.</span>
|
||||
<span class="ident">ok</span> <span class="op">=</span> <span class="bool-val">false</span>;
|
||||
<span class="kw">break</span>;
|
||||
}
|
||||
}
|
||||
<span class="kw">if</span> <span class="ident">ok</span> {
|
||||
<span class="ident">input_graph</span>.<span class="ident">add_edge</span>(
|
||||
<span class="ident">from</span>,
|
||||
<span class="ident">nodes</span>.<span class="ident">get</span>(<span class="ident">Node::UberTurn</span>(<span class="kw-2">*</span><span class="ident">idx</span>)),
|
||||
@ -647,6 +658,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">nodes</span>.<span class="ident">guarantee_node_ordering</span>(<span class="kw-2">&mut</span> <span class="ident">input_graph</span>);
|
||||
<span class="ident">input_graph</span>.<span class="ident">freeze</span>();
|
||||
|
Loading…
Reference in New Issue
Block a user