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
8d3ac65d
Commit
8d3ac65d
authored
Nov 05, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup in code
parent
9dfe7b06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
dream/simulation/applications/CapacityStations/CapacityStationBuffer.py
...on/applications/CapacityStations/CapacityStationBuffer.py
+14
-1
dream/simulation/applications/CapacityStations/CapacityStationController.py
...pplications/CapacityStations/CapacityStationController.py
+1
-13
No files found.
dream/simulation/applications/CapacityStations/CapacityStationBuffer.py
View file @
8d3ac65d
...
...
@@ -42,10 +42,23 @@ class CapacityStationBuffer(Queue):
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
self
.
notRequiredOperations
=
notRequiredOperations
# operations that are not required to be assembled
def
initialize
(
self
):
Queue
.
initialize
(
self
)
import
dream.simulation.Globals
as
Globals
# identify the notRequiredOperations
# input gives only stationId, buffer and exit should be identified
notRequiredOperations
=
[]
for
id
in
self
.
notRequiredOperations
:
station
=
Globals
.
findObjectById
(
id
)
notRequiredOperations
.
append
(
station
.
id
)
bufferId
=
station
.
previous
[
0
].
id
notRequiredOperations
.
append
(
bufferId
)
exitId
=
station
.
next
[
0
].
id
notRequiredOperations
.
append
(
exitId
)
self
.
notRequiredOperations
=
notRequiredOperations
self
.
isLocked
=
True
def
canAccept
(
self
,
callerObject
=
None
):
...
...
dream/simulation/applications/CapacityStations/CapacityStationController.py
View file @
8d3ac65d
...
...
@@ -460,24 +460,12 @@ 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
:
if
object
.
id
in
buffer
.
notRequiredOperations
:
continue
# if there is one entity from the same project which we check somewhere else return false
for
entity
in
object
.
getActiveObjectQueue
():
...
...
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