Code Monkey home page Code Monkey logo

project's Introduction

MAAS Project -

Add a brief description of your project. Make sure to keep this README updated, particularly on how to run your project from the command line.

Team Members

Dependencies

  • JADE v.4.5.0
  • ...

How to run

Just install gradle and run:

gradle run

Run with multiple machines

  • Connect machines to a common network
  • Find the ip of the server/host machine (for example 192.168.1.123)
  • Find a port which can be used for JADE communication (for example 5555)

For server/host machine

gradle run --args="-isHost 192.168.1.123 -localPort 5555 -stage1 -stage2 ... -noTK"

For client machines

gradle run --args="-host 192.168.1.123 -port 5555 -stage3 -noTK"

For the client which executes gradle command later than every other machine

gradle run --args="-host 192.168.1.123 -port 5555 -stageN"

It will automatically get the dependencies and start JADE with the configured agents. In case you want to clean you workspace run

gradle clean

Run Graph (Street Network) Visualization

Note: Since the JavaFX framework does not support starting multiple application threads simultaneously, it is not possible to initiate two visualizations for the project at the same time. Therefore, the graph visualization clashes with other visualization applications and would not show up if run along with them. In particular, the graph visualization waits for five seconds before starting the thread in order to ensure that the StreetNetwork and all Truck agents are up.

In order to run the graph visualization, disable the initialization of other visualization agents in the Start.java file. For example, to disable 'Board Visualization' comment out the lines as shown below:

if(visualizationStage) {
    Initializer init = new VisualizationInitializer();
    sb.append(init.initialize(scenarioDirectory));
            
    // Initializer boardInit = new BoardVisualisationInitializer(endTime);
    // sb.append(boardInit.initialize(scenarioDirectory));
}

After doing this, start the visualization using the follow command:

gradle run --args='-visualization'

Note that, at the moment, the simulation time is very short, and so the graph visualization will launch and shut down quickly.

For detailed documentation about the design and usage of the graph visualization click here. The descriptions of the messages required by the visualization agent can be found here.

Testing Baking

For testing baking stage

gradle run --args="-baking"

For testing packaging stage

gradle run --args="-packaging"

For testing board visualization (right brothers). Please note that, the platform will shut down after visualizer window is closed using close (X) button or menu at top right.

gradle run --args="-visualization"

For testing multiple stages with visualization

gradle run --args="-baking -packaging -visualization"

Eclipse

To use this project with eclipse run

gradle eclipse

This command will create the necessary eclipse files. Afterwards you can import the project folder.

project's People

Contributors

af-a avatar anenriquez avatar argenos avatar dharminb avatar dr4gonbl4de avatar drealarun avatar element54 avatar erickkramer avatar jackuzzi003 avatar janhavi19 avatar janl1992 avatar madmax2012 avatar moriarty avatar sushant-chavan avatar tmetzl avatar widyaaulia avatar zahidse avatar

Stargazers

 avatar

Watchers

 avatar  avatar

project's Issues

Recipe Action (Out of) Order?

@argenos It would appear that some items in the bakeries.json file are possibly out of order. For example in the Multigrain Bread recipe "cooling" comes before "proofing" and "baking". Does this imply that all actions before "baking" (which happens in the Baking Stage) should happen in the Dough Preparation Stage?

Currently, we are under the impression that the Dough Preparation Stage should be responsible for "Kneading", "Resting", 'Item Preparation", and "Proofing" and thus any action that happens before all of these actions are completed poses a problem.

https://github.com/HBRS-MAAS/project/blob/master/src/main/resources/config/sample/bakeries.json

Visualization agent

The following visualization proposals were accepted:

  • Historical view #34
  • Individual order status #35
  • Message queues by agent #36
  • Order board #37
  • Street network #38

The pull request should also contain their interfaces added to the base class (#39), so other teams can seamlessly integrate it into their projects.

The selected framework is JavaFX.

Baking interfaces

Two pull requests are needed:

  • docs/messages/cooling-racks.md containing the input and output messages
  • the cooling rack agent, which inherits from the base class

Expected reply by Customer for notFeasibleMessage from OrderProcessing

When the scheduler decide the order is not feasible based on the schedule, what does the order processing expect the customer to send? Order Processing, after sendNotFeasibleMessage(), doesn't increment the step: step = 1. So it stays there and wait for the scheduler to send something. Then, looking at Scheduler, after sending the schedule feasibility to Order Processing, it increments the step to 2 and so it waits for accept_proposal from Order Processing. This problem, I think, won't be just for 'not feasible order'. If the customer reject the proposal, the order processing doesn't tell the Scheduler (DistributeScheduledOrder) which also will make the Scheduler to wait.

I am trying to understand how Order Processing works so how I interpret the code might be wrong.

Any input will be appreciated. Thank you.

Bugs in scenario files

  • Repeated product with different information in same bakery. Example : product with guid: "Bun" is repeated for same Bakery Sunspear Bakery with different salesPrice.
  • heating and cooling rate for ovens are underscroll seperated rather than camel case. Expected heatingRate, found heating_rate

Dough preparation interfaces

Two pull requests are needed:

  • docs/messages/proofer.md containing the input and output messages
  • the proofer agent, which inherits from the base class

CoolingRackAgent is not matching the conversation ID of ACL messages

In the documentation for the CoolingRackAgent, it says that conversation ID should be "cooled-product-" + counter.toString()", but the CoolingRackAgent does not seem to be matching the conversation ID when receiving the message. How is the conversation ID used by the CoolingRackAgent and is the counter in the ID required? @HBRS-MAAS/right-brothers

Thanks

Agent base class

This base class will be in charge of sending messages to the corresponding visualization agents and synchronizing with the clock agent. Further, it can provide a mechanism to maintain a priority queue which can be used in the logic by agents who receive information from the previous stage.

Add initialiser for orderprocessing agent

Would it be possible to add initialiser for order processing agent?

We want to test baking and packaging stage with order processor and customer.

I tried adding just order-processing:org.maas.agents.OrderProcessing in the OrderProcessingInitialiser.java but soon realised that the agent needs 2 arguments.

Delivery interfaces

Two pull requests are needed:

  • docs/messages/mailbox.md containing the input and output messages
  • the mailbox agent, which inherits from the base class

Missing slot information for the ovens

Hello @argenos it seems the bakery scenarios do not have information about the slots in the ovens. Should we assume that each oven has 4 slots? The PDF with the project description says: " The bakery has a number of ovens, each of which has 4 equally-sized 
 baking slots with individual controllable baking temperature" ... For each product, a number of items simultaneously fit into an oven slot." Is there information about the capacity of a slot based on the product type? I cannot find it in the bakery.json scenario.

Thanks!

TimeStep in minutes should be one minute instead of 10

The time step is too large to perform the production (dough and baking stages). For example, the Oven needs to heat up based on the heating rate and it increases, in some cases, 2 degrees every 10 minutes so to reach the baking temperature takes a lot of time. We suggest changing the time step to 1 minute in the meta files.

Integrate customer with orderProcessing

@HBRS-MAAS/jsw
We need customer agent to work in order to test the integrated code for baking stage.
It would be greatly appreciated if you could integrate customer agent with orderProcessing agent.

Also, please take a look at #90 and #94 and make necessary changes if needed. We are using that initializer.

Historical view

Adding a way to visualize important information in retrospect, e.g. statistics

Packaging interfaces

Two pull requests are needed:

  • docs/messages/loading-bay.md containing the input and output messages
  • the loading bay agent, which inherits from the base class

Related to #47

Groups should add their status badges

  • Yes. We are being lazy...
  • Yes. This will cause trivial merge conflicts when if you merge the project back to your forks.

@HBRS-MAAS/ws17
@HBRS-MAAS/autobake
@HBRS-MAAS/breadnbeer
@HBRS-MAAS/zarvis
@HBRS-MAAS/pieceofcake
@HBRS-MAAS/just_a_bakery

Customer Agent throws error

The Customer Agent throws errors - are you aware of this?
org.json.JSONException: JSONObject["bakery-005"] not found.
at org.json.JSONObject.get(JSONObject.java:566)
at org.json.JSONObject.getJSONObject(JSONObject.java:778)
at org.team_pjt.agents.CustomerAgent.findTheCheapest(CustomerAgent.java:495)
at org.team_pjt.agents.CustomerAgent.access$1000(CustomerAgent.java:40)
at org.team_pjt.agents.CustomerAgent$SendConfirmation.action(CustomerAgent.java:324)
at jade.core.behaviours.Behaviour.actionWrapper(Behaviour.java:344)
at jade.core.Agent$ActiveLifeCycle.execute(Agent.java:1585)
at jade.core.Agent.run(Agent.java:1524)
at java.lang.Thread.run(Thread.java:745)

Scheduling received orders and aggregation

Based on the discussions from the class:

  • order processing checks schedule for feasibility and makes offer
  • scheduler agent aggregates accepted orders by delivery date
  • The order processing will send orders immediately after they are received, and scheduled orders will be sent on the same day sorted by delivery date.
  • service to query the place of an order in the queue

Two pull requests are needed:

  • one with the messages:
    • docs/messages/order-processing.md
    • docs/messages/scheduler.md
  • the scheduler and order processing agents, which inherit from the base class

Interface agents

The following tasks were distributed among the teams:

  • Customers placing orders #27
  • Order scheduling and aggregation #28
  • Dough preparation #29
  • Baking #30
  • Packaging #31
  • Delivery #32

In order to make sure this is working, on their own repos, each team will implement their stage + 1 (the receiving agent on the next stage). The pull request should, however, contain only the interface agent and its documentation.

cc @HBRS-MAAS

The simulation ends after the end time determined in the Start.java

The end time for each state has to be manually entered in the Start.java. It is difficult to determine how long the simulation should last for each scenario file and it is most likely different for each of the scenarios. We suggest to take the endtime from the meta file (duration in days).

TimeKeeper agent does not terminate.

How should the TimeKeeper agent terminate? Should the termination be triggered by another agent? The function takeDown() of the TimeKeeper is currently empty.

Two object folders

Currently, there is a folder Objects and a folder objects. The name of the package in the folder orders was changed to package org.maas.Objects; What was the reason for this change?
Would it be better to have all objects in one folder, either orders or Orders?

Config File (order message) for Order Processing

There is a mistake in how the code read the JSONObject of order, ex. customerId instead of customer_id. Our message is based on the config file. Our team did this review before so it seems the code in class repo hasn't been update.

Base agent's finished functions cannot be accessed from another folder

When the folder structure is as below

org
├── maas
│   ├── agents
│   ├── behaviours
│   ├── data
│   │   └── messages
│   ├── messages
│   ├── objects
│   ├── Objects
│   └── utils
└── right_brothers
    ├── agents
    ├── bakery_objects
    ├── data
    │   ├── messages
    │   └── models
    └── utils

the agents in right_brothers/agents/ cannot access finished function of maas/right_brothers/agents/BaseAgent.java.

This folder structure is needed to integrate team code with class code.

Adding a clock agent

@HBRS-MAAS/right-brothers can you add a few lines describing your approach for the TimeKeeper agent with discrete timesteps see

Street network visualization

Show the current location of the truck agents, and in show by truck the contained orders and their estimated delivery time

Order board by stage

Adding a way to visualize the production process. The orders can only move to the next task after all products have completed a stage. Based on the project description, probably the following columns should suffice:

  • backlog
  • scheduled
  • dough preparation
  • baking
  • packaging
  • delivery
  • done

Customers placing an order

  • customer requests quotation only from bakeries which offer that product
  • customer will buy bread from the cheapest bakery, even if that means splitting the order
  • the customer will place the required orders to the different bakeries at the appropriate time

Two pull requests are needed:

  • docs/messages/customer.md containing the input and output messages
  • the implementation of the customer agent, which inherits from the base class

BakeryId for Proofer

Hi
Would it be possible to assign a bakeryId to the proofer? By now proofer just registers with type proofer. It would be great if proofer could register with type proofer and name bakery id. This way it would be possible that the dough manager is able to dispatch orders only to the proofer with whom he has a bakery id in common. Thank you.

Kind regards
Jan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.