Skip to content
Snippets Groups Projects
Commit 356b341d authored by Lukas Müller's avatar Lukas Müller
Browse files

Fixing methods related to equations when saving to CMDOWS and solving various...

Fixing methods related to equations when saving to CMDOWS and solving various other small CMDOWS issues (resolving #98)


Former-commit-id: 2b47ab3cadcf635394cbb3a90e9472924a88590e
parent a88455b1
No related branches found
No related tags found
No related merge requests found
Pipeline #192708 canceled
Showing
with 5 additions and 7 deletions
......@@ -110,7 +110,7 @@ rcg.add_equation('F1', 'x1**2+z2+y1+exp(-y2)', 'Python')
rcg.add_equation('F1', 'x1^2+z2+y1+e^{-y2}', 'LaTeX')
rcg.add_equation('F1', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi><msup><mn>1</mn><mn>2</mn></msup><mo>+</mo><mi>z</mi><mn>2</mn><mo>+</mo><mi>y</mi><mn>1</mn><mo>+</mo><msup><mi>e</mi><mrow><mo>-</mo><mi>y</mi><mn>2</mn></mrow></msup></math>', 'MathML')
# Add some (optional) organization information
contacts = [{'attrib': {'uID': 'ivangent'},'name': 'Imco van Gent', 'email': 'i.vangent@tudelft.nl', 'company': 'TU Delft'},
contacts = [{'attrib': {'uID': 'ivangent'}, 'name': 'Imco van Gent', 'email': 'i.vangent@tudelft.nl', 'company': 'TU Delft'},
{'attrib': {'uID': 'lmuller'}, 'name': 'Lukas Muller', 'email': 'l.muller@student.tudelft.nl', 'company': 'TU Delft'}]
architects = [{'contactUID': 'ivangent'}, {'contactUID': 'lmuller'}]
integrators = [{'contactUID': 'lmuller'}]
......@@ -251,14 +251,12 @@ for mdao_definition in mdao_definitions:
+ str(mdao_architecture) + (
'_' + str(convergence_type) if convergence_type else '') + '.'
# Just make sure everything is labeled (for MDF and IDF this might be not the case yet)
#mdg.add_equation_labels(mdg.get_function_nodes())
# Copy mathematical functions to additional output edges (for MDF and IDF additional output edges are created)
# TODO: This should be automated in the KADMOS method get_mdg()
#if mdao_architecture in ['IDF', 'MDF']:
# mdg.edge['F1']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/f']['equations'] = mdg.edge['F1']['/data_schema/analyses/f']['equations']
# mdg.edge['G1']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/g1']['equations'] = mdg.edge['G1']['/data_schema/analyses/g1']['equations']
# mdg.edge['G2']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/g2']['equations'] = mdg.edge['G2']['/data_schema/analyses/g2']['equations']
if mdao_architecture in ['IDF', 'MDF']:
mdg.edge['F1']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/f']['equations'] = mdg.edge['F1']['/data_schema/analyses/f']['equations']
mdg.edge['G1']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/g1']['equations'] = mdg.edge['G1']['/data_schema/analyses/g1']['equations']
mdg.edge['G2']['/data_schema/architectureNodes/finalOutputVariables/data_schemaCopy/analyses/g2']['equations'] = mdg.edge['G2']['/data_schema/analyses/g2']['equations']
# Create a DSM visualization of the Mdao
mdg.create_dsm(file_name='Mdao_'+mdao_definition, include_system_vars=True, destination_folder=pdf_dir, mpg=mpg)
......
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
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
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