Plot of TU game on Windows

i need to make a barycentric plot including core vertices of the following TU cost game:

c(1)<=150

c(2)<=100

c(3)<=100

c(1,2)<=200

c(1,3)<=200

c(2,3)<=200

c(1,2,3)<=200

Can anyone provide me with a function or code which can do so?

To compute the barycenter of the extreme points of the core, I recommend to apply my Mathematica Package TuGames that can be downloaded from the following URL

Mma Package TuGames

To install the package for Mma Version 11.3 or later just execute in a notebook

ResourceFunction["GitHubInstall"]["himeinhardt", "TuGames"]


otherwise you need to follow one of the alternative custom installation procedure.

Note that the package cannot handle cost games directly, you have to transcribe it into a cost-savings game. This can be accomplished for the above example by

T=Range[3];
svec=CostSaving[{0,150,100,100,200,200,200,200},T]


From this vector one can define a TU game by

SavGame := DefineGame[T,svec];


After that you can compute the barycenter while calling

bc=BaryCenter[SavGame]


In the next step, we check first the existence of the core with

CoreQ[SavGame]


to get then the extreme points of the core while executing

crv=VerticesCore[SavGame]


Under Linux/MacOSX you can also invoke the Cddmathlink library by

crv2=CddVerticesCore[SavGame]


There, you have also the possibility to plot the core by invoking

FilledCoreV6[SavGame]


Windows users need to compile the Cddmathlink by themselves for plotting the core. Moreover, plotting the barycenter directly is at the moment not possible for three person games. For four person it is, see the documentation of TuGames for more information. However, one can project the point to the two-dimensional simplex with

bcprj2=Vec3DToSimplex[bc]


To finally combine the core plot with that of the barycenter. See the Mma documentation for more information of plotting a point and how to combine graphics. Alternatively, contact me by e-mail for getting a core plot with that of the barycenter.

• Hi Holger, I'm not able to install your package successfully. I think it's because im on Windows. i get a window popup when trying to run Needs["TUG`"] after installing to "choose a Mathlink program to launch". I don't know how to get around this. – MadsM May 15 '20 at 12:05
• Thank you for this information. In that case, you need to deactivate the Cddmathlink binaries in the file TuGames.wl. This file can be located by SystemOpen@Lookup[PacletObject["TUG"][All], "Location"] for Mma V12.1. Have a look for the phrase "If you plan to install these libraries somewhere else" at the README.md file of the project home at GitHub for more information how to do that. If you still have problems, send me an e-mail, and I will send you an adjusted file that overcome this issue. – Holger I. Meinhardt May 15 '20 at 12:35
• I supposed that this message is unproblematic of using the package, at least under Linux. Closing the popup window should be sufficient. Have you tried if the example given at GitHub works? – Holger I. Meinhardt May 15 '20 at 12:49