Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
39743610
Commit
39743610
authored
Feb 17, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jobshop: really use dueDate information
parent
9e5224dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
dream/simulation/GUI/ACO.py
dream/simulation/GUI/ACO.py
+1
-1
dream/simulation/GUI/JobShop.py
dream/simulation/GUI/JobShop.py
+7
-6
No files found.
dream/simulation/GUI/ACO.py
View file @
39743610
...
...
@@ -47,7 +47,7 @@ class Simulation(DefaultSimulation):
if
elementClass
==
'Dream.Job'
:
results
=
element
[
'results'
]
delay
=
float
(
results
.
get
(
'delay'
,
"0"
))
totalDelay
+=
delay
totalDelay
+=
delay
return
totalDelay
...
...
dream/simulation/GUI/JobShop.py
View file @
39743610
...
...
@@ -3,6 +3,7 @@ import json
import
time
import
random
import
operator
from
datetime
import
datetime
from
dream.simulation.GUI
import
ACO
from
dream.simulation.GUI.Default
import
schema
...
...
@@ -38,11 +39,16 @@ class Simulation(ACO.Simulation):
""" Set the WIP in queue from spreadsheet data.
"""
data
=
copy
(
in_data
)
# XXX have now a global option ?
now
=
datetime
.
now
()
if
'wip_spreadsheet'
in
data
:
wip_dict
=
{}
for
value_list
in
data
[
'wip_spreadsheet'
]:
if
value_list
[
1
]
==
'ID'
or
not
value_list
[
1
]:
continue
dueDate
=
(
datetime
.
strptime
(
value_list
[
3
],
'%Y/%m/%d'
)
-
now
).
days
sequence_list
=
value_list
[
6
].
split
(
'-'
)
processing_time_list
=
value_list
[
7
].
split
(
'-'
)
wip_dict
.
setdefault
(
sequence_list
[
0
],
[]).
append
(
...
...
@@ -50,12 +56,7 @@ class Simulation(ACO.Simulation):
"_class"
:
"Dream.Job"
,
"id"
:
value_list
[
1
],
"name"
:
value_list
[
0
],
"order_date"
:
value_list
[
2
],
"due_date"
:
value_list
[
3
],
# TODO: calculate due date properly (based on simulation date ?)
"dueDate"
:
1
,
"priority"
:
value_list
[
4
],
"material"
:
value_list
[
5
],
"dueDate"
:
dueDate
,
"route"
:
[
{
"processingTime"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment