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
d0d2bc9c
Commit
d0d2bc9c
authored
Mar 10, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Router to consider if the shift of operators have been changed
parent
b8ba7eca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+5
-1
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
d0d2bc9c
...
@@ -164,7 +164,7 @@ class SkilledRouter(Router):
...
@@ -164,7 +164,7 @@ class SkilledRouter(Router):
LPFlag
=
True
LPFlag
=
True
if
self
.
checkCondition
:
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
# 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
):
if
(
not
self
.
availableStationsDict
)
or
(
not
self
.
availableOperatorList
):
LPFlag
=
False
LPFlag
=
False
...
@@ -324,6 +324,10 @@ class SkilledRouter(Router):
...
@@ -324,6 +324,10 @@ class SkilledRouter(Router):
def
checkIfAllocationShouldBeCalled
(
self
):
def
checkIfAllocationShouldBeCalled
(
self
):
from
Globals
import
G
from
Globals
import
G
# loop through the operators. If for one the shift ended or started right now allocation is needed
for
operator
in
G
.
OperatorsList
:
if
operator
.
timeLastShiftEnded
==
self
.
env
.
now
or
operator
.
timeLastShiftStarted
==
self
.
env
.
now
:
return
True
# loop through the machines
# loop through the machines
for
machine
in
G
.
MachineList
:
for
machine
in
G
.
MachineList
:
# if one machine is starved more than 30 then allocation is needed
# if one machine is starved more than 30 then allocation is needed
...
...
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