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
17452863
Commit
17452863
authored
Jan 03, 2016
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support NonStarvingEntry in the optimization model
parent
b063e29b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
dream/plugins/Batches/AddBatchStations.py
dream/plugins/Batches/AddBatchStations.py
+3
-3
dream/plugins/Batches/BatchesWIPKEtool.py
dream/plugins/Batches/BatchesWIPKEtool.py
+2
-2
dream/plugins/Batches/BatchesWIPShort.py
dream/plugins/Batches/BatchesWIPShort.py
+2
-2
dream/plugins/Batches/BatchesWIPSpreadsheet.py
dream/plugins/Batches/BatchesWIPSpreadsheet.py
+2
-2
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+1
-1
No files found.
dream/plugins/Batches/AddBatchStations.py
View file @
17452863
...
...
@@ -20,8 +20,8 @@ class AddBatchStations(plugin.InputPreparationPlugin):
# get the number of units for a standard batch
standardBatchUnits
=
0
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.BatchSource'
:
standardBatchUnits
=
int
(
node
[
'
batchN
umberOfUnits'
])
if
node
[
'_class'
]
in
[
'Dream.BatchSource'
,
'Dream.NonStarvingEntry'
]
:
standardBatchUnits
=
int
(
node
[
'
entityData'
][
'n
umberOfUnits'
])
# loop through all the objects and set that the name will be equal to the id
for
node_id
,
node
in
nodes
.
iteritems
():
...
...
@@ -69,7 +69,7 @@ class AddBatchStations(plugin.InputPreparationPlugin):
if
node
[
'_class'
]
==
'Dream.BatchDecompositionBlocking'
:
predecessorId
=
self
.
getPredecessors
(
data
,
node_id
)[
0
]
predecessorClass
=
nodes
[
predecessorId
][
'_class'
]
if
predecessorClass
==
'Dream.BatchSource'
:
if
predecessorClass
in
[
'Dream.BatchSource'
,
'Dream.NonStarvingEntry'
]
:
data
[
'graph'
][
'node'
][
node_id
][
'_class'
]
=
'Dream.BatchDecompositionStartTime'
# loop through the nodes
...
...
dream/plugins/Batches/BatchesWIPKEtool.py
View file @
17452863
...
...
@@ -24,8 +24,8 @@ class BatchesWIPKEtool(plugin.InputPreparationPlugin):
# get the number of units for a standard batch
standardBatchUnits
=
0
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.BatchSource'
:
standardBatchUnits
=
int
(
node
[
'
batchN
umberOfUnits'
])
if
node
[
'_class'
]
in
[
'Dream.BatchSource'
,
'Dream.NonStarvingEntry'
]
:
standardBatchUnits
=
int
(
node
[
'
entityData'
][
'n
umberOfUnits'
])
node
[
'wip'
]
=
[]
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
...
...
dream/plugins/Batches/BatchesWIPShort.py
View file @
17452863
...
...
@@ -23,8 +23,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
# get the number of units for a standard batch
standardBatchUnits
=
0
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.BatchSource'
:
standardBatchUnits
=
int
(
node
[
'
batchN
umberOfUnits'
])
if
node
[
'_class'
]
in
[
'Dream.BatchSource'
,
'Dream.NonStarvingEntry'
]
:
standardBatchUnits
=
int
(
node
[
'
entityData'
][
'n
umberOfUnits'
])
node
[
'wip'
]
=
[]
# remove the titles
...
...
dream/plugins/Batches/BatchesWIPSpreadsheet.py
View file @
17452863
...
...
@@ -25,8 +25,8 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
# get the number of units for a standard batch
standardBatchUnits
=
0
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.BatchSource'
:
standardBatchUnits
=
int
(
node
[
'
batchN
umberOfUnits'
])
if
node
[
'_class'
]
in
[
'Dream.BatchSource'
,
'Dream.NonStarvingEntry'
]
:
standardBatchUnits
=
int
(
node
[
'
entityData'
][
'n
umberOfUnits'
])
node
[
'wip'
]
=
[]
if
wipData
:
...
...
dream/simulation/SkilledOperatorRouter.py
View file @
17452863
...
...
@@ -455,7 +455,7 @@ class SkilledRouter(Router):
def
getPreviousQueue
(
self
,
machine
):
predecessor
=
machine
.
previous
[
0
]
while
1
:
if
"Source"
in
str
(
predecessor
.
__class__
):
if
"Source"
in
str
(
predecessor
.
__class__
)
or
"NonStarvingEntry"
in
str
(
predecessor
.
__class__
)
:
return
None
if
"Queue"
in
str
(
predecessor
.
__class__
)
or
"Clearance"
in
str
(
predecessor
.
__class__
):
return
predecessor
...
...
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