
The file bidding.py contains the functions implementing Algorithm 1 and the heuristics from the paper.

The file main.py implements the calls to the algorithms and outputs the data necessary to plot the figures in the paper. An integer between 0 and 6 is given as a parameter to select which plot data to compute.

The file plot.py takes a file output by main.py as input and outputs the corresponding plot as a png file.

The bash script to reproduce the plots in the paper is then:


#!/usr/bin/bash
for i in $(seq 0 6);
do
  python3 main.py $i
done

for f in out*; 
do 
  python3 plot.py $f
done


The instances randomly generated for each plot in the paper are:


## p_i uniform

# mu_i gaussian small std
# list of \{(mu_i,p_i)\}: 
# [[(3147.882091411367, 0.2127756714012869), (3395.976502075804, 0.3378408487578268), (3878.5776951656007, 0.3011338910788941), (4288.030691099789, 0.1482495887619923)], [(1948.0921927020527, 0.04107549683158686), (4510.238672588946, 0.37997308715356165), (6665.390448243644, 0.3149559205168344), (7740.827831569619, 0.2639954954980171)], [(4840.458451093746, 0.07048462386439637), (6043.531493601331, 0.31816932627306566), (7369.672568146019, 0.3871327240187177), (7548.254137239679, 0.2242133258438202)], [(3522.0750865792434, 0.16702829620046997), (4428.923579573776, 0.14457875748974117), (5061.202832625053, 0.1624334322471424), (5716.345755877419, 0.5259595140626465)], [(3394.6798329171324, 0.23776041498779843), (6455.387829301389, 0.6666277959831072), (7029.124667038064, 0.04711626113659597), (7291.241649196596, 0.04849552789249845)], [(1006.6744721102364, 0.14031413142527546), (3600.4506691236047, 0.3441730355879608), (4356.008462981455, 0.4405186886272227), (8137.059024404686, 0.07499414435954105)], [(2747.6275220793154, 0.18185366884885196), (5011.002570201404, 0.4582998914039767), (6225.815805087526, 0.22208972440539354), (6402.757388915779, 0.1377567153417778)], [(2527.8566006736783, 0.22165984550612136), (4185.769684140573, 0.3170306592683468), (4568.850866460716, 0.18888215218181634), (8349.905969975287, 0.27242734304371563)], [(4690.706846124814, 0.19936435546390585), (4945.191397262728, 0.5515044301332277), (5287.581415118525, 0.20077841637900773), (5870.885624306469, 0.04835279802385881)], [(3318.4376697818725, 0.01826364039858053), (4491.013899006273, 0.2502726018676791), (5399.056453253065, 0.3290621631869789), (5736.222572620129, 0.40240159454676155)]]

# mu_i gaussian large std
# list of \{(mu_i,p_i)\}: 
# [[(2911.561068020675, 0.10089235166503238), (4259.837009048949, 0.24597101068477548), (4504.288584870525, 0.34945951981508044), (7613.728517438678, 0.30367711783511186)], [(693.9732205220871, 0.04495171729179717), (1956.188371742262, 0.4428000347034472), (3101.0683012987347, 0.4485186383068979), (7503.540117326262, 0.06372960969785758)], [(6690.697640592184, 0.11407985039327974), (6788.452541084209, 0.5233425300766646), (7901.492889432877, 0.1302727632375717), (8553.786034267236, 0.23230485629248387)], [(726.085458961722, 0.3919124613033719), (2294.153287212087, 0.398617555143872), (5728.255228711087, 0.10041784993025454), (6380.337116195456, 0.1090521336225017)], [(4186.6723862454155, 0.16630871170481243), (4972.9917959719605, 0.26083128403559075), (5316.871664979191, 0.21844757016622912), (7451.985806687213, 0.35441243409336765)], [(3519.264393215296, 0.5923906983941364), (5187.893093107594, 0.22979407239456043), (6256.7334570023395, 0.08988553470456448), (8606.25368557146, 0.08792969450673872)], [(2551.576681231731, 0.5778561169356418), (5344.882926327632, 0.17225237139922958), (9049.521307064375, 0.15455672334788614), (9170.205760310351, 0.09533478831724247)], [(3515.9252941336676, 0.37878689829159634), (5466.963823625881, 0.1461854902168506), (8923.91989447864, 0.17799997789224897), (9666.246295002196, 0.2970276335993042)], [(1739.6024592355784, 0.04754605484411021), (3130.5754640196446, 0.16694953903606916), (6144.076948953503, 0.4112965130512206), (7882.146157806529, 0.3742078930686)], [(2502.6921466147564, 0.25450038491100846), (5177.904233332758, 0.15482344935661377), (7801.829294168329, 0.21504490067755924), (8061.33837071338, 0.3756312650548184)]]

