Home / Expert Answers / Computer Science / set-i-39-noktalar-39-depot-k1-k2-k3-k4-k5-k6-k7-k8-k9-k-10-s-i-39-depo-noktalar-39-pa615

(Solved): Set i 'noktalar' ()/(depot), K1, K2, K3, K4, K5, K6, K7, K8, K9, K(10)/() s(i) 'depo noktalar' ()/ ...



Set i 'noktalar' ()/(depot), K1, K2, K3, K4, K5, K6, K7, K8, K9, K(10)/() s(i) 'depo noktaları' ()/(depo)(t)/() t(i) 'bayi noktaları' ()/(K1)*K(10)/() v 'araçlar' ()/(L1)*L(3)/() O 'zaman dilimleri' ()/(G0)*G(540)/(;) Alias (i,j); Parameter a(v) 'araçların kapasiteleri' ()/(L) 1 150 L2 150 L3( 150)/(;) Parameter b(i) 'Bayilerin eski telefon arzı' ()/(D) epot 0, K1 50, K2 40, K3 30, K4 60, K5 20, K6 70, K7 40, K8 30, K9 50, K10 20 ()/(); Parameter c(i,j) 'mesafe matrisi'; c('depot','K1') = 10; c('depot','K2') = 15; c('depot','K3') = 20; c('depot','K4') = 25; c('depot','K5') = 30; c('depot','K6') = 35; c('depot','K7') = 40; c('depot','K8') = 45; c('depot','K9') = 50; c('depot','K10') = 55; c('K1','depot') = 10; c('K1','K2') = 12; c('K1','K3') = 14; c('K1','K4') = 16; c('K1','K5') = 18; c('K1','K6') = 20; c('K1','K7') = 22; c('K1','K8') = 24; c('K1','K9') = 26; c('K1','K10') = 28; c('K2','depot') = 15; c('K2','K1') = 12; c('K2','K3') = 10; c('K2','K4') = 15; c('K2','K5') = 20; c('K2','K6') = 25; c('K2','K7') = 30; c('K2','K8') = 35; c('K2','K9') = 40; c('K2','K10') = 45; c('K3','depot') = 20; c('K3','K1') = 14; c('K3','K2') = 10; c('K3','K4') = 8; c('K3','K5') = 12; c('K3','K6') = 15; c('K3','K7') = 18; c('K3','K8') = 22; c('K3','K9') = 25; c('K3','K10') = 30; c('K4','depot') = 25; c('K4','K1') = 16; c('K4','K2') = 15; c('K4','K3') = 8; c('K4','K5') = 10; c('K4','K6') = 14; c('K4','K7') = 18; c('K4','K8') = 20; c('K4','K9') = 25; c('K4','K10') = 28; c('K5','depot') = 30; c('K5','K1') = 18; c('K5','K2') = 20; c('K5','K3') = 12; c('K5','K4') = 10; c('K5','K6') = 10; c('K5','K7') = 15; c('K5','K8') = 18; c('K5','K9') = 22; c('K5','K10') = 25; c('K6','depot') = 35; c('K6','K1') = 20; c('K6','K2') = 25; c('K6','K3') = 15; c('K6','K4') = 14; c('K6','K5') = 10; c('K6','K7') = 8; c('K6','K8') = 12; c('K6','K9') = 16; c('K6','K10') = 20; c('K7','depot') = 40; c('K7','K1') = 22; c('K7','K2') = 30; c('K7','K3') = 18; c('K7','K4') = 18; c('K7','K5') = 15; c('K7','K6') = 8; c('K7','K8') = 10; c('K7','K9') = 12; c('K7','K10') = 18; c('K8','depot') = 45; c('K8','K1') = 24; c('K8','K2') = 35; c('K8','K3') = 22; c('K8','K4') = 20; c('K8','K5') = 18; c('K8','K6') = 12; c('K8','K7') = 10; c('K8','K9') = 8; c('K8','K10') = 12; c('K9','depot') = 50; c('K9','K1') = 26; c('K9','K2') = 40; c('K9','K3') = 25; c('K9','K4') = 25; c('K9','K5') = 22; c('K9','K6') = 16; c('K9','K7') = 12; c('K9','K8') = 8; c('K9','K10') = 10; c('K10','depot') = 55; c('K10','K1') = 28; c('K10','K2') = 45; c('K10','K3') = 30; c('K10','K4') = 28; c('K10','K5') = 25; c('K10','K6') = 20; c('K10','K7') = 18; c('K10','K8') = 12; c('K10','K9') = 10; Scalar M 'number of transport vehicles' ()/()(3)/(;) Binary Variables x(i,j,v) '1 eğer taşıma aracı v doğrudan i düğümünden j düğümüne gidiyorsa, aksi takdirde 0' y(i,v) '1 eğer müşteri i nakliye aracı v tarafından tam olarak tedarik edilirse, aksi takdirde 0'; Positive Variable u(i,v) 'aracın i noktasındaki yükü'; Variable Z 'toplam mesafe (hedef fonksiyon)' arrival(i,v) 'aracın i noktasına varış zamanı'; Equations target_(f)unction 'hedef fonksiyon' demand_(c)apa_(c)onstraint(v) 'her aracın kapasite sınırı' depot_(c)onstraint(s) 'turların depo ile başlaması ve bitmesi' customer_(v)ehicle_(c)onstraint(t) 'her bayi tam olarak bir araca atanmalı' subtour_(e)limination(i,j,v) 'alt turların oluşmasını engeller' vehicle_(u)sage(v); target_(f)unction.. Z =e= sum((i,j,v), c(i,j)*x(i,j,v)); demand_(c)apa_(c)onstraint(v).. sum(i, b(i)*y(i,v)) =l= a(v); depot_(c)onstraint(s).. sum(v, y(s,v)) =e= M; customer_(v)ehicle_(c)onstraint(t).. sum(v, y(t,v)) =e= 1;; subtour_(e)limination(i,j,v)$[not sameas(i,'depot') and not sameas(j,'depot')].. u(i,v) - u(j,v) + a(v) * x(i,j,v) =l= a(v) - b(j); vehicle_(u)sage(v).. sum(i, y(i,v)) =g= 1; Model CVRP ()/(al)(l)/(;) Solve CVRP using mip minimizing Z; display x.l, y.l, u.l, Z.l; In the code I wrote, the vehicles come out of a single depot and collect the phones without returning to the depot, that is, without performing a subtour. There is a problem with the code I wrote because the objective function and irritation are 0. Can you find the error and fix it?



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe