Upload
stefano-nasini
View
224
Download
0
Embed Size (px)
Citation preview
8/8/2019 Simulation of Barter Processes
1/15
Simulation of barter processes as
heuristic method for multiobjectiveoptimization
Stefano Nasini
8/8/2019 Simulation of Barter Processes
2/15
1) Bargaining problem2) The associated Game
3) Simulation model with Petri Net4) Java implementation5) Experimental design
6) Conclusions and Results
8/8/2019 Simulation of Barter Processes
3/15
The k -lateral bargaining problem concerns the ways k agents cooperate when non-cooperation leads to Pareto-inefficient output in the allocation of a fixed quantity. Such aproblem has been modelled from different outlooks and still represents a source of uncertainty in Social Science and Decision Theory.
Bargaining problem
Suppose two agents are endowed with tworespective points in the 3-dimensional commodity
space and utility function which represents their preference relation has been defined.
The related bargaining problem consists in findingtwo new points which keep untouched the overall amount of endowments.
0
..
),,(max
),,(max
23
13
23
13
22
12
22
12
21
11
21
11
23
22
21
2(
13
12
11
1(
i j x
ee x x
ee x x
ee x xt s
x x xu
x x xu
8/8/2019 Simulation of Barter Processes
4/15
Bargaining problem
As far as the determination of a unique solution isconcerned, Nash suggested that a solution shouldfulfil certain conditions:
-symmetry,- invariant to affine transformations,- Pareto efficiency,- independence of irrelevant alternatives.
The solution proposed by Nash considers the compact and convex payoff space P = {(u1, u2)|u1 > t1; u1 > t2}, where (t1, t2) is the vector of disagreement payoff, and a set H of non-dominatedvectors of P.
8/8/2019 Simulation of Barter Processes
5/15
The associated Game
Consider a lexicographic order in the Cartesian product of the commodities type. Let (i,j) be an elementof such a set of ordered pares. Then, a sequential game is defined as follows. The first element (i,j) isselected and an intermediary chooses within three actions:
])',(),',([21 ji ji x xUtility y yUtility
])',(),',([21 ji ji x xUtility y yUtility
])(),,([ ,21 ji ji x xUtility y yUtility
otherwise0
bydominatedParetot isn'if 1payoff(
)],(),,( 21[ ji ji y yUtility x xUtility)
The payoff function of the intermediary is the following
8/8/2019 Simulation of Barter Processes
6/15
The associated Game
The intermediary proposes exactly that tradewhich isnt Pareto-dominated by
. If the thirdstrategy has been chosen, then the secondcouple of good (i,j) is selected and theintermediary must chosen again between
and .
])(),,([ ,21 ji ji x xUtility y yUtility
])',(),',([21 ji ji x xUtility y yUtility
])',(),',([21 ji ji x xUtility y yUtility
])(),,([ ,21 ji ji x xUtility y yUtility
Then the two agent sequentially choosewhether to accept the proposal, inaccordance with their associated utilityfunctions.
8/8/2019 Simulation of Barter Processes
7/15
Simulation model with Petri Net
We used a ColoredTimestamp Petri Net. Eachtoken has a timestamp,which is a particular colorused to specify the earliest time when it can be
consumed.
The transition consumes @units firing time.
In an economy with three commodities there will be 4 tokens in p.1 at initial marking. The first transaction to fire is t.2 because it is the unique with @=0. Then, the clock will be updated as@++ so that t.1 will fire since the timestamps associated to its incoming tokens are @ = 1,which is the value of the current clock. The clock is again updated (clock = 2) and the next
transaction to fire will be t.1 .
8/8/2019 Simulation of Barter Processes
8/15
Uti_A =all amount;@ ++;
true;i = 1;@ ++;Iterations++;
if ( Utility(u_a, All_A+y-z) > Uti_A && Utility(u_b, All_B-y+z) > Uti_A ){
Uti_A = Utility(u_a, All_A+y-z);Uti_B = Utility(u_b, All_B-y+z);All_A = All_A+y-z;All_B = All_B-y+z;arc.1 = (Uti_A, @+1);
arc.2 = (Uti_B, @+1);arc.3 = 2y;arc.4 = 2z;
if ( M(p.6, t) < 3) { arc.6 = (1, @+3) } else { arc.6 = (0, @+3) }}if ( Utility(u_a, All_A-y+z) > Uti_A && Utility(u_b, All_B+y-z) > Uti_A ){
Uti_A = Utility(u_a, All_A-y+z);Uti_B = Utility(u_b, All_B+y-z);All_A = All_A-y+z;All_B = All_B+y-z;arc.1 = (Uti_A, @+1);arc.2 = (Uti_B, @+1);arc.3 = 2z;arc.4 = 2y;if ( M(p.6, t) < 3) { arc.6 = (1, @+3) } else { arc.6 = (0, @+3) }
}else {
arc.1 = Uti_A;arc.2 = Uti_B;arc.3 = y + z;arc.4 = y + z;arc.6 = (-1, @+3);
}
@ ++;
Simulation model with Petri Net
8/8/2019 Simulation of Barter Processes
9/15
Simulation model with Petri NetThe sequence beside showthe reachability tree of thePetri Net previously shown.
We consider a three-commodities two - agentseconomy with the followinginitial condition.
A given marking isreachable from the initialmarking if exists asequence of firings that transform the initialmarking into it.
1]6,[8,=
11]7,[5,=
50]110,[150,=
140]250,[100,=
b
a
b
a
u
u
e
e
8/8/2019 Simulation of Barter Processes
10/15
Java implementation
We implemented the simulation model in Java, a programming languageoriginally developed by James Gosling at Sun Microsystems. There werefive primary goals in the creation of the Java language:
- It should be "simple, object oriented, and familiar".- It should be "robust and secure".
- It should be "architecture neutral and portable".- It should execute with "high performance"
We use a Netbeans Integrated Development Environment to interpret the Java codeand run it in Windows Environment. An Integrated Development Environment is a
software application that provides comprehensive facilities for software developmentand usually consists of:
- a source code editor;- a compiler and/or an interpreter;- build automation tools;
- a debugger;
8/8/2019 Simulation of Barter Processes
11/15
The NetBeans Integrated Development
Environment is written in Java and runseverywhere with a JVM.
We implemented two java classes:
Java implementation
- public class RepeatedGame { . . . }- public static void main(String[] args) { . . . }
The result shown beside allow a quick understanding of the improvement theplayers get after the trading are carried out.
8/8/2019 Simulation of Barter Processes
12/15
Experimental design
X1: Correlation between utility and quantity of the same agent :+ : mean correlation higher then 0.7;: mean correlation within [ -0.4 , 0.4];-: mean correlation lower then -0.7 .
X2> Correlation between utility and quantity of the opposite agents:+ : mean correlation higher then 07.;: mean correlation within [ -0.4 , 0.4];
-: mean correlation lower then -0.7 .
We use a two-factors-three-levels experiment (3 2 factorial designs) with four replications foreach combination of them to check whether the number of trades needed to reach a Paretoefficient allocation depends on the correlation between utility and quantity of the initialendowment.
)N(0,~ 2
211222110
k
k k k k k k x x x x y
A factorial design of experiment consists of two or more factors,each with discrete
possible values or "levels", and whoseexperimental unitstake on all possiblecombinations of theselevels across all such
factors.
8/8/2019 Simulation of Barter Processes
13/15
X1 X2 Responces
+ + 45 41 36 31
+ 35 5 6 4
+ - 33 3 1 2
+ 25 48 5 71
1 21 1 20
- 11 8 1 2
- + 69 82 198 103
- 43 21 36 51
- - 2 20 5 20
Data are collected in the following table where each row has 4 observations of the number of trades needed to reach a Pareto efficient allocation for each combination of factors. The idea isthat there are many possible initial allocations which can fulfill the definition of a factorcombination (i.e. many integer allocations could have mean correlation higher then 0.7 betweenutility and quantity of the same agent and mean correlation higher then 0.7 between utility andquantity of opposite agents). Among then we randomly select fours, which constitute fourdistinct replications for the same combination of factors.
Experimental design
The number of replications has beencalculated as follwos
8/8/2019 Simulation of Barter Processes
14/15
Experimental design
Effect Estimate Stand.Err t.value p.value
intercept 30.444 4.355 6.991 6.39e-08 ***
X1 - 16.583 5.334 - 3.109 0.00392 **
X2 27.333 5.335 5.125 1.38e-05 ***
X1*X2 - 18.812 6.533 - 2.880 0.00704 **
By maximum likelihood,we obtain the followingestimation of the effectsand the associatedp.values.
The following two plots suggest the presence of a quadratic effect of X1 (Correlation between
utility and quantity of the same agent ). Instead, the evvect of X2 over the responce seems to belinear. Nonetheless, ti could be reasonable to think that such a curvature could be explained bythe interaction between X1 and X2.
8/8/2019 Simulation of Barter Processes
15/15
Conclusions and Results
-The correlation between utility and quantity of the same agent is affecting the number of movements of the Local Search needed to reach a Pareto efficient allocation.
- Also the correlation between utility and quantity of opposite agents has a significativeeffect on the response. The underlying idea is that the more preferences of agents matchtheir respective allocations the closer they are to a Pareto efficient allocation. Conversely,the more preference of an agent matches with the allocation to the opposite agent themore it is likely that they have both a convenience in carrying out a movement.
- We also observe something that is less intuitive; that is, the effect of both factors on theresponse is not additive: there exists a signifivative interaction between the factors.