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
199044fd
Commit
199044fd
authored
Mar 06, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
currentStep attribute is used to update activeEntity and currentOperator schedule (task_id)
parent
50915cea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+9
-5
dream/simulation/QueueJobShop.py
dream/simulation/QueueJobShop.py
+7
-0
No files found.
dream/simulation/MachineJobShop.py
View file @
199044fd
...
...
@@ -60,12 +60,16 @@ class MachineJobShop(Machine):
self
.
stpRng
=
RandomNumberGenerator
(
self
,
setupTime
)
# check if there is a need for manual processing
self
.
checkForManualOperation
(
type
=
'Setup'
,
entity
=
activeEntity
)
# if there is currentOperator then update the taskId of corresponding step of their schedule according to the task_id of the first remaining route step
if
self
.
currentOperator
:
taskId
=
activeEntity
.
remainingRoute
[
0
].
get
(
"task_id"
,
None
)
if
taskId
:
self
.
currentOperator
.
schedule
[
-
1
][
"task_id"
]
=
taskId
activeEntity
.
currentStep
=
activeEntity
.
remainingRoute
.
pop
(
0
)
#remove data from the remaining route of the entity
if
activeEntity
.
currentStep
:
# update the task_id of the currentStep dict within the schedule
try
:
activeEntity
.
schedule
[
-
1
][
"task_id"
]
=
activeEntity
.
currentStep
[
"task_id"
]
# if there is currentOperator then update the taskId of corresponding step of their schedule according to the task_id of the currentStep
if
self
.
currentOperator
:
self
.
currentOperator
.
schedule
[
-
1
][
"task_id"
]
=
activeEntity
.
currentStep
[
"task_id"
]
except
KeyError
:
pass
return
activeEntity
#===========================================================================
...
...
dream/simulation/QueueJobShop.py
View file @
199044fd
...
...
@@ -106,6 +106,13 @@ class QueueJobShop(Queue):
def
getEntity
(
self
):
activeEntity
=
Queue
.
getEntity
(
self
)
activeEntity
.
currentStep
=
activeEntity
.
remainingRoute
.
pop
(
0
)
#remove data from the remaining route of the entity
# update the task_id of the current schedule step dict
# find the currentStep within the entity's route
if
activeEntity
.
currentStep
:
try
:
activeEntity
.
schedule
[
-
1
][
"task_id"
]
=
activeEntity
.
currentStep
[
"task_id"
]
except
KeyError
:
pass
return
activeEntity
#===========================================================================
...
...
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