3 occurrences in 3 agents at cycle 0: Java error: nil value detected
in closest_path <- paths with_min_of distance_to(each.free_space,location);
NullPointerException: null
when applying the distance_to operator on nil and {19.609053066740447,7.304609674349487,0.0}
in closest_path <- paths with_min_of distance_to(each.free_space,location);
in else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
in if movement_model = 'moving skill' {
closest_path <- paths with_min_of distance_to(each,location);
}else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
in if not(empty(pedestrian_path)) {
list paths <- pedestrian_path at_distance 10.0;
if movement_model = 'moving skill' {
closest_path <- paths with_min_of distance_to(each,location);
}else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
3 occurrences in 3 agents at cycle 0: Java error: nil value detected in closest_path <- paths with_min_of distance_to(each.free_space,location); NullPointerException: null when applying the distance_to operator on nil and {19.609053066740447,7.304609674349487,0.0} in closest_path <- paths with_min_of distance_to(each.free_space,location); in else { closest_path <- paths with_min_of distance_to(each.free_space,location); }
in if movement_model = 'moving skill' { closest_path <- paths with_min_of distance_to(each,location); }else { closest_path <- paths with_min_of distance_to(each.free_space,location); }
in if not(empty(pedestrian_path)) { list paths <- pedestrian_path at_distance 10.0;
if movement_model = 'moving skill' {
closest_path <- paths with_min_of distance_to(each,location);
}else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
}else { init_place <- shape; }
in ask building_entrance { if not(empty(pedestrian_path)) { list paths <- pedestrian_path at_distance 10.0;
if movement_model = 'moving skill' {
closest_path <- paths with_min_of distance_to(each,location);
}else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
}
in ask building_entrance { if not(empty(pedestrian_path)) { list paths <- pedestrian_path at_distance 10.0;
if movement_model = 'moving skill' {
closest_path <- paths with_min_of distance_to(each,location);
}else {
closest_path <- paths with_min_of distance_to(each.free_space,location);
}
}
in init { validator <- false; outputFilePathName <- ((((((((((((('../results/output' + #now.year) + '') + #now.month) + '') + #now.day) + '') + #now.hour) + '') + #now.minute) + '') + #now.second) + 'distance') + distance_people) + '.csv'; do initiliaze_dxf ; create pedestrian_path from: pedestrian_path_shape_file ; pedestrian_network <- as_edge_graph(pedestrian_path); loop se over: the_dxf_file { string type <- get(se,layer); if type = walls { create wall with: [shape::clean(polygon(se.points))]; }else { if type = entrance { create building_entrance with: [shape::polygon(se.points), type::type]; }else { if type in ([offices,meeting_rooms,coffee]) { create room with: [shape::polygon(se.points), type::type] { if flip(ventilation_ratio) { isVentilated <- true; }
}
in agents building_entrance0, Simulation 0, DailyRoutine0