Skip to content

Commit

Permalink
Improved consistency of efficiency calculations for an exploding reac…
Browse files Browse the repository at this point in the history
…tor.
  • Loading branch information
MauveCloud committed Feb 23, 2018
1 parent b227314 commit 0eabdca
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Ic2ExpReactorPlanner/SimpleSimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,18 @@ protected Void doInBackground() throws Exception {
}
}
}
lastEUoutput = reactor.getCurrentEUoutput();
totalEUoutput += lastEUoutput;
lastHeatOutput = reactor.getVentedHeat();
totalHeatOutput += lastHeatOutput;
if (reactor.getCurrentHeat() <= reactor.getMaxHeat() && lastEUoutput > 0.0) {
reactorTicks++;
minEUoutput = Math.min(lastEUoutput, minEUoutput);
maxEUoutput = Math.max(lastEUoutput, maxEUoutput);
minHeatOutput = Math.min(lastHeatOutput, minHeatOutput);
maxHeatOutput = Math.max(lastHeatOutput, maxHeatOutput);
if (reactor.getCurrentHeat() <= reactor.getMaxHeat()) {
lastEUoutput = reactor.getCurrentEUoutput();
totalEUoutput += lastEUoutput;
lastHeatOutput = reactor.getVentedHeat();
totalHeatOutput += lastHeatOutput;
if (lastEUoutput > 0.0) {
reactorTicks++;
minEUoutput = Math.min(lastEUoutput, minEUoutput);
maxEUoutput = Math.max(lastEUoutput, maxEUoutput);
minHeatOutput = Math.min(lastHeatOutput, minHeatOutput);
maxHeatOutput = Math.max(lastHeatOutput, maxHeatOutput);
}
}
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 9; col++) {
Expand Down

0 comments on commit 0eabdca

Please sign in to comment.