Sie sind auf Seite 1von 5

> COALITIONS <- c(27,17,13,8,44,40,35,30,25,21,0,0,0,0,65)

> EQUIPOS<-DefineGame(4,COALITIONS)
> summary(EQUIPOS)

Characteristic form of the game

Number of agents: 4

Coaliton Value(s)

v(i)
1 27
2 17
3 13
4 8
12 44
13 40
14 35
23 30
24 25
34 21
123 0
124 0
134 0
234 0
1234 65

>
>
> FINALISTAS <- c("BRASIL","FRANCIA","CROACIA","INGLATERRA")
> AIRSHAPLEY<-ShapleyValue(EQUIPOS,FINALISTAS)
There were 22 warnings (use warnings() to see them)
> summary(AIRSHAPLEY)

Shapley Value for the given game

Shapley Value
BRASIL 23.41667
FRANCIA 16.75000
CROACIA 14.08333
INGLATERRA 10.75000
>
> AIRNUCLEOLUS <- Nucleolus(EQUIPOS,type="Cost")
Model name:
C1 C2 C3 C4 C5 C6
Minimize 0 0 0 0 1 -1
Kind Std Std Std Std Std Std
Type Real Real Real Real Real Real
Upper Inf Inf Inf Inf Inf Inf
Lower 0 0 0 0 0 0
Model name: Nucleolus of a cost game
C1 C2 C3 C4 C5 C6
Maximize 0 0 0 0 1 -1
R1 0 0 0 0 0 1 >= 0
R2 1 0 0 0 1 -1 <= 27
R3 0 1 0 0 1 -1 <= 17
R4 1 1 0 0 1 -1 <= 44
R5 0 0 1 0 1 -1 <= 13
R6 1 0 1 0 1 -1 <= 40
R7 0 1 1 0 1 -1 <= 30
R8 1 1 1 0 1 -1 <= 0
R9 0 0 0 1 1 -1 <= 8
R10 1 0 0 1 1 -1 <= 35
R11 0 1 0 1 1 -1 <= 25
R12 1 1 0 1 1 -1 <= 0
R13 0 0 1 1 1 -1 <= 21
R14 1 0 1 1 1 -1 <= 0
R15 0 1 1 1 1 -1 <= 0
R16 1 1 1 1 0 0 = 65
Kind Std Std Std Std Std Std
Type Real Real Real Real Real Real
Upper Inf Inf Inf Inf Inf Inf
Lower 0 0 0 0 0 0

Model name: 'Nucleolus of a cost game ' - run #1


Objective: Maximize(R0)

SUBMITTED
Model size: 16 constraints, 6 variables, 61 non-zeros.
Sets: 0 GUB, 0 SOS.

Using PRIMAL simplex for phase 1 and DUAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.

Optimized BLAS was successfully loaded for bfp_LUSOL.


Found feasibility by primal simplex after 3 iter.

Optimal solution -48.75 after 5 iter.

Excellent numeric accuracy ||*|| = 0

MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
There were 2 refactorizations, 0 triggered by time and 0 by density.
... on average 2.5 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 45 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.015 seconds, presolve used 0.000 seconds,
... 0.001 seconds in simplex solver, in total 0.016 seconds.
[1] 16.25 16.25 16.25 16.25 0.00 48.75
Using PRIMAL simplex for phase 1 and DUAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.

Found feasibility by primal simplex after 5 iter.

Optimal solution -48.75 after 6 iter.

Excellent numeric accuracy ||*|| = 0

MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
There were 3 refactorizations, 0 triggered by time and 0 by density.
... on average 2.0 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 57 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.017 seconds, presolve used 0.000 seconds,
... 0.001 seconds in simplex solver, in total 0.018 seconds.
[1] 16.25 16.25 16.25 16.25 0.00 48.75
Using PRIMAL simplex for phase 1 and DUAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.

Found feasibility by primal simplex after 5 iter.

Optimal solution -48.75 after 7 iter.

Excellent numeric accuracy ||*|| = 0

MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
There were 3 refactorizations, 0 triggered by time and 0 by density.
... on average 2.3 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 54 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.019 seconds, presolve used 0.000 seconds,
... 0.001 seconds in simplex solver, in total 0.020 seconds.
[1] 16.25 16.25 16.25 16.25 0.00 48.75
Using PRIMAL simplex for phase 1 and DUAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.

Found feasibility by primal simplex after 6 iter.

Optimal solution -48.75 after 8 iter.

