overhauled route search algorithm:

now using breadth-first search instead of depth-first search
This commit is contained in:
Stephan Richter
2021-04-01 09:55:27 +02:00
parent 2967e3b762
commit db9fed1642
11 changed files with 250 additions and 129 deletions

View File

@@ -28,7 +28,7 @@ public class SetTurnout extends Action {
public boolean fire(Context context,Object cause) {
if (context.invalidated()) return false;
if (isNull(turnout)) return false;
if (!turnout.state(state).succeeded()) return false;
if (!turnout.state(state,false).succeeded()) return false;
if (turnout.address() == 0) return true;
sleep(1000);
return true;