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
83aef483
Commit
83aef483
authored
Nov 07, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections in CapacityStationController
parent
447ec2ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
22 deletions
+27
-22
dream/simulation/applications/CapacityStations/CapacityStationController.py
...pplications/CapacityStations/CapacityStationController.py
+27
-22
No files found.
dream/simulation/applications/CapacityStations/CapacityStationController.py
View file @
83aef483
...
...
@@ -373,8 +373,8 @@ class CapacityStationController(EventGenerator):
# else break the entity according to rule
else
:
self
.
breakEntity
(
entity
,
entityBuffer
,
entityStation
,
totalAvailableCapacity
,
totalRequestedCapacity
)
if
self
.
breakEntity
(
entity
,
entityBuffer
,
entityStation
,
totalAvailableCapacity
,
totalRequestedCapacity
)
:
# reduce the available space if there is need to
if
entityBuffer
.
requireFullProject
and
\
(
not
self
.
checkIfProjectConsumesAssemblySpace
(
entity
,
entityBuffer
)):
...
...
@@ -386,6 +386,10 @@ class CapacityStationController(EventGenerator):
# calculate what is the capacity that should proceed and what that should remain
capacityToMove
=
totalAvailableCapacity
*
(
entity
.
requiredCapacity
)
/
float
(
totalRequestedCapacity
)
capacityToStay
=
entity
.
requiredCapacity
-
capacityToMove
# if capacityToMove is equal to 0 no need to break. Return false.
if
capacityToMove
==
0
:
return
False
else
:
# remove the capacity entity by the buffer so that the broken ones are created
buffer
.
getActiveObjectQueue
().
remove
(
entity
)
entityToMoveName
=
entity
.
capacityProjectId
+
'_'
+
station
.
objName
+
'_'
+
str
(
capacityToMove
)
...
...
@@ -399,6 +403,7 @@ class CapacityStationController(EventGenerator):
entityToStay
.
currentStation
=
buffer
import
dream.simulation.Globals
as
Globals
Globals
.
setWIP
([
entityToMove
,
entityToStay
])
#set the new components as wip
return
True
# merges the capacity entities if they belong to the same project
def
mergeEntities
(
self
):
...
...
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