[253] | 1 | package onetomany.etc;
|
---|
[236] | 2 | //package negotiator.onetomany;
|
---|
[225] | 3 | //
|
---|
[236] | 4 | //public class Main
|
---|
| 5 | //{
|
---|
| 6 | // private Portfolio portfolio;
|
---|
| 7 | // private DemandPlan demandPlan;
|
---|
| 8 | //
|
---|
| 9 | // public static int numType = 7; // this could later be gained from Domain
|
---|
| 10 | //
|
---|
| 11 | // public Main()
|
---|
| 12 | // {
|
---|
| 13 | // Product redProduct = new Product("Red");
|
---|
| 14 | // Product pinkProduct = new Product("Pink");
|
---|
| 15 | // Product blueProduct = new Product("Blue");
|
---|
| 16 | // //Product orangeProduct = new Product("Orange");
|
---|
[225] | 17 | //
|
---|
[236] | 18 | //
|
---|
| 19 | // portfolio = new Portfolio();
|
---|
| 20 | //
|
---|
| 21 | // portfolio.addProduct(redProduct);
|
---|
| 22 | // portfolio.addProduct(pinkProduct);
|
---|
| 23 | // portfolio.addProduct(blueProduct);
|
---|
| 24 | // //portfolio.addProduct(orangeProduct);
|
---|
| 25 | //
|
---|
| 26 | //
|
---|
| 27 | // demandPlan = new DemandPlan();
|
---|
| 28 | //// for (Product product : portfolio.getPortfolio())
|
---|
| 29 | //// demandPlan.setQuantity(product, (int)(Math.random()*numType+1));
|
---|
| 30 | //
|
---|
| 31 | //// System.out.println(demandPlan);
|
---|
| 32 | //
|
---|
| 33 | //
|
---|
| 34 | //
|
---|
| 35 | //// Agent sam = new Sam();
|
---|
| 36 | //// Agent sally = new Sally();
|
---|
| 37 | ////
|
---|
| 38 | //// Agent bob = new Bob();
|
---|
| 39 | ////
|
---|
| 40 | //// OneToManyProtocol p = new OneToManyProtocol(bob, sam, sally);
|
---|
| 41 | ////===> BilateralThread(bob, sam) and BilateralThread(bob, sally)`
|
---|
| 42 | //// p.start();
|
---|
| 43 | //
|
---|
| 44 | //
|
---|
| 45 | //
|
---|
| 46 | //
|
---|
| 47 | // }
|
---|
| 48 | //
|
---|
| 49 | //
|
---|
| 50 | // public Portfolio getPortfolio()
|
---|
| 51 | // {
|
---|
| 52 | // return portfolio;
|
---|
| 53 | // }
|
---|
| 54 | //
|
---|
| 55 | // public DemandPlan getDemandPlan()
|
---|
| 56 | // {
|
---|
| 57 | // return demandPlan;
|
---|
| 58 | // }
|
---|
| 59 | //
|
---|
| 60 | //}
|
---|
| 61 | //
|
---|