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
2222a11b
Commit
2222a11b
authored
Jun 11, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Jun 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments added
parent
03b05cba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dream/simulation/CapacityStationController.py
dream/simulation/CapacityStationController.py
+5
-1
No files found.
dream/simulation/CapacityStationController.py
View file @
2222a11b
...
...
@@ -72,6 +72,7 @@ class CapacityStationController(EventGenerator):
exit
.
currentlyObtainedEntities
.
append
(
entity
)
station
.
entityRemoved
=
self
.
env
.
event
()
project
=
entity
.
capacityProject
# output the finish time of the project. This will updated every time, so in the end it should be correct
for
entry
in
project
.
projectSchedule
:
if
entry
[
'station'
]
==
station
.
id
:
entry
[
'finish'
]
=
self
.
env
.
now
...
...
@@ -115,7 +116,8 @@ class CapacityStationController(EventGenerator):
yield
buffer
.
entityRemoved
buffer
.
entityRemoved
=
self
.
env
.
event
()
project
=
entity
.
capacityProject
periodDict
[
project
.
id
]
=
entity
.
requiredCapacity
periodDict
[
project
.
id
]
=
entity
.
requiredCapacity
# dict to be appended in the utilization list
# append the move in the detailedWorkPlan of the station
station
.
detailedWorkPlan
.
append
({
'time'
:
self
.
env
.
now
,
'operation'
:
station
.
id
,
'project'
:
project
.
id
,
...
...
@@ -125,7 +127,9 @@ class CapacityStationController(EventGenerator):
project
.
projectSchedule
.
append
({
"station"
:
station
.
id
,
"start"
:
self
.
env
.
now
})
# lock the station
station
.
isLocked
=
True
# calculate the utilization
periodDict
[
'utilization'
]
=
capacityAllocated
/
float
(
capacityAvailable
)
# update the utilisationDict of the station
station
.
utilisationDict
.
append
(
periodDict
)
# for every station update the remaining interval capacity so that it is ready for next loop
...
...
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