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
4f13ba14
Commit
4f13ba14
authored
Sep 25, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes in Order
parent
7fe3cee6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
dream/simulation/Order.py
dream/simulation/Order.py
+6
-8
dream/simulation/OrderDecomposition.py
dream/simulation/OrderDecomposition.py
+5
-3
No files found.
dream/simulation/Order.py
View file @
4f13ba14
...
...
@@ -60,15 +60,14 @@ class Order(Job):
self
.
secondaryComponentsList
=
[]
# list that holds the Secondary Components of the order
self
.
auxiliaryComponentsList
=
[]
# list of the auxiliary components of the order
self
.
basicsEnded
=
basicsEnded
# flag that informs that the basic components of the order are finished
#=======================================================================
self
.
manager
=
manager
# the manager responsible to handle the order
#=======================================================================
# flag that informs weather the components needed for the assembly are present in the Assembly Buffer
self
.
componentsReadyForAssembly
=
componentsReadyForAssembly
self
.
decomposed
=
False
#
self.decomposed=False
# used by printRoute
self
.
alias
=
'O'
+
str
(
len
(
G
.
OrderList
))
def
createRoute
(
self
,
route
):
return
route
...
...
@@ -78,13 +77,13 @@ class Order(Job):
# returns only the components that are present in the system
#===========================================================================
def
findComponents
(
self
):
from
Globals
import
findObjectById
for
componentDict
in
self
.
componentsList
:
from
Globals
import
findObjectById
,
G
componentId
=
componentDict
.
get
(
'id'
,
0
)
componentClass
=
componentDict
.
get
(
'_class'
,
'not found'
)
# if there is mould defined in the componentsList and the mould is not yet created, then assembly is requested
if
componentClass
==
'Dream.Mould'
:
if
not
componentId
in
G
.
EntityList
:
if
not
componentId
in
[
x
.
id
for
x
in
G
.
EntityList
]
:
self
.
assemblyRequested
=
True
# XXX if the component is not yet created then there is no entity to find.
component
=
findObjectById
(
componentId
)
...
...
@@ -98,7 +97,6 @@ class Order(Job):
def
getComponents
(
self
):
if
not
self
.
components
:
self
.
findComponents
()
assert
len
(
self
.
components
)
>=
len
(
self
.
componentsList
),
'the created child components of an order cannot be less than the length of the componentsList'
return
self
.
components
#===========================================================================
...
...
@@ -106,7 +104,7 @@ class Order(Job):
#===========================================================================
def
findAssemblyComponents
(
self
):
for
child
in
self
.
getComponents
():
if
child
.
componentType
in
assemblyValidTypes
:
if
child
.
componentType
in
self
.
assemblyValidTypes
:
if
not
child
in
self
.
assemblyComponents
:
self
.
assemblyComponents
.
append
(
child
)
...
...
dream/simulation/OrderDecomposition.py
View file @
4f13ba14
...
...
@@ -291,12 +291,14 @@ class OrderDecomposition(CoreObject):
isCritical
=
self
.
orderToBeDecomposed
.
isCritical
)
# check the componentType of the component and accordingly add to the corresponding list of the parent order
#===============================================================================
if
OC
.
componentType
==
'Basic'
:
self
.
orderToBeDecomposed
.
basicComponentsList
.
append
(
OC
)
elif
OC
.
componentType
==
'Secondary'
:
self
.
orderToBeDecomposed
.
secondaryComponentsList
.
append
(
OC
)
else
:
self
.
orderToBeDecomposed
.
auxiliaryComponentsList
.
append
(
OC
)
# else:
# self.orderToBeDecomposed.auxiliaryComponentsList.append(OC)
#===============================================================================
G
.
OrderComponentList
.
append
(
OC
)
G
.
JobList
.
append
(
OC
)
...
...
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