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
2657ed18
Commit
2657ed18
authored
Aug 07, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction for better calculation of what is to be processed
parent
72c1fba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dream/simulation/CapacityStationController.py
dream/simulation/CapacityStationController.py
+5
-2
No files found.
dream/simulation/CapacityStationController.py
View file @
2657ed18
...
@@ -222,12 +222,15 @@ class CapacityStationController(EventGenerator):
...
@@ -222,12 +222,15 @@ class CapacityStationController(EventGenerator):
allCapacityConsumed
=
False
allCapacityConsumed
=
False
# 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
if
totalRequestedCapacity
<
totalAvailableCapacity
:
if
totalRequestedCapacity
<
=
totalAvailableCapacity
:
for
entity
in
entitiesWithinThreshold
:
for
entity
in
entitiesWithinThreshold
:
if
self
.
checkIfProjectCanStartInStation
(
entity
.
capacityProject
,
station
)
and
\
if
self
.
checkIfProjectCanStartInStation
(
entity
.
capacityProject
,
station
)
and
\
(
not
self
.
checkIfProjectNeedsToBeAssembled
(
entity
.
capacityProject
,
buffer
)):
(
not
self
.
checkIfProjectNeedsToBeAssembled
(
entity
.
capacityProject
,
buffer
)):
entity
.
shouldMove
=
True
entity
.
shouldMove
=
True
# check if all the capacity is consumed to update the flag
if
totalRequestedCapacity
==
totalAvailableCapacity
:
allCapacityConsumed
=
True
# else calculate the capacity for every entity and create the entities
# else calculate the capacity for every entity and create the entities
else
:
else
:
allCapacityConsumed
=
True
allCapacityConsumed
=
True
...
...
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