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
3d1387da
Commit
3d1387da
authored
Sep 08, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jobshop objects updated to follow the new signalling
parent
28d10945
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
7 deletions
+19
-7
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+2
-1
dream/simulation/MouldAssemblyBuffer.py
dream/simulation/MouldAssemblyBuffer.py
+2
-1
dream/simulation/OperatorRouterManaged.py
dream/simulation/OperatorRouterManaged.py
+5
-2
dream/simulation/OrderDecomposition.py
dream/simulation/OrderDecomposition.py
+2
-0
dream/simulation/QueueManagedJob.py
dream/simulation/QueueManagedJob.py
+2
-1
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+6
-2
No files found.
dream/simulation/MachineJobShop.py
View file @
3d1387da
...
...
@@ -292,7 +292,8 @@ class MachineJobShop(Machine):
self
.
receiver
.
timeLastEntityEnded
=
self
.
env
.
now
#required to count blockage correctly in the preemptied station
# TODO: use a signal and wait for it, reactivation is not recognised as interruption
# reactivate(self)
self
.
preemptQueue
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
self
.
preemptQueue
.
succeed
(
succeedTuple
)
# TODO: consider the case when a failure has the Station down. The event preempt will not be received now()
# but at a later simulation time.
...
...
dream/simulation/MouldAssemblyBuffer.py
View file @
3d1387da
...
...
@@ -110,7 +110,8 @@ class MouldAssemblyBuffer(QueueManagedJob):
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
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
secondary
.
currentStation
.
canDispose
.
succeed
(
succeedTuple
)
break
# for all the components that have the same parent Order as the activeEntity
activeEntity
.
order
.
componentsReadyForAssembly
=
1
...
...
dream/simulation/OperatorRouterManaged.py
View file @
3d1387da
...
...
@@ -79,6 +79,7 @@ class RouterManaged(Router):
while
1
:
# wait until the router is called
yield
self
.
isCalled
transmitter
,
eventTime
=
self
.
isCalled
.
value
self
.
isCalled
=
self
.
env
.
event
()
self
.
printTrace
(
''
,
'=-'
*
15
)
self
.
printTrace
(
''
,
'router received event'
)
...
...
@@ -192,7 +193,8 @@ class RouterManaged(Router):
if
station
in
self
.
pendingMachines
and
station
in
self
.
toBeSignalled
:
# signal this station's broker that the resource is available
self
.
printTrace
(
'router'
,
'signalling broker of'
+
' '
*
50
+
operator
.
isAssignedTo
().
id
)
operator
.
isAssignedTo
().
broker
.
resourceAvailable
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
operator
.
isAssignedTo
().
broker
.
resourceAvailable
.
succeed
(
succeedTuple
)
elif
(
not
station
in
self
.
pendingMachines
)
or
(
not
station
in
self
.
toBeSignalled
):
# signal the queue proceeding the station
assert
operator
.
candidateEntity
.
currentStation
in
self
.
toBeSignalled
,
'the candidateEntity currentStation is not picked by the Router'
...
...
@@ -202,7 +204,8 @@ class RouterManaged(Router):
# if the station is already is already signalled then do not send event
if
not
operator
.
candidateEntity
.
currentStation
.
loadOperatorAvailable
.
triggered
:
self
.
printTrace
(
'router'
,
'signalling queue'
+
' '
*
50
+
operator
.
candidateEntity
.
currentStation
.
id
)
operator
.
candidateEntity
.
currentStation
.
loadOperatorAvailable
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
operator
.
candidateEntity
.
currentStation
.
loadOperatorAvailable
.
succeed
(
succeedTuple
)
#===========================================================================
# clear the pending lists of the router
...
...
dream/simulation/OrderDecomposition.py
View file @
3d1387da
...
...
@@ -75,12 +75,14 @@ class OrderDecomposition(CoreObject):
receivedEvent
=
yield
self
.
env
.
any_of
([
self
.
isRequested
,
self
.
canDispose
])
# if the event that activated the thread is isRequested then getEntity
if
self
.
isRequested
in
receivedEvent
:
transmitter
,
eventTime
=
self
.
isRequested
.
value
self
.
isRequested
=
self
.
env
.
event
()
# reset the isRequested signal parameter
self
.
isRequested
.
signalparam
=
None
self
.
getEntity
()
self
.
decompose
()
if
self
.
canDispose
in
receivedEvent
:
transmitter
,
eventTime
=
self
.
canDispose
.
value
self
.
canDispose
=
self
.
env
.
event
()
# if the event that activated the thread is canDispose then signalReceiver
if
self
.
haveToDispose
():
...
...
dream/simulation/QueueManagedJob.py
View file @
3d1387da
...
...
@@ -120,7 +120,8 @@ class QueueManagedJob(QueueJobShop):
if
not
G
.
Router
.
invoked
:
# self.printTrace(self.id, signal='router')
G
.
Router
.
invoked
=
True
G
.
Router
.
isCalled
.
succeed
(
G
.
env
.
now
)
succeedTuple
=
(
G
.
env
,
G
.
env
.
now
)
G
.
Router
.
isCalled
.
succeed
(
succeedTuple
)
return
True
except
:
return
False
...
...
dream/simulation/SkilledOperatorRouter.py
View file @
3d1387da
...
...
@@ -71,6 +71,7 @@ class SkilledRouter(Router):
while
1
:
# wait until the router is called
yield
self
.
isCalled
transmitter
,
eventTime
=
self
.
isCalled
.
value
self
.
isCalled
=
self
.
env
.
event
()
self
.
printTrace
(
''
,
'=-'
*
15
)
self
.
printTrace
(
''
,
'router received event'
)
...
...
@@ -128,6 +129,7 @@ class SkilledRouter(Router):
receivedEvent
=
yield
self
.
env
.
all_of
(
self
.
endProcessingSignals
)
for
station
in
self
.
busyStations
:
if
station
.
endedLastProcessing
in
receivedEvent
:
transmitter
,
eventTime
=
station
.
endedLastProcessing
.
value
station
.
endedLastProcessing
=
self
.
env
.
event
()
...
...
@@ -240,13 +242,15 @@ class SkilledRouter(Router):
if
station
.
broker
.
waitForOperator
:
# signal this station's broker that the resource is available
self
.
printTrace
(
'router'
,
'signalling broker of'
+
' '
*
50
+
station
.
id
)
station
.
broker
.
resourceAvailable
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
station
.
broker
.
resourceAvailable
.
succeed
(
succeedTuple
)
else
:
# signal the queue proceeding the station
if
station
.
canAccept
()
\
and
any
(
type
==
'Load'
for
type
in
station
.
multOperationTypeList
):
self
.
printTrace
(
'router'
,
'signalling'
+
' '
*
50
+
station
.
id
)
station
.
loadOperatorAvailable
.
succeed
(
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
station
.
loadOperatorAvailable
.
succeed
(
succeedTuple
)
#===================================================================
# default behaviour
...
...
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