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
e8f54294
Commit
e8f54294
authored
Feb 02, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Machine now releases the currentOperator if it is not in its skillSet for the following operation
parent
b364746d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
dream/simulation/Machine.py
dream/simulation/Machine.py
+16
-2
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+3
-1
No files found.
dream/simulation/Machine.py
View file @
e8f54294
...
@@ -695,6 +695,20 @@ class Machine(CoreObject):
...
@@ -695,6 +695,20 @@ class Machine(CoreObject):
#===================================================================
#===================================================================
if
self
.
shouldYield
(
operationTypes
=
{
"Setup"
:
1
,
"Load"
:
1
,
"Processing"
:
0
},
methods
=
{
'isOperated'
:
1
}):
if
self
.
shouldYield
(
operationTypes
=
{
"Setup"
:
1
,
"Load"
:
1
,
"Processing"
:
0
},
methods
=
{
'isOperated'
:
1
}):
yield
self
.
env
.
process
(
self
.
release
())
yield
self
.
env
.
process
(
self
.
release
())
elif
(
self
.
currentOperator
):
if
self
.
currentOperator
.
skillDict
:
if
not
self
.
id
in
self
.
currentOperator
.
skillDict
[
"process"
]:
yield
self
.
env
.
process
(
self
.
release
())
#===================================================================
# # request a resource if it is not already assigned an Operator
#===================================================================
if
self
.
shouldYield
(
operationTypes
=
{
"Processing"
:
1
},
methods
=
{
"isOperated"
:
0
}):
self
.
timeWaitForOperatorStarted
=
self
.
env
.
now
yield
self
.
env
.
process
(
self
.
request
())
self
.
timeWaitForOperatorEnded
=
self
.
env
.
now
self
.
operatorWaitTimeCurrentEntity
+=
self
.
timeWaitForOperatorEnded
-
self
.
timeWaitForOperatorStarted
#===================================================================
#===================================================================
#===================================================================
#===================================================================
...
...
dream/simulation/OperatorRouter.py
View file @
e8f54294
...
@@ -314,7 +314,9 @@ class Router(ObjectInterruption):
...
@@ -314,7 +314,9 @@ class Router(ObjectInterruption):
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
if
candidateOperator
.
skillDict
:
if
candidateOperator
.
skillDict
:
if
(
station
.
id
in
candidateOperator
.
skillDict
[
"process"
]
and
station
in
self
.
pendingMachines
)
or
\
if
(
station
.
id
in
candidateOperator
.
skillDict
[
"process"
]
and
station
in
self
.
pendingMachines
)
or
\
(
station
.
id
in
candidateOperator
.
skillDict
[
"setup"
]
and
station
in
candidateMachines
):
(
station
.
id
in
candidateOperator
.
skillDict
[
"setup"
]
and
station
in
candidateMachines
)
or
\
((
station
.
id
in
candidateOperator
.
skillDict
[
"process"
]
and
station
in
candidateMachines
)
and
\
not
station
.
getActiveObjectQueue
()):
if
not
station
in
candidateOperator
.
candidateStations
:
if
not
station
in
candidateOperator
.
candidateStations
:
candidateOperator
.
candidateStations
.
append
(
station
)
candidateOperator
.
candidateStations
.
append
(
station
)
else
:
else
:
...
...
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