From 149f3e71412658d0341e67c610ea968ce679f819 Mon Sep 17 00:00:00 2001 From: de1008 Date: Fri, 17 May 2024 19:11:06 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Cberarbeitung=20von=20DelieveryCar=20sowie?= =?UTF-8?q?=20deren=20Methoden,=20was=20noch=20fehlt=20ist=20die=20StartMe?= =?UTF-8?q?ssage=20von=20DistributionCenter=20aus=20und=20die=20TimeSchedu?= =?UTF-8?q?ler=20beim=20DeliveryCar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../7.1/executionHistory/executionHistory.bin | Bin 65216 -> 73251 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/7.1/fileHashes/fileHashes.bin | Bin 21597 -> 23697 bytes .gradle/7.1/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .gradle/buildOutputCleanup/outputFiles.bin | Bin 18983 -> 19343 bytes .../main/com/example/AkkaMainSystem.class | Bin 5219 -> 5005 bytes .../java/main/com/example/Customer.class | Bin 8040 -> 8257 bytes .../main/com/example/DistributionCenter.class | Bin 10242 -> 10270 bytes .../compileJava/previous-compilation-data.bin | Bin 20718 -> 20718 bytes src/main/java/com/example/AkkaMainSystem.java | 8 +- src/main/java/com/example/Customer.java | 7 ++ src/main/java/com/example/DeliveryCar.java | 99 ++++++++++++++---- .../java/com/example/DistributionCenter.java | 4 +- 14 files changed, 91 insertions(+), 27 deletions(-) diff --git a/.gradle/7.1/executionHistory/executionHistory.bin b/.gradle/7.1/executionHistory/executionHistory.bin index 670278bfcddf749003a0a9d7c8587ff4fc017add..d0e61a7e9727486b0fc0ed9832b72502a3ec6f6f 100644 GIT binary patch delta 4739 zcmeH~3s6&68pjj3h@xniiX!h6imwXXT{|v;w;%xd{?XzyzpZ%S&8a zEDt$aR0Kh!%CDni{Din)(Rb2H^r32as5MXt)eB}HhxH@ z&99f65^TKY7fZ>ws_C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zgKIaAH##%kBi z4b{1Pn**ZjGF5iWHaE&LN=wSjO0P=FOUh2INK4KwF{`XfGtPx*VfYN!GTCgq-*jC8 zM!m@jR{{hsx3mY!S|_Z#)w6w@@XINdlQ%}sn7nF-*W^>5wI|E(^qnp%1XMX|XNZ7W zr_7BFtGqp(?@V7&-^%l3`bHr})ydDg{3iQ;)t|gz*SX1l-!vybU!*56-SSt<0jn7i z-FN0ssZR4dH#wjzcJhK7Dk4{lZa+UP-ls4x-S=Mjd-wfMU(MS(U0syXjO96ql_<(+ z$Z`kBnmm7x~{2r)f!fT+}Jz|WeEYpCj$>;W}O@A%M zD8SMV68|s8sK?R(Vi}4vny_?%R6Mw)#xe)QX!vQ)auR6N^mF1s-Mc`B*4;J)Gp5@} zFj}x21qr>st;uo$#E`k8C-Lv{7rwX78kQ4`FYpvd9twN{cGfGd>3Wik8X_^Fi!67~ z-T6MO=MDS8e~Wvb0cEFWNdir}2lAJ|Zv~0;T5D_F*HT*|vUK8hW!{udMw=pY-@ndr15(}0-kkG^fMl8KR#`JwsjFzl3z>zlZ>Z z%K5fVd-OajRh4Bzf%odCkwBr{^O{P(2Q&qLo1A%-|8)A?>Gd*{Xx$nzN9Rg^__l=IG?^hq^kppu`Wurs;Pj8I9?fYJWJ}FBg02 z7+5ybmF2?CHOqlX^vM*apc#4>x0Kwj6MBDlKQ|~L@84b{eC=w0iHckDZjEiLkW%ez du9Ao&9~vZ%pStdpA{X-g6WAZ`AgNZC0|0+L#aaLW diff --git a/.gradle/7.1/executionHistory/executionHistory.lock b/.gradle/7.1/executionHistory/executionHistory.lock index 51fa88b9fec1c9f2bad816e2c54e0426f497f538..f2762d250055ada455e9c3659986d00718b7e692 100644 GIT binary patch literal 17 UcmZQJ-Ffa%$-@Ly1_)RS061O+2><{9 literal 17 UcmZQJ-Ffa%$-@Ly1_(F{062aHDF6Tf diff --git a/.gradle/7.1/fileHashes/fileHashes.bin b/.gradle/7.1/fileHashes/fileHashes.bin index a1ca05d3d0d13a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Z)Us`+TMsXhkoN<55oss%Wl7zInwjmYBbH`Dj0 z<)FIte!0?Zwz1{?{dynJdrZwvzXf}nWz+Wuf#1>nA;3;*fh6P6-c!;m(biM_GPLu! zZ>0O>Xx|BP*B=8B{{D{159$tRuT`K(BAR4^GU65D;IwF+V zM#!W4M07x?`Zr;}(Mw^k4Asv&E26j0EW(`n;X)sp(Ube*T%2RKRA@a%lRjk~RS z@GV)Kju+j)1SFwoL*E=6gl#B-A4x?h!7dWzEf|d7l$6*86+n-HFIst(SfA#W?EGF z2R#W{SV%A-U(eyLz6gR)0GGgFRw#s&XhL5ihXr!eMGg+psj1V>>W9w;r>H?y8hoOt zai)&lal2IK!mfS<#hY*$I6O3%*tPIcC{*)a!%Cdjlod0yyYMI@zHe?V*XKAN&9sjU zZ~oeytxzx>EmtGoQJW3d5G=|ABWc--gCkXxWIK^*wnelAto68J=EbScoA&-SjSkpz z7p}SOKlYGP@n4G)Ts` z|BSwb=WcI2WqY~Q#Q7(u_tXnj%i%u1@U+f20VbQW7 znGUr+h!>S9O1IyEAC)|wTk6FnZA0UvRQh00ElhZ~HQuN0mRMR4`vv)BdAK2MQF?q0 z=r1GI9-kfaQbwf5cZ4SKaqw2Bkc3Wrs?H#I9qO78wqlozO*kpzWvp3cgI;8ohlXUw zkZsFQhHzfu@why+5q2DXGWiy7Y&>+egbY~QkygQrt258s{-lBx{Rk6v==-bT@GfrA zK~mS@KwS#4YePrHZ}M*TH5F7gOxwt31gu?PYIz*9ldS}--BeYcz%nWG_zuHhH)@E` KLxqSOg2sOy4Gm}j diff --git a/.gradle/7.1/fileHashes/fileHashes.lock b/.gradle/7.1/fileHashes/fileHashes.lock index dc5caf0f1ac0a789053d9a597aec043d26150e83..34a3ebafc3dcc65675b86d901672ba80b7fce35f 100644 GIT binary patch literal 17 VcmZR6t*}YBa<=Ot1~6b@001yZ1JeKi literal 17 VcmZR6t*}YBa<=Ot1~6dB1pqL$1V8`) diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 2477e219537508d75aa612f0148b2a0d6f75e589..539e33639dbb08a596c785ae10b9aed9c20ea8aa 100644 GIT binary patch literal 17 VcmZR6_T&GuLYbG|3}C=m1pr1x1;YRU literal 17 VcmZR6_T&GuLYbG|3}C>x8URLi1@r&_ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 33ae91ab087c5b6027d74e47610fc134de4eb66e..a1e82dea0735b659fed512e8d61884e246590de4 100644 GIT binary patch delta 494 zcmZ2Jg|UA+;|3E6M*YdA5*`|T&KD)r9rxX400Xbs|4=X`jsIA%b^9@hxVP!#QV9it z)q9dM6W_ml0ag5eaxYMD`-|0E_oZd+feOBzyi~$Mwp*?%pyG{_eI+dfc)d>@7wl1QfeJ32Tq~&{AmplX)@pf(9z@Vv zdGb`r41tiNMc(@PKSZH|k(0klTJr1FOCS7``v5BDK3P>NKqKGy_de6vQ#BxhUXx+= z=O^wAk2Es62URRMIaex*iKTL*;t%nS1`C8YJ9<20oV?$Icd~$&IFOc~oZwM6xxsTe E0PWGnIRF3v delta 79 zcmeC5&bWLE;|3E6M(N3>5+0M+N=Qt;3&gyV29t9oB__|6^q8zGB{6xal)>b;Kw4Hh iVe(XI!^!ug-6x021Titq+^G0Ne4{~w=w?TcXN&+Ryc=Wy diff --git a/build/classes/java/main/com/example/AkkaMainSystem.class b/build/classes/java/main/com/example/AkkaMainSystem.class index fc8f7cb4376ba044366b45f87cf6cb966f5f2562..1c52899f307fae8a3ff2dd094b1b41bf99a9ebdb 100644 GIT binary patch delta 1562 zcmZ8hYg80v7=C6iGsEmGy9_EJ#lg5O7bOfcR8T-OOl}GpNYw1^#BJHd-Bs*Di&|QV zC4OC`t6ih^ zE1mg!;sk(Y`2MI=YE2b!6$ic|(CO2PB`n0%0!m~o!ZmErx{k8fQdTvx4lKb^0n22R zp`2Z?ZsS+Ts6Zv_v!%C)SjoXw8S)m3xQ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?J) diff --git a/build/classes/java/main/com/example/Customer.class b/build/classes/java/main/com/example/Customer.class index 62003f395ec0cd735624e0043b8a2585923c8932..8653b7aa993161287d77946b41fbefc6badf837d 100644 GIT binary patch delta 2779 zcmY*adtj5*75|;)^(Fa8)30emXbb5J+5}o0k0LF#wS^H%1wkowZjh!QZD~xfEh;j| z<~E&U58TxOd)et6>c+%bQ%af0=G?~U&~47Sm)m@dZMwm5=pO3M{qm))f8@L8+kbj}V#yn7 z^;@Dh?1<~NMp`F}{E~_R&RGSRBX`)<+)c9}P%;0(btd2g%rcs!|KkAky=++<=s zU%|CI%vhQBSrtE%iSl~%p$H#byFS#L>~8Bzbj#IWsCW)X2t~ZQYG)!g)R#;|V}c0D#E;eM;)cPwz8 zyGl8MKdAU4J00$j?Ipt8Dv{^R7l+)wiW7K6#j7%{YLYV3luL}isQ4>yd)8fKeT}fm zIO_?ACbs1I#OZ>PQW^7i75~5iJ_p|465TPhb3pHI9_UeUfzZMQ>=%308oDTss4E?N z6!h~a{3>RRMftBTXO;KhYp8@*pntX6Rb7rnU16K!&0t%|d_Svh?l1IFr#MzvM;{dD3oEQ!2$iC_z%Oe3UW$q)e`^I1cY++s;co>hL8fnk z6FE{AuUW-|{amdQJQIY4zYXLdg-2;Q$;C&)7C(z>263~k zW@dPeEi=&!ILSk~G7U#8<_NjV6*`U(a11p^*~{VF3jn*Zw8%)9fpQt(jAaCQ*~r5> zgYodpR^BCEomo~fEq-x^pc${RLOx9+etuxq8bhIrCxI3yXf-w#8op~%nTzttH_5($ zSNZ%+_OCNVsbZJdAMjC=cpy-k3XLPu8A_vT4BH6d5yVGvOB%a74x=hFog!!-3yomz z7(QV!BF3?=lSc8GF%0A&Bu~I%a4Tb0KpTJ8A{Xr_V6jWF5gX8fZP<*Pah<_Alwlz` zr+5PsV$y|tdJ1kNKh0#)x!6ttn#I6Hyw0NE#s&vEC|eK39K(&@6!s!txV+~6addQ! zqO*NI^9`o4KaJ}frCE~3-A}@~+&YefodK&VWM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<>(); // Erstellen von vier Empfänger*innen - for (int i = 0; i < 4; i++) { + /* for (int i = 0; i < 4; i++) { customers.add(getContext().spawn(Customer.create("Customer" + (i + 1)), "customer" + (i + 1))); - } + }*/ + customers.add(getContext().spawn(Customer.create("Alice"+( 1)) ,"alice"+(1))); + customers.add(getContext().spawn(Customer.create("Bob"+( 1)) ,"bob"+(1))); + customers.add(getContext().spawn(Customer.create("Charles"+( 1)) ,"charles"+(1))); + customers.add(getContext().spawn(Customer.create("Derick"+( 1)) ,"derick"+(1))); ActorRef addressBook = getContext().spawn(AddressBook.create(customers), "addressBook"); // Nachricht GetCustomers senden, um Kundenreferenzen abzurufen diff --git a/src/main/java/com/example/Customer.java b/src/main/java/com/example/Customer.java index 51ac188..d6428dc 100644 --- a/src/main/java/com/example/Customer.java +++ b/src/main/java/com/example/Customer.java @@ -77,7 +77,14 @@ public class Customer extends AbstractBehavior { if(number <= 80){ //truck wird hier übergeben, damit man im nächsten Schritt wieder auf ihn zugreifen kann. this.adrBook.tell(new AddressBook.CustomerMessage(getContext().getSelf(), this.name, msg.truckReference)); + + //Methode um einen Paket zu versenden + //über onAddressMessage wird dann Paket aufgenommen + onAddressMessage(new AddressMessage(getContext().getSelf(), msg.truckReference)); + + }else{ + getContext().getLog().info("Kunde {}, will kein Paket abschicken", this.name); msg.truckReference.tell(new DeliveryCar.PickupResponse(null)); } return this; diff --git a/src/main/java/com/example/DeliveryCar.java b/src/main/java/com/example/DeliveryCar.java index 4b1d4f6..0f9509b 100644 --- a/src/main/java/com/example/DeliveryCar.java +++ b/src/main/java/com/example/DeliveryCar.java @@ -6,6 +6,7 @@ import akka.actor.typed.javadsl.AbstractBehavior; import akka.actor.typed.javadsl.ActorContext; import akka.actor.typed.javadsl.Behaviors; import akka.actor.typed.javadsl.Receive; +import akka.actor.typed.javadsl.TimerScheduler; import java.util.ArrayList; import java.util.List; @@ -15,6 +16,7 @@ public class DeliveryCar extends AbstractBehavior { private final ArrayList pakete = new ArrayList<>(); private final ArrayList> route; private final int maxCapacity = 3; + private int globalIndex = 0; public interface Message {} @@ -22,7 +24,9 @@ public class DeliveryCar extends AbstractBehavior { public record PickupResponse(Paket paket) implements Message {} - public record ContinueRoute() implements Message {} + public record StartRoute() implements Message {} + + public record RestartRoute() implements Message{} private DeliveryCar(ActorContext context, ArrayList> route) { super(context); @@ -38,10 +42,8 @@ public class DeliveryCar extends AbstractBehavior { return newReceiveBuilder() .onMessage(LoadMessage.class, this::onLoadMessage) .onMessage(PickupResponse.class, this::onPickupResponse) - .onMessage(ContinueRoute.class, msg -> { - deliverPackages(); - return Behaviors.same(); - }) + .onMessage(StartRoute.class, msg->{ + onStartRoute();return this;}) .build(); } @@ -52,30 +54,81 @@ public class DeliveryCar extends AbstractBehavior { } private Behavior onPickupResponse(PickupResponse rsp) { - pakete.add(rsp.paket); - getContext().getLog().info("Aktuelle Anzahl der Pakete im Truck: {}", pakete.size()); - checkNextStop(); + if(rsp.paket.inhalt == null){ + globalIndex++; + checkNextStop(); + }else { + if(pakete.size()==3){ + checkNextStop(); + } + pakete.add(rsp.paket); + getContext().getLog().info("Aktuelle Anzahl der Pakete im Truck: {}", pakete.size()); + globalIndex++; + checkNextStop(); + } return this; } - +//Die rekursive Methode,die über alle Addressen iteriert private void checkNextStop() { - if (pakete.size() >= maxCapacity || route.isEmpty()) { - getContext().getSelf().tell(new ContinueRoute()); - } else { + //Wenn Wagen voll ist, dann wird erstmal geguckt ob man ein Paket liefern kann + if (pakete.size() >= maxCapacity) { + deliverPackages(); + checkNextStop(); + } + //Wenn fertig iteriert so geht der Wagen an den Verteilerzentrum + if(globalIndex==4){ + DistributionCenter.ArriveMessage antwort = new DistributionCenter.ArriveMessage(pakete,getContext().getSelf()); + //Fehlende Antwort an den Verteilerzentrum + + + // + + } + else { + //Guckt ob Paket für Kunden da ist und fragt an ob etwas mitgenommen werden muss + deliverPackages(); sendPickupMessage(); } } - - private void sendPickupMessage() { - ActorRef nextCustomer = route.remove(0); - nextCustomer.tell(new Customer.PickUpMessage(getContext().getSelf(), "Some string")); - } - - private void deliverPackages() { - ActorRef nextCustomer = route.get(0); - for (Paket paket : pakete) { - nextCustomer.tell(new Customer.DeliveryMessage(paket)); + private Behavior onStartRoute(){ + if(globalIndex==0){ + checkNextStop(); + return this; + }else{ + if(globalIndex==4) { + globalIndex = 0; + onStartRoute(); + } } - pakete.clear(); + return this; } + +//Sendet PickUp Nachricht an den jetztigen Kunden wo der gerade ist. + private void sendPickupMessage() { + ActorRef nextCustomer = route.get(globalIndex); + nextCustomer.tell(new Customer.PickUpMessage(getContext().getSelf(), "Wagen kann Paket aufnehmen")); + globalIndex++; + } + + + //Prüft ob Paket im Wagen für den Empfänger ist oder nicht, falls ja wird dieser direkt entfernt + private void deliverPackages() { + ActorRef nextCustomer = route.get(globalIndex); + //Iteriert über alle Pakete + for (Paket paket : pakete) { + //Falls Empfänger vorhanden so wird dieser aus dem Wagen genommen und geht dann weiter + if(pakete.get(globalIndex).empfaenger == nextCustomer ) { + nextCustomer.tell(new Customer.DeliveryMessage(paket)); + pakete.remove(globalIndex); + globalIndex++; + } + } + + } + + private void removeMessage(Paket paket){ + pakete.remove(paket); + } + + } \ No newline at end of file diff --git a/src/main/java/com/example/DistributionCenter.java b/src/main/java/com/example/DistributionCenter.java index c29fdd1..909529a 100644 --- a/src/main/java/com/example/DistributionCenter.java +++ b/src/main/java/com/example/DistributionCenter.java @@ -137,8 +137,8 @@ public class DistributionCenter extends AbstractBehavior> route = generateRandomRoute(customers); - getContext().spawn(DeliveryCar.create(route), "deliveryCar" + i); - getContext().getLog().info("Lieferwagen {} erstellt mit Route: {}", i, route); + getContext().spawn(DeliveryCar.create(route), "deliveryCar" + i+1); + getContext().getLog().info("Lieferwagen {} erstellt mit Route: {}", i+1, route.toString()); } }