#c #cplex #opl
#c #cplex #opl
Вопрос:
im meyla. я запускал свой cplex в bahasa indonesia. но я получаю некоторую ошибку «opl не может извлечь выражение: Pembagian_Stasiun [m] [s](сумма (i в .. 306) Penugasan_Kerja [i] [m]Waktu_Proses[i](-1) 320″ в моей целевой функции. но в моей целевой функции я не использую «(-1) 320″, что 320 — это время ожидания. в конце я получаю сообщение об ошибке «Исключение из IBM ILOG CPLEX: ошибка CPLEX 1217: решения не существует». вы можете мне помочь? 🙁
это моя модель на изображении, МОЯ МОДЕЛЬ, У КОТОРОЙ ЕСТЬ ОШИБКА В ОБЪЕКТИВНОЙ ФУНКЦИИ
ОШИБКА, которая у меня ЕСТЬ
//Parameter
int n_Stasiun =...;
int n_Operasi =...;
int n_PekerjaM=...;
int n_PekerjaE=...;
int n_PekerjaT=...;
int n_Pekerja = n_PekerjaM n_PekerjaE n_PekerjaT;
float TaktTime =...;
float TotalTime =...;
{string} Skill=...;
int M=1000000;
range Stasiun = 1..n_Stasiun;
range Operasi = 1..n_Operasi;
range Pekerja = 1..n_Pekerja;
range PekerjaM =1..n_PekerjaM;
range PekerjaE =n_PekerjaM 1 .. n_PekerjaM n_PekerjaE;
range PekerjaT =n_PekerjaM n_PekerjaE 1 .. n_Pekerja;
range PekerjaM_Ringkas= 1..n_PekerjaM - 1;
range PekerjaE_Ringkas= n_PekerjaM 1 .. n_PekerjaM n_PekerjaE - 1;
range PekerjaT_Ringkas= n_PekerjaM n_PekerjaE 1 .. n_Pekerja - 1;
int Kebutuhan_Pekerja [Skill][Operasi] = ...;
float Waktu_Proses [Operasi] = ... ;
float ES [Operasi] = ...;
float LS [Operasi] = ...;
int arrayOperasi [Skill][Operasi] = ...;
tuple Precedence {
int Predecessor;
int Successor;
};
{Precedence} Precedences = ...;
tuple Pair {
int P_Op1;
int P_Op2;
};
setof (Pair) A = {<P_Op1,P_Op2> | P_Op1,P_Op2 in Operasi : P_Op1!=P_Op2};
tuple Samespot {
int S_Op1;
int S_Op2;
};
{Samespot} Spot = ...;
//Variables
dvar float Waktu_Mulai [Operasi];
dvar boolean Penugasan_Kerja [Operasi][Pekerja];
dvar boolean Penugasan_Kerja_Rangkap [Operasi][Operasi];
dvar boolean Penyelesaian_Operasi [Operasi][Operasi];
dvar boolean Penugasan_Stasiun [Operasi][Stasiun];
dvar boolean Pembagian_Stasiun [Pekerja][Stasiun];
//Model Matematis
dexpr float Waktu_Menganggur = sum (s in Stasiun)(sum (m in Pekerja)Pembagian_Stasiun [m][s]*(TaktTime-(sum (i in Operasi)Penugasan_Kerja [i][m]*Waktu_Proses[i])));
//Fungsi Objektif
minimize Waktu_Menganggur;
//Fungsi Pembatas
subject to {
forall (i in Operasi)
cons1 :
sum (m in Pekerja) Penugasan_Kerja [i][m] == sum (j in Skill) Kebutuhan_Pekerja [j][i];
forall (i in Operasi : arrayOperasi ["M"][i] == 1)
cons2 :
sum (m in PekerjaM) Penugasan_Kerja [i][m] == Kebutuhan_Pekerja ["M"][i];
forall (i in Operasi : arrayOperasi ["E"][i] == 1)
cons3 :
sum (m in PekerjaE) Penugasan_Kerja [i][m] == Kebutuhan_Pekerja ["E"][i];
forall (i in Operasi : arrayOperasi ["T"][i] == 1)
cons4 :
sum (m in PekerjaT) Penugasan_Kerja [i][m] == Kebutuhan_Pekerja ["T"][i];
cons5 :
Waktu_Mulai [n_Operasi] Waktu_Proses [n_Operasi] <= TotalTime ;
forall (<Predecessor,Successor> in Precedences)
cons6 :
Waktu_Mulai [Successor] - Waktu_Mulai [Predecessor] >= Waktu_Proses [Predecessor];
forall (<P_Op1,P_Op2> in A : P_Op2>P_Op1)
cons7 :
Penugasan_Kerja_Rangkap [P_Op1][P_Op2] Penugasan_Kerja_Rangkap [P_Op2][P_Op1] <= 1;
forall (i in Operasi)
cons8 :
Penugasan_Kerja_Rangkap [i][i] == 0;
forall (<P_Op1,P_Op2> in A : P_Op1>P_Op2)
forall (m in Pekerja)
cons9 :
Penugasan_Kerja_Rangkap [P_Op1][P_Op2] Penugasan_Kerja_Rangkap [P_Op2][P_Op1] >= Penugasan_Kerja [P_Op1][m] Penugasan_Kerja [P_Op2][m] - 1;
forall (<P_Op1,P_Op2> in A)
cons10 :
Waktu_Mulai [P_Op2] - Waktu_Mulai [P_Op1] >= Waktu_Proses [P_Op1] - M * (1 - Penugasan_Kerja_Rangkap [P_Op1][P_Op2]) ;
forall (<S_Op1,S_Op2> in Spot )
cons11 :
Waktu_Mulai [S_Op2] Waktu_Proses [S_Op2] <= Waktu_Mulai [S_Op1] M * Penyelesaian_Operasi [S_Op1][S_Op2] ;
forall (<S_Op1,S_Op2> in Spot )
cons12 :
Waktu_Mulai [S_Op1] Waktu_Proses [S_Op1] <= Waktu_Mulai [S_Op2] M * Penyelesaian_Operasi [S_Op2][S_Op1];
forall (<S_Op1,S_Op2> in Spot )
cons13 :
Penyelesaian_Operasi [S_Op1][S_Op2] Penyelesaian_Operasi [S_Op2][S_Op1] == 1;
forall (i in Operasi)
cons14 :
sum (s in Stasiun) Penugasan_Stasiun [i][s] == 1 ;
forall (<Predecessor,Successor> in Precedences )
cons15 :
sum (s in Stasiun) s * (Penugasan_Stasiun [Predecessor][s] - Penugasan_Stasiun [Successor][s]) <= 0 ;
forall (i in Operasi)
forall (s in Stasiun)
cons16 :
sum (m in Pekerja) Penugasan_Kerja [i][m] == sum (j in Skill) Kebutuhan_Pekerja [j][i] * Penugasan_Stasiun [i][s];
forall (i in Operasi)
forall (m in Pekerja)
cons17 :
Penugasan_Kerja [i][m] <= sum (s in Stasiun) Pembagian_Stasiun [m][s];
forall (i in Operasi)
forall (m in Pekerja)
forall (s in Stasiun)
cons18 :
Penugasan_Kerja[i][m] Penugasan_Stasiun [i][s] <= 1 Pembagian_Stasiun [m][s];
forall (m in PekerjaM_Ringkas)
cons19 :
sum (s in Stasiun) (Pembagian_Stasiun [m][s] - Pembagian_Stasiun [m 1][s]) >= 0;
forall (m in PekerjaE_Ringkas)
cons20 :
sum (s in Stasiun) (Pembagian_Stasiun [m][s] - Pembagian_Stasiun [m 1][s]) >= 0;
forall (m in PekerjaT_Ringkas)
cons21 :
sum (s in Stasiun) (Pembagian_Stasiun [m][s] - Pembagian_Stasiun [m 1][s]) >= 0;
forall (i in Operasi)
cons22 :
Waktu_Mulai [i] >= ES [i];
forall (i in Operasi)
cons23 :
Waktu_Mulai [i] <= LS [i];
forall (i in Operasi)
cons24 :
Waktu_Mulai [i] >= (-1 sum(s in Stasiun) s * Penugasan_Stasiun [i][s]) * TaktTime;
forall (i in Operasi)
cons25 :
Waktu_Mulai [i] Waktu_Proses [i] <= (sum (s in Stasiun) s * Penugasan_Stasiun [i][s]) * TaktTime;
forall (m in Pekerja)
cons26 :
sum (i in Operasi) Penugasan_Kerja [i][m] <= 0 M * sum (s in Stasiun) Pembagian_Stasiun [m][s];
}
n_Operasi = 306 ;
n_Stasiun = 3 ;
Skill = {M,E,T};
arrayOperasi = [
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //30
1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1, //60
1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,1,0,0, //90
1,1,1,1,0,1,1,1,1,0,1,0,0,1,1,1,1,0,1,0,0,0,0,1,1,1,1,1,0,0, //120
0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1, //150
1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1, //180
1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //210
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0, //240
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, //270
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,0,0,0,0,//150
0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,//180
0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//210
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1, //240
1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, //270
0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//300
1,0,1,1,0,0]
];
Precedences =
{<1,2>,<1,3>,<1,4>,<1,5>,<1,6>,<6,7>,<7,8>,<8,9>,<8,10>,<10,11>,<10,12>,
<8,13>,<11,14>,<12,14>,<13,14>,<14,15>,<7,16>,<16,17>,<17,18>,
<17,19>,<16,20>,<18,21>,<19,21>,<20,21>,<21,22>,<22,23>,<15,24>,
<23,25>,<24,25>,<14,26>,<21,26>,<16,27>,<8,28>,<16,28>,<28,29>,
<28,30>,<8,31>,<16,31>,<29,32>,<30,32>,<31,32>,<32,33>,<29,34>,
<30,34>,<29,35>,<30,35>,<29,36>,<14,37>,<37,38>,<21,39>,<39,40>,
<1,41>,<7,42>,<41,42>,<10,43>,<17,43>,<42,43>,<43,44>,
<30,45>,<7,46>,<46,47>,<1,48>,<1,49>,<1,50>,<1,51>,<1,52>,<52,53>,
<35,54>,<36,54>,<45,54>,<47,54>,<48,54>,<49,54>,<50,54>,<51,54>,
<53,54>,<78,54>,<80,54>,<54,55>,<55,56>,<56,57>,<1,58>,<1,59>,
<8,60>,<16,60>,<1,61>,<61,62>,<61,63>,<61,64>,<61,65>,<65,66>,
<1,67>,<1,68>,<68,69>,<68,70>,<70,71>,<1,72>,<1,73>,<73,74>,<1,75>,
<75,76>,<82,76>,<76,77>,<75,78>,<78,79>,<1,80>,<80,81>,<1,82>,
<1,83>,<85,84>,<1,85>,<1,86>,<85,87>,<87,88>,<87,89>,<88,89>,
<89,90>,<69,91>,<84,91>,<87,91>,<69,92>,<87,92>,<1,93>,
<1,94>,<93,95>,<94,95>,<1,96>,<1,97>,<1,98>,<1,99>,<69,100>,
<87,100>,<96,100>,<97,100>,<98,100>,<99,100>,<1,101>,<101,102>,
<1,103>,<1,104>,<1,105>,<1,106>,<106,107>,<69,108>,<87,108>,<102,108>,
<103,108>,<104,108>,<105,108>,<107,108>,<1,109>,<69,110>,<87,110>,
<86,110>,<109,110>,<69,111>,<32,111>,<87,111>,<32,112>,<60,112>,
<32,113>,<69,113>,<84,113>,<1,114>,<114,115>,<114,116>,<1,117>,
<1,118>,<1,119>,<53,120>,<191,120>,<32,121>,<69,121>,<84,121>,<87,121>,
<88,121>,<114,121>,<115,121>,<116,121>,<117,121>,<118,121>,<119,121>,
<120,121>,<128,121>,<121,122>,<121,123>,<90,124>,<80,124>,<108,124>,<110,124>,
<111,124>,<112,124>,<113,124>,<121,124>,<124,125>,<124,126>,<124,127>,
<1,128>,<77,129>,<91,129>,<92,129>,<95,129>,<125,129>,<126,129>,
<127,129>,<128,129>,<129,130>,<130,131>,<131,132>,<132,133>,<133,134>,
<134,135>,<74,136>,<135,136>,<136,137>,<1,138>,<138,139>,<1,140>,
<1,141>,<1,142>,<1,143>,<1,144>,<1,145>,<1,146>,<1,147>,<1,148>,
<1,149>,<1,150>,<1,151>,<1,152>,<152,153>,<1,154>,<1,155>,
<155,156>,<1,157>,<1,158>,<1,159>,<1,160>,<26,161>,<135,161>,<44,162>,
<135,162>,<2,163>,<3,163>,<4,163>,<5,163>,<58,163>,<63,163>,<64,163>,
<66,163>,<135,163>,<140,163>,<141,163>,<142,163>,<143,163>,<144,163>,
<145,163>,<146,163>,<147,163>,<148,163>,<149,163>,<150,163>,<151,163>,
<152,163>,<153,163>,<135,164>,<154,164>,<135,165>,<157,165>,<156,165>, //196
<72,166>,<135,166>,<159,166>,<160,166>,<57,167>,<135,167>,<57,168>,
<135,168>,<57,169>,<135,169>,<57,170>,<135,170>,<57,171>,<135,171>,
<57,172>,<135,172>,<81,172>,<34,173>,<57,173>,<135,173>,<67,174>,
<135,174>,<186,174>,<135,175>,<179,175>,<180,175>,<135,176>,<185,176>,<7,177>,
<161,178>,<177,178>,<1,179>,<179,180>,<158,181>,<158,182>,<158,183>,
<1,184>,<181,185>,<182,185>,<183,185>,<184,185>,<1,186>,<1,187>,<1,188>,
<155,189>,<8,190>,<16,190>,<1,191>,<191,192>,<135,193>,<135,194>,
<135,195>,<135,196>,<135,197>,<135,198>,<135,199>,<135,200>,<135,201>,
<135,202>,<135,203>,<135,204>,<135,205>,<135,206>,<135,207>,<135,208>,
<135,209>,<135,210>,<135,211>,<135,212>,<135,213>,<135,214>,<135,215>,
<135,216>,<135,217>,<135,218>,<135,219>,<135,220>,<135,221>,<135,222>,
<135,223>,<135,224>,<135,225>,<135,226>,<135,227>,<135,228>,<135,229>,
<135,230>,<135,231>,<135,232>,<135,233>,<135,234>,<135,235>,<135,236>,
<29,237>,<30,237>,<237,238>,<1,239>,<135,240>,<187,240>,<188,240>,
<135,241>,<189,241>,<190,241>,<135,242>,<190,242>,<192,242>,<135,243>,
<71,243>,<135,244>,<238,244>,<25,245>,<38,245>,<40,245>,<135,245>,
<25,246>,<38,246>,<40,246>,<135,246>,<135,247>,<135,248>,<247,248>,
<137,249>,<138,249>,<161,249>,<162,249>,<163,249>,<164,249>,<165,249>,
<166,249>,<167,249>,<168,249>,<169,249>,<170,249>,<171,249>,<172,249>,
<173,249>,<174,249>,<175,249>,<176,249>,<178,249>,<193,249>,<194,249>,
<195,249>,<196,249>,<197,249>,<198,249>,<199,249>,<200,249>,<201,249>,
<202,249>,<203,249>,<204,249>,<205,249>,<206,249>,<207,249>,<208,249>,
<209,249>,<210,249>,<211,249>,<212,249>,<213,249>,<214,249>,<215,249>,
<216,249>,<217,249>,<218,249>,<219,249>,<220,249>,<221,249>,<222,249>,
<223,249>,<224,249>,<225,249>,<226,249>,<227,249>,<228,249>,<229,249>,
<230,249>,<231,249>,<232,249>,<233,249>,<234,249>,<235,249>,<236,249>,
<239,249>,<240,249>,<241,249>,<242,249>,<243,249>,<244,249>,<245,249>,
<246,249>,<247,249>,<248,249>,<249,250>,<250,251>,<251,252>,<251,253>,
<251,254>,<251,255>,<121,256>,<256,257>,<257,258>,<191,259>,<53,260>,<191,260>,
<9,261>,<27,261>,<33,261>,<59,261>,<121,261>,<122,261>,<123,261>,<258,261>,
<259,261>,<260,261>,<121,262>,<8,263>,<16,263>,<263,264>,<12,265>,
<18,265>,<58,265>,<82,265>,<83,265>,<140,265>,<141,265>,<142,265>,
<143,265>,<144,265>,<145,265>,<146,265>,<147,265>,<148,265>,<149,265>,
<150,265>,<152,265>,<264,265>,<7,266>,<8,267>,<16,267>,<53,268>,
<191,268>,<53,269>,<191,269>,<248,270>,<266,270>,<267,270>,<268,270>,
<269,270>,<1,271>,<1,272>,<135,273>,<271,273>,<272,273>,<135,274>,<135,275>,
<135,276>,<126,277>,<126,278>,<278,279>,<279,280>,<1,281>,<126,282>,<281,282>,
<1,283>,<126,284>,<283,284>,<277,285>,<277,286>,<277,287>,<277,288>,<288,289>,
<288,290>,<1,291>,<291,292>,<292,293>,<1,294>,<1,295>,<1,296>,<1,297>,<1,298>,
<1,299>,<1,300>,<62,301>,<79,301>,<124,301>,<139,301>,<261,301>,<262,301>,
<265,301>,<270,301>,<271,301>,<272,301>,<273,301>,<274,301>,<275,301>,<276,301>,
<277,301>,<279,301>,<280,301>,<281,301>,<282,301>,<284,301>,<285,301>,<286,301>,
<287,301>,<288,301>,<289,301>,<290,301>,<293,301>,<294,301>,<295,301>,<296,301>,
<297,301>,<298,301>,<301,302>,<302,303>,<252,305>,<253,305>,<254,305>,<255,305>,
<270,305>,<273,305>,<274,305>,<275,305>,<276,305>,<304,305>,<305,306>};
Spot = {<1,306>};
TaktTime = 320;
TotalTime = 960;
Waktu_Proses = [2.75,2.31,3.39,3.32,8.51,6.41,17.22,5.99,6.59,7.92, //10
3.55,1.78,10.79,9.03,7.48,5.99,7.92,1.78,4.03,9.07,9.03,7.48,0.65, //23
0.65,4.76,0.81,6.31,5.06,5.24,5.32,7.31,17.27,11.26,3.61,12.1,5.25, //36
1.15,7.73,1.05,7.73,5.31,8.51,2.93,10.88,4.74,1.59,10.13,4.61,4.61, //49
7.84,3.14,5.9,6.92,15,10.39,8.69,3.77,9.37,7.74,4.52,8.74,2.59,0.79, //63
0.84,4.18,3.51,10.52,8.16,22.93,10.35,4.05,18.25,28.41,3.08,7.35,11.27, //76
79.14,4.01,2.91,6.07,0.79,8.82,3.72,16.16,1.41,4.05,62.47,4.22,33.15, //89
20.03,95.93,32.86,40.04,3.99,12.62,4.35,19.34,3.23,22.47,79.29,19.17, //101
2,2.49,2.19,17.56,8.33,1.37,4.89,2.38,37.34,10.93,11.54,13.73,9.3, //114
1.32,3.55,9.46,6.55,2.77,3.48,35.19,7.39,12.88,10.4,6.83,6.75,10.16, //127
0.42,8,8,8,8,8,8,3.27,9.07,5.06,3.04,3.04,2.6,1.95,5.3,3.08,3.69,5.91, //145
6.5,2.89,1.87,8,4.92,2.59,4.53,5.75,8.63,7.52,10.15,2.02,6.04,6.11, //159
10.84,9.07,2.63,10.6,9.81,3.5,3.91,30.85,25.1,12.55,10.39,9.81,11, //172
10.55,4.31,10.6,4.55,7.43,7.78,3.14,6.78,9.06,3.35,30.96,4.29,16.11, //185
8.38,2.21,4.29,2.86,3,1.92,1.36,5.17,9.6,9.85,15.76,18.83,7,7,6.33, //200
10.13,11.04,10.12,3.88,2.89,10.26,3.36,4.31,5.33,5.25,13.03,6.33,7, //213
12.6,17.42,6.83,10.6,11.06,3.77,4,8.55,11.66,6.79,10.88,10.47,10.47, //226
6.83,6.83,6.83,11.76,4.32,18.83,5.25,10.6,8.86,2.2,7.13,3.38,0.41, // 239
4.47,5.33,3.97,5.27,4.55,8.41,8.72,6.11,10.93,7.41,6.83,8.17,12.02, //252
5.75,8.37,5.33,6.71,6.49,7.12,17.1,25.06,2.59,2.51,12.35,7.83,0.87, //265
5.38,8.08,7,24.87,8.72,6.62,7.25,10.6,4.4,8.41,6.23,3.34,4.83,28.51, //279
0.79,2.14,2.14,2.59,2.59,47.66,5.43,1.22,1.54,0.19,2.28,3.78,2.56, //292
1.18,6.44,1.96,3.32,6.02,3.68,1.76,0.38,14.11,3.03,10.07,3.25,3.2,6.9];
Kebutuhan_Pekerja = [
[3,2,2,2,4,7,6,4,4,3,2,2,6,4,5,5,3,2,3,6,4,5,2,2,2,2,4,2,4,4,4,2,6 //33
4,4,2,2,3,2,3,2,2,2,0,2,4,7,4,4,6,2,2,4,2,6,4,0,4,8,2,2,2,2,2,2,2, //66
4,4,0,4,2,6,4,7,2,2,0,4,2,2,2,6,6,0,0,0,0,2,0,0,5,5,4,2,0,4,4,2,6, //99
0,4,0,0,4,6,6,2,0,4,0,0,0,0,6,2,4,2,2,0,0,0,6,6,0,0,0,0,0,0,0,0,0, //132
0,0,0,0,0,4,4,2,2,3,2,2,4,2,2,5,2,2,2,2,2,7,4,6,2,2,8,6,0,0,0,0,0, //165
0,0,0,0,0,0,0,0,0,0,0,6,0,7,4,2,3,4,6,8,2,2,4,6,4,2,2,0,0,0,0,0,0, //198
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //231
0,0,0,0,0,6,8,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,4,4,6,6,2,2,4,6, //264
2,2,7,4,6,0,5,4,0,0,0,0,2,2,4,2,4,4,2,2,6,5,2,4,2,5,2,2,2,2,4,4,4, //297
2,4,2,0,6,0,0,2,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0, //33
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //66
0,0,2,0,0,0,0,0,0,0,2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0,0,0,0,0,0,0,0,0,0,2, //270
0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //300
2,0,2,2,0,0]
];
n_PekerjaM = 30 ;
n_PekerjaE = 6 ;
n_PekerjaT = 11 ;
ES = [0,0,0,0,0,0,8,24,32,32,56,56,32,56,64,24,32,56,56,32,56,64, //22
72,72,72,64,32,32,32,32,32,56,72,56,56,56,64,64,64,64,0,24,56,56, //44
56,24,24,0,0,0,0,0,8,64,80,112,120,0,0,32,0,8,8,8,8,8,0,0,8,8,16, //71
0,0,24,0,8,16,8,8,0,8,0,0,0,0,0,0,80,80,136,80,80,0,0,56,0,0,0,0, //99
80,0,16,0,0,0,0,8,80,0,80,80,72,72,0,8,8,0,0,0,8,80,136,136,192, //124
200,200,200,0,224,232,240,248,256,264,272,280,288,0,0,0,0,0,0,0, //144
0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,280,280,280,280,280,280,280,280, //168
280,280,280,280,280,280,280,280,24,288,0,0,8,8,8,0,32,0,0,0,8,32, //190
0,0,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
280,280,280,280,280,280,280,280,280,280,280,280,280,56,64,0,280, //240
280,280,280,280,280,280,280,280,328,336,336,344,344,344,344,360, //256
368,368,8,8,392,392,32,56,64,32,32,8,8,296,0,0,280,280,280,280, //276
224,224,224,256,0,224,0,224,224,224,224,224,224,224,0,0,8,0,0,0, //296
0,0,0,0,336,352,352,360,392,392];
LS = [0,312,312,312,304,64,72,88,336,280,288,296,280,296,304,88, //16
280,296,288,288,296,304,312,312,312,304,336,112,120,120,112,120, //32
312,312,224,232,304,312,304,312,296,296,304,304,232,232,232,232,232, //49
232,240,120,128,240,256,280,288,304,336,176,296,344,312,312,304, //65
312,312,32,56,304,312,304,280,304,80,88,112,232,344,80,312,336,336, //83
64,0,136,0,120,120,168,80,176,144,192,200,72,56,72,56,80,144,184, //102
184,184,168,176,184,184,136,136,176,176,176,128,136,136,128,136, //118
136,136,136,336,312,192,200,200,200,136,224,232,240,248,256,280, //134
288,312,336,336,344,312,312,312,312,312,312,304,312,312,304,312, //150
312,304,312,304,304,312,336,248,312,312,304,336,312,312,336,336, //166
296,296,312,312,312,312,312,336,312,336,312,336,304,304,296,304, //182
256,296,304,312,336,312,336,336,136,336,336,312,312,312,304,344, //198
344,336,312,312,312,336,336,312,336,336,336,336,312,336,344,312, //214
304,336,312,312,336,336,336,312,336,312,312,312,336,336,336,312, //230
336,304,336,312,312,336,312,336,344,336,336,336,336,336,336,312, //246
304,312,344,352,352,360,368,368,368,304,312,336,312,304,344,344, //262
304,336,344,312,312,312,296,336,312,312,336,344,336,336,280,296, //278
296,344,344,344,336,344,280,336,344,344,344,344,336,344,344,336, //294
344,344,336,344,344,344,344,360,360,368,392,392];
Комментарии:
1. Не могли бы вы опубликовать полный файл .mod здесь? По крайней мере, до
subject to
инструкции. Ваша картинка не показывает, какWaktu_Proses
определяется. Я подозреваю, что это также переменная решения, и в итоге вы получаете произведение трех переменных решения, которое не поддерживается. Но я не могу быть уверен, прежде чем увижу определение этого элемента.2. я уже редактирую свой полный .mod, дэниел. плис, мне нужна твоя помощь @DanielJunglas
3. Не очевидно, что может быть не так с вашей целевой функцией. Можно ли было бы предоставить данные для вашей rmodel, чтобы мы могли запустить это здесь и посмотреть, что может быть не так?
4. конечно, @DanielJunglas. я уже добавляю свои данные в этот вопрос. спасибо вам
5. Это странно. Здесь ваш код выполняется без проблем. Ваша модель неосуществима, но у меня не возникает никаких проблем с «не удается извлечь выражение». Какую версию CPLEX вы используете?