GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hangouby/agents

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
README
README
 
 
catalog1.csv
catalog1.csv
 
 
catalog1discount.csv
catalog1discount.csv
 
 
catalog1markedup.csv
catalog1markedup.csv
 
 
catalog2.csv
catalog2.csv
 
 
order1.csv
order1.csv
 
 
order2.csv
order2.csv
 
 
run_test2.bat
run_test2.bat
 
 
run_test3.bat
run_test3.bat
 
 
run_test4.bat
run_test4.bat
 
 
run_test5.bat
run_test5.bat
 
 
run_test6.bat
run_test6.bat
 
 
run_test7.bat
run_test7.bat
 
 
run_test8.bat
run_test8.bat
 
 

Repository files navigation

Playing Around with Jade (http://jade.tilab.com/)
=================================================
This project is to illustrate and document the basic patterns of usage of Jade.

The initial setup is Windows specific. This is because I am trying to do this on a Saturday
and Jade installs and works better out of the box on my Windows laptop than my mbp.

Setting up Jade
---------------
Follow instructions on web page then create setenv.bat

Creating Jade agents
--------------------
Create a class
Put it in a jar file
Add jar file to classpath

Typical Usages
--------------
java jade.Boot -agents John:examples.peter.PeterAgent

Args are inside (). Claims to support space separated args but on ever reports 1 arg
Fails if no "". Condenses to single arg if there are ""
java  jade.Boot -agents "John:examples.peter.PeterAgent(arg1 arg2 arg3)"

BookTrading examples
--------------------
Each instance running on same computer needs to use a different port. Will try counting backwards
from defautl port 1099

C:\java\jade>java jade.Boot -agents "Big-Bad-John:examples.bookTrading.BookBuyerAgent(War-and-Peace)"
....
Hallo! Buyer-agent [email protected]:1099/JADE is ready.
Target book is War-and-Peace

java jade.Boot -agents "Gentleman-Jim:examples.bookTrading.BookSellerAgent(War-and-Peace)"


Second buyer

java jade.Boot -port 1098 -agents "Big-Bad-John:examples.bookTrading.BookBuyerAgent(War-and-Peace)"

Seller

java jade.Boot -port 1097 -agents "Gentleman-Jim:examples.bookTrading.BookSellerAgent(War-and-Peace)"

Running multiple agents
=======================
java jade.Boot -agents Buyer1:examples.bookTrading.BookBuyerAgent(xyz);Buyer2:examples.bookTrading.BookBuyerAgent(xyz);Buyer3:examples.bookTrading.BookBuyerAgent(xyz);Seller1:examples.bookTrading.BookSellerAgent;Seller2:examples.bookTrading.BookSellerAgent;Seller3:examples.bookTrading.BookSellerAgent

Found the following 3 seller agents:
[email protected]:1099/JADE
[email protected]:1099/JADE
[email protected]:1099/JADE
Found the following 3 seller agents:
[email protected]:1099/JADE
[email protected]:1099/JADE
[email protected]:1099/JADE
Found the following 3 seller agents:
[email protected]:1099/JADE
[email protected]:1099/JADE
[email protected]:1099/JADE
xyz sold to agent [email protected]:1099/JADE
xyz successfully purchased from agent [email protected]:1099/JADE
Price = 20
Attempt failed: xyz not available for sale
Buyer-agent [email protected]:1099/JADE terminating.
Attempt failed: xyz not available for sale
xyz inserted into catalogue. Price = 10
xyz inserted into catalogue. Price = 5
Trying to buy 'xyz'
Found the following 3 seller agents:
[email protected]:1099/JADE
[email protected]:1099/JADE
[email protected]:1099/JADE
Trying to buy 'xyz'
xyz sold to agent [email protected]:1099/JADE
Found the following 3 seller agents:
[email protected]:1099/JADE
[email protected]:1099/JADE
[email protected]:1099/JADE
xyz successfully purchased from agent [email protected]:1099/JADE
Price = 5
xyz sold to agent [email protected]:1099/JADE
Buyer-agent [email protected]:1099/JADE terminating.
xyz successfully purchased from agent [email protected]:1099/JADE
Price = 10
Buyer-agent [email protected]:1099/JADE terminating.





Yellow Pages??? Does not work!!
------------
java jade.Boot -port 1095 -jade_core_nodeMonitoring_UDPNodeMonitoringService_port 5555 -agents "Gentleman-Jim:examples.bookTrading.BookSellerAgent(War-and-Peace)"

Working Code!!
--------------
run_test4.bat
c:\java\jade>java -cp \java\jade\lib\jade.jar;\java\jade\lib\jadeTools.jar;\java\jade\lib\iiop.jar;\java\jade\lib\commons-codec\commons
ar  jade.Boot -agents Buyer1:examples.ordering.BuyerAgent(order2.csv);Seller1:examples.ordering.SupplierAgent(catalog1.csv)
...
Reading catalog from 'catalog1.csv'
Buyer agent [email protected]:1099/JADE is starting.
Reading order from 'order2.csv'
Read catalog1.csv 5 lines ------------------------
Read order2.csv 5 lines ------------------------
Order string is 'bricks,100,0.0;cement,1,0.0;wood,10,0.0;sand,2,0.0;nails,500,0.0;'
Catalog has 5 rows worth $525.0
Starting Supplier Agent [email protected]:1099/JADE
Trying to buy 'bricks,100,0.0;cement,1,0.0;wood,10,0.0;sand,2,0.0;nails,500,0.0;'
Found the following 1 supplier agents:
[email protected]:1099/JADE
'bricks,100,0.0;cement,1,0.0;wood,10,0.0;sand,2,0.0;nails,500,0.0;' sold to agent [email protected]:1099/JADE
bricks,100,0.0;cement,1,0.0;wood,10,0.0;sand,2,0.0;nails,500,0.0; successfully purchased from agent [email protected]:1099/JADE
Price = 55.0
Buyer-agent [email protected]:1099/JADE terminating.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.