Skip to content

Commit

Permalink
Removed counters entrance B and E
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzilutz committed May 24, 2019
1 parent fbba9ec commit 6a191f2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 50 deletions.
4 changes: 0 additions & 4 deletions src/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ private Road genSortieCERNSE(MultiLaneRoundAbout raPorteDeFrance) {
roads.add(rSortieCERNSE);
raPorteDeFrance.connectTo(rSortieCERNSE, raPorteDeFrance.getLanes()[0].getLength()-23);
rSortieCERNSE.setMaxOutflow(8);
rSortieCERNSE.setCounter(0.5, "counter EntranceE right");
return rSortieCERNSE;
}
private Road genSortieCERNNW(MultiLaneRoundAbout raPorteDeFrance) {
Expand Down Expand Up @@ -415,7 +414,6 @@ private void genD884CERN(Road rD884NE, Road rSortieCERNSE) {
rD884CERN.getRoadCells().get(0).setInCell(rD884NE.getRoadCells().get(27));
rD884CERN.addEnter("rD884NE", 0);
rD884CERN.setMaxOutflow(8);
rD884CERN.setCounter(0.5, "counter EntranceE left");

MaxVehicleOutflow outflowEntranceE = new MaxVehicleOutflow(rD884CERN, 4);
outflowEntranceE.addRoad(rSortieCERNSE);
Expand Down Expand Up @@ -696,7 +694,6 @@ private Road genRoutePauliSouthNERight(Road rWE2, MultiLaneRoundAbout raEntreeB)
rRoutePauliSouthNERight.connectTo(raEntreeB, 8);
}
rRoutePauliSouthNERight.setGenerateVehicules(50);
rRoutePauliSouthNERight.setCounter(0.5, "counter EntranceB right");
return rRoutePauliSouthNERight;
}
private Road genRoutePauliSouthNELeft(Road rRoutePauliSouthNERight, MultiLaneRoundAbout raEntreeB) {
Expand All @@ -709,7 +706,6 @@ private Road genRoutePauliSouthNELeft(Road rRoutePauliSouthNERight, MultiLaneRou
rRoutePauliSouthNELeft.connectTo(raEntreeB, 7);
}
rRoutePauliSouthNELeft.setGenerateVehicules(50);
rRoutePauliSouthNELeft.setCounter(0.5, "counter EntranceB left");
return rRoutePauliSouthNELeft;
}
private Road genRoutePauliSouthSW(Road rRoutePauliSouthNELeft, MultiLaneRoundAbout raEntreeB) {
Expand Down
22 changes: 1 addition & 21 deletions src/network/NetworkComputing.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,17 +526,7 @@ private static void writeFinalData(Network n) {
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounter2A().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounter2A().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounter2B().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounter2B().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceBLeft().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceBLeft().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceBRight().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceBRight().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceELeft().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceELeft().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceERight().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceERight().getEcartType().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceESum().getEsperance().get(i)) + " ");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounterEntranceESum().getEcartType().get(i)) + "\n");
Utils.writeDataCountersAll(Float.toString(n.getSimulation().getSimState().getCounter2B().getEcartType().get(i)) + "\n");
}

Utils.saveDataCountersAll();
Expand All @@ -563,11 +553,6 @@ private static void writeData24Hours(Network n) {
n.getSimulation().getSimState().getCounter1B().saveTemp();
n.getSimulation().getSimState().getCounter2A().saveTemp();
n.getSimulation().getSimState().getCounter2B().saveTemp();
n.getSimulation().getSimState().getCounterEntranceBLeft().saveTemp();
n.getSimulation().getSimState().getCounterEntranceBRight().saveTemp();
n.getSimulation().getSimState().getCounterEntranceELeft().saveTemp();
n.getSimulation().getSimState().getCounterEntranceERight().saveTemp();
n.getSimulation().getSimState().getCounterEntranceESum().saveTemp();
}
// Write data every hour
private static void writeDataHours(Network n) {
Expand Down Expand Up @@ -626,10 +611,5 @@ private static void writeDataMinutes(Network n) {
n.getSimulation().getSimState().getCounter1B().addTemp(n.selectARoad("rD984FNW").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounter2A().addTemp(n.selectARoad("rD984FSES").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounter2B().addTemp(n.selectARoad("rD984FNWS").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounterEntranceBLeft().addTemp(n.selectARoad("rRoutePauliSouthNELeft").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounterEntranceBRight().addTemp(n.selectARoad("rRoutePauliSouthNERight").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounterEntranceELeft().addTemp(n.selectARoad("rD884CERN").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounterEntranceERight().addTemp(n.selectARoad("rSortieCERNSE").getVehicleCounter().getCounter());
n.getSimulation().getSimState().getCounterEntranceESum().addTemp(n.selectARoad("rSortieCERNSE").getVehicleCounter().getCounter() + n.selectARoad("rD884CERN").getVehicleCounter().getCounter());
}
}
25 changes: 0 additions & 25 deletions src/states/SimState.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ public class SimState extends State {
private ExpVarCalculator counter1BEVC;
private ExpVarCalculator counter2AEVC;
private ExpVarCalculator counter2BEVC;
private ExpVarCalculator counterEntranceBLeftEVC;
private ExpVarCalculator counterEntranceBRightEVC;
private ExpVarCalculator counterEntranceELeftEVC;
private ExpVarCalculator counterEntranceERightEVC;
private ExpVarCalculator counterEntranceESumEVC;

// state of the writing phase : 0 before, 1 when begins ... , -1 if finished
private int finalDataWritingState = 0;
Expand Down Expand Up @@ -130,11 +125,6 @@ public void init() {
counter1BEVC = new ExpVarCalculator(24*60-1);
counter2AEVC = new ExpVarCalculator(24*60-1);
counter2BEVC = new ExpVarCalculator(24*60-1);
counterEntranceBLeftEVC = new ExpVarCalculator(24*60-1);
counterEntranceBRightEVC = new ExpVarCalculator(24*60-1);
counterEntranceELeftEVC = new ExpVarCalculator(24*60-1);
counterEntranceERightEVC = new ExpVarCalculator(24*60-1);
counterEntranceESumEVC = new ExpVarCalculator(24*60-1);

// save time of current tick
lastTick = System.nanoTime();
Expand Down Expand Up @@ -635,21 +625,6 @@ public ExpVarCalculator getCounter2A() {
public ExpVarCalculator getCounter2B() {
return this.counter2BEVC;
}
public ExpVarCalculator getCounterEntranceBLeft() {
return this.counterEntranceBLeftEVC;
}
public ExpVarCalculator getCounterEntranceBRight() {
return this.counterEntranceBRightEVC;
}
public ExpVarCalculator getCounterEntranceELeft() {
return this.counterEntranceELeftEVC;
}
public ExpVarCalculator getCounterEntranceERight() {
return this.counterEntranceERightEVC;
}
public ExpVarCalculator getCounterEntranceESum() {
return this.counterEntranceESumEVC;
}
public int getSimulationID() {
return this.simulationID;
}
Expand Down

0 comments on commit 6a191f2

Please sign in to comment.