File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [
7+ {
8+ "name" : " Python: Current File" ,
9+ "type" : " python" ,
10+ "request" : " launch" ,
11+ "program" : " ${file}" ,
12+ "console" : " integratedTerminal" ,
13+ "justMyCode" : true
14+ }
15+ ]
16+ }
Original file line number Diff line number Diff line change @@ -244,16 +244,20 @@ def Ejn(self, sequence):
244244 def Emax (self , sequence ):
245245 return max (self .Lj (sequence ))
246246
247- # flowtime of all jobs in a solution
247+ # flowtime (Cj - rj) of all jobs in a solution
248248 def Fj (self , solution ):
249- ct , job_order = self .ct (solution )
250- Cj = [max ([ct [i ][j ] for i in range (len (ct ))]) for j in range (len (job_order ))]
251- return [Cj [j ] - min ([ct [i ][j ] - self .pt [i ][job_order [j ]] for i in range (len (ct ))]) for j in range (len (job_order ))]
252-
249+ ct , job_order = self .ct (solution )
250+ return [max ([ct [i ][j ] for i in range (len (ct ))]) - self .r [job_order [j ]] for j in range (len (job_order ))]
253251
254- # flowtime of all jobs according to a solution (natural order of the jobs)
252+ # flowtime (Cj - rj) of all jobs according to a solution (natural order of the jobs)
255253 def Fjn (self , solution ):
256- return [self .Cjn (solution )[j ] - self .Sjn (solution )[j ] for j in range (self .jobs )]
254+ ct , order = self .ct (solution )
255+ cj = [max ([ct [i ][j ] for i in range (len (ct ))]) for j in range (len (order ))]
256+ fjn = [float ('nan' ) for j in range (self .jobs )]
257+ for j in range (len (order )):
258+ fjn [order [j ]] = cj [j ] - self .r [j ]
259+
260+ return fjn
257261
258262
259263 # max flowtime
Original file line number Diff line number Diff line change 11Metadata-Version: 2.1
22Name: scheptk
3- Version: 0.0.8
3+ Version: 0.0.9
44Summary: Python scheduling package
55Home-page: https://github.com/framinan/scheptk
66Author: Jose M Framinan
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ def Ejn(self, sequence):
242242
243243 # max earliness
244244 def Emax (self , sequence ):
245- return max (self .Lj (sequence ))
245+ return max (self .Ej (sequence ))
246246
247247 # flowtime (Cj - rj) of all jobs in a solution
248248 def Fj (self , solution ):
Original file line number Diff line number Diff line change 1111
1212setup (
1313 name = "scheptk" ,
14- version = "0.0.8 " ,
14+ version = "0.0.9 " ,
1515 author = "Jose M Framinan" ,
1616 author_email = "framinan@us.es" ,
1717 description = "Python scheduling package" ,
You can’t perform that action at this time.
0 commit comments