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
d7976d40
Commit
d7976d40
authored
May 23, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
objects have to recreate signal in every replications. TODO check why and which others need it
parent
13451009
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+5
-0
dream/simulation/Machine.py
dream/simulation/Machine.py
+7
-1
dream/simulation/Queue.py
dream/simulation/Queue.py
+3
-0
dream/simulation/Source.py
dream/simulation/Source.py
+0
-1
No files found.
dream/simulation/CoreObject.py
View file @
d7976d40
...
...
@@ -132,6 +132,11 @@ class CoreObject(Process):
# TODO, think what to do in multiple runs
# TODO, this should be also updated in Globals.setWIP (in case we have initial wip)
self
.
wipStatList
=
[[
0
,
0
]]
# signalizing an event that activates the generator
self
.
isRequested
=
SimEvent
(
'isRequested'
)
self
.
canDispose
=
SimEvent
(
'canDispose'
)
self
.
interruptionEnd
=
SimEvent
(
'interruptionEnd'
)
self
.
interruptionStart
=
SimEvent
(
'interruptionStart'
)
# =======================================================================
# the main process of the core object
...
...
dream/simulation/Machine.py
View file @
d7976d40
...
...
@@ -211,11 +211,17 @@ class Machine(CoreObject):
# flag notifying that there is operator assigned to the actievObject
self
.
assignedOperator
=
True
self
.
brokerIsSet
=
SimEvent
(
'brokerIsSet'
)
# this event is generated every time an operator is requested by machine for Load operation type.
# if the machine has not succeeded in getting an entity due to the resource absence
# and waits for the next event to get the entity,
# then it must be signalled that the operator is now available
self
.
loadOperatorAvailable
=
SimEvent
(
'loadOperatorAvailable'
)
# =======================================================================
# the main process of the machine
# =======================================================================
def
run
(
self
):
# check if there is WIP and signal receiver
self
.
initialSignalReceiver
()
# execute all through simulation time
while
1
:
...
...
dream/simulation/Queue.py
View file @
d7976d40
...
...
@@ -84,6 +84,9 @@ class Queue(CoreObject):
CoreObject
.
initialize
(
self
)
# initialise the internal Queue (type Resource) of the Queue object
self
.
Res
=
Resource
(
self
.
capacity
)
# event used by router
self
.
loadOperatorAvailable
=
SimEvent
(
'loadOperatorAvailable'
)
#===========================================================================
# run method of the queue
...
...
dream/simulation/Source.py
View file @
d7976d40
...
...
@@ -55,7 +55,6 @@ class EntityGenerator(Process):
# the generator of the EntitiesGenerator
#===========================================================================
def
run
(
self
):
print
'1'
while
1
:
entity
=
self
.
victim
.
createEntity
()
# create the Entity object and assign its name
entity
.
creationTime
=
now
()
# assign the current simulation time as the Entity's creation time
...
...
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