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
1f4e19c9
Commit
1f4e19c9
authored
Jun 22, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prints removed
parent
5daca64b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
dream/simulation/applications/CapacityStations/CapacityStationController.py
...pplications/CapacityStations/CapacityStationController.py
+1
-16
No files found.
dream/simulation/applications/CapacityStations/CapacityStationController.py
View file @
1f4e19c9
...
...
@@ -231,11 +231,6 @@ class CapacityStationController(EventGenerator):
# loop through the capacity station buffers
for
buffer
in
G
.
CapacityStationBufferList
:
pr
=
False
if
self
.
env
.
now
==
21.0
:
if
buffer
.
id
==
'ASBTST_B'
:
pass
print
'FOUND'
pr
=
True
# if the buffer was considered before (due to shared resources) continue
if
buffer
in
alreadyConsideredBuffers
:
continue
...
...
@@ -302,9 +297,6 @@ class CapacityStationController(EventGenerator):
# get buffer where the entity is and the station it requests to get in
entityBuffer
=
entity
.
currentStation
entityStation
=
entity
.
currentStation
.
next
[
0
]
if
pr
:
print
'----->checking'
,
entity
.
capacityProject
.
id
print
self
.
checkIfThereIsEnoughSpace
(
entity
,
entityBuffer
,
consideredSpace
)
if
self
.
checkIfProjectCanStartInStation
(
entity
.
capacityProject
,
entityStation
)
and
\
(
not
self
.
checkIfProjectNeedsToBeAssembled
(
entity
.
capacityProject
,
entityBuffer
))
\
...
...
@@ -312,8 +304,7 @@ class CapacityStationController(EventGenerator):
if
not
self
.
checkIfProjectConsumesAssemblySpace
(
entity
,
entityBuffer
):
consideredSpace
-=
entity
.
capacityProject
.
assemblySpaceRequirement
totalRequestedCapacity
+=
entity
.
requiredCapacity
if
pr
:
print
totalRequestedCapacity
# if there is enough capacity for all the entities set them that they all should move
if
totalRequestedCapacity
<=
totalAvailableCapacity
:
availableCapacity
=
float
(
totalAvailableCapacity
)
...
...
@@ -399,12 +390,6 @@ class CapacityStationController(EventGenerator):
totalRequestedCapacity
-=
entity
.
requiredCapacity
# else break the entity according to rule
else
:
if
pr
:
print
'breaking entity'
,
entity
.
capacityProject
.
id
print
totalAvailableCapacity
print
totalRequestedCapacity
print
entity
.
requiredCapacity
print
totalAvailableCapacity
*
(
entity
.
requiredCapacity
)
/
float
(
totalRequestedCapacity
)
if
self
.
breakEntity
(
entity
,
entityBuffer
,
entityStation
,
totalAvailableCapacity
,
totalRequestedCapacity
):
# reduce the available space if there is need to
...
...
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