source: src/main/java/onetomany/bargainingchipsgame/BargainingChips.java@ 271

Last change on this file since 271 was 270, checked in by Tim Baarslag, 5 years ago

Offers between agents

File size: 1.2 KB
Line 
1package onetomany.bargainingchipsgame;
2
3import java.util.concurrent.BlockingQueue;
4import java.util.concurrent.LinkedBlockingQueue;
5
6import onetomany.bargainingchipsgame.interactions.Offer;
7import onetomany.bargainingchipsgame.interactions.SampleOffer;
8import onetomany.bargainingchipsgame.players.BilateralAgent;
9
10/**
11 * This package describes all the fundamental concepts in Bargaining Chips Game (BCG).
12 *
13 * BCG rules are based on a non-alternating offer protocol in each bilateral negotiation thread.
14 * Multiple deals via simultaneous threads in the BCG one-to-many negotiation need to be coordinated.
15 * So the players are equipped with two modules, one coordinator and multiple negotiators one per each thread.
16 *
17 */
18public class BargainingChips
19{
20 public static void main(String[] args) throws InterruptedException
21 {
22 BlockingQueue<Offer> in = new LinkedBlockingQueue<Offer>();
23 BlockingQueue<Offer> out = new LinkedBlockingQueue<Offer>();
24 BilateralAgent a = new BilateralAgent(in, out);
25
26 Thread thread = new Thread(a);
27 thread.start();
28
29 in.add(new SampleOffer(3));
30 Thread.sleep(5000);
31 in.add(new SampleOffer(4));
32
33 }
34
35}
Note: See TracBrowser for help on using the repository browser.