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
cd90a83e
Commit
cd90a83e
authored
May 16, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean-up in Router methods
parent
23c117cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
40 deletions
+5
-40
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+5
-40
No files found.
dream/simulation/OperatorRouter.py
View file @
cd90a83e
...
...
@@ -340,9 +340,6 @@ class Router(ObjectInterruption):
candidateOperator
=
nextobject
.
findCandidateOperator
()
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
# update the schedulingRule/multipleCriterionList of the Router
if
self
.
sorting
:
self
.
updateSchedulingRule
()
# in case the router deals with managed entities
#------------------------------------------------------------------------------
else
:
...
...
@@ -356,40 +353,11 @@ class Router(ObjectInterruption):
if
entity
.
currentStation
.
canEntityProceed
(
entity
)
\
and
not
entity
.
manager
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
entity
.
manager
)
# # for entities of type OrderComponent, if they reside at a conditionalBuffer,
# # they must wait till their basicsEnded flag is raised
# if entity.type=='OrderComponent':
# from ConditionalBuffer import ConditionalBuffer
# if (entity.componentType=='Secondary'\
# and type(entity.currentStation) is ConditionalBuffer\
# and entity.order.basicsEnded==False):
# continue
# # unassembled components of a mould must wait at a MouldAssemblyBuffer till the componentsReadyForAssembly flag is raised
# from MouldAssemblyBuffer import MouldAssemblyBuffer
# if type(entity.currentStation) is MouldAssemblyBuffer:
# if not entity.order.componentsReadyForAssembly:
# continue
# # for all the possible receivers of an entity check whether they can accept and then set accordingly the canProceed flag of the entity
# if not entity.currentStation in self.pendingMachines:
# for nextObject in [object for object in entity.currentStation.next if object.canAcceptEntity(entity)]:
# entity.canProceed=True
# entity.candidateReceivers.append(nextObject)
# # if the entity is in a machines who's broker waits for operator then
# if entity.currentStation in self.pendingMachines:
# entity.canProceed=True
# entity.candidateReceivers.append(entity.currentStation)
#
# # if the entity can proceed, add its manager to the candidateOperators list
# if entity.canProceed and not entity.manager in self.candidateOperators:
# self.candidateOperators.append(entity.manager)
# find the candidateEntities for each operator
self
.
findCandidateEntities
()
# update the schedulingRule/multipleCriterionList of the Router
if
self
.
sorting
:
self
.
updateSchedulingRule
()
# find the candidateEntities for each operator
self
.
findCandidateEntities
()
if
self
.
managed
:
self
.
printTrace
(
'router found candidate operators'
+
' '
*
3
,[
operator
.
id
for
operator
in
self
.
candidateOperators
])
else
:
...
...
@@ -481,10 +449,7 @@ class Router(ObjectInterruption):
from
Globals
import
G
candidateList
=
self
.
pending
self
.
activeQSorter
(
criterion
=
self
.
schedulingRule
,
candList
=
candidateList
)
#=======================================================================
# # testing
# self.printTrace('router', ' sorted pending entities')
#=======================================================================
self
.
printTrace
(
'router'
,
' sorted pending entities'
)
#=======================================================================
# Sort candidateOperators
...
...
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