[316] | 1 | package bargainingchips.players;
|
---|
[315] | 2 |
|
---|
| 3 | import java.util.concurrent.BlockingQueue;
|
---|
| 4 | import java.util.concurrent.LinkedBlockingQueue;
|
---|
| 5 |
|
---|
[316] | 6 | import bargainingchips.NegotiationContext;
|
---|
| 7 | import bargainingchips.actions.Offer;
|
---|
[323] | 8 | import bargainingchips.actions.OfferBy;
|
---|
[340] | 9 | import bargainingchips.messaging.coordination.CoordinationMessage;
|
---|
| 10 | import bargainingchips.messaging.status.StatusMessage;
|
---|
[316] | 11 | import bargainingchips.utilityfunctions.UtilityFunction;
|
---|
[315] | 12 |
|
---|
| 13 | public class BoulwareAgent extends TimeDependentNegotiationAgent
|
---|
| 14 | {
|
---|
| 15 | public BoulwareAgent(String name, UtilityFunction u, NegotiationContext nc,
|
---|
[323] | 16 | BlockingQueue<Offer> in, BlockingQueue<OfferBy> out,
|
---|
[315] | 17 | BlockingQueue<CoordinationMessage> cin,
|
---|
| 18 | BlockingQueue<StatusMessage> cout)
|
---|
| 19 | {
|
---|
| 20 | super(name, u, nc, in, out, cin, cout);
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * For sellers dummy coordinator queues are created but are never linked up
|
---|
| 25 | */
|
---|
| 26 | public BoulwareAgent(String name, UtilityFunction u, NegotiationContext nc,
|
---|
[323] | 27 | BlockingQueue<Offer> in, BlockingQueue<OfferBy> out)
|
---|
[315] | 28 | {
|
---|
| 29 | super(name, u, nc, in, out,
|
---|
| 30 | new LinkedBlockingQueue<CoordinationMessage>(),
|
---|
| 31 | new LinkedBlockingQueue<StatusMessage>());
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | @Override
|
---|
| 35 | public double getE() {
|
---|
| 36 | return 0.2;
|
---|
| 37 | }
|
---|
[339] | 38 |
|
---|
| 39 | @Override
|
---|
| 40 | public String toDescription()
|
---|
| 41 | {
|
---|
| 42 | return name + " with u = " + u + " using " + getClass().getSimpleName() + " e = " + getE() + " strategy ";
|
---|
| 43 | }
|
---|
[315] | 44 | }
|
---|