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
d61a6f09
Commit
d61a6f09
authored
Sep 10, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new attributes added to CoreObject to better control the different operation types
parent
8925ea0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+16
-2
No files found.
dream/simulation/CoreObject.py
View file @
d61a6f09
...
...
@@ -94,6 +94,7 @@ class CoreObject(ManPyObject):
self
.
onShift
=
True
self
.
currentEntity
=
None
# ============================== total times ===============================================
self
.
totalOperationTime
=
0
#dummy variable to hold totalWorkin/SetupTime during an interruption (yield ...(self.operation('setup'))
self
.
totalBlockageTime
=
0
#holds the total blockage time
self
.
totalFailureTime
=
0
#holds the total failure time
self
.
totalWaitingTime
=
0
#holds the total waiting time
...
...
@@ -199,6 +200,12 @@ class CoreObject(ManPyObject):
# flag that shows if the object is processing state at any given time
self
.
isProcessing
=
False
# variable that shows what kind of operation is the station performing at the moment
'''
it can be Processing or Setup
XXX: others not yet implemented
'''
self
.
currentlyPerforming
=
None
# flag that shows if the object is blocked state at any given time
self
.
isBlocked
=
False
self
.
timeLastBlockageStarted
=
None
...
...
@@ -593,8 +600,15 @@ class CoreObject(ManPyObject):
self
.
addBlockage
()
#if object is currently processing an entity we should count this working time
if
self
.
isProcessing
:
activeObject
.
totalWorkingTime
+=
self
.
env
.
now
-
self
.
timeLastProcessingStarted
if
self
.
isProcessing
:
'''XXX currentlyPerforming can be Setup or Processing '''
if
self
.
currentlyPerforming
:
if
self
.
currentlyPerforming
==
'Setup'
:
activeObject
.
totalSetupTime
+=
self
.
env
.
now
-
self
.
timeLastOperationStarted
else
:
activeObject
.
totalWorkingTime
+=
self
.
env
.
now
-
self
.
timeLastOperationStarted
else
:
activeObject
.
totalWorkingTime
+=
self
.
env
.
now
-
self
.
timeLastProcessingStarted
# activeObject.totalTimeWaitingForOperator+=activeObject.operatorWaitTimeCurrentEntity
# if object is down we have to add this failure time to its total failure 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