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
e694962f
Commit
e694962f
authored
Jun 18, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
operators now hold schedule. PrintRoute pritns schedule of operators
parent
0e8eebb3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
18 deletions
+105
-18
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+5
-1
dream/simulation/Operator.py
dream/simulation/Operator.py
+2
-0
dream/simulation/PrintRoute.py
dream/simulation/PrintRoute.py
+98
-17
No files found.
dream/simulation/OperatedPoolBroker.py
View file @
e694962f
...
...
@@ -119,11 +119,13 @@ class Broker(ObjectInterruption):
# clear the timeWaitForOperatorStarted variable
self
.
timeWaitForOperatorStarted
=
0
# update the time that the operation started
self
.
timeOperationStarted
=
self
.
env
.
now
#()
self
.
timeOperationStarted
=
self
.
env
.
now
self
.
victim
.
outputTrace
(
self
.
victim
.
currentOperator
.
objName
,
"started work in "
+
self
.
victim
.
objName
)
self
.
victim
.
currentOperator
.
timeLastOperationStarted
=
self
.
env
.
now
#()
# signal the machine that an operator is reserved
self
.
victim
.
brokerIsSet
.
succeed
(
self
.
env
.
now
)
# update the schedule of the operator
self
.
victim
.
currentOperator
.
schedule
.
append
([
self
.
victim
,
self
.
env
.
now
])
# wait till the processing is over
yield
self
.
isCalled
...
...
@@ -149,6 +151,8 @@ class Broker(ObjectInterruption):
# TODO: this wont work for the moment. The actions that follow must be performed by all operated brokers.
self
.
victim
.
printTrace
(
self
.
victim
.
currentOperator
.
objName
,
finishWork
=
self
.
victim
.
id
)
# update the schedule of the operator
self
.
victim
.
currentOperator
.
schedule
[
-
1
].
append
(
self
.
env
.
now
)
# the victim current operator must be cleared after the operator is released
self
.
timeLastOperationEnded
=
self
.
env
.
now
self
.
victim
.
currentOperator
.
workingStation
=
None
...
...
dream/simulation/Operator.py
View file @
e694962f
...
...
@@ -72,6 +72,8 @@ class Operator(ObjectResource):
self
.
candidateEntity
=
None
# the entity that will be chosen for processing
self
.
candidateStations
=
[]
# list of candidateStations of the stations (those stations that can receive an entity)
self
.
schedule
=
[]
# the working schedule of the resource, the objects the resource was occupied by and the corresponding times
@
staticmethod
def
getSupportedSchedulingRules
():
return
(
"FIFO"
,
"Priority"
,
"WT"
,
"EDD"
,
"EOD"
,
...
...
dream/simulation/PrintRoute.py
View file @
e694962f
This diff is collapsed.
Click to expand it.
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