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
96febac7
Commit
96febac7
authored
Jun 16, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Capacity Project: only set the wip in the proper buffer.
The same WIP was set in all buffers
parent
30540540
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
dream/simulation/GUI/CapacityProject.py
dream/simulation/GUI/CapacityProject.py
+18
-8
No files found.
dream/simulation/GUI/CapacityProject.py
View file @
96febac7
...
...
@@ -65,6 +65,13 @@ class Simulation(DefaultSimulation):
required_capacity_by_project
[
project_id
][
capacity_station
]
=
\
float
(
requirement_sequence
.
split
(
'-'
)[
idx
])
# a mapping project id -> first station
first_station_by_project
=
dict
()
for
project_id
,
station_sequence
,
requirement_sequence
\
in
data
[
'capacity_by_project_spreadsheet'
][
1
:]:
if
station_sequence
:
first_station_by_project
[
project_id
]
=
station_sequence
.
split
(
'-'
)[
0
]
# implicitly add a Queue for wip
assert
'Qstart'
not
in
new_data
[
'nodes'
],
"reserved ID used"
wip
=
[]
...
...
@@ -107,15 +114,18 @@ class Simulation(DefaultSimulation):
del
new_data
[
'edges'
][
edge_id
]
wip
=
[]
# set as wip all projects that have to be processed in this station
# firts
for
project
,
requirement_dict
in
required_capacity_by_project
.
items
():
requirement
=
requirement_dict
[
'%s_Station'
%
node_id
]
name
=
'%s_%s_%s'
%
(
project
,
node_id
,
requirement
)
wip
.
append
(
dict
(
_class
=
'Dream.CapacityEntity'
,
id
=
name
,
name
=
name
,
capacityProjectId
=
project
,
requiredCapacity
=
requirement
))
if
first_station_by_project
[
project
]
==
node_id
:
requirement
=
requirement_dict
[
'%s_Station'
%
node_id
]
name
=
'%s_%s_%s'
%
(
project
,
node_id
,
requirement
)
wip
.
append
(
dict
(
_class
=
'Dream.CapacityEntity'
,
id
=
name
,
name
=
name
,
capacityProjectId
=
project
,
requiredCapacity
=
requirement
))
new_data
[
'nodes'
][
"%s_Buffer"
%
node_id
]
=
dict
(
_class
=
'Dream.CapacityStationBuffer'
,
...
...
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