Skip to content
Snippets Groups Projects
Commit 828ecda6 authored by imcovangent's avatar imcovangent
Browse files

Adjusted the SSBJ script to expand the CMDOWS definition with architecture element block settings.

Former-commit-id: baa2cec4f2214168234f98cd34d013075e027838
parent 3a43e118
No related branches found
No related tags found
No related merge requests found
Showing
with 4 additions and 4 deletions
......@@ -25,11 +25,11 @@ cmdows_dir = 'ssbj/CMDOWS'
kdms_dir = 'ssbj/KDMS'
vistoms_dir = 'ssbj/VISTOMS'
print 'Loading repository connectivity graph...'
print('Loading repository connectivity graph...')
rcg = load(os.path.join(kb_dir, 'ssbj', '__cmdows__SSBJ.xml'))
print 'Scripting RCG...'
print('Scripting RCG...')
# A name and a description are added to the graph
rcg.graph['name'] = 'RCG'
......@@ -79,7 +79,7 @@ rcg.add_mathematical_function([[item[0], item[1]] for item in zip(prop_nodes, pr
# Add the objective
R = [node for node in rcg.find_all_nodes(category='variable') if node.endswith('/R')]
R_label = dpdx[0].split('/')[-1]
R_label = R[0].split('/')[-1]
f_R = '/data_schema/mdo_data/objectives/R'
rcg.add_mathematical_function([[R[0], R_label]], 'F[R]', [[f_R, '-{}'.format(R_label), 'Python']])
......@@ -165,7 +165,7 @@ fpg.save('FPG_' + architecture_type, file_type='cmdows', destination_folder=cmdo
integrity=True)
for mdao_definition in mdao_definitions:
print 'Scripting ' + str(mdao_definition) + '...'
print('Scripting ' + str(mdao_definition) + '...')
# Change the problem formulation of the FPG based on the MDAO definition
fpg.add_problem_formulation(mdao_definition, function_order)
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
File added
File added
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment