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
4239ba05
Commit
4239ba05
authored
Jun 13, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CapacityStationController: use same keys than job shop for output schedule
parent
b9843a8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
26 deletions
+20
-26
dream/simulation/CapacityStationController.py
dream/simulation/CapacityStationController.py
+8
-5
dream/tests/dump/Topology76.json.result
dream/tests/dump/Topology76.json.result
+12
-21
No files found.
dream/simulation/CapacityStationController.py
View file @
4239ba05
...
...
@@ -74,8 +74,8 @@ class CapacityStationController(EventGenerator):
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
if
entry
[
'station
Id
'
]
==
station
.
id
:
entry
[
'
exitTime
'
]
=
self
.
env
.
now
# lock the exit again
exit
.
isLocked
=
True
...
...
@@ -124,7 +124,10 @@ class CapacityStationController(EventGenerator):
'allocation'
:
entity
.
requiredCapacity
})
capacityAllocated
+=
entity
.
requiredCapacity
if
self
.
checkIfProjectJustStartsInStation
(
project
,
station
):
project
.
projectSchedule
.
append
({
"station"
:
station
.
id
,
"start"
:
self
.
env
.
now
})
project
.
projectSchedule
.
append
({
"stationId"
:
station
.
id
,
"entranceTime"
:
self
.
env
.
now
})
# lock the station
station
.
isLocked
=
True
# calculate the utilization
...
...
@@ -250,7 +253,7 @@ class CapacityStationController(EventGenerator):
# checks if a project is just starting in station
def
checkIfProjectJustStartsInStation
(
self
,
project
,
station
):
for
entry
in
project
.
projectSchedule
:
if
entry
[
'station'
]
==
station
.
id
:
if
entry
[
'station
Id
'
]
==
station
.
id
:
return
False
return
True
\ No newline at end of file
dream/tests/dump/Topology76.json.result
View file @
4239ba05
...
...
@@ -9,15 +9,6 @@
"_class": "Dream.CapacityStationBuffer",
"id": "CB2"
},
{
"_class": "Dream.Exit",
"id": "CE1",
"results": {
"lifespan": 1.5,
"takt_time": 0.5,
"throughput": 4
}
},
{
"_class": "Dream.Exit",
"id": "CE2",
...
...
@@ -135,14 +126,14 @@
"results": {
"schedule": [
{
"
finish": 2
.0,
"
start": 0
.0,
"station": "CS1"
"
entranceTime": 0
.0,
"
exitTime": 2
.0,
"station
Id
": "CS1"
},
{
"
finish": 3
.0,
"
start": 1
.0,
"station": "CS2"
"
entranceTime": 1
.0,
"
exitTime": 3
.0,
"station
Id
": "CS2"
}
]
}
...
...
@@ -153,14 +144,14 @@
"results": {
"schedule": [
{
"
finish": 2
.0,
"
start": 0
.0,
"station": "CS1"
"
entranceTime": 0
.0,
"
exitTime": 2
.0,
"station
Id
": "CS1"
},
{
"
finish": 3
.0,
"
start": 1
.0,
"station": "CS2"
"
entranceTime": 1
.0,
"
exitTime": 3
.0,
"station
Id
": "CS2"
}
]
}
...
...
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