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
adb92ea1
Commit
adb92ea1
authored
Aug 15, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addBlockage moved to CoreObject
parent
32cf335b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
27 deletions
+6
-27
dream/simulation/Assembly.py
dream/simulation/Assembly.py
+1
-8
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+4
-4
dream/simulation/Dismantle.py
dream/simulation/Dismantle.py
+0
-7
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-8
No files found.
dream/simulation/Assembly.py
View file @
adb92ea1
...
@@ -297,14 +297,7 @@ class Assembly(CoreObject):
...
@@ -297,14 +297,7 @@ class Assembly(CoreObject):
activeObjectQueue
[
0
].
getFrameQueue
().
append
(
entity
)
#get the part from the giver and append it to the frame!
activeObjectQueue
[
0
].
getFrameQueue
().
append
(
entity
)
#get the part from the giver and append it to the frame!
elif
entity
.
type
==
'Frame'
:
elif
entity
.
type
==
'Frame'
:
activeObjectQueue
.
append
(
entity
)
#get the frame and append it to the internal queue
activeObjectQueue
.
append
(
entity
)
#get the frame and append it to the internal queue
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def
addBlockage
(
self
):
self
.
totalBlockageTime
+=
self
.
env
.
now
-
self
.
timeLastBlockageStarted
#===========================================================================
#===========================================================================
# outputs data to "output.xls"
# outputs data to "output.xls"
...
...
dream/simulation/CoreObject.py
View file @
adb92ea1
...
@@ -185,6 +185,7 @@ class CoreObject(object):
...
@@ -185,6 +185,7 @@ class CoreObject(object):
self
.
isProcessing
=
False
self
.
isProcessing
=
False
# flag that shows if the object is blocked state at any given time
# flag that shows if the object is blocked state at any given time
self
.
isBlocked
=
False
self
.
isBlocked
=
False
self
.
timeLastBlockageStarted
=
None
# =======================================================================
# =======================================================================
# the main process of the core object
# the main process of the core object
...
@@ -289,15 +290,14 @@ class CoreObject(object):
...
@@ -289,15 +290,14 @@ class CoreObject(object):
giverObjectQueue
=
self
.
getGiverObjectQueue
()
giverObjectQueue
=
self
.
getGiverObjectQueue
()
return
giverObjectQueue
[
0
]
return
giverObjectQueue
[
0
]
# =======================================================================
# =======================================================================
# adds the blockage time to totalBlockageTime
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# each time an Entity is removed
# =======================================================================
# =======================================================================
def
addBlockage
(
self
):
def
addBlockage
(
self
):
self
.
totalTimeInCurrentEntity
=
self
.
env
.
now
-
self
.
timeLastEntityEntered
if
self
.
timeLastBlockageStarted
:
self
.
totalTimeWaitingForOperator
+=
self
.
operatorWaitTimeCurrentEntity
self
.
totalBlockageTime
+=
self
.
env
.
now
-
self
.
timeLastBlockageStarted
blockage
=
self
.
env
.
now
-
(
self
.
timeLastEntityEnded
+
self
.
downTimeInTryingToReleaseCurrentEntity
)
self
.
totalBlockageTime
+=
blockage
# =======================================================================
# =======================================================================
# gets an entity from the giver
# gets an entity from the giver
...
...
dream/simulation/Dismantle.py
View file @
adb92ea1
...
@@ -295,13 +295,6 @@ class Dismantle(CoreObject):
...
@@ -295,13 +295,6 @@ class Dismantle(CoreObject):
activeObject
.
printTrace
(
self
.
id
,
attemptSignalGiver
=
'(removeEntity)'
)
activeObject
.
printTrace
(
self
.
id
,
attemptSignalGiver
=
'(removeEntity)'
)
activeObject
.
signalGiver
()
activeObject
.
signalGiver
()
return
activeEntity
return
activeEntity
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def
addBlockage
(
self
):
self
.
totalBlockageTime
+=
self
.
env
.
now
-
self
.
timeLastBlockageStarted
#===========================================================================
#===========================================================================
# outputs message to the trace.xls.
# outputs message to the trace.xls.
...
...
dream/simulation/Machine.py
View file @
adb92ea1
...
@@ -853,14 +853,7 @@ class Machine(CoreObject):
...
@@ -853,14 +853,7 @@ class Machine(CoreObject):
and
self
.
waitToDispose
\
and
self
.
waitToDispose
\
and
(
thecaller
in
self
.
next
)
\
and
(
thecaller
in
self
.
next
)
\
and
(
self
.
canDeliverOnInterruption
or
self
.
checkIfActive
())
and
(
self
.
canDeliverOnInterruption
or
self
.
checkIfActive
())
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def
addBlockage
(
self
):
self
.
totalBlockageTime
+=
self
.
env
.
now
-
self
.
timeLastBlockageStarted
# =======================================================================
# =======================================================================
# calculates the setup time
# calculates the setup 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