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
5ab8e6d2
Commit
5ab8e6d2
authored
Jun 10, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor corrections in setStartWip
parent
1d84eac5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
dream/simulation/readWip.py
dream/simulation/readWip.py
+13
-5
No files found.
dream/simulation/readWip.py
View file @
5ab8e6d2
...
...
@@ -204,7 +204,9 @@ def getOrders(input_data):
G
.
OrderList
.
append
(
O
)
# call the method that finds the components of each order and initiates them
getComponets
(
orderDict
,
O
)
print
print
len
(
G
.
EntityList
)
print
def
getMachineNameSet
(
technology
):
"""
...
...
@@ -562,8 +564,12 @@ def setStartWip():
json_data
=
G
.
wip_Data
#Read the json data
WIP
=
json_data
[
'WIP'
]
# read from the dictionary the dict with key 'WIP'
print
'/'
*
200
print
'SETTING THE WIP'
print
'
\
\
'
*
200
#===========================================================================
# OrderDesign type
print
'setting desings as wip'
#===========================================================================
# for all the entities in the entityList
for
entity
in
G
.
DesignList
:
...
...
@@ -574,10 +580,11 @@ def setStartWip():
# if the entity is in the WIP dict then move it to the station defined.
elif
entity
.
id
in
WIP
.
keys
():
objectID
=
WIP
[
entity
.
id
][
"station"
]
print
objectID
assert
objectID
!=
''
,
'there must be a stationID given to set the WIP'
from
Globals
import
findObjectById
object
=
Globals
.
findObjectById
(
objectID
)
assert
station
!=
None
,
'the station defined in the WIP is not a valid Station'
assert
object
!=
None
,
'the station defined in the WIP is not a valid Station'
# find the station by its id, if there is no station then place it
# in the starting queue (QCAD), (QENG)
entry_time
=
float
(
WIP
[
entity
.
id
][
"entry"
])
...
...
@@ -598,11 +605,12 @@ def setStartWip():
# find the stations that come after the machine that the entity last exited
currentObjectIds
=
entity
.
remainingRoute
[
0
].
get
(
'stationIdsList'
,[])
# pick one at random
currentObjectId
=
next
(
currentObjectIds
)
currentObjectId
=
next
(
id
for
id
in
currentObjectIds
)
currentObject
=
Globals
.
findObjectById
(
currentObjectId
)
# then break down the OrderDesing and design the OrderComponents
if
currentObject
.
type
==
'OrderDecomposition'
:
if
len
(
Order
.
auxiliaryComponentsList
+
Order
.
secondaryComponentsList
+
Order
.
basicComponentsList
)
==
0
:
orderToDecompose
=
entity
.
order
if
len
(
orderToDecompose
.
auxiliaryComponentsList
+
orderToDecompose
.
secondaryComponentsList
+
orderToDecompose
.
basicComponentsList
)
==
0
:
breakOrderDesing
(
entity
)
# if the orderDesign is already broken down do not break it down again
else
:
...
...
@@ -788,7 +796,7 @@ def breakOrderDesing(orderDesign):
reqComponent
.
auxiliaryList
.
append
(
auxComponent
)
#if there is an order for decomposition
if
G
.
orderToBeDecomposed
:
from
Globals
import
setW
ip
from
Globals
import
setW
IP
setWIP
(
G
.
newlyCreatedComponents
)
#set the new components as wip
# TODO: consider signalling the receivers if any WIP is set now
#reset attributes
...
...
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