Excellent numeric accuracy ||*|| = 0

MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
There were 3 refactorizations, 0 triggered by time and 0 by density.
... on average 2.7 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 51 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.021 seconds, presolve used 0.000 seconds,
... 0.000 seconds in simplex solver, in total 0.021 seconds.
[1] 16.25 16.25 16.25 16.25 0.00 48.75
Warning messages:
1: In solve.lpExtPtr(lprec) :
printing of extremely long output is truncated
2: In solve.lpExtPtr(lprec) :
printing of extremely long output is truncated
3: In solve.lpExtPtr(lprec) :
printing of extremely long output is truncated
4: In solve.lpExtPtr(lprec) :
printing of extremely long output is truncated
> summary(AIRNUCLEOLUS)

Nucleolus of a Cost Game for the given coalitions

v(S) x(S) Ei
1 27 16.25 -48.75
2 17 16.25 -48.75
3 13 16.25 -48.75
4 8 16.25 -48.75
>
>
> CLAIM <- c(27,17,13,8)
> FINALISTAS <- c("BRASIL","FRANCIA","CROACIA","INGLATERRA")
> EQUIPOS <- AllRules(100,CLAIM,FINALISTAS)
> summary(EQUIPOS)

Claims of the Agents


BRASIL FRANCIA CROACIA INGLATERRA
27 17 13 8

Assignments according to the following rules

Proportional CEA CEL Talmud RA


BRASIL 41.54 25 35.75 35.75 27
FRANCIA 26.15 25 25.75 25.75 17
CROACIA 20.00 13 21.75 21.75 13
INGLATERRA 12.31 8 16.75 16.75 8

Inequality Analysis among rules (Gini Index)

Proportional CEA CEL Talmud RA


0.23 0.22 0.15 0.15 0.23
> ## REPARTICION VOTOS BRASIL FRANCIA CROACIA INGLATERRA
> plot(EQUIPOS,1)
There were 12 warnings (use warnings() to see them)
> plot(EQUIPOS,2)
There were 14 warnings (use warnings() to see them)
> plot(EQUIPOS,3)
There were 12 warnings (use warnings() to see them)
> plot(EQUIPOS,4)
Warning messages:
1: In axis(if (horiz) 2 else 1, at = at.l, labels = names.arg, lty = axis.lty, :
font family not found in Windows font database
2: In title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) :
font family not found in Windows font database
3: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
4: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
5: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
6: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
7: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
8: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
9: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
10: In axis(if (horiz) 1 else 2, cex.axis = cex.axis, ...) :
font family not found in Windows font database
>
> LorenzRules(EQUIPOS)
Warning messages:
1: In axis(side = side, at = at, labels = labels, ...) :
font family not found in Windows font database
2: In title(...) : font family not found in Windows font database
3: In title(...) : font family not found in Windows font database
4: In title(...) : font family not found in Windows font database
5: In strwidth(legend, units = "user", cex = cex, font = text.font) :
font family not found in Windows font database
>
> PORCENTAJES <- c(27,17,13,8)
> FINALISTAS <- c("BRASIL","FRANCIA","CROACIA","INGLATERRA")
>
pie(PORCENTAJES,labels=FINALISTAS,MAIN="ShapleyValue",col=c("green","blue","white",
"red"))
Warning messages:
1: In text.default(1.1 * P$x, 1.1 * P$y, labels[i], xpd = TRUE, adj = ifelse(P$x <
:
"MAIN" is not a graphical parameter
2: In text.default(1.1 * P$x, 1.1 * P$y, labels[i], xpd = TRUE, adj = ifelse(P$x <
:
font family not found in Windows font database
3: In text.default(1.1 * P$x, 1.1 * P$y, labels[i], xpd = TRUE, adj = ifelse(P$x <
:
"MAIN" is not a graphical parameter
4: In text.default(1.1 * P$x, 1.1 * P$y, labels[i], xpd = TRUE, adj = ifelse(P$x <
:
"MAIN" is not a graphical parameter
5: In text.default(1.1 * P$x, 1.1 * P$y, labels[i], xpd = TRUE, adj = ifelse(P$x <
:
"MAIN" is not a graphical parameter
6: In title(main = main, ...) : "MAIN" is not a graphical parameter
> text(0.2,0.5,"27%")
> text(-0.4,-0.15,"17%")
> text(0.1,-0.5,"13%")
> text(0.48,-0.2,"8%")
>
>

Das könnte Ihnen auch gefallen