|
@@ -28,8 +28,6 @@ public class SimulationManager {
|
|
|
private int timeStep;
|
|
|
private boolean simMode;
|
|
|
private HashMap<Integer, Float> tagTable = new HashMap<Integer, Float>();
|
|
|
- private boolean recalculate;
|
|
|
-
|
|
|
/**
|
|
|
* Constructor.
|
|
|
*
|
|
@@ -41,7 +39,6 @@ public class SimulationManager {
|
|
|
model = m;
|
|
|
subNets = new ArrayList<SubNet>();
|
|
|
simMode = model.getIsSimulation();
|
|
|
- recalculate = false;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -92,11 +89,6 @@ public class SimulationManager {
|
|
|
}
|
|
|
}
|
|
|
canvas.repaint();
|
|
|
- System.out.println(recalculate);
|
|
|
- if(recalculate){
|
|
|
- recalculate = false;
|
|
|
- calculateStateForTimeStep(x);
|
|
|
- }
|
|
|
//printNet();
|
|
|
}
|
|
|
|
|
@@ -161,9 +153,6 @@ public class SimulationManager {
|
|
|
}
|
|
|
edge.setFlow(edge.getFlow() + energy);
|
|
|
edge.calculateState(true);
|
|
|
- if(!edge.getState()){
|
|
|
- recalculate = true;
|
|
|
- }
|
|
|
edge.addTag(hl.getID());
|
|
|
if (edge.getState() && !producers.contains(tmp)) {
|
|
|
if(tmp instanceof HolonSwitch){
|
|
@@ -220,9 +209,6 @@ public class SimulationManager {
|
|
|
}
|
|
|
}
|
|
|
edge.calculateState(true);
|
|
|
- if(!edge.getState()){
|
|
|
- recalculate = true;
|
|
|
- }
|
|
|
if(edge.getState() && !(tmp instanceof CpsUpperNode)){
|
|
|
tmp.addAllPseudoTags(cps.getTag());
|
|
|
if(!newNodes.contains(tmp)){
|