diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/DataStorageDecision.java b/AlgebraicDataflowArchitectureModel/src/algorithms/DataStorageDecision.java index 120b29a..1172a88 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/DataStorageDecision.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/DataStorageDecision.java @@ -30,13 +30,7 @@ flag = true; } } - boolean flag2 = false; - for (Edge e : resource.getOutEdges()) { - if (((PushPullAttribute) e.getAttribute()).getOptions().get(0) != PushPullValue.PUSH) { - flag2 = true; - } - } - if (resource.getInEdges().size() == 0 && flag2) + if (resource.getInEdges().size() == 0) flag = true; ((StoreAttribute) resource.getAttribute()).setStored(flag); if (resource.getIdentifierTemplate().getResourceStateType() == null) { diff --git a/AlgebraicDataflowArchitectureModel/src/experiment/pull/Payment.java b/AlgebraicDataflowArchitectureModel/src/experiment/pull/Payment.java index 2cf25c0..0307cef 100644 --- a/AlgebraicDataflowArchitectureModel/src/experiment/pull/Payment.java +++ b/AlgebraicDataflowArchitectureModel/src/experiment/pull/Payment.java @@ -2,6 +2,7 @@ public class Payment { private History history; + private int payment; public Payment(History history) { this.history = history; } diff --git a/AlgebraicDataflowArchitectureModel/src/experiment/push/History.java b/AlgebraicDataflowArchitectureModel/src/experiment/push/History.java index 0270b05..58d4fa3 100644 --- a/AlgebraicDataflowArchitectureModel/src/experiment/push/History.java +++ b/AlgebraicDataflowArchitectureModel/src/experiment/push/History.java @@ -7,7 +7,7 @@ private ArrayList history = new ArrayList(); public void updatePayment(int payment) { history.add(payment); - total.update(history); + total.updateHistory(history); } public History(Total total) { this.total = total; diff --git a/AlgebraicDataflowArchitectureModel/src/experiment/push/Main.java b/AlgebraicDataflowArchitectureModel/src/experiment/push/Main.java index 3015614..9edf4f4 100644 --- a/AlgebraicDataflowArchitectureModel/src/experiment/push/Main.java +++ b/AlgebraicDataflowArchitectureModel/src/experiment/push/Main.java @@ -6,7 +6,7 @@ private Total total = new Total(); private Points points = new Points(); private History history = new History(total); - private Payment payment = new Payment(history,points); + private Payment payment = new Payment(points,history); public void purchase(int payment) { this.payment.purchase(payment); } diff --git a/AlgebraicDataflowArchitectureModel/src/experiment/push/Payment.java b/AlgebraicDataflowArchitectureModel/src/experiment/push/Payment.java index 202ead9..47e6ca3 100644 --- a/AlgebraicDataflowArchitectureModel/src/experiment/push/Payment.java +++ b/AlgebraicDataflowArchitectureModel/src/experiment/push/Payment.java @@ -1,16 +1,17 @@ package experiment.push; public class Payment { - private History history; private Points points; - public Payment(History history, Points points) { - this.history = history; + private History history; + private int payment; + public Payment(Points points, History history) { this.points = points; + this.history = history; } public void purchase(int payment) { this.payment = payment; - history.update(payment); - points.update(payment); + points.updatePayment(payment); + history.updatePayment(payment); } public int getPayment() { return payment;