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
c36f1a7e
Commit
c36f1a7e
authored
Feb 24, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Machine updated to remove currentEntity from pendingEntities list after receiving them
parent
aa5c6983
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
dream/simulation/Globals.py
dream/simulation/Globals.py
+3
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+6
-0
No files found.
dream/simulation/Globals.py
View file @
c36f1a7e
...
...
@@ -126,6 +126,7 @@ class SetWipTypeError(Exception):
# although the entity cannot be in more than one stations
# =======================================================================
def
setWIP
(
entityList
):
# for all the entities in the entityList
for
entity
in
entityList
:
# if the entity is of type Part
if
entity
.
type
==
'Part'
:
...
...
@@ -166,7 +167,6 @@ def setWIP(entityList):
entity
.
remainingRoute
.
pop
(
0
)
# remove data from the remaining route.
entity
.
schedule
.
append
([
object
,
now
()])
#append the time to schedule so that it can be read in the result
entity
.
currentStation
=
object
# update the current station of the entity
# if the currentStation of the entity is of type Machine then the entity
# must be processed first and then added to the pendingEntities list
# Its hot flag is not raised
...
...
@@ -179,6 +179,8 @@ def setWIP(entityList):
break
if
not
successorsAreMachines
:
entity
.
hot
=
False
else
:
entity
.
hot
=
True
# add the entity to the pendingEntities list
G
.
pendingEntities
.
append
(
entity
)
...
...
dream/simulation/Machine.py
View file @
c36f1a7e
...
...
@@ -264,6 +264,12 @@ class Machine(CoreObject):
# TODO: the Machine receive the entity after the operator is available
# the canAcceptAndIsRequested method checks only in case of Load type of operation
# after the machine receives an entity, it must be removed from the pendingEntities list
# TODO: consider incorporating it in the getEntity of the machine
from
Globals
import
G
if
self
.
currentEntity
in
G
.
pendingEntities
:
G
.
pendingEntities
.
remove
(
self
.
currentEntity
)
# ======= request a resource if it is not already assigned an Operator
if
(
self
.
operatorPool
!=
"None"
)
\
and
(
any
(
type
==
"Processing"
for
type
in
self
.
multOperationTypeList
)
\
...
...
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