Lampiran 1
Lampiran 2
Saluran distribusi yang ada
P
R
O
D
U
S
E
N
K
O
N
S
U
M
E
N
hawker
warung
Motor
Stock Point
(SP)
Retail/outlet
(RO)
Distribution Center
(DC)
Institusi
Agen
Lampiran 3
Diagram alir pada saluran distribusi retail/outlet
- F P (stempel, ttd) - D N (stempel, ttd) - Check product - Display
- DN
- Sisa stock/ titipan (bila ada) - Nota penarikan barang - Product/ roti BS & crate
- DN
- Faktur penjualan (FP) - PO
- Product/ roti & crate
Purcahased Order(PO)
- Delivery note(DN) - Faktur penjualan - PO Konsumen Sales admin Warehouse Operator loading unloading Divisi Distribusi Driver& helper
- Bukti Terima Barang - Sisa Stock/ titipan (bila ada) - Nota Penarikan Barang - Product/ Roti BS & Crate
Lampiran 4 Beberapa gambar:
Penghitungan roti
Cratekosong saat unloading
Lampiran 5 Matriks Jarak 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 0.00 11.52 18.24 14.16 12.48 13.08 18.00 13.92 13.44 15.12 15.12 20.76 22.68 24.24 16.32 22.08 19.01 20.76 23.33 23.40 21.72 22.80 24.19 23.64 22.32 1 0.00 6.72 2.64 1.56 2.16 6.00 4.32 4.32 4.56 5.88 11.40 13.32 14.88 7.08 12.84 12.48 13.92 13.32 17.47 14.35 14.47 11.88 12.43 13.99 2 0.00 4.32 8.28 8.88 10.44 6.60 6.60 7.56 7.92 7.56 9.48 11.04 9.12 11.64 13.56 16.44 17.28 17.35 16.39 16.51 13.92 14.47 16.03 3 0.00 1.80 1.56 4.92 4.56 4.32 3.36 6.00 8.88 10.80 12.36 7.20 9.96 15.12 15.84 9.72 17.59 14.47 12.48 12.00 12.55 14.11 4 0.00 0.60 4.44 2.76 2.76 3.00 4.32 9.84 11.76 13.08 5.40 10.08 10.92 12.00 11.76 15.91 12.79 10.80 10.32 10.87 12.43 5 0.00 3.84 2.16 2.16 2.40 3.72 9.24 11.16 12.48 4.92 9.48 10.32 11.64 11.16 15.31 12.19 10.20 9.72 10.27 11.83 6 0.00 4.08 3.84 2.88 5.52 10.92 12.84 14.40 6.72 11.40 10.80 14.64 8.88 12.36 13.99 14.11 11.52 12.07 13.63 7 0.00 0.24 1.20 1.68 6.84 8.76 10.32 2.88 7.32 6.96 9.60 9.96 13.27 10.15 10.27 7.68 8.23 9.79 8 0.00 0.96 1.68 7.08 9.00 10.56 2.88 7.56 6.96 9.60 9.72 13.27 10.15 10.27 7.68 8.23 9.79 9 0.00 2.64 8.04 9.96 11.52 3.84 8.52 7.92 10.56 8.76 12.24 11.11 11.23 8.64 9.19 10.75 10 0.00 8.52 10.44 12.00 1.20 6.96 5.28 8.40 9.60 11.59 8.47 8.59 6.00 6.55 8.11 11 0.00 1.92 3.48 7.32 8.16 10.08 13.56 14.40 17.83 14.71 14.95 12.36 12.91 14.47 12 0.00 1.56 9.24 5.16 11.04 12.00 20.78 16.03 12.91 13.03 10.44 10.99 12.55 13 0.00 10.80 6.48 12.60 11.52 21.67 17.11 13.99 14.04 11.52 12.07 13.56 14 0.00 5.76 4.08 6.72 8.40 10.39 7.27 7.39 4.80 5.35 6.91 15 0.00 5.88 6.36 10.20 11.71 7.75 9.43 5.28 5.83 7.39 16 0.00 3.84 4.32 5.83 6.55 6.67 4.08 4.63 6.19 17 0.00 8.16 6.36 5.28 6.36 1.92 2.47 5.88 18 0.00 3.48 6.60 7.68 9.07 8.52 7.20 19 0.00 3.12 4.20 5.59 5.04 3.72 20 0.00 1.08 2.47 1.92 0.60 21 0.00 2.59 2.04 0.48 22 0.00 0.55 2.11 23 0.00 1.56 24 0.00
Data
No Nama Tempat Permintaan (crate) bongkar-muat Waktu
(menit)
0 PT. NIC
1 HARI-HARI BEKASI TRADE CENTRE 17 38
2 MITRA WISMA ASRI 3 7
3 LION SUPERINDO BOROBUDUR BEKAS 7 34
4 PT.CONTIMAS UTAMA IND. (BLUE MALL) 17 69
5 CARREFOUR BEKASI SQUARE 8 91
6 HERO KEMANG PRATAMA 12 37
7 GIANT HYPERMARKET BEKASI 19 28
8 LION SUPERINDO METROPOLITAN MALL 17 41
9 MAKRO BEKASI 2 2 32
10 HARI-HARI BEKASI CYBER PARK 19 15
11 CV. NAGA SWALAYAN (Pondok Ungu) 37 69
12 GIANT UJUNG MENTENG 16 42
13 CARREFOUR CAKUNG 12 54
14 LION SUPERINDO KALIMALANG BEKASI 22 21
15 GIANT PONDOK KOPI SPM 15 18
16 GIANT JATI BENING 9 47
17 STAR MART PERSADA GOLF 4 8
18 TIP-TOP PONDOK GEDE 11 60
19 GIANT PONDOK GEDE 18 35
20 CV. NAGA SWALAYAN (Jatiwaringin) 18 20
21 TIP-TOP PONDOK BAMBU 37 81
22 GIANT KALIMALANG 18 58
23 SUPER INDO PONDOK BAMBU 25 66
Lampiran 7 Input
Berupa file .dat yang berisi sebagai berikut: 24 5 200 1 0 540 -13.6310 8.6950 1 17 0 540 38 -7.0298 2.2886 2 3 0 540 7 -6.6594 -4.2273 3 7 0 540 34 -6.6025 0.1463 4 17 0 540 69 -5.1493 1.6448 5 8 0 540 91 -4.5309 -1.3859 6 12 0 540 37 -3.5825 1.8177 7 19 0 540 28 -3.0148 0.1602 8 17 0 540 41 -3.1175 0.4612 9 2 0 540 32 -2.9581 0.8333 10 19 0 540 15 -1.3809 1.1434 11 37 0 540 69 -3.2144 -6.9702 12 16 0 540 42 -0.7663 -9.7032 13 12 0 540 54 -0.1513 -11.0930 14 22 0 540 21 -0.0748 0.4208 15 15 0 540 18 3.0291 -4.1345 16 9 0 540 47 4.1974 1.2394 17 4 0 540 8 6.1911 0.6274 18 11 0 540 60 5.6338 3.9049 19 18 0 540 35 9.3217 4.1036 20 18 0 540 20 7.0661 1.8967 21 37 0 540 81 6.8457 1.6644 22 18 0 540 58 6.2007 -1.1632 23 25 0 540 66 6.4034 -0.4744 24 18 0 540 73 6.9748 1.314
Proses
Source code yang digunakan sebagai berikut: #include <ildispat/dispatch.h> #include <ildispat/rplan.h> #if defined(ILUSESTL) #include <iostream> #include <fstream> #include <string> #else #include <iostream.h> #include <fstream.h> #include <string.h> #endif ILCSTLBEGIN
void Info(IlcManager m, IlcRoutingPlan plan, char * problem) { //////////////////////////////////////////////////////// // informasi aja //////////////////////////////////////////////////////// m.printInformation(); plan.printInformation(); m.out() << "===============" << endl
<< "Problem name : " << problem << endl // nama permasalahan
<< "Cost : " <<plan.getTotalCost()+1000*plan.getNbOfVehiclesUsed()<< endl //biaya total
<< "Number of vehicles used : "<< plan.getNbOfVehiclesUsed() << endl// kendaraan yang digunakan
<< "Solution : " << endl //gambaran solusi yang dihasilkan << plan << endl;
}
int main(int argc, char* argv[]) { IlcManager m(IlcEdit); #if defined(ILCLOGFILE) m.openLogFile("vrp.log"); #endif
IlcRoutingPlan plan(m); // definisikan permasalahan yang dihadapi IlcDimension2 time(plan, IlcEuclidean, "Time");
IlcDimension1 weight(plan, "Weight"); // definisikan kapasitas yang dibawa kendaraan IlcDimension2 length(plan, IlcEuclidean, "Length");
////////////////////////////////////////////////////////////////// // membaca data dari file vrp20_1_1_1.dat ////////////////////////////////////////////////////////////////// ifstream infile;
char * problem;
if (argc >=2) problem = argv[1];
else problem = (char *) "E:/ta/prognya/code/coba/vrp/cost on vehicle/vrp20_1_1_1.dat"; infile.open(problem);
if (!infile) {
m.out() << "File not found or not specified: " << problem << endl; #if defined(ILCLOGFILE) m.closeLogFile(); #endif m.end(); return 0; }
IlcInt nbOfVisits, nbOfTrucks; infile >> nbOfVisits >> nbOfTrucks;
IlcFloat capacity; infile >> capacity;
IlcFloat openTime, closeTime; infile >> openTime >> closeTime; IlcFloat depotX, depotY ;
infile >> depotX >> depotY; IlcNode depot(plan, depotX, depotY); for (IlcInt j = 0; j < nbOfTrucks; j++) {
IlcVisit first(depot, "Depot"); // dimulai dari depot
m.add(first.getCumulVar(time) >= openTime); // definisikan waktu buka IlcVisit last(depot, "Depot"); // diakhiri di depot
m.add(last.getCumulVar(time) <= closeTime); // definisikan waktu tutup char name[16];
sprintf(name, "Vehicle %d\0", j); // kendaraan yang melakukan pengiriman IlcVehicle vehicle(plan, first, last, name);
vehicle.setCapacity(weight, capacity); // kendala kapasitas kendaraan vehicle.setSpeed(length, 1);
}
for (IlcInt i = 0; i < nbOfVisits; i++) { IlcInt id; // visit identifier??
IlcFloat x, y, quantity, minTime, maxTime, dropTime;
infile >> id >> quantity >> minTime >> maxTime >> dropTime >> x >> y; IlcNode customer(plan, x, y);
char name[16]; sprintf(name, "%d\0", id); IlcVisit visit(customer, name);
visit.setDelay(time, dropTime); //kendala waktu bongkar-muat visit.setQuantity(weight, quantity);// kendala yang dibawa kendaraan ///////////////////////////////////////////////
// kendala waktu pelayanan (time window) ///////////////////////////////////////////////
ILCSETWINDOW(visit.getCumulVar(time), minTime <= var && var <= maxTime); }
infile.close();
/////////////////////////////////////////////////////////////////////////
// mencari solusi dengan menggunakan metode nearest addition heuristic /////////////////////////////////////////////////////////////////////////
IlcGoal generateGoal = IlcNearestAdditionGenerate(m, plan); m.add(generateGoal);
if (!m.nextSolution()) {
m.out() << "Not enough vehicles to generate first solution" << endl; #if defined(ILCLOGFILE) m.closeLogFile(); #endif m.end(); return 0; } else { m.restart(); m.remove(generateGoal); //////////////////////////////////////////////////////////////////////////////////
//memperbaiki solusi yang didapat dengan twoOP,orOpt,Relocate,Exchange,dan Cross ////////////////////////////////////////////////////////////////////////////////// plan.improve(5, IlcTwoOpt(plan), IlcOrOpt(plan), IlcRelocate(plan), IlcExchange(plan),
}
Info(m, plan, problem); #if defined(ILCLOGFILE) m.closeLogFile(); #endif m.end(); return 0; }
Lampiran 9 Output
Problem name: cost: 3136.39
Number of vehicles used: 3 Solution:
Unperform visits: None Vehicle 0:
Depot Weight [0..166] Time [0..401.784] Length [0..1.#INF]
1 Weight [0..166] Time [9.19879..419.983] Length [9.19879..1.#INF] 4 Weight [17..183] Time [49.1864..459.971] Length [11.1864..1.#INF] Depot Weight [34..200] Time [129.216..540] Length [22.2157..1.#INF] Vehicle 1:
Depot Weight [0..47] Time [0..2.07651] Length [0..1.#INF]
3 Weight [0..47] Time [11.0671..13.1436] Length [11.0671..1.#INF] 5 Weight [7..54] Time [47.6437..49.7202] Length [13.6437..1.#INF] 2 Weight [15..62] Time [142.194..144.27] Length [17.194..1.#INF] 11 Weight [18..65] Time [153.598..155.674] Length [21.5975..1.#INF] 12 Weight [55..102] Time [226.267..228.343] Length [25.2667..1.#INF] 13 Weight [71..118] Time [269.786..271.863] Length [26.7864..1.#INF] 15 Weight [83..130] Time [331.437..333.514] Length [34.4373..1.#INF] 22 Weight [98..145] Time [353.783..355.860] Length [38.7833..1.#INF] 23 Weight [116..163] Time [412.501..414.578] Length [39.5013..1.#INF] 6 Weight [141..188] Time [488.747..490.823] Length [49.7469..1.#INF] Depot Weight[153..200] Time [537.923..540] Length [61.9235..1.#INF] Vehicle 2:
Depot Weight [0..6] Time [0..26.7505] Length [0..1.#INF]
09 Weight [0..6] Time [13.2558..40.0063] Length [13.2558..1.#INF] 08 Weight [2..8] Time [45.6606..72.4111] Length [13.6606..1.#INF] 07 Weight [19..25] Time [86.9787..113.729] Length [13.9787..1.#INF] 10 Weight [38..44] Time [116.886..143.636] Length [15.8856..1.#INF] 14 Weight [57.. 63] Time[133.378..160.129] Length [17.3783..1.#INF] 16 Weight [79..85] Time [158.728..185.479] Length [21.7282..1.#INF] 17 Weight [88..94] Time [207.814..234.564] Length [23.8137..1.#INF] 24 Weight [92..98] Time [216.856..243.606] Length [24.8556..1.#INF] 21 Weight [110..116] Time [290.229..316.979] Length [25.229..1.#INF] 20 Weight [147..153] Time [371.549..398.300] Length [25.5493..1.#INF] 19 Weight [165..171] Time [394.705..421.455] Length [28.7049..1.#INF] 18 Weight [183..189] Time [433.398..460.149] Length [32.3982..1.#INF] Depot Weight[194..200] Time [513.250..540] Length [52.2495..1.#INF]
Lampiran 10
Contoh dari metode multidimensional scaling (MDS): Input:
D =
X Atl Chi Den Hou LA Mia NYC SF Sea WDC
Atl 0 587 1212 701 1936 604 748 2139 2182 543 Chi 587 0 920 940 1745 1188 713 1858 1737 597 Den 1212 920 0 879 831 1726 1631 949 1021 1494 Hou 701 940 879 0 1374 968 1420 1645 1891 1220 LA 1936 1745 831 1374 0 2339 2451 347 959 2300 Mia 604 1188 1726 968 2339 0 1092 2594 2734 923 NYC 748 713 1631 1420 2451 1092 0 2571 2408 205 SF 2139 1858 949 1645 347 2594 2571 0 678 2442 Sea 2182 1737 1021 1891 959 2734 2408 678 0 2329 WDC 543 597 1494 1220 2300 923 205 2442 2329 0
Matriks jarak antara 10 kota di Amerika Serikat Ouput yang dihasilkan:
Output Multidimensional Scaling (MATLAB, 2004)