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
ec00842e
Commit
ec00842e
authored
Sep 25, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
singalling holder of entity with requiredParts moved from ConditionalBuffer to CoreObject
parent
c4312ef0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
37 deletions
+17
-37
dream/simulation/ConditionalBuffer.py
dream/simulation/ConditionalBuffer.py
+0
-22
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+17
-0
dream/simulation/ExitJobShop.py
dream/simulation/ExitJobShop.py
+0
-15
No files found.
dream/simulation/ConditionalBuffer.py
View file @
ec00842e
...
...
@@ -46,28 +46,6 @@ class ConditionalBuffer(QueueJobShop):
schedulingRule
=
"FIFO"
,
**
kw
):
QueueJobShop
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
,
isDummy
=
isDummy
,
schedulingRule
=
schedulingRule
)
#===========================================================================
# 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
# =======================================================================
# checks if the Buffer can dispose an entity.
...
...
dream/simulation/CoreObject.py
View file @
ec00842e
...
...
@@ -373,6 +373,23 @@ 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 the object (eg Queue) canAccept then signal the Giver
if
self
.
canAccept
():
self
.
signalGiver
()
...
...
dream/simulation/ExitJobShop.py
View file @
ec00842e
...
...
@@ -63,19 +63,4 @@ class ExitJobShop(Exit):
if
activeObject
.
id
in
activeEntity
.
remainingRoute
[
0
].
get
(
'stationIdsList'
,[]):
return
True
return
False
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