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
a689804e
Commit
a689804e
authored
Apr 23, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Broker code rearranged. Prints added
parent
1acc04cb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
153 additions
and
57 deletions
+153
-57
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-0
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+1
-0
dream/simulation/MouldAssemblyBuffer.py
dream/simulation/MouldAssemblyBuffer.py
+1
-0
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+143
-55
dream/simulation/OrderDecomposition.py
dream/simulation/OrderDecomposition.py
+2
-0
dream/simulation/Queue.py
dream/simulation/Queue.py
+5
-2
No files found.
dream/simulation/Machine.py
View file @
a689804e
...
...
@@ -237,6 +237,7 @@ class Machine(CoreObject):
# if an interruption caused the control to be taken by the machine or
# if an operator was rendered available while it was needed by the machine to proceed with getEntity
if
self
.
interruptionEnd
.
signalparam
==
now
()
or
self
.
loadOperatorAvailable
.
signalparam
==
now
():
# print now(), self.id, 'received an other type of event sent at ', self.loadOperatorAvailable.signalparam
# try to signal the Giver, otherwise wait until it is requested
if
self
.
signalGiver
():
break
...
...
dream/simulation/MachineManagedJob.py
View file @
a689804e
...
...
@@ -125,6 +125,7 @@ class MachineManagedJob(MachineJobShop):
if
activeObject
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
\
and
activeObject
.
checkOperator
():
if
not
giverObject
.
exitIsAssignedTo
():
# print self.id, 'assigning givers exit'
giverObject
.
assignExitTo
()
elif
giverObject
.
exitIsAssignedTo
()
!=
activeObject
:
return
False
...
...
dream/simulation/MouldAssemblyBuffer.py
View file @
a689804e
...
...
@@ -108,6 +108,7 @@ class MouldAssemblyBuffer(QueueManagedJob):
# TODO: has to signal ConditionalBuffer to start sending entities again
for
secondary
in
[
x
for
x
in
activeEntity
.
order
.
secondaryComponentsList
if
activeEntity
.
order
.
basicsEnded
]:
if
secondary
.
currentStation
.
__class__
.
__name__
==
'ConditionalBuffer'
:
# print now(), self.id, ' signalling conditional buffer'
secondary
.
currentStation
.
canDispose
.
signal
(
now
())
break
# for all the components that have the same parent Order as the activeEntity
...
...
dream/simulation/OperatedPoolBroker.py
View file @
a689804e
This diff is collapsed.
Click to expand it.
dream/simulation/OrderDecomposition.py
View file @
a689804e
...
...
@@ -79,6 +79,7 @@ class OrderDecomposition(CoreObject):
self
.
decompose
()
# if the event that activated the thread is canDispose then signalReceiver
if
self
.
haveToDispose
():
# print now(), self.id, 'will try to signal a receiver from generator'
self
.
signalReceiver
()
# =======================================================================
...
...
@@ -90,6 +91,7 @@ class OrderDecomposition(CoreObject):
if
self
.
canAccept
():
self
.
signalGiver
()
if
self
.
haveToDispose
():
# print now(), self.id, 'will try to signal a receiver from removeEntity'
self
.
signalReceiver
()
return
activeEntity
...
...
dream/simulation/Queue.py
View file @
a689804e
...
...
@@ -97,14 +97,17 @@ class Queue(CoreObject):
# print now(), self.id, 'just received an event'
# if the event that activated the thread is isRequested then getEntity
if
self
.
isRequested
.
signalparam
:
# print now(), self.id, 'received a isRequested event from', self.isRequested.signalparam.id
# reset the isRequested signal parameter
self
.
isRequested
.
signalparam
=
None
self
.
getEntity
()
#if entity just got to the dummyQ set its startTime as the current time
if
self
.
isDummy
:
activeObjectQueue
[
0
].
startTime
=
now
()
# if self.canDispose.signalparam:
# print now(), self.id, 'received a canDispose event from', self.canDispose.signalparam.id
# if the queue received an canDispose with signalparam time, this means that the signals was sent from a MouldAssemblyBuffer
if
self
.
canDispose
.
signalparam
:
# print now(), self.id, 'received a canDispose event from', self.canDispose.signalparam
self
.
canDispose
.
signalparam
=
None
# if the event that activated the thread is canDispose then signalReceiver
if
self
.
haveToDispose
():
# print now(), self.id, 'will try to signal a receiver from generator'
...
...
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