# mu_i uniform
# list of \{(mu_i,p_i)\}: 
# [[(906.0627927540787, 0.33403855862068826), (1239.0413685744838, 0.4527766098570072), (3028.183813117284, 0.01346260904087479), (5140.527556512713, 0.1997222224814298)], [(5603.486534675004, 0.4082698774043147), (6762.247132151494, 0.12234555477550427), (7600.8200006544375, 0.010192049197789668), (7628.039264348048, 0.4591925186223913)], [(1789.6020701873388, 0.05378705091537233), (5679.66383181964, 0.3579438059820291), (6334.669157069949, 0.33468631256720804), (8776.328030032786, 0.25358283053539055)], [(846.6357132605056, 0.10788530994571711), (5651.886163100651, 0.3988658814270825), (6023.112833778972, 0.12919174271129436), (8472.434099145914, 0.364057065915906)], [(1739.7480740237827, 0.49738524897151476), (3195.151716822582, 0.20138080037020978), (9168.739998355497, 0.006379729883174627), (9937.850459242018, 0.2948542207751008)], [(2298.938776818708, 0.3942761659754234), (4572.977518289665, 0.2525705032641465), (7479.624191928239, 0.0514356713998142), (8498.287390430969, 0.30171765936061595)], [(1598.8336679953272, 0.40732810056238), (1843.4120695516353, 0.2938501347204625), (2736.7873836394388, 0.14742849858120394), (6160.833458600903, 0.15139326613595347)], [(4109.262482850595, 0.17134660326933382), (5852.8025388722335, 0.24552878091380986), (8601.54859537059, 0.2515369032691987), (9824.920544134831, 0.3315877125476577)], [(496.31727901214254, 0.3143483764537598), (746.9024096122199, 0.3230982000287913), (4473.760091005344, 0.17926327593027516), (7183.566811774242, 0.1832901475871737)], [(1449.1970522775268, 0.038105933908134146), (4993.725993966825, 0.34164588444377225), (5968.260823649119, 0.22229381170188384), (8180.975089178257, 0.3979543699462098)]]






## p_i equal

# mu_i gaussian small std
# list of \{(mu_i,p_i)\}: 
# [[(4080.2651970247084, 0.25), (4516.23285476092, 0.25), (5613.136976924751, 0.25), (7746.117854606226, 0.25)], [(4196.339656774868, 0.25), (4210.362409491597, 0.25), (5567.550465274848, 0.25), (6746.732247866407, 0.25)], [(2739.593324686894, 0.25), (4026.303601664373, 0.25), (4778.170898279203, 0.25), (4861.778696744696, 0.25)], [(2993.2179224345614, 0.25), (3698.0302761283956, 0.25), (4338.321152003529, 0.25), (5757.146368759544, 0.25)], [(4164.787469616682, 0.25), (5002.739710171322, 0.25), (6088.335491665762, 0.25), (6134.768954743705, 0.25)], [(4971.8043834169275, 0.25), (6321.765532129215, 0.25), (7302.724061757554, 0.25), (7444.444700215106, 0.25)], [(4139.435166727597, 0.25), (4867.440069828382, 0.25), (5402.400404184064, 0.25), (6026.672788603209, 0.25)], [(1875.2299900556613, 0.25), (3267.6645053086086, 0.25), (5529.020084537598, 0.25), (8039.39283156459, 0.25)], [(2228.045270340131, 0.25), (4113.984918867792, 0.25), (6832.427581734861, 0.25), (7110.213201266055, 0.25)], [(3636.9869342921215, 0.25), (6642.086789663297, 0.25), (6865.615031218868, 0.25), (7263.912194566403, 0.25)]]

# mu_i gaussian large std
# list of \{(mu_i,p_i)\}: 
# [[(2420.3629602888896, 0.25), (4674.360963610029, 0.25), (5827.045789045851, 0.25), (5927.2192851628815, 0.25)], [(429.52598619297714, 0.25), (1150.882214161843, 0.25), (5161.831887115531, 0.25), (5647.901171116903, 0.25)], [(1308.4453209184453, 0.25), (4232.846360083767, 0.25), (5718.385525942264, 0.25), (8479.68345761733, 0.25)], [(6044.803526507598, 0.25), (6238.821267322946, 0.25), (6634.726601937536, 0.25), (8403.540759713964, 0.25)], [(4009.939314153039, 0.25), (4458.0235238759005, 0.25), (5438.2371979386935, 0.25), (6837.9807489336, 0.25)], [(544.3060944197623, 0.25), (3326.058996016175, 0.25), (3562.0911112932454, 0.25), (4815.510431582621, 0.25)], [(2716.7112624245665, 0.25), (7385.982638652566, 0.25), (8241.936910652856, 0.25), (9122.628445298804, 0.25)], [(5038.888930724324, 0.25), (5749.6123650577465, 0.25), (6520.950822539435, 0.25), (8011.794576215476, 0.25)], [(1533.0965772792629, 0.25), (1612.6085961519384, 0.25), (3496.2895887133127, 0.25), (6103.455690626395, 0.25)], [(5775.508703886699, 0.25), (7169.513457742123, 0.25), (9201.306003238631, 0.25), (9938.564108962652, 0.25)]]

# mu_i uniform
# list of \{(mu_i,p_i)\}: 
# [[(2369.454009436525, 0.25), (4925.674766423986, 0.25), (6884.066407550369, 0.25), (7774.075502485429, 0.25)], [(1213.17227762668, 0.25), (5674.895901488217, 0.25), (6658.957854689375, 0.25), (7496.811008150387, 0.25)], [(1677.984311196386, 0.25), (4904.205207196198, 0.25), (7252.950284439343, 0.25), (9777.629734419126, 0.25)], [(2079.249398455281, 0.25), (3849.586414204628, 0.25), (4835.632266452901, 0.25), (7304.936512279251, 0.25)], [(1494.5948853048374, 0.25), (2947.03538636813, 0.25), (3226.5958266445846, 0.25), (7558.834065293695, 0.25)], [(150.15337130208002, 0.25), (1591.8520667253215, 0.25), (3240.626731105163, 0.25), (8011.4395514620255, 0.25)], [(3687.3760430257203, 0.25), (5041.429295198324, 0.25), (6094.796500269327, 0.25), (9751.474207386642, 0.25)], [(1847.752059913677, 0.25), (2909.1101075622682, 0.25), (5339.3399943425375, 0.25), (6771.00812966982, 0.25)], [(667.3926106923798, 0.25), (4046.9091718972113, 0.25), (5115.68044807003, 0.25), (9077.813858509484, 0.25)], [(1174.0926150791927, 0.25), (1957.9665374139934, 0.25), (4904.292769789108, 0.25), (6249.748788062177, 0.25)]]

