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
02fce240
Commit
02fce240
authored
Sep 26, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
route passed as argument to OrderDesign; dueDate and orderDate default values are zero
parent
46a45c46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
dream/simulation/OrderDesign.py
dream/simulation/OrderDesign.py
+32
-4
No files found.
dream/simulation/OrderDesign.py
View file @
02fce240
...
...
@@ -38,14 +38,15 @@ class OrderDesign(Job): # inherits from the Job
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
dueDate
=
0
,
orderDate
=
0
,
extraPropertyDict
=
None
,
order
=
None
,
requestingComponent
=
None
,
isCritical
=
False
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
Job
.
__init__
(
self
,
id
=
id
,
name
=
name
,
route
=
route
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
extraPropertyDict
=
extraPropertyDict
,
isCritical
=
isCritical
)
self
.
order
=
order
# parent order of the order component
# TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
# or create the initiate the parent order not as WIP
...
...
@@ -61,4 +62,31 @@ class OrderDesign(Job): # inherits from the Job
#=======================================================================
# used by printRoute
if
self
.
order
:
self
.
alias
=
self
.
order
.
alias
+
'C'
+
str
(
len
(
G
.
OrderComponentList
))
\ No newline at end of file
self
.
alias
=
self
.
order
.
alias
+
'C'
+
str
(
len
(
G
.
OrderComponentList
))
route
=
[
x
for
x
in
self
.
route
]
# copy self.route
#Below it is to assign an order decomposition if it was not assigned in JSON
#have to talk about it with NEX
odAssigned
=
False
for
element
in
route
:
elementIds
=
element
.
get
(
'stationIdsList'
,[])
for
obj
in
G
.
ObjList
:
for
elementId
in
elementIds
:
if
obj
.
id
==
elementId
and
obj
.
type
==
'OrderDecomposition'
:
odAssigned
=
True
if
not
odAssigned
:
odId
=
None
for
obj
in
G
.
ObjList
:
if
obj
.
type
==
'OrderDecomposition'
:
odId
=
obj
.
id
break
if
odId
:
route
.
append
({
'stationIdsList'
:[
odId
],
\
'processingTime'
:
\
{
'distributionType'
:
'Fixed'
,
\
'mean'
:
'0'
}})
self
.
route
=
route
# add the OrderDesign to the DesignList and the OrderComponentList
G
.
OrderComponentList
.
append
(
self
)
G
.
DesignList
.
append
(
self
)
G
.
WipList
.
append
(
self
)
\ No newline at end of file
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