微件:GLPK/gf/data

来自Mooncell - 玩家共同构筑的FGO中文Wiki
跳转到导航 跳转到搜索

set Name;

param Time{i in Name};

param Rl{i in Name};

param Dy{i in Name};

param Kl{i in Name};

param Lj{i in Name};

var times{i in Name} >=0,integer;

minimize cost: sum{i in Name} Time[i]*times[i];

s.t. time{i in Name}: Time[i]*times[i]*4<=sum{j in Name} Time[j]*times[j];

s.t. rl: sum{i in Name} times[i]*Rl[i]>=300000;

s.t. dy: sum{i in Name} times[i]*Dy[i]>=300000;

s.t. kl: sum{i in Name} times[i]*Kl[i]>=300000;

s.t. lj: sum{i in Name} times[i]*Lj[i]>=300000;

data;

set Name :=0-1 0-2 0-3 0-4 1-1 1-2 1-3 1-4 2-1 2-2 2-3 2-4 3-1 3-2 3-3 3-4 4-1 4-2 4-3 4-4 5-1 5-2 5-3 5-4 6-1 6-2 6-3 6-4 7-1 7-2 7-3 7-4 8-1 8-2 8-3 8-4 9-1 9-2 9-3 9-4 10-1 10-2 10-3 10-4 11-1 11-2 11-3 11-4;

param Time:= 0-1 50 0-2 180 0-3 720 0-4 1440 1-1 15 1-2 30 1-3 60 1-4 120 2-1 40 2-2 90 2-3 240 2-4 360 3-1 20 3-2 45 3-3 90 3-4 300 4-1 60 4-2 120 4-3 360 4-4 480 5-1 30 5-2 150 5-3 240 5-4 420 6-1 120 6-2 180 6-3 300 6-4 720 7-1 150 7-2 240 7-3 330 7-4 480 8-1 60 8-2 180 8-3 360 8-4 540 9-1 30 9-2 90 9-3 270 9-4 420 10-1 40 10-2 100 10-3 320 10-4 600 11-1 240 11-2 240 11-3 480 11-4 600;

param Rl := 0-1 0 0-2 550 0-3 900 0-4 0 1-1 10 1-2 0 1-3 30 1-4 160 2-1 100 2-2 60 2-3 10 2-4 0 3-1 50 3-2 0 3-3 0 3-4 0 4-1 0 4-2 0 4-3 800 4-4 400 5-1 0 5-2 0 5-3 800 5-4 100 6-1 300 6-2 0 6-3 0 6-4 800 7-1 650 7-2 0 7-3 900 7-4 250 8-1 150 8-2 0 8-3 400 8-4 1500 9-1 0 9-2 180 9-3 750 9-4 500 10-1 140 10-2 0 10-3 0 10-4 660 11-1 350 11-2 360 11-3 0 11-4 0;

param Dy := 0-1 145 0-2 0 0-3 900 0-4 1200 1-1 30 1-2 40 1-3 0 1-4 160 2-1 0 2-2 200 2-3 10 2-4 250 3-1 0 3-2 120 3-3 300 3-4 0 4-1 185 4-2 0 4-3 550 4-4 400 5-1 0 5-2 600 5-3 400 5-4 0 6-1 300 6-2 200 6-3 0 6-4 800 7-1 0 7-2 650 7-3 600 7-4 250 8-1 150 8-2 0 8-3 800 8-4 400 9-1 0 9-2 0 9-3 750 9-4 900 10-1 200 10-2 240 10-3 480 10-4 660 11-1 1050 11-2 540 11-3 750 11-4 1650;

param Kl := 0-1 145 0-2 0 0-3 900 0-4 800 1-1 15 1-2 60 1-3 30 1-4 0 2-1 0 2-2 80 2-3 10 2-4 600 3-1 75 3-2 70 3-3 0 3-4 300 4-1 185 4-2 0 4-3 0 4-4 400 5-1 100 5-2 300 5-3 400 5-4 0 6-1 0 6-2 550 6-3 200 6-4 800 7-1 650 7-2 0 7-3 600 7-4 250 8-1 150 8-2 0 8-3 800 8-4 400 9-1 100 9-2 180 9-3 0 9-4 900 10-1 0 10-2 180 10-3 480 10-4 660 11-1 0 11-2 540 11-3 1500 11-4 0;

param Lj:= 0-1 0 0-2 350 0-3 250 0-4 750 1-1 0 1-2 0 1-3 10 1-4 0 2-1 30 2-2 0 2-3 230 2-4 60 3-1 0 3-2 30 3-3 0 3-4 300 4-1 0 4-2 210 4-3 0 4-4 150 5-1 45 5-2 0 5-3 0 5-4 700 6-1 100 6-2 100 6-3 500 6-4 0 7-1 0 7-2 300 7-3 0 7-4 600 8-1 0 8-2 450 8-3 0 8-4 100 9-1 50 9-2 100 9-3 0 9-4 0 10-1 0 10-2 0 10-3 300 10-4 330 11-1 0 11-2 0 11-3 250 11-4 900;

end;