|
@@ -665,12 +665,8 @@ public class StatisticGraph extends JPanel {
|
|
for (AbstractCpsObject obj : objects) {
|
|
for (AbstractCpsObject obj : objects) {
|
|
if (obj instanceof HolonObject) {
|
|
if (obj instanceof HolonObject) {
|
|
for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
- if (ele.getEnergyAt()[tStep] > 0 && ele.getActive()) {
|
|
|
|
- if (ele.getActiveFlex()) {
|
|
|
|
- val += (ele.getEnergyAt()[tStep]+ele.getFlexibility()) * ele.getAmount();
|
|
|
|
- } else {
|
|
|
|
- val += ele.getEnergyAt()[tStep] * ele.getAmount();
|
|
|
|
- }
|
|
|
|
|
|
+ if (ele.getTotalEnergyAtTimeStep(tStep) > 0 && ele.getActive()) {
|
|
|
|
+ val += ele.getTotalEnergyAtTimeStep(tStep);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (obj instanceof CpsUpperNode) {
|
|
} else if (obj instanceof CpsUpperNode) {
|
|
@@ -694,11 +690,7 @@ public class StatisticGraph extends JPanel {
|
|
if (obj instanceof HolonObject) {
|
|
if (obj instanceof HolonObject) {
|
|
for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
for (HolonElement ele : ((HolonObject) obj).getElements()) {
|
|
if (ele.getEnergyAt()[tStep] < 0 && ele.getActive()) {
|
|
if (ele.getEnergyAt()[tStep] < 0 && ele.getActive()) {
|
|
- if (ele.getActiveFlex()) {
|
|
|
|
- val += (ele.getEnergyAt()[tStep]+ele.getFlexibility()) * ele.getAmount();
|
|
|
|
- } else {
|
|
|
|
- val += ele.getEnergyAt()[tStep] * ele.getAmount();
|
|
|
|
- }
|
|
|
|
|
|
+ val += ele.getTotalEnergyAtTimeStep(tStep);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (obj instanceof CpsUpperNode) {
|
|
} else if (obj instanceof CpsUpperNode) {
|