|
@@ -402,16 +402,16 @@ public class HolonObject extends AbstractCpsObject {
|
|
|
float tempFlex = 0;
|
|
|
for (HolonElement e : getElements()) {
|
|
|
if (e.getActiveFlex()) {
|
|
|
- tempFlex += e.getFlexibility();
|
|
|
+ tempFlex += e.getFlexibility() * e.getAmount();
|
|
|
}
|
|
|
}
|
|
|
this.totalFlex = tempFlex;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* calculates total flexible Production
|
|
|
*/
|
|
|
- public float getFlexProd(){
|
|
|
+ public float getFlexProd() {
|
|
|
float tempFlex = 0;
|
|
|
for (HolonElement e : getElements()) {
|
|
|
if (e.getFlexibility() > 0) {
|
|
@@ -420,11 +420,11 @@ public class HolonObject extends AbstractCpsObject {
|
|
|
}
|
|
|
return tempFlex;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* calculates total flexible Concumption
|
|
|
*/
|
|
|
- public float getFlexCons(){
|
|
|
+ public float getFlexCons() {
|
|
|
float tempFlex = 0;
|
|
|
for (HolonElement e : getElements()) {
|
|
|
if (e.getFlexibility() < 0) {
|