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
20c3ed3c
Commit
20c3ed3c
authored
Nov 11, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction in CapacityStationController
parent
e6b26cf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
dream/simulation/applications/CapacityStations/CapacityStationController.py
...pplications/CapacityStations/CapacityStationController.py
+5
-4
No files found.
dream/simulation/applications/CapacityStations/CapacityStationController.py
View file @
20c3ed3c
...
...
@@ -257,7 +257,6 @@ class CapacityStationController(EventGenerator):
# list to keep entities that have not been already allocated
entitiesNotAllocated
=
list
(
entitiesConsidered
)
allCapacityConsumed
=
False
# if there is no available capacity no need to do anything
if
totalAvailableCapacity
==
0
:
...
...
@@ -282,15 +281,17 @@ class CapacityStationController(EventGenerator):
# calculate the total capacity that is requested
totalRequestedCapacity
=
0
# do not to count projects that cannot move due to space limitations
# so check according to considered capacity
consideredSpace
=
float
(
availableSpace
)
for
entity
in
entitiesWithinThreshold
:
# get buffer where the entity is and the station it requests to get in
entityBuffer
=
entity
.
currentStation
entityStation
=
entity
.
currentStation
.
next
[
0
]
# entities that cannot start (due to space, need for assembly or earliest start)
# do not request for capacity
if
self
.
checkIfProjectCanStartInStation
(
entity
.
capacityProject
,
entityStation
)
and
\
(
not
self
.
checkIfProjectNeedsToBeAssembled
(
entity
.
capacityProject
,
entityBuffer
))
\
and
self
.
checkIfThereIsEnoughSpace
(
entity
,
entityBuffer
,
availableSpace
):
and
self
.
checkIfThereIsEnoughSpace
(
entity
,
entityBuffer
,
consideredSpace
):
consideredSpace
-=
entity
.
capacityProject
.
assemblySpaceRequirement
totalRequestedCapacity
+=
entity
.
requiredCapacity
# if there is enough capacity for all the entities set them that they all should move
...
...
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