Code Monkey home page Code Monkey logo

ws18-jade-tutorials-dharminb's People

Watchers

James Cloos avatar Argentina Ortega Sáinz avatar Dharmin Bakaraniya avatar

ws18-jade-tutorials-dharminb's Issues

End the execution after all buyers terminate

After all buyers terminate, the sellers and the container itself should terminate. The program itself runs perfectly in terminal, but travis will get stuck.

Cannot use shutdown behavious because that does not give time to buyers to buy 3 books.

For current progress please check this branch.

For travis execution details, check this
@argenos please help !

Complete JADE tutorial assignment

There are 2 types of agents

  1. Buyer
  2. Seller
  • Each buyer agent receives the title of the book to buy as a command line argument and requests all known seller agents to provide an offer. As soon as an offer is received the buyer agent accepts it and issues a purchase order. If more than one seller agent provides an offer the buyer agent accepts the best one (lowest price). Having bought a book the buyer agent repeats above actions for another book. This goes on till the buyer agent has 3 books.
  • Each seller agent has a catalogue of books for sale. Seller agents continuously wait for requests from buyer agents. When asked to provide an offer for a book they check if the requested book is in their catalogue and in this case reply with the price. Otherwise they refuse. When they receive a purchase order they serve it and remove the requested book from their catalogue.

There are 2 types of books

  1. ebooks
  2. paperback

To Do
The following should be running simultaneously.

  • at least 20 buyer agents and
  • 3 book seller agents

Each book seller should have 4 different titles for each type of book

  • They have unlimited ebooks for each ebook title
  • They have 20 paperback books (5 books for each paperback title)

Each customer should buy at least 3 books before the simulation is over

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.