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
1ce60619
Commit
1ce60619
authored
Jan 09, 2016
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SkilledOperatorRouter: add assertations that machine is correctly cconsidered as blocked or not
parent
fcf9dbaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+22
-1
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
1ce60619
...
@@ -226,9 +226,30 @@ class SkilledRouter(Router):
...
@@ -226,9 +226,30 @@ class SkilledRouter(Router):
if
nextObject
.
getActiveObjectQueue
()[
0
].
type
==
'Batch'
:
if
nextObject
.
getActiveObjectQueue
()[
0
].
type
==
'Batch'
:
reassemblyBlocksMachine
=
True
reassemblyBlocksMachine
=
True
if
machine
.
isBlocked
or
reassemblyBlocksMachine
:
if
machine
.
isBlocked
or
reassemblyBlocksMachine
:
if
not
len
(
machine
.
getActiveObjectQueue
())
and
(
not
reassemblyBlocksMachine
):
raise
ValueError
(
'empty machine considered as blocked'
)
if
machine
.
timeLastEntityEnded
<
machine
.
timeLastEntityEntered
:
raise
ValueError
(
'machine considered as blocked, while it has Entity that has not finished'
)
if
"Queue"
in
nextObjectClassName
:
if
len
(
nextObject
.
getActiveObjectQueue
())
!=
nextObject
.
capacity
:
raise
ValueError
(
'Machine considered as blocked while Queue has space'
)
if
"Clearance"
in
nextObjectClassName
:
if
not
nextObject
.
getActiveObjectQueue
():
raise
ValueError
(
'Machine considered as blocked while Clearance is empty'
)
else
:
subBatchMachineHolds
=
machine
.
getActiveObjectQueue
()[
0
]
subBatchLineClearanceHolds
=
nextObject
.
getActiveObjectQueue
()[
0
]
if
subBatchMachineHolds
.
parentBatch
==
subBatchLineClearanceHolds
.
parentBatch
and
\
(
len
(
nextObject
.
getActiveObjectQueue
())
!=
nextObject
.
capacity
):
raise
ValueError
(
'Machine considered as blocked while Line Clearance holds same batch and has space'
)
machinesForSecondPhaseDict
[
stationId
]
=
self
.
availableStationsDict
[
stationId
]
machinesForSecondPhaseDict
[
stationId
]
=
self
.
availableStationsDict
[
stationId
]
del
self
.
availableStationsDict
[
stationId
]
del
self
.
availableStationsDict
[
stationId
]
else
:
if
len
(
machine
.
getActiveObjectQueue
())
and
(
not
machine
.
isProcessing
)
and
\
machine
.
onShift
and
machine
.
currentOperator
:
raise
ValueError
(
'machine should be considered blocked'
)
# run the LP method only for the machines that are not blocked
# run the LP method only for the machines that are not blocked
solution
=
opAss_LP
(
self
.
availableStationsDict
,
self
.
availableOperatorList
,
solution
=
opAss_LP
(
self
.
availableStationsDict
,
self
.
availableOperatorList
,
self
.
operators
,
previousAssignment
=
self
.
previousSolution
,
self
.
operators
,
previousAssignment
=
self
.
previousSolution
,
...
...
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