mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 12:43:04 +02:00
chore: cleanup wdwr
This commit is contained in:
parent
1c623cf40f
commit
f37d8d60c7
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
// solution (optimal) with objective 11031.2880472593
|
||||
averageProfit: 11031.288047259, riskMeasureGini: 473.954253809
|
||||
@ -0,0 +1,20 @@
|
||||
1 minimalAverageProfit: -600 averageProfit: -600, riskMeasureGini: 0
|
||||
2 minimalAverageProfit: -67.59 averageProfit: -67.423334025, riskMeasureGini: 12.249866065
|
||||
3 minimalAverageProfit: 464.82 averageProfit: 465.647226284, riskMeasureGini: 26.015138747
|
||||
4 minimalAverageProfit: 997.23 averageProfit: 997.66185313, riskMeasureGini: 40.349353614
|
||||
5 minimalAverageProfit: 1529.64 averageProfit: 1530.172175866, riskMeasureGini: 54.689711726
|
||||
6 minimalAverageProfit: 2062.05 averageProfit: 2062.088549477, riskMeasureGini: 69.062913221
|
||||
7 minimalAverageProfit: 2594.46 averageProfit: 2594.684714046, riskMeasureGini: 84.265583873
|
||||
8 minimalAverageProfit: 3126.87 averageProfit: 3127.12427492, riskMeasureGini: 99.497458717
|
||||
9 minimalAverageProfit: 3659.28 averageProfit: 3659.345897427, riskMeasureGini: 114.728718529
|
||||
10 minimalAverageProfit: 4191.69 averageProfit: 4191.916591732, riskMeasureGini: 129.963670504
|
||||
11 minimalAverageProfit: 4724.1 averageProfit: 4724.191045823, riskMeasureGini: 145.204545226
|
||||
12 minimalAverageProfit: 5256.51 averageProfit: 5256.719240584, riskMeasureGini: 162.349562672
|
||||
13 minimalAverageProfit: 5788.92 averageProfit: 5789.016098305, riskMeasureGini: 182.46075748
|
||||
14 minimalAverageProfit: 6321.33 averageProfit: 6321.358645932, riskMeasureGini: 205.000585625
|
||||
15 minimalAverageProfit: 6853.74 averageProfit: 6853.83219788, riskMeasureGini: 229.023498807
|
||||
16 minimalAverageProfit: 7386.15 averageProfit: 7386.171785273, riskMeasureGini: 253.962965038
|
||||
17 minimalAverageProfit: 7918.56 averageProfit: 7918.565798346, riskMeasureGini: 279.907638363
|
||||
18 minimalAverageProfit: 8450.97 averageProfit: 8451.020747071, riskMeasureGini: 306.383357869
|
||||
19 minimalAverageProfit: 8983.38 averageProfit: 8983.400103901, riskMeasureGini: 332.936696297
|
||||
20 minimalAverageProfit: 9515.79 averageProfit: 9515.804890325, riskMeasureGini: 360.18213126
|
||||
@ -0,0 +1,6 @@
|
||||
First solution:
|
||||
1 minimalAverageProfit: 8450.97 averageProfit: 8451.020747071, riskMeasureGini: 306.383357869
|
||||
Second solution:
|
||||
31 minimalAverageProfit: 8983.38 averageProfit: 8983.400103901, riskMeasureGini: 332.936696297
|
||||
Third solution:
|
||||
31 minimalAverageProfit: 9515.79 averageProfit: 9515.804890325, riskMeasureGini: 360.18213126
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,128 @@
|
||||
// solution (optimal) with objective 11258.7493517503
|
||||
// Quality Incumbent solution:
|
||||
// MILP objective 1.1258749352e+04
|
||||
// MILP solution norm |x| (Total, Max) 2.22362e+04 3.57575e+02
|
||||
// MILP solution error (Ax=b) (Total, Max) 5.92408e-09 5.78098e-11
|
||||
// MILP x bound error (Total, Max) 0.00000e+00 0.00000e+00
|
||||
// MILP x integrality error (Total, Max) 0.00000e+00 0.00000e+00
|
||||
// MILP slack bound error (Total, Max) 1.56319e-13 8.52651e-14
|
||||
//
|
||||
|
||||
sell = [[160
|
||||
0 100 160]
|
||||
[240 80 200 160]
|
||||
[0 240 100 160]];
|
||||
lowerProfit = [[[0 0 138.26 0]
|
||||
[0 0 276.53 0]
|
||||
[0 0 138.26 0]]
|
||||
[[0 0 168.91 0]
|
||||
[0 0 337.82 0]
|
||||
[0 0 168.91 0]]
|
||||
[[0 0 163 0]
|
||||
[0 0 326.01 0]
|
||||
[0 0 163 0]]
|
||||
[[0 0 121.79 0]
|
||||
[0 0 243.58 0]
|
||||
[0 0 121.79 0]]
|
||||
[[0 0 153.89 0]
|
||||
[0 0 307.78 0]
|
||||
[0 0 153.89 0]]
|
||||
[[0 0 155.82 0]
|
||||
[0 0 311.64 0]
|
||||
[0 0 155.82 0]]
|
||||
[[0 0 101.57 0]
|
||||
[0 0 203.14 0]
|
||||
[0 0 101.57 0]]
|
||||
[[0 0 167.71 0]
|
||||
[0 0 335.43 0]
|
||||
[0 0 167.71 0]]
|
||||
[[0 0 110.37 0]
|
||||
[0 0 220.73 0]
|
||||
[0 0 110.37 0]]
|
||||
[[0 0 112.35 0]
|
||||
[0 0 224.71 0]
|
||||
[0 0 112.35 0]]
|
||||
[[0 0 165.09 0]
|
||||
[0 0 330.17 0]
|
||||
[0 0 165.09 0]]
|
||||
[[0 0 165.36 0]
|
||||
[0 0 330.71 0]
|
||||
[0 0 165.36 0]]
|
||||
[[0 0 172.8 0]
|
||||
[0 0 345.61 0]
|
||||
[0 0 172.8 0]]
|
||||
[[0 0 174.16 0]
|
||||
[0 0 348.32 0]
|
||||
[0 0 174.16 0]]
|
||||
[[0 0 169.66 0]
|
||||
[0 0 339.33 0]
|
||||
[0 0 169.66 0]]
|
||||
[[0 0 156.24 0]
|
||||
[0 0 312.48 0]
|
||||
[0 0 156.24 0]]
|
||||
[[0 0 135.37 0]
|
||||
[0 0 270.74 0]
|
||||
[0 0 135.37 0]]
|
||||
[[0 0 100.27 0]
|
||||
[0 0 200.54 0]
|
||||
[0 0 100.27 0]]
|
||||
[[0 0 167.35 0]
|
||||
[0 0 334.7 0]
|
||||
[0 0 167.35 0]]
|
||||
[[0 0 163.08 0]
|
||||
[0 0 326.16 0]
|
||||
[0 0 163.08 0]]
|
||||
[[0 0 116.41 0]
|
||||
[0 0 232.82 0]
|
||||
[0 0 116.41 0]]
|
||||
[[0 0 131.51 0]
|
||||
[0 0 263.03 0]
|
||||
[0 0 131.51 0]]
|
||||
[[0 0 129.82 0]
|
||||
[0 0 259.64 0]
|
||||
[0 0 129.82 0]]
|
||||
[[0 0 178.36 0]
|
||||
[0 0 356.72 0]
|
||||
[0 0 178.36 0]]
|
||||
[[0 0 178.79 0]
|
||||
[0 0 357.57 0]
|
||||
[0 0 178.79 0]]
|
||||
[[0 0 160.04 0]
|
||||
[0 0 320.07 0]
|
||||
[0 0 160.04 0]]
|
||||
[[0 0 127.34 0]
|
||||
[0 0 254.68 0]
|
||||
[0 0 127.34 0]]
|
||||
[[0 0 130.1 0]
|
||||
[0 0 260.21 0]
|
||||
[0 0 130.1 0]]
|
||||
[[0 0 148.52 0]
|
||||
[0 0 297.04 0]
|
||||
[0 0 148.52 0]]
|
||||
[[0 0 142.16 0]
|
||||
[0 0 284.33 0]
|
||||
[0 0 142.16 0]]];
|
||||
stock = [[0 50 0 0]
|
||||
[0 0 0 0]
|
||||
[50 50 50 50]];
|
||||
workTime = [[[44 0 0 0]
|
||||
[22 0 0 66]
|
||||
[11 0 35 0]
|
||||
[6.6 0 0 5.5]
|
||||
[0 0 1 0]]
|
||||
[[96 18 0 0]
|
||||
[48 3 0 96]
|
||||
[24 0 140 0]
|
||||
[14.4 1.2 0 8]
|
||||
[0 1.5 4 0]]
|
||||
[[20 174 0 0]
|
||||
[10 29 0 126]
|
||||
[5 0 105 0]
|
||||
[3 11.6 0 10.5]
|
||||
[0 14.5 3 0]]];
|
||||
produce = [[110 0 50 110]
|
||||
[240 30 200 160]
|
||||
[50 290 150 210]];
|
||||
if80prec = [[0 1 1 0]
|
||||
[0 0 1 0]
|
||||
[1 0 1 0]];
|
||||
@ -0,0 +1,18 @@
|
||||
library(MASS) # mvrnorm()
|
||||
mu <- c(9, 8, 7, 6); # expected values
|
||||
sigma <- matrix(c(16,-2,-1,-3,-2,9,-4,-1,-1,-4,4,1,-3,-1,1,1), 4); # covariance matrix
|
||||
nu <- 4; # degrees of freedom
|
||||
n <- 10000; # number of scenarios
|
||||
y <- t(t(mvrnorm(n, rep(0, length(mu)), sigma) * sqrt(nu / rchisq(n, nu))) + mu)
|
||||
|
||||
y <- y[y[,1]>=5,]
|
||||
y <- y[y[,2]>=5,]
|
||||
y <- y[y[,3]>=5,]
|
||||
y <- y[y[,4]>=5,]
|
||||
y <- y[y[,1]<=12,]
|
||||
y <- y[y[,2]<=12,]
|
||||
y <- y[y[,3]<=12,]
|
||||
y <- y[y[,4]<=12,]
|
||||
y <- y[1:1000,]
|
||||
|
||||
write.table(y, "scenarios.txt", sep=" ", eol="]\n[", row.names = FALSE, col.names=FALSE)
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,84 @@
|
||||
int numberOfMachineTypes = ...;
|
||||
int numberOfMonths = ...;
|
||||
int numberOfProductsTypes = ...;
|
||||
|
||||
int numberOfHoursInFactory = ...;
|
||||
int numberOfScenarios = ...;
|
||||
|
||||
{int} machines = asSet(1..numberOfMachineTypes);
|
||||
{int} months = asSet(1..numberOfMonths);
|
||||
{int} products = asSet(1..numberOfProductsTypes);
|
||||
{int} scenarios = asSet(1..numberOfScenarios);
|
||||
|
||||
int machineCount[machines] = ...;
|
||||
float timeToProduce[machines][products] = ...;
|
||||
int maxProductsInMonth[months][products] = ...;
|
||||
|
||||
int storageMax[products] = ...;
|
||||
int storageCost = ...;
|
||||
int storageStart[products] = ...;
|
||||
|
||||
int mu[products] = ...;
|
||||
int sigma[products][products] = ...;
|
||||
|
||||
float sellProfit[scenarios][products] = ...;
|
||||
|
||||
dvar int produce[months][products];
|
||||
dvar int sell[months][products];
|
||||
dvar int stock[months][products];
|
||||
|
||||
dvar float workTime[months][machines][products];
|
||||
|
||||
dvar boolean if80prec[months][products];
|
||||
|
||||
dvar float lowerProfit[scenarios][months][products];
|
||||
|
||||
dexpr float profit[i in scenarios] = sum(m in months, p in products)
|
||||
(sell[m][p]*sellProfit[i][p]-lowerProfit[i][m][p]- stock[m][p]*storageCost);
|
||||
|
||||
dexpr float averageProfit = sum(i in scenarios)(profit[i])/numberOfScenarios;
|
||||
|
||||
maximize averageProfit;
|
||||
|
||||
subject to {
|
||||
forall(i in scenarios, m in months, mc in machines, p in products) {
|
||||
workTime[m][mc][p] >= 0;
|
||||
produce[m][p] >= 0;
|
||||
sell[m][p] >= 0;
|
||||
stock[m][p] >= 0;
|
||||
lowerProfit[i][m][p] >= 0;
|
||||
}
|
||||
forall(m in months, mc in machines) {
|
||||
sum(p in products) (workTime[m][mc][p]) <= (machineCount[mc]*numberOfHoursInFactory);
|
||||
}
|
||||
forall(m in months, p in products, mc in machines) {
|
||||
workTime[m][mc][p] == produce[m][p]*timeToProduce[mc][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= maxProductsInMonth[m][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= 0.8*maxProductsInMonth[m][p] + 1000000 * if80prec[m][p];
|
||||
sell[m][p] >= 0.8*maxProductsInMonth[m][p] * if80prec[m][p];
|
||||
}
|
||||
forall (i in scenarios,m in months, p in products) {
|
||||
lowerProfit[i][m][p] <= 1000000 * if80prec[m][p];
|
||||
lowerProfit[i][m][p] <= 0.2 * sell[m][p]*sellProfit[i][p];
|
||||
0.2 * sell[m][p]*sellProfit[i][p] - lowerProfit[i][m][p] + 1000000 * if80prec[m][p] <= 1000000;
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
if(m == 1) { //pierwszy miesiac
|
||||
sell[m][p] <= produce[m][p]+storageStart[p];
|
||||
stock[m][p]==(produce[m][p] + storageStart[p])-sell[m][p];
|
||||
}else { // kolejne miesiace
|
||||
sell[m][p] <= produce[m][p] + stock[m-1][p];
|
||||
stock[m][p]==(produce[m][p] + stock[m-1][p])-sell[m][p];
|
||||
}
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
stock[m][p] <= storageMax[p];
|
||||
if(m == 3) {
|
||||
stock[m][p] >= 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,93 @@
|
||||
|
||||
int numberOfMachineTypes = ...;
|
||||
int numberOfMonths = ...;
|
||||
int numberOfProductsTypes = ...;
|
||||
|
||||
int numberOfHoursInFactory = ...;
|
||||
int numberOfScenarios = ...;
|
||||
|
||||
{int} machines = asSet(1..numberOfMachineTypes);
|
||||
{int} months = asSet(1..numberOfMonths);
|
||||
{int} products = asSet(1..numberOfProductsTypes);
|
||||
{int} scenarios = asSet(1..numberOfScenarios);
|
||||
|
||||
int machineCount[machines] = ...;
|
||||
float timeToProduce[machines][products] = ...;
|
||||
int maxProductsInMonth[months][products] = ...;
|
||||
|
||||
int storageMax[products] = ...;
|
||||
int storageCost = ...;
|
||||
int storageStart[products] = ...;
|
||||
|
||||
int mu[products] = ...;
|
||||
int sigma[products][products] = ...;
|
||||
|
||||
float sellProfit[scenarios][products] = ...;
|
||||
|
||||
dvar int produce[months][products];
|
||||
dvar int sell[months][products];
|
||||
dvar int stock[months][products];
|
||||
|
||||
dvar float workTime[months][machines][products];
|
||||
|
||||
dvar boolean if80prec[months][products];
|
||||
|
||||
dvar float lowerProfit[scenarios][months][products];
|
||||
|
||||
dexpr float profit[i in scenarios] = sum(m in months, p in products)
|
||||
(sell[m][p]*sellProfit[i][p]-lowerProfit[i][m][p]- stock[m][p]*storageCost);
|
||||
|
||||
dexpr float averageProfit = sum(i in scenarios)(profit[i])/numberOfScenarios;
|
||||
|
||||
dexpr float riskMeasureGini = sum (t1 in scenarios, t2 in scenarios ) (
|
||||
0.5 * abs(profit[t1] - profit[t2]) * 1/numberOfScenarios * 1/numberOfScenarios
|
||||
);
|
||||
|
||||
minimize riskMeasureGini;
|
||||
|
||||
subject to {
|
||||
forall(i in scenarios, m in months, mc in machines, p in products) {
|
||||
workTime[m][mc][p] >= 0;
|
||||
produce[m][p] >= 0;
|
||||
sell[m][p] >= 0;
|
||||
stock[m][p] >= 0;
|
||||
lowerProfit[i][m][p] >= 0;
|
||||
}
|
||||
forall(m in months, mc in machines) {
|
||||
sum(p in products) (workTime[m][mc][p]) <= (machineCount[mc]*numberOfHoursInFactory);
|
||||
}
|
||||
forall(m in months, p in products, mc in machines) {
|
||||
workTime[m][mc][p] == produce[m][p]*timeToProduce[mc][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= maxProductsInMonth[m][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= 0.8*maxProductsInMonth[m][p] + 1000000 * if80prec[m][p];
|
||||
sell[m][p] >= 0.8*maxProductsInMonth[m][p] * if80prec[m][p];
|
||||
}
|
||||
forall (i in scenarios,m in months, p in products) {
|
||||
lowerProfit[i][m][p] <= 1000000 * if80prec[m][p];
|
||||
lowerProfit[i][m][p] <= 0.2 * sell[m][p]*sellProfit[i][p];
|
||||
0.2 * sell[m][p]*sellProfit[i][p] - lowerProfit[i][m][p] + 1000000 * if80prec[m][p] <= 1000000;
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
if(m == 1) { //pierwszy miesiac
|
||||
sell[m][p] <= produce[m][p]+storageStart[p];
|
||||
stock[m][p]==(produce[m][p] + storageStart[p])-sell[m][p];
|
||||
}else { // kolejne miesiace
|
||||
sell[m][p] <= produce[m][p] + stock[m-1][p];
|
||||
stock[m][p]==(produce[m][p] + stock[m-1][p])-sell[m][p];
|
||||
}
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
stock[m][p] <= storageMax[p];
|
||||
if(m == 3) {
|
||||
stock[m][p] >= 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
execute {
|
||||
cplex.tilim = 600;
|
||||
writeln("averageProfit: ",averageProfit,", riskMeasureGini: ",riskMeasureGini);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,122 @@
|
||||
int numberOfMachineTypes = ...;
|
||||
int numberOfMonths = ...;
|
||||
int numberOfProductsTypes = ...;
|
||||
|
||||
int numberOfHoursInFactory = ...;
|
||||
int numberOfScenarios = ...;
|
||||
|
||||
{int} machines = asSet(1..numberOfMachineTypes);
|
||||
{int} months = asSet(1..numberOfMonths);
|
||||
{int} products = asSet(1..numberOfProductsTypes);
|
||||
{int} scenarios = asSet(1..numberOfScenarios);
|
||||
|
||||
int machineCount[machines] = ...;
|
||||
float timeToProduce[machines][products] = ...;
|
||||
int maxProductsInMonth[months][products] = ...;
|
||||
|
||||
int storageMax[products] = ...;
|
||||
int storageCost = ...;
|
||||
int storageStart[products] = ...;
|
||||
|
||||
int mu[products] = ...;
|
||||
int sigma[products][products] = ...;
|
||||
|
||||
float sellProfit[scenarios][products] = ...;
|
||||
|
||||
float minimalAverageProfit = ...; //wymagany poziom zysku
|
||||
|
||||
dvar int produce[months][products];
|
||||
dvar int sell[months][products];
|
||||
dvar int stock[months][products];
|
||||
|
||||
dvar float workTime[months][machines][products];
|
||||
|
||||
dvar boolean if80prec[months][products];
|
||||
|
||||
dvar float lowerProfit[scenarios][months][products];
|
||||
|
||||
dexpr float profit[i in scenarios] = sum(m in months, p in products)
|
||||
(sell[m][p]*sellProfit[i][p]-lowerProfit[i][m][p]- stock[m][p]*storageCost);
|
||||
|
||||
dexpr float averageProfit = sum(i in scenarios)(profit[i])/numberOfScenarios;
|
||||
|
||||
dexpr float riskMeasureGini = sum (t1 in scenarios, t2 in scenarios ) (
|
||||
0.5 * abs(profit[t1] - profit[t2]) * 1/numberOfScenarios * 1/numberOfScenarios
|
||||
);
|
||||
|
||||
minimize riskMeasureGini;
|
||||
|
||||
subject to {
|
||||
forall(i in scenarios, m in months, mc in machines, p in products) {
|
||||
workTime[m][mc][p] >= 0;
|
||||
produce[m][p] >= 0;
|
||||
sell[m][p] >= 0;
|
||||
stock[m][p] >= 0;
|
||||
lowerProfit[i][m][p] >= 0;
|
||||
}
|
||||
forall(m in months, mc in machines) {
|
||||
sum(p in products) (workTime[m][mc][p]) <= (machineCount[mc]*numberOfHoursInFactory);
|
||||
}
|
||||
forall(m in months, p in products, mc in machines) {
|
||||
workTime[m][mc][p] == produce[m][p]*timeToProduce[mc][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= maxProductsInMonth[m][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= 0.8*maxProductsInMonth[m][p] + 1000000 * if80prec[m][p];
|
||||
sell[m][p] >= 0.8*maxProductsInMonth[m][p] * if80prec[m][p];
|
||||
}
|
||||
forall (i in scenarios,m in months, p in products) {
|
||||
lowerProfit[i][m][p] <= 1000000 * if80prec[m][p];
|
||||
lowerProfit[i][m][p] <= 0.2 * sell[m][p]*sellProfit[i][p];
|
||||
0.2 * sell[m][p]*sellProfit[i][p] - lowerProfit[i][m][p] + 1000000 * if80prec[m][p] <= 1000000;
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
if(m == 1) { //pierwszy miesiac
|
||||
sell[m][p] <= produce[m][p]+storageStart[p];
|
||||
stock[m][p]==(produce[m][p] + storageStart[p])-sell[m][p];
|
||||
}else { // kolejne miesiace
|
||||
sell[m][p] <= produce[m][p] + stock[m-1][p];
|
||||
stock[m][p]==(produce[m][p] + stock[m-1][p])-sell[m][p];
|
||||
}
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
stock[m][p] <= storageMax[p];
|
||||
if(m == 3) {
|
||||
stock[m][p] >= 50;
|
||||
}
|
||||
}
|
||||
averageProfit>=minimalAverageProfit;
|
||||
|
||||
}
|
||||
|
||||
main {
|
||||
var file = new IloOplOutputFile("result-minimalAverageProfit.txt");
|
||||
|
||||
var mod = thisOplModel;
|
||||
var def = mod.modelDefinition;
|
||||
var data = mod.dataElements;
|
||||
var maxAvgProfit = 10048;
|
||||
var i = 1;
|
||||
|
||||
file.writeln("i;minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
|
||||
data.minimalAverageProfit = -600.0;
|
||||
|
||||
while (data.minimalAverageProfit <= maxAvgProfit) {
|
||||
mod = new IloOplModel (def, cplex);
|
||||
mod.addDataSource(data);
|
||||
mod.generate();
|
||||
cplex.tilim = 10;
|
||||
cplex.solve();
|
||||
file.writeln(i,";",data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
writeln(i," minimalAverageProfit: ",data.minimalAverageProfit," averageProfit: ",mod.averageProfit,", riskMeasureGini: ",mod.riskMeasureGini);
|
||||
mod.end();
|
||||
data.minimalAverageProfit = data.minimalAverageProfit + 532.41;
|
||||
i = i+1;
|
||||
};
|
||||
|
||||
|
||||
file.close();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,202 @@
|
||||
int numberOfMachineTypes = ...;
|
||||
int numberOfMonths = ...;
|
||||
int numberOfProductsTypes = ...;
|
||||
|
||||
int numberOfHoursInFactory = ...;
|
||||
int numberOfScenarios = ...;
|
||||
|
||||
{int} machines = asSet(1..numberOfMachineTypes);
|
||||
{int} months = asSet(1..numberOfMonths);
|
||||
{int} products = asSet(1..numberOfProductsTypes);
|
||||
{int} scenarios = asSet(1..numberOfScenarios);
|
||||
|
||||
int machineCount[machines] = ...;
|
||||
float timeToProduce[machines][products] = ...;
|
||||
int maxProductsInMonth[months][products] = ...;
|
||||
|
||||
int storageMax[products] = ...;
|
||||
int storageCost = ...;
|
||||
int storageStart[products] = ...;
|
||||
|
||||
int mu[products] = ...;
|
||||
int sigma[products][products] = ...;
|
||||
|
||||
float sellProfit[scenarios][products] = ...;
|
||||
|
||||
float minimalAverageProfit = ...;
|
||||
|
||||
dvar int produce[months][products];
|
||||
dvar int sell[months][products];
|
||||
dvar int stock[months][products];
|
||||
|
||||
dvar float workTime[months][machines][products];
|
||||
|
||||
dvar boolean if80prec[months][products];
|
||||
|
||||
dvar float lowerProfit[scenarios][months][products];
|
||||
|
||||
dexpr float profit[i in scenarios] = sum(m in months, p in products)
|
||||
(sell[m][p]*sellProfit[i][p]-lowerProfit[i][m][p]- stock[m][p]*storageCost);
|
||||
|
||||
dexpr float averageProfit = sum(i in scenarios)(profit[i])/numberOfScenarios;
|
||||
|
||||
dexpr float risk[i in scenarios] = sum (t in scenarios) (
|
||||
0.5 * abs(profit[i] - profit[t]) * 1/numberOfScenarios
|
||||
);
|
||||
|
||||
dexpr float riskMeasureGini = sum (t1 in scenarios, t2 in scenarios ) (
|
||||
0.5 * abs(profit[t1] - profit[t2]) * 1/numberOfScenarios * 1/numberOfScenarios
|
||||
);
|
||||
|
||||
maximize averageProfit;
|
||||
|
||||
subject to {
|
||||
forall(i in scenarios, m in months, mc in machines, p in products) {
|
||||
workTime[m][mc][p] >= 0;
|
||||
produce[m][p] >= 0;
|
||||
sell[m][p] >= 0;
|
||||
stock[m][p] >= 0;
|
||||
lowerProfit[i][m][p] >= 0;
|
||||
}
|
||||
forall(m in months, mc in machines) {
|
||||
sum(p in products) (workTime[m][mc][p]) <= (machineCount[mc]*numberOfHoursInFactory);
|
||||
}
|
||||
forall(m in months, p in products, mc in machines) {
|
||||
workTime[m][mc][p] == produce[m][p]*timeToProduce[mc][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= maxProductsInMonth[m][p];
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
sell[m][p] <= 0.8*maxProductsInMonth[m][p] + 1000000 * if80prec[m][p];
|
||||
sell[m][p] >= 0.8*maxProductsInMonth[m][p] * if80prec[m][p];
|
||||
}
|
||||
forall (i in scenarios,m in months, p in products) {
|
||||
lowerProfit[i][m][p] <= 1000000 * if80prec[m][p];
|
||||
lowerProfit[i][m][p] <= 0.2 * sell[m][p]*sellProfit[i][p];
|
||||
0.2 * sell[m][p]*sellProfit[i][p] - lowerProfit[i][m][p] + 1000000 * if80prec[m][p] <= 1000000;
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
if(m == 1) { //pierwszy miesiac
|
||||
sell[m][p] <= produce[m][p]+storageStart[p];
|
||||
stock[m][p]==(produce[m][p] + storageStart[p])-sell[m][p];
|
||||
}else { // kolejne miesiace
|
||||
sell[m][p] <= produce[m][p] + stock[m-1][p];
|
||||
stock[m][p]==(produce[m][p] + stock[m-1][p])-sell[m][p];
|
||||
}
|
||||
}
|
||||
forall(m in months, p in products) {
|
||||
stock[m][p] <= storageMax[p];
|
||||
if(m == 3) {
|
||||
stock[m][p] >= 50;
|
||||
}
|
||||
}
|
||||
averageProfit>=minimalAverageProfit;
|
||||
|
||||
}
|
||||
|
||||
main {
|
||||
var fileProfit = new IloOplOutputFile("results-minimalAverageProfit-FSD-profit_two.txt");
|
||||
var fileRisk = new IloOplOutputFile("results-minimalAverageProfit-FSD-risk_two.txt");
|
||||
|
||||
var mod = thisOplModel;
|
||||
var def = mod.modelDefinition;
|
||||
var data = mod.dataElements;
|
||||
var maxAvgProfit = 11031;
|
||||
var i = 1;
|
||||
fileProfit.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
fileRisk.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
|
||||
data.minimalAverageProfit = 8450.97;
|
||||
|
||||
mod = new IloOplModel (def, cplex);
|
||||
mod.addDataSource(data);
|
||||
mod.generate();
|
||||
|
||||
writeln("First solution: ");
|
||||
cplex.tilim = 60;
|
||||
cplex.solve();
|
||||
|
||||
writeln(i," minimalAverageProfit: ",data.minimalAverageProfit," averageProfit: ",mod.averageProfit,", riskMeasureGini: ",mod.riskMeasureGini);
|
||||
fileProfit.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
fileRisk.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
|
||||
i = 1;4
|
||||
fileProfit.writeln("averageProfit: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileProfit.writeln(mod.profit[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
i = 1;
|
||||
fileRisk.writeln("Risk: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileRisk.writeln(mod.risk[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
fileProfit.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
fileRisk.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
|
||||
data.minimalAverageProfit = 8983.38;
|
||||
|
||||
|
||||
mod = new IloOplModel (def, cplex);
|
||||
mod.addDataSource(data);
|
||||
mod.generate();
|
||||
|
||||
writeln("Second solution: ");
|
||||
cplex.solve();
|
||||
|
||||
writeln(i," minimalAverageProfit: ",data.minimalAverageProfit," averageProfit: ",mod.averageProfit,", riskMeasureGini: ",mod.riskMeasureGini);
|
||||
fileProfit.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
fileRisk.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
|
||||
i = 1;
|
||||
fileProfit.writeln("averageProfit: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileProfit.writeln(mod.profit[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
i = 1;
|
||||
fileRisk.writeln("Risk: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileRisk.writeln(mod.risk[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
fileProfit.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
fileRisk.writeln("minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4");
|
||||
|
||||
data.minimalAverageProfit = 9515.79;
|
||||
|
||||
mod = new IloOplModel (def, cplex);
|
||||
mod.addDataSource(data);
|
||||
mod.generate();
|
||||
|
||||
writeln("Third solution: ");
|
||||
cplex.solve();
|
||||
|
||||
writeln(i," minimalAverageProfit: ",data.minimalAverageProfit," averageProfit: ",mod.averageProfit,", riskMeasureGini: ",mod.riskMeasureGini);
|
||||
fileProfit.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
fileRisk.writeln(data.minimalAverageProfit,";",mod.averageProfit,";",mod.riskMeasureGini,";",mod.produce[1][1],";",mod.produce[1][2],";",mod.produce[1][3],";",mod.produce[1][4], ";",mod.produce[2][1],";",mod.produce[2][2],";",mod.produce[2][3],";",mod.produce[2][4],";",mod.produce[3][1],";",mod.produce[3][2], ";",mod.produce[3][3],";",mod.produce[3][4],";",mod.stock[1][1],";",mod.stock[1][2],";",mod.stock[1][3],";",mod.stock[1][4], ";",mod.stock[2][1],";",mod.stock[2][2],";",mod.stock[2][3],";",mod.stock[2][4],";",mod.stock[3][1],";",mod.stock[3][2], ";",mod.stock[3][3],";",mod.stock[3][4]);
|
||||
|
||||
i = 1;
|
||||
fileProfit.writeln("averageProfit: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileProfit.writeln(mod.profit[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
i = 1;
|
||||
fileRisk.writeln("Risk: ");
|
||||
while (i<=data.numberOfScenarios) {
|
||||
fileRisk.writeln(mod.risk[i]);
|
||||
i++;
|
||||
};
|
||||
|
||||
|
||||
fileProfit.close();
|
||||
fileRisk.close();
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
i;minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
1;-600;-600;0;0;0;0;0;0;0;0;0;0;0;0;0;50;50;50;50;50;50;50;50;50;50;50;50
|
||||
2;-67.59;-67.423334025;12.249866065;0;0;0;1;0;0;0;0;9;8;1;43;41;50;50;7;41;42;49;7;50;50;50;50
|
||||
3;464.82;465.647226284;26.015138747;0;0;0;0;0;0;0;29;20;19;9;52;30;50;41;0;30;31;41;0;50;50;50;50
|
||||
4;997.23;997.66185313;40.349353614;0;0;0;110;0;0;0;0;30;30;13;50;20;50;37;0;20;20;37;0;50;50;50;50
|
||||
5;1529.64;1530.172175866;54.689711726;0;0;0;114;0;0;0;0;42;40;17;92;8;50;33;0;8;10;33;0;50;50;50;50
|
||||
6;2062.05;2062.088549477;69.062913221;0;0;0;9;0;0;0;200;50;50;25;50;0;50;25;0;0;0;25;0;50;50;50;50
|
||||
7;2594.46;2594.684714046;84.265583873;9;0;0;64;0;10;0;159;50;51;28;51;0;50;22;0;0;0;22;0;50;50;50;50
|
||||
8;3126.87;3127.12427492;99.497458717;20;0;0;0;0;30;0;111;50;58;35;249;0;50;15;0;0;0;15;0;50;50;50;50
|
||||
9;3659.28;3659.345897427;114.728718529;29;0;0;2;1;31;0;200;50;69;39;249;0;50;11;0;0;0;11;0;50;50;50;50
|
||||
10;4191.69;4191.916591732;129.963670504;36;0;0;114;5;32;0;160;50;79;45;210;0;50;5;0;0;0;5;0;50;50;50;50
|
||||
11;4724.1;4724.191045823;145.204545226;50;0;0;100;2;34;0;197;50;89;50;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
12;5256.51;5256.719240584;162.349562672;72;0;34;150;0;3;0;200;50;123;50;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
13;5788.92;5789.016098305;182.46075748;122;0;0;150;1;1;0;200;50;149;94;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
14;6321.33;6321.358645932;205.000585625;110;0;50;150;19;33;0;200;50;156;102;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
15;6853.74;6853.83219788;229.023498807;109;0;24;110;1;0;94;160;50;191;51;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
16;7386.15;7386.171785273;253.962965038;1;0;1;150;121;30;189;200;50;200;50;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
17;7918.56;7918.565798346;279.907638363;110;0;30;110;59;48;76;160;50;205;130;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
18;8450.97;8451.020747071;306.383357869;111;0;0;150;72;0;191;200;50;256;131;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
19;8983.38;8983.400103901;332.936696297;111;0;49;110;83;15;144;200;50;317;149;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
20;9515.79;9515.804890325;360.18213126;110;0;30;110;110;28;160;160;50;273;150;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
@ -0,0 +1,99 @@
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
8450.97;8451.020747071;306.383357869;111;0;0;150;72;0;191;200;50;256;131;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
averageProfit:
|
||||
8283.101223531
|
||||
8360.092861464
|
||||
8023.436774628
|
||||
7996.435353438
|
||||
8108.734620296
|
||||
8709.702668322
|
||||
9236.429507678
|
||||
8492.980846575
|
||||
8912.962073143
|
||||
8201.079841867
|
||||
7947.08574225
|
||||
8426.386242154
|
||||
8633.510288097
|
||||
7925.419317516
|
||||
8216.653093455
|
||||
8162.239336848
|
||||
10606.276724793
|
||||
7766.753696884
|
||||
8902.966530729
|
||||
8329.954853003
|
||||
8615.534725088
|
||||
9307.905933844
|
||||
8711.836200338
|
||||
7853.713101162
|
||||
8160.850707138
|
||||
8505.74747647
|
||||
7807.599624626
|
||||
8650.006339759
|
||||
7571.333855925
|
||||
9103.892851116
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
8983.38;8983.400103901;332.936696297;111;0;49;110;83;15;144;200;50;317;149;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
averageProfit:
|
||||
8779.880622914
|
||||
8905.098118171
|
||||
8457.038873118
|
||||
8476.337700492
|
||||
8611.662470696
|
||||
9284.604268643
|
||||
9787.525726881
|
||||
9033.316521658
|
||||
9469.444921654
|
||||
8726.555858861
|
||||
8437.173060618
|
||||
8935.043125766
|
||||
9172.334141304
|
||||
8425.564554151
|
||||
8725.52174345
|
||||
8672.538442695
|
||||
11321.501722433
|
||||
8233.9854963
|
||||
9465.167737138
|
||||
8841.407418574
|
||||
9162.816556878
|
||||
9946.670992861
|
||||
9281.411111594
|
||||
8349.695093959
|
||||
8671.731748701
|
||||
9074.152941559
|
||||
8296.712958538
|
||||
9208.592940681
|
||||
8041.287735389
|
||||
9707.228511359
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
9515.79;9515.804890325;360.18213126;110;0;50;110;110;11;160;200;50;350;130;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
averageProfit:
|
||||
9268.899026395
|
||||
9430.210649623
|
||||
8919.631184021
|
||||
8944.062758608
|
||||
9095.775246456
|
||||
9886.312580673
|
||||
10387.393647889
|
||||
9637.953603446
|
||||
10098.221535588
|
||||
9238.913391815
|
||||
8980.977156104
|
||||
9414.393022001
|
||||
9722.356857713
|
||||
8917.726783311
|
||||
9178.474614142
|
||||
9167.292074295
|
||||
12011.512542804
|
||||
8693.048121325
|
||||
10039.47692674
|
||||
9375.735645214
|
||||
9730.36014247
|
||||
10531.376234688
|
||||
9750.101324443
|
||||
8881.341453044
|
||||
9186.289888284
|
||||
9675.754350507
|
||||
8773.329747496
|
||||
9722.523537949
|
||||
8489.277170975
|
||||
10325.425491734
|
||||
@ -0,0 +1,99 @@
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
8450.97;8451.020747071;306.383357869;111;0;0;150;72;0;191;200;50;256;131;210;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
Risk:
|
||||
215.259123099
|
||||
213.69733545
|
||||
256.982543908
|
||||
264.182922892
|
||||
237.079713252
|
||||
256.485998738
|
||||
440.748501746
|
||||
220.346755101
|
||||
317.725887198
|
||||
221.246323596
|
||||
278.987806249
|
||||
215.907114806
|
||||
239.257645075
|
||||
286.209947826
|
||||
219.688998438
|
||||
226.425057599
|
||||
1077.627988861
|
||||
348.647519792
|
||||
314.394039726
|
||||
213.69733545
|
||||
236.261717906
|
||||
471.721619751
|
||||
257.054940609
|
||||
312.502227156
|
||||
226.656495884
|
||||
221.623418091
|
||||
330.947617771
|
||||
242.556855407
|
||||
439.843445573
|
||||
387.733839121
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
8983.38;8983.400103901;332.936696297;111;0;49;110;83;15;144;200;50;317;149;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
Risk:
|
||||
235.514485857
|
||||
233.463592669
|
||||
295.10776005
|
||||
289.961406084
|
||||
258.385626369
|
||||
283.59921572
|
||||
458.500186874
|
||||
241.013319315
|
||||
339.19398444
|
||||
239.069470128
|
||||
301.0675038
|
||||
234.461759589
|
||||
258.505040752
|
||||
304.937005956
|
||||
239.172881669
|
||||
246.237321769
|
||||
1169.050809266
|
||||
381.130562498
|
||||
337.768256268
|
||||
233.463592669
|
||||
256.918776681
|
||||
527.463135466
|
||||
282.747707173
|
||||
332.755808026
|
||||
246.371770768
|
||||
245.096961305
|
||||
353.948662195
|
||||
265.756800627
|
||||
471.056184256
|
||||
426.381300665
|
||||
minimalAverageProfit;averageProfit;riskMeasureGini;m1_prod_P1;m1_prod_P2;m1_prod_P3;m1_prod_P4;m2_prod_P1;m2_prod_P2;m2_prod_P3;m2_prod_P4;m3_prod_P1;m3_prod_P2;m3_prod_P3;m3_prod_P4;m1_stock_P1;m1_stock_P2;m1_stock_P3;m1_stock_P4;m2_stock_P1;m2_stock_P2;m2_stock_P3;m2_stock_P4;m3_stock_P1;m3_stock_P2;m3_stock_P3;m3_stock_P4
|
||||
9515.79;9515.804890325;360.18213126;110;0;50;110;110;11;160;200;50;350;130;250;0;50;0;0;0;0;0;0;50;50;50;50
|
||||
Risk:
|
||||
257.771190407
|
||||
254.737224034
|
||||
326.201274617
|
||||
318.871802241
|
||||
282.241741827
|
||||
321.104875021
|
||||
494.731094839
|
||||
268.586754289
|
||||
386.635715124
|
||||
259.770232712
|
||||
309.027962909
|
||||
254.20996978
|
||||
278.580496622
|
||||
326.836074854
|
||||
266.074619618
|
||||
267.938376259
|
||||
1247.85382624
|
||||
418.170749512
|
||||
367.054178841
|
||||
254.20996978
|
||||
280.175597566
|
||||
557.123549119
|
||||
284.781873359
|
||||
340.177362618
|
||||
265.032583065
|
||||
272.366828995
|
||||
383.382044838
|
||||
278.608276661
|
||||
513.263859675
|
||||
469.943832377
|
||||
@ -23,7 +23,7 @@ int sigma[products][products] = ...;
|
||||
|
||||
float sellProfit[scenarios][products] = ...;
|
||||
|
||||
float minimalAverageProfit = ...; //wymagany poziom zysku
|
||||
float minimalAverageProfit = ...;
|
||||
|
||||
dvar int produce[months][products];
|
||||
dvar int sell[months][products];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user