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
847c8a4c
Commit
847c8a4c
authored
May 20, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor correction in Machine (no operator is released if it is allready released). Small clean-up
parent
dc2c50ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
dream/simulation/Machine.py
dream/simulation/Machine.py
+2
-14
No files found.
dream/simulation/Machine.py
View file @
847c8a4c
...
...
@@ -418,9 +418,9 @@ class Machine(CoreObject):
# carry on actions that have to take place when an Entity ends its processing
self
.
endProcessingActions
()
# =============== release resource after the end of processing
if
(
self
.
operatorPool
!=
'None'
)
\
and
self
.
isOperated
()
\
and
any
(
type
==
"Processing"
for
type
in
self
.
multOperationTypeList
)
\
and
not
self
.
interruption
:
self
.
releaseOperator
()
...
...
@@ -653,11 +653,6 @@ class Machine(CoreObject):
giverObject
.
assignExitTo
(
activeObject
)
elif
giverObject
.
exitIsAssignedTo
()
!=
activeObject
:
return
False
# if the activeObject is not in operators' activeCallersList
if
activeObject
not
in
activeObject
.
operatorPool
.
operators
[
0
].
activeCallersList
:
# append it to the activeCallerList of the operatorPool operators list
for
operator
in
activeObject
.
operatorPool
.
operators
:
operator
.
activeCallersList
.
append
(
activeObject
)
return
True
else
:
return
False
...
...
@@ -812,14 +807,7 @@ class Machine(CoreObject):
def
releaseOperator
(
self
):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# set the flag operatorAssignedTo to None
self
.
currentOperator
.
operatorAssignedTo
=
None
# if the operationType is just Load and not Setup or Processing
# then clear the activeCallersList of the currentOperator
if
any
(
type
==
'Load'
for
type
in
self
.
multOperationTypeList
)
\
and
not
(
any
(
type
==
'Setup'
for
type
in
self
.
multOperationTypeList
)
\
or
any
(
type
==
'Processing'
for
type
in
self
.
multOperationTypeList
)):
self
.
currentOperator
.
activeCallersList
=
[]
self
.
currentOperator
.
operatorAssignedTo
=
None
self
.
broker
.
invoke
()
self
.
toBeOperated
=
False
...
...
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