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
24bfa80b
Commit
24bfa80b
authored
Nov 11, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction in CapacityStationController
parent
7fb06de1
Changes
1
Hide 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 @
24bfa80b
...
@@ -257,7 +257,6 @@ class CapacityStationController(EventGenerator):
...
@@ -257,7 +257,6 @@ class CapacityStationController(EventGenerator):
# list to keep entities that have not been already allocated
# list to keep entities that have not been already allocated
entitiesNotAllocated
=
list
(
entitiesConsidered
)
entitiesNotAllocated
=
list
(
entitiesConsidered
)
allCapacityConsumed
=
False
allCapacityConsumed
=
False
# if there is no available capacity no need to do anything
# if there is no available capacity no need to do anything
if
totalAvailableCapacity
==
0
:
if
totalAvailableCapacity
==
0
:
...
@@ -282,15 +281,17 @@ class CapacityStationController(EventGenerator):
...
@@ -282,15 +281,17 @@ class CapacityStationController(EventGenerator):
# calculate the total capacity that is requested
# calculate the total capacity that is requested
totalRequestedCapacity
=
0
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
:
for
entity
in
entitiesWithinThreshold
:
# get buffer where the entity is and the station it requests to get in
# get buffer where the entity is and the station it requests to get in
entityBuffer
=
entity
.
currentStation
entityBuffer
=
entity
.
currentStation
entityStation
=
entity
.
currentStation
.
next
[
0
]
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
\
if
self
.
checkIfProjectCanStartInStation
(
entity
.
capacityProject
,
entityStation
)
and
\
(
not
self
.
checkIfProjectNeedsToBeAssembled
(
entity
.
capacityProject
,
entityBuffer
))
\
(
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
totalRequestedCapacity
+=
entity
.
requiredCapacity
# if there is enough capacity for all the entities set them that they all should move
# 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