Advertisement
Guest User

Untitled

a guest
Mar 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. MODEL:
  2.  
  3. SETS:
  4. dodavatele/1..3/:a;
  5. odberatele/1..4/:b;
  6. cesta(dodavatele,odberatele):x,y,c,v;
  7. ENDSETS
  8.  
  9. DATA:
  10. a=300 180 220;
  11.  
  12. b=180 250 160 110;
  13.  
  14. c=10 3 14 6
  15. 5 3 7 4
  16. 2 8 5 11;
  17.  
  18. v= 12 5 10 7
  19. 8 7 4 3
  20. 1 4 4 9;
  21.  
  22.  
  23. K1=16;
  24. K2=12;
  25.  
  26. ENDDATA
  27.  
  28. min=@SUM(cesta(i,j):c(i,j)*y(i,j));
  29.  
  30. @FOR(dodavatele(i):@SUM(odberatele(j):x(i,j))<=a(i));
  31. @FOR(odberatele(j):@SUM(dodavatele(i):x(i,j))=b(j));
  32.  
  33. @FOR(cesta(i,j):x(i,j)<=K1*y(i,j));
  34.  
  35. @FOR(cesta:x);
  36. @FOR(cesta:@GIN(y));
  37.  
  38.  
  39. min=@SUM(cesta(i,j):v(i,j)*y(i,j));
  40.  
  41. @FOR(dodavatele(i):@SUM(odberatele(j):x(i,j))<=a(i));
  42. @FOR(odberatele(j):@SUM(dodavatele(i):x(i,j))=b(j));
  43.  
  44. @FOR(cesta(i,j):x(i,j)<=K2*y(i,j));
  45.  
  46. @FOR(cesta:@GIN(x));
  47. @FOR(cesta:@GIN(y));
  48.  
  49. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement