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
82a06417
Commit
82a06417
authored
Sep 09, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups
parent
036e2ee9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
14 deletions
+9
-14
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+2
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+3
-9
dream/simulation/ManPyObject.py
dream/simulation/ManPyObject.py
+1
-1
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+1
-1
dream/simulation/Operator.py
dream/simulation/Operator.py
+1
-2
dream/simulation/ShiftScheduler.py
dream/simulation/ShiftScheduler.py
+1
-0
No files found.
dream/simulation/CoreObject.py
View file @
82a06417
...
...
@@ -83,7 +83,8 @@ class CoreObject(ManPyObject):
"preemptQueue"
:
0
,
"entityRemoved"
:
0
,
"entityCreated"
:
0
,
"moveEnd"
:
0
"moveEnd"
:
0
,
"processOperatorUnavailable"
:
0
}
def
initialize
(
self
):
...
...
dream/simulation/Machine.py
View file @
82a06417
...
...
@@ -181,7 +181,6 @@ class Machine(CoreObject):
self
.
expectedSignals
[
'initialWIP'
]
=
1
# events about the availability of process operator
# TODO group those operator relate events
self
.
processOperatorAvailable
=
self
.
env
.
event
()
self
.
processOperatorUnavailable
=
self
.
env
.
event
()
@
staticmethod
...
...
@@ -217,12 +216,6 @@ class Machine(CoreObject):
loadTime
[
'max'
]
=
float
(
loadTime
[
'mean'
])
+
5
*
float
(
loadTime
[
'stdev'
])
return
loadTime
# events about the availability of process operator
# TODO group those operator relate events
self
.
processOperatorAvailable
=
self
.
env
.
event
()
self
.
processOperatorUnavailable
=
self
.
env
.
event
()
#===========================================================================
# create an operatorPool if needed
#===========================================================================
...
...
@@ -610,6 +603,7 @@ class Machine(CoreObject):
while
processingNotFinished
:
self
.
expectedSignals
[
'interruptionStart'
]
=
1
self
.
expectedSignals
[
'preemptQueue'
]
=
1
self
.
expectedSignals
[
'processOperatorUnavailable'
]
=
1
# timeLastProcessingStarted : dummy variable to keep track of the time that the processing starts after
# every interruption
self
.
timeLastProcessingStarted
=
self
.
env
.
now
...
...
@@ -1181,7 +1175,7 @@ class Machine(CoreObject):
if
not
self
.
currentOperator
.
onShift
:
self
.
currentOperator
.
timeLastShiftEnded
=
self
.
env
.
now
self
.
currentOperator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
self
.
currentOperator
.
objN
ame
,
"released from "
+
self
.
objName
)
self
.
outputTrace
(
self
.
currentOperator
.
n
ame
,
"released from "
+
self
.
objName
)
# XXX in case of skilled operators which stay at the same station should that change
elif
not
self
.
checkForDedicatedOperators
():
self
.
currentOperator
.
unAssign
()
# set the flag operatorAssignedTo to None
...
...
dream/simulation/ManPyObject.py
View file @
82a06417
dream/simulation/OperatedPoolBroker.py
View file @
82a06417
...
...
@@ -151,7 +151,7 @@ class Broker(ObjectInterruption):
self
.
timeWaitForOperatorStarted
=
0
# update the time that the operation started
self
.
timeOperationStarted
=
self
.
env
.
now
self
.
victim
.
outputTrace
(
self
.
victim
.
currentOperator
.
objN
ame
,
"started work in "
+
self
.
victim
.
objName
)
self
.
victim
.
outputTrace
(
self
.
victim
.
currentOperator
.
n
ame
,
"started work in "
+
self
.
victim
.
objName
)
self
.
victim
.
currentOperator
.
timeLastOperationStarted
=
self
.
env
.
now
#()
# signal the machine that an operator is reserved
if
self
.
victim
.
expectedSignals
[
'brokerIsSet'
]:
...
...
dream/simulation/Operator.py
View file @
82a06417
...
...
@@ -38,8 +38,7 @@ class Operator(ObjectResource):
family
=
'Operator'
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
'FIFO'
,
skills
=
[],
available
=
True
,
**
kw
):
ObjectResource
.
__init__
(
self
)
self
.
id
=
id
ObjectResource
.
__init__
(
self
,
id
=
id
,
name
=
name
)
self
.
objName
=
name
self
.
capacity
=
int
(
capacity
)
# repairman is an instance of resource
self
.
type
=
"Operator"
...
...
dream/simulation/ShiftScheduler.py
View file @
82a06417
...
...
@@ -131,6 +131,7 @@ class ShiftScheduler(ObjectInterruption):
if
station
:
if
not
self
.
endUnfinished
and
station
.
isProcessing
:
station
.
processOperatorUnavailable
.
succeed
(
self
.
env
.
now
)
station
.
expectedSignals
[
'processOperatorUnavailable'
]
=
0
CoreObject
.
requestAllocation
()
# if the victim has interruptions that measure only the on-shift time, they have to be notified
...
...
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