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
aeb64904
Commit
aeb64904
authored
Oct 31, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoreObject to add offShift in postProcessing correctly in the case of running for infinite time
parent
1c7bac62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+14
-4
No files found.
dream/simulation/CoreObject.py
View file @
aeb64904
...
...
@@ -270,13 +270,14 @@ class CoreObject(ManPyObject):
# as argument by getEntity of the receiver
# =======================================================================
def
removeEntity
(
self
,
entity
=
None
,
resetFlags
=
True
,
addBlockage
=
True
):
if
addBlockage
and
self
.
isBlocked
:
# add the blocking time
self
.
addBlockage
()
# reset flags
if
resetFlags
:
self
.
isBlocked
=
False
self
.
isProcessing
=
False
if
addBlockage
:
# add the blocking time
self
.
addBlockage
()
activeObjectQueue
=
self
.
Res
.
users
activeObjectQueue
.
remove
(
entity
)
#remove the Entity from the queue
...
...
@@ -625,7 +626,16 @@ class CoreObject(ManPyObject):
#if the object is off shift,add this to the off-shift time
if
activeObject
.
onShift
==
False
:
self
.
totalOffShiftTime
+=
self
.
env
.
now
-
self
.
timeLastShiftEnded
# if we ran the simulation for infinite time we have to identify the last event
now
=
self
.
env
.
now
if
now
==
float
(
'inf'
):
now
=
0
lastExits
=
[]
for
object
in
G
.
ExitList
:
lastExits
.
append
(
object
.
timeLastEntityEntered
)
if
lastExits
:
now
=
max
(
lastExits
)
self
.
totalOffShiftTime
+=
now
-
self
.
timeLastShiftEnded
#object was idle when it was not in any other state
activeObject
.
totalWaitingTime
=
MaxSimtime
-
activeObject
.
totalWorkingTime
-
activeObject
.
totalBlockageTime
-
activeObject
.
totalFailureTime
-
activeObject
.
totalLoadTime
-
activeObject
.
totalSetupTime
-
self
.
totalOffShiftTime
...
...
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