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
c73b4d3d
Commit
c73b4d3d
authored
Nov 05, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
capacityStations to be able to assemble projects partly
parent
02ea57ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
dream/simulation/applications/CapacityStations/CapacityStationBuffer.py
...on/applications/CapacityStations/CapacityStationBuffer.py
+2
-1
dream/simulation/applications/CapacityStations/CapacityStationController.py
...pplications/CapacityStations/CapacityStationController.py
+14
-0
No files found.
dream/simulation/applications/CapacityStations/CapacityStationBuffer.py
View file @
c73b4d3d
...
...
@@ -36,12 +36,13 @@ class CapacityStationBuffer(Queue):
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def
__init__
(
self
,
id
,
name
,
requireFullProject
=
False
,
capacity
=
float
(
"inf"
),
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
,
**
kw
):
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
,
notRequiredOperations
=
[],
**
kw
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
self
.
isLocked
=
True
self
.
requireFullProject
=
requireFullProject
# flag that shows if here the whole project is assembled
from
dream.simulation.Globals
import
G
G
.
CapacityStationBufferList
.
append
(
self
)
self
.
notRequiredOperations
=
notRequiredOperations
def
initialize
(
self
):
Queue
.
initialize
(
self
)
...
...
dream/simulation/applications/CapacityStations/CapacityStationController.py
View file @
c73b4d3d
...
...
@@ -460,11 +460,25 @@ class CapacityStationController(EventGenerator):
# checks if the given project is all in the buffer
def
checkIfProjectAssembledInBuffer
(
self
,
project
,
buffer
):
import
dream.simulation.Globals
as
Globals
# find the ids that are in the notRequiredOperations
notRequiredList
=
[]
if
buffer
.
notRequiredOperations
:
for
id
in
buffer
.
notRequiredOperations
:
station
=
Globals
.
findObjectById
(
id
)
notRequiredList
.
append
(
station
.
id
)
bufferId
=
station
.
previous
[
0
].
id
notRequiredList
.
append
(
bufferId
)
exitId
=
station
.
next
[
0
].
id
notRequiredList
.
append
(
exitId
)
# loop through all the stations of the system
for
object
in
G
.
CapacityStationList
+
G
.
CapacityStationBufferList
+
G
.
CapacityStationExitList
:
# skip the given buffer
if
object
is
buffer
:
continue
# skip not required operations
if
object
.
id
in
notRequiredList
:
continue
# if there is one entity from the same project which we check somewhere else return false
for
entity
in
object
.
getActiveObjectQueue
():
if
entity
.
capacityProject
==
project
:
...
...
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