Skip to content

Commit

Permalink
Assignment 4 schedule and aggregation of order #12
Browse files Browse the repository at this point in the history
more communication working
  • Loading branch information
Dr4gonbl4de committed Nov 25, 2018
1 parent 3e73234 commit 5c4967f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/team_pjt/agents/OrderProcessing.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public void action() {
schedulerRequest.addReceiver(aidScheduler);
sendMessage(schedulerRequest);
System.out.println("asked scheduler for feasibility");
step++;
}
else {
block();
Expand All @@ -207,6 +208,7 @@ public void action() {
MessageTemplate schedulerReply = MessageTemplate.and(MessageTemplate.MatchConversationId(order.getGuid()),
MessageTemplate.MatchConversationId(order.getGuid()));
ACLMessage schedulerMessage = myAgent.receive(schedulerReply);
System.out.println("in case 1");
if (schedulerMessage != null) {
System.out.println("schedule reply received!");
if (schedulerMessage.getPerformative() == ACLMessage.CONFIRM) {
Expand Down Expand Up @@ -234,7 +236,6 @@ public void action() {
if (!bFeasibleOrder) {
sendNotFeasibleMessage(cfpMessage, "Not able to schedule Order!");
}
step++;
} else {
block();
}
Expand Down

0 comments on commit 5c4967f

Please sign in to comment.