Parameterize priority queue
This commit is contained in:
parent
6f74f1345e
commit
ffe51bede9
14 changed files with 276 additions and 183 deletions
|
|
@ -3,11 +3,9 @@ use factorio_core::{
|
|||
prelude::*,
|
||||
visualize::{Color, Symbol, Visualization, Visualize, image_grid},
|
||||
};
|
||||
use factorio_graph::priority_queue::binary_heap::FastBinaryHeap;
|
||||
use factorio_pathfinding::belt_finding::{self, conflict_avoidance::ConflictAvoidance};
|
||||
use rand::{
|
||||
Rng,
|
||||
seq::IndexedRandom,
|
||||
};
|
||||
use rand::{Rng, seq::IndexedRandom};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{sync::atomic::AtomicU32, time::Instant};
|
||||
|
||||
|
|
@ -241,7 +239,7 @@ impl<'a> PathLayout<'a> {
|
|||
pub fn new(layout: Layout<'a>) -> Option<PathLayout<'a>> {
|
||||
let mut p = beltfinding_problem_from_layout(&layout);
|
||||
|
||||
if !p.find_path() {
|
||||
if !p.find_path::<FastBinaryHeap<_>>() {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue