File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ use anyhow:: Result ;
2+ use std:: collections:: HashMap ;
13use std:: fs:: File ;
24use std:: io:: { BufRead , BufReader } ;
35use std:: path:: Path ;
4- use anyhow:: Result ;
5- use std:: collections:: HashMap ;
66
77use mapf:: negotiation:: { Agent , Scenario } ;
88use std:: collections:: BTreeMap ;
@@ -44,7 +44,11 @@ impl Map {
4444 }
4545 }
4646
47- Ok ( Map { width, height, grid } )
47+ Ok ( Map {
48+ width,
49+ height,
50+ grid,
51+ } )
4852 }
4953
5054 pub fn to_occupancy_map ( & self ) -> HashMap < i64 , Vec < i64 > > {
Original file line number Diff line number Diff line change @@ -1009,7 +1009,11 @@ impl App {
10091009
10101010 self . canvas . program . layers . 3 . searches . clear ( ) ;
10111011
1012- for ticket in self . search_memory . iter ( ) . take ( self . debug_ticket_size as usize ) {
1012+ for ticket in self
1013+ . search_memory
1014+ . iter ( )
1015+ . take ( self . debug_ticket_size as usize )
1016+ {
10131017 if let Some ( mt) = search
10141018 . memory ( )
10151019 . 0
@@ -1319,9 +1323,9 @@ impl App {
13191323 let mut total_length = 0.0 ;
13201324 for solution in solution_node. proposals . values ( ) {
13211325 total_length += solution. meta . trajectory . windows ( 2 ) . fold ( 0.0 , |acc, w| {
1322- ( w[ 0 ] . position . translation . vector - w[ 1 ] . position . translation . vector ) . magnitude ( ) + acc
1326+ ( w[ 0 ] . position . translation . vector - w[ 1 ] . position . translation . vector ) . magnitude ( )
1327+ + acc
13231328 } ) ;
1324-
13251329 }
13261330 println ! ( "Total length: {total_length}" ) ;
13271331 assert ! ( self . canvas. program. layers. 3 . solutions. is_empty( ) ) ;
@@ -1997,7 +2001,10 @@ impl Application for App {
19972001 . push ( iced:: Space :: with_width ( Length :: Units ( 16 ) ) )
19982002 . push (
19992003 Column :: new ( )
2000- . push ( Text :: new ( format ! ( "Debug Paths: {}" , & self . debug_ticket_size) ) )
2004+ . push ( Text :: new ( format ! (
2005+ "Debug Paths: {}" ,
2006+ & self . debug_ticket_size
2007+ ) ) )
20012008 . push ( iced:: Space :: with_height ( Length :: Units ( 2 ) ) )
20022009 . push (
20032010 Slider :: new (
You can’t perform that action at this time.
0 commit comments