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
Show 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):
...
@@ -418,9 +418,9 @@ class Machine(CoreObject):
# carry on actions that have to take place when an Entity ends its processing
# carry on actions that have to take place when an Entity ends its processing
self
.
endProcessingActions
()
self
.
endProcessingActions
()
# =============== release resource after the end of processing
# =============== release resource after the end of processing
if
(
self
.
operatorPool
!=
'None'
)
\
if
(
self
.
operatorPool
!=
'None'
)
\
and
self
.
isOperated
()
\
and
any
(
type
==
"Processing"
for
type
in
self
.
multOperationTypeList
)
\
and
any
(
type
==
"Processing"
for
type
in
self
.
multOperationTypeList
)
\
and
not
self
.
interruption
:
and
not
self
.
interruption
:
self
.
releaseOperator
()
self
.
releaseOperator
()
...
@@ -653,11 +653,6 @@ class Machine(CoreObject):
...
@@ -653,11 +653,6 @@ class Machine(CoreObject):
giverObject
.
assignExitTo
(
activeObject
)
giverObject
.
assignExitTo
(
activeObject
)
elif
giverObject
.
exitIsAssignedTo
()
!=
activeObject
:
elif
giverObject
.
exitIsAssignedTo
()
!=
activeObject
:
return
False
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
return
True
else
:
else
:
return
False
return
False
...
@@ -813,13 +808,6 @@ class Machine(CoreObject):
...
@@ -813,13 +808,6 @@ class Machine(CoreObject):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# set the flag operatorAssignedTo to None
# set the flag operatorAssignedTo to None
self
.
currentOperator
.
operatorAssignedTo
=
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
.
broker
.
invoke
()
self
.
broker
.
invoke
()
self
.
toBeOperated
=
False
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