@@ -17,7 +17,7 @@ def read_data():
1717
1818 # Pembacaan data mesin dari file dan exception handling
1919 try :
20- mesin_file = open (f"test /Mesin.txt" , "r" )
20+ mesin_file = open (f"test2 /Mesin.txt" , "r" )
2121 except :
2222 print (f"File Mesin.txt tidak ditemukan!" )
2323 exit ()
@@ -40,7 +40,7 @@ def read_data():
4040 for j in range (n_jobs ):
4141 # Exception handling
4242 try :
43- time_file = open (f"test /Job{ j + 1 } _Time.txt" , "r" )
43+ time_file = open (f"test2 /Job{ j + 1 } _Time.txt" , "r" )
4444 except :
4545 print (f"File Job{ j + 1 } _Time.txt tidak ditemukan!" )
4646 exit ()
@@ -58,7 +58,7 @@ def read_data():
5858
5959 # Exception handling
6060 try :
61- routing_file = open (f"test /Job{ j + 1 } _Routing.txt" , "r" )
61+ routing_file = open (f"test2 /Job{ j + 1 } _Routing.txt" , "r" )
6262 except :
6363 print (f"File Job{ j + 1 } _Routing.txt tidak ditemukan!" )
6464 exit ()
@@ -118,7 +118,7 @@ def state_check():
118118 # Kalau tidak, kembalikan saja nilai st dari cj tersebut dalam sebuah list
119119 else :
120120 retval = [ST [CJ .index (min_c )]]
121-
121+
122122 # d. Melakukan indexing terhadap jadwal yang ada dan telah selesai
123123 for value in retval :
124124 i = ST .index (value )
@@ -161,7 +161,7 @@ def state_check():
161161 if i in index_job :
162162 ready_time = MESIN [0 ][ST [i ][2 ] - 1 ]
163163 recent_rjx = RJ [i ]
164- if COPY_OF_ST [i ][1 ] != len (COPY_OF_ST [0 ]):
164+ if COPY_OF_ST [i ][1 ] != len (ROUTING [ COPY_OF_ST [i ][ 0 ] - 1 ]):
165165 if ready_time > recent_rjx :
166166 COPY_OF_CJ [i ] = ready_time
167167 else :
@@ -180,14 +180,14 @@ def state_check():
180180 if (len (CJ ) < len (COPY_OF_CJ )):
181181 for i in range (len (COPY_OF_CJ ) - 1 , - 1 , - 1 ):
182182 # Proses penyesuaian dengan cj yang sudah baru dengan menghapus
183- if i in index_job and COPY_OF_ST [i ][1 ] == len (COPY_OF_ST [0 ]):
183+ if i in index_job and COPY_OF_ST [i ][1 ] == len (ROUTING [ COPY_OF_ST [i ][ 0 ] - 1 ]):
184184 COPY_OF_CJ .pop (i )
185185 else :
186186 continue
187187
188188 # Penyalinan kembali nilai cj yang telah diperbaharui
189189 CJ = COPY_OF_CJ
190-
190+
191191 # j. Pembaharuan terhadap nilai rj
192192 RJ = [0 for i in range (len (ST ))]
193193 for i in range (len (ST )):
0 commit comments