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
b8ba7eca
Commit
b8ba7eca
authored
Mar 10, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Router to be called only if there are machines that starve formore than 30 minutes
parent
25614f17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+14
-3
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
b8ba7eca
...
...
@@ -164,7 +164,11 @@ class SkilledRouter(Router):
LPFlag
=
True
if
self
.
checkCondition
:
LPFlag
=
self
.
checkIfAllocationShouldBeCalled
()
LPFlag
=
self
.
checkIfAllocationShouldBeCalled
()
# in case there are not available stations or operators there is no need to call the LP
if
(
not
self
.
availableStationsDict
)
or
(
not
self
.
availableOperatorList
):
LPFlag
=
False
#===================================================================
# # XXX run the LP assignment algorithm
# # should return a list of correspondences
...
...
@@ -173,10 +177,12 @@ class SkilledRouter(Router):
# as it doesn't support zero WIP levels
#===================================================================
if
LPFlag
:
# print self.env.now, 'LP called'
solution
=
opAss_LP
(
self
.
availableStationsDict
,
self
.
availableOperatorList
,
self
.
operators
,
previousAssignment
=
self
.
previousSolution
,
weightFactors
=
self
.
weightFactors
,
Tool
=
self
.
tool
)
else
:
# print self.env.now, 'no need to call LP'
solution
=
{}
# print '-------'
# print self.env.now, solution
...
...
@@ -317,8 +323,13 @@ class SkilledRouter(Router):
self
.
waitEndProcess
=
False
def
checkIfAllocationShouldBeCalled
(
self
):
print
'*'
*
10
return
True
from
Globals
import
G
# loop through the machines
for
machine
in
G
.
MachineList
:
# if one machine is starved more than 30 then allocation is needed
if
(
self
.
env
.
now
-
machine
.
timeLastEntityEnded
>=
30
)
and
(
not
machine
.
isProcessing
):
return
True
return
False
def
postProcessing
(
self
):
if
self
.
outputSolutions
:
...
...
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