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
9308c8d3
Commit
9308c8d3
authored
Sep 26, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
previous changes revoked for speed issues
parent
295f4a31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
16 deletions
+55
-16
dream/simulation/ConditionalBuffer.py
dream/simulation/ConditionalBuffer.py
+22
-0
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+16
-16
dream/simulation/ExitJobShop.py
dream/simulation/ExitJobShop.py
+17
-0
No files found.
dream/simulation/ConditionalBuffer.py
View file @
9308c8d3
...
...
@@ -67,6 +67,28 @@ class ConditionalBuffer(QueueJobShop):
return
activeObjectQueue
[
0
].
mayProceed
return
False
#===========================================================================
# getEntity method
# ass soon as the buffer receives an entity it controls if the entity is requested elsewhere,
# then it checks if there other requested entities by the same requesting entity.
# Finally, it is controlled whether all the requested parts have concluded
# their sequences for the requesting entity
#===========================================================================
def
getEntity
(
self
):
activeEntity
=
QueueJobShop
.
getEntity
(
self
)
from
Globals
import
G
# for all the entities in the EntityList
for
entity
in
G
.
EntityList
:
requiredParts
=
entity
.
getRequiredParts
()
if
requiredParts
:
# if the activeEntity is in the requierdParts of the entity
if
activeEntity
in
requiredParts
:
# if the entity that requires the activeEntity can proceed then signal the currentStation of the entity
if
entity
.
checkIfRequiredPartsReady
()
and
entity
.
currentStation
.
expectedSignals
[
'canDispose'
]:
entity
.
mayProceed
=
True
self
.
sendSignal
(
receiver
=
entity
.
currentStation
,
signal
=
entity
.
currentStation
.
canDispose
)
return
activeEntity
# =======================================================================
# sort the entities of the activeQ
# bring to the front the entities that have no requestedParts for the following step in their route
...
...
dream/simulation/CoreObject.py
View file @
9308c8d3
...
...
@@ -373,22 +373,22 @@ class CoreObject(ManPyObject):
self
.
updateNext
(
activeEntity
)
self
.
outputTrace
(
activeEntity
.
name
,
"got into "
+
self
.
objName
)
self
.
printTrace
(
activeEntity
.
name
,
enter
=
self
.
id
)
# if there are entities with requiredParts then check whether the requirements are fulfilled for them to proceed
# ass soon as a "buffer" receives an entity it controls if the entity is requested elsewhere,
# then it checks if there other requested entities by the same requesting entity.
# Finally, it is controlled whether all the requested parts have concluded
# their sequences for the requesting entity
from
Globals
import
G
# for all the entities in the EntityList
for
entity
in
G
.
EntityList
:
requiredParts
=
entity
.
getRequiredParts
()
if
requiredParts
:
# if the activeEntity is in the requierdParts of the entity
if
activeEntity
in
requiredParts
:
# if the entity that requires the activeEntity can proceed then signal the currentStation of the entity
if
entity
.
checkIfRequiredPartsReady
()
and
entity
.
currentStation
.
expectedSignals
[
'canDispose'
]:
entity
.
mayProceed
=
True
self
.
sendSignal
(
receiver
=
entity
.
currentStation
,
signal
=
entity
.
currentStation
.
canDispose
)
#
# if there are entities with requiredParts then check whether the requirements are fulfilled for them to proceed
#
# ass soon as a "buffer" receives an entity it controls if the entity is requested elsewhere,
#
# then it checks if there other requested entities by the same requesting entity.
#
# Finally, it is controlled whether all the requested parts have concluded
#
# their sequences for the requesting entity
#
from Globals import G
#
# for all the entities in the EntityList
#
for entity in G.EntityList:
#
requiredParts=entity.getRequiredParts()
#
if requiredParts:
#
# if the activeEntity is in the requierdParts of the entity
#
if activeEntity in requiredParts:
#
# if the entity that requires the activeEntity can proceed then signal the currentStation of the entity
#
if entity.checkIfRequiredPartsReady() and entity.currentStation.expectedSignals['canDispose']:
#
entity.mayProceed=True
#
self.sendSignal(receiver=entity.currentStation, signal=entity.currentStation.canDispose)
# if the object (eg Queue) canAccept then signal the Giver
if
self
.
canAccept
():
...
...
dream/simulation/ExitJobShop.py
View file @
9308c8d3
...
...
@@ -63,4 +63,21 @@ class ExitJobShop(Exit):
if
activeObject
.
id
in
activeEntity
.
remainingRoute
[
0
].
get
(
'stationIdsList'
,[]):
return
True
return
False
#===========================================================================
# overides the default getEntity
#===========================================================================
def
getEntity
(
self
):
activeEntity
=
Exit
.
getEntity
(
self
)
#run the default method
from
Globals
import
G
# for all the entities in the EntityList
for
entity
in
G
.
EntityList
:
requiredParts
=
entity
.
getRequiredParts
()
if
requiredParts
:
# if the activeEntity is in the requierdParts of the entity
if
activeEntity
in
requiredParts
:
# if the entity that requires the activeEntity can proceed then signal the currentStation of the entity
if
entity
.
checkIfRequiredPartsReady
()
and
entity
.
currentStation
.
expectedSignals
[
'canDispose'
]:
self
.
sendSignal
(
receiver
=
entity
.
currentStation
,
signal
=
entity
.
currentStation
.
canDispose
)
return
activeEntity
\ No newline at end of file
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