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
50915cea
Commit
50915cea
authored
Mar 06, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setWIP uses currentStep to update schedule (task_id)
parent
f2806a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
dream/simulation/Globals.py
dream/simulation/Globals.py
+5
-12
No files found.
dream/simulation/Globals.py
View file @
50915cea
...
...
@@ -255,20 +255,13 @@ def setWIP(entityList):
# append only if not already in the list
if
nextObject
not
in
object
.
next
:
object
.
next
.
append
(
nextObject
)
# update the task_id of the current schedule step dict
# find the currentStep within the entity's route
try
:
currentTaskId
=
None
if
entity
.
remainingRoute
:
currentTaskId
=
entity
.
remainingRoute
[
0
].
get
(
"task_id"
,
None
)
except
AttributeError
:
pass
entity
.
remainingRoute
.
pop
(
0
)
# remove data from the remaining route.
entity
.
currentStep
=
entity
.
remainingRoute
.
pop
(
0
)
# remove data from the remaining route.
entity
.
schedule
.
append
({
"station"
:
object
,
"entranceTime"
:
G
.
env
.
now
})
#append the time to schedule so that it can be read in the result
# if there is currentTaskId then append it to the schedule
if
currentTaskId
:
entity
.
schedule
[
-
1
][
"task_id"
]
=
currentTaskId
# if there is currentStep task_id then append it to the schedule
if
entity
.
currentStep
:
if
entity
.
currentStep
.
get
(
"task_id"
,
None
):
entity
.
schedule
[
-
1
][
"task_id"
]
=
entity
.
currentStep
[
"task_id"
]
# 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
...
...
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