|
@@ -988,37 +988,42 @@ public abstract class TopologieAlgorithmFramework implements AddOn{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- List<Flexibility> flexActiveList = control.getSimManager().getActualFlexManager().getAllFlexWrapperWithState(FlexState.IN_USE).stream().map(flex -> flex.getFlex()).collect(Collectors.toList());
|
|
|
|
- int amountActiveEssential = (int)flexActiveList.stream().filter(flex -> flex.getElement().getPriority() == Priority.Essential).count();
|
|
|
|
- int amountActiveHigh = (int)flexActiveList.stream().filter(flex -> flex.getElement().getPriority() == Priority.High).count();
|
|
|
|
- int amountActiveMedium = (int)flexActiveList.stream().filter(flex -> flex.getElement().getPriority() == Priority.Medium).count();
|
|
|
|
- int amountActiveLow = (int)flexActiveList.stream().filter(flex -> flex.getElement().getPriority() == Priority.Low).count();
|
|
|
|
- int amountActiveFlexibilities = amountActiveEssential + amountActiveHigh + amountActiveMedium + amountActiveLow;
|
|
|
|
int amountHolons = state.getNetworkList().size();
|
|
int amountHolons = state.getNetworkList().size();
|
|
int amountSwitch = state.getDecoratedSwitches().size();
|
|
int amountSwitch = state.getDecoratedSwitches().size();
|
|
int amountActiveSwitch = (int)state.getDecoratedSwitches().stream().filter(dswitch -> (dswitch.getState() == SwitchState.Closed)).count();
|
|
int amountActiveSwitch = (int)state.getDecoratedSwitches().stream().filter(dswitch -> (dswitch.getState() == SwitchState.Closed)).count();
|
|
|
|
|
|
|
|
+ int addedSwitches = calculateAmountOfAddedSwitches();
|
|
|
|
+ double addedCableMeters = addedCableMeter();
|
|
|
|
+ double wildcardCost = TopologieObjectiveFunction.calculateWildcardCost(state);
|
|
|
|
+ double cableCost = TopologieObjectiveFunction.calculateWildcardCost(state);
|
|
|
|
+ double switchCost = TopologieObjectiveFunction.calculateWildcardCost(state);
|
|
|
|
+ double totalCost = wildcardCost + cableCost + switchCost;
|
|
|
|
|
|
return "HolonObjects["
|
|
return "HolonObjects["
|
|
- + " Passiv: " + percentage(amountOfPassiv, amountOfObjects)
|
|
|
|
- + " Producer: " + percentage(amountOfSupplier, amountOfObjects)
|
|
|
|
- + " Consumer: " + percentage(amountOfConsumer, amountOfObjects)
|
|
|
|
- + " Unsupplied: " + percentage(unSuppliedConsumer, amountOfConsumer)
|
|
|
|
- + " PartiallySupplied: " + percentage(partiallySuppliedConsumer, amountOfObjects)
|
|
|
|
- + " Supplied: " + percentage(suppliedConsumer, amountOfConsumer)
|
|
|
|
- + " Over: " + percentage(overSuppliedConsumer, amountOfConsumer)
|
|
|
|
- + "]" + " HolonElemnts["
|
|
|
|
- + " Active: " + percentage(activeElements, amountOfelements)
|
|
|
|
- + "]" + "Flexibilities_active["
|
|
|
|
- + " Essential: " + percentage(amountActiveEssential, amountActiveFlexibilities)
|
|
|
|
- + " High: " + percentage(amountActiveHigh, amountActiveFlexibilities)
|
|
|
|
- + " Medium: " + percentage(amountActiveMedium, amountActiveFlexibilities)
|
|
|
|
- + " Low: " + percentage(amountActiveLow, amountActiveFlexibilities)
|
|
|
|
- + "]" + " activeSwitches:" + percentage(amountActiveSwitch,amountSwitch)
|
|
|
|
|
|
+ + " Passiv: " + percentage(amountOfPassiv, amountOfObjects)
|
|
|
|
+ + " Producer: " + percentage(amountOfSupplier, amountOfObjects)
|
|
|
|
+ + " Consumer: " + percentage(amountOfConsumer, amountOfObjects)
|
|
|
|
+ + " Unsupplied: " + percentage(unSuppliedConsumer, amountOfConsumer)
|
|
|
|
+ + " PartiallySupplied: " + percentage(partiallySuppliedConsumer, amountOfObjects)
|
|
|
|
+ + " Supplied: " + percentage(suppliedConsumer, amountOfConsumer)
|
|
|
|
+ + " Over: " + percentage(overSuppliedConsumer, amountOfConsumer)
|
|
|
|
+ + "]" + " HolonElemnts["
|
|
|
|
+ + " Active: " + percentage(activeElements, amountOfelements)
|
|
|
|
+ + "]"
|
|
|
|
+ + " activeSwitches:" + percentage(amountActiveSwitch,amountSwitch)
|
|
+ " Holons: " + amountHolons
|
|
+ " Holons: " + amountHolons
|
|
+ " totalConsumption: " + totalConsumption
|
|
+ " totalConsumption: " + totalConsumption
|
|
+ " totalProduction: " + totalProduction
|
|
+ " totalProduction: " + totalProduction
|
|
- + " difference: " + difference;
|
|
|
|
|
|
+ + " difference: " + difference
|
|
|
|
+ + " Topologie["
|
|
|
|
+ + " addedCableMeters:" + addedCableMeters
|
|
|
|
+ + " addedSwitches: " + addedSwitches
|
|
|
|
+ + " totalCost: " + totalCost + "("
|
|
|
|
+ + " wildcardCost: " + wildcardCost
|
|
|
|
+ + " cableCost: " + cableCost
|
|
|
|
+ + " switchCost: " + switchCost
|
|
|
|
+ + ")]"
|
|
|
|
+ ;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|