Skip to content
Snippets Groups Projects
Commit 001b05db authored by baigner's avatar baigner
Browse files

VISTOMS update: Impose MDAO architecture including additionals settings works...

VISTOMS update: Impose MDAO architecture including additionals settings works now for all architectures.


Former-commit-id: bfaf8e30442d24dacdd34d34d3ca01307dc90be8
parent 5a2ae084
No related branches found
No related tags found
No related merge requests found
......@@ -20066,6 +20066,7 @@
'Uniform design',
'Box-Behnken design']
var DOE_settings = []
var coupled_functions_groups = [];
//################################################################################################//
......@@ -22991,7 +22992,7 @@
}
})
}
if (MDAO_architecture.includes("DOE"))
if (MDAO_architecture.includes("DOE") || MDAO_architecture == "BLISS-2000")
{
var theOptions = []
for (var i = 0; i<DOE_methods.length; i++){theOptions.push({text:DOE_methods[i], value:DOE_methods[i]})}
......@@ -23120,6 +23121,55 @@
}
})
}
if (MDAO_architecture == "CO" || MDAO_architecture == "BLISS-2000")
{
bootbox.prompt(
{
closeButton: false,
title: "Select number of coupled function groups",
inputType: 'number',
callback: function (result) {
if (result)
{
var number_of_coupled_groups = result;
var theOptions = [];
for (var j=1; j<currentGraph.xdsm.nodes.length;j++)
{
//aigner: value: j-1 because in KADMOS the coordinator is not in the node list, therefore all other competences' indices are decreased by 1!
theOptions.push({text: currentGraph.xdsm.nodes[j].name, value: currentGraph.xdsm.nodes[j].uID});
}
coupled_functions_groups = [];
function select_coupled_functions_group(num, counter)
{
counter ++;
if (num >= counter)
{
bootbox.prompt(
{
closeButton: false,
title: "Select functions for group " +String(counter),
inputType: 'checkbox',
inputOptions: theOptions,
callback: function (result)
{
if (result)
{
coupled_functions_groups.push(result)
select_coupled_functions_group(num, counter);
}
else {bootbox.hideAll()}
}
})
}
}
select_coupled_functions_group(number_of_coupled_groups, 0)
}
else {bootbox.hideAll()}
}
})
}
}}
})
})
......@@ -23177,6 +23227,7 @@
'currentOrder':nodeOrder,
'mdao_architecture':MDAO_architecture,
'doe_settings': JSON.stringify(DOE_settings),
'coupled_functions_groups': JSON.stringify(coupled_functions_groups),
'coupling_decomposition':coupling_decomposition,
'allow_unconverged_couplings':allow_unconverged_couplings,
'sessionId':sessionId},
......@@ -2088,6 +2088,7 @@ def interface(debug=True, tempdir=None):
mdao_architecture = request.form['mdao_architecture']
doe_settings_py = json.loads(request.form['doe_settings'])
coupling_decomposition = request.form['coupling_decomposition']
coupled_functions_groups = json.loads(request.form['coupled_functions_groups'])
allow_unconverged_couplings_str = request.form['allow_unconverged_couplings']
if allow_unconverged_couplings_str == 'True':
allow_unconverged_couplings = True
......@@ -2156,17 +2157,19 @@ def interface(debug=True, tempdir=None):
fpg.graph['problem_formulation']['convergence_type'] = coupling_decomposition
fpg.graph['problem_formulation']['allow_unconverged_couplings'] = allow_unconverged_couplings
# TODO Benedikt: Collaborative Optimization and Bliss2000 do not work yet
if mdao_architecture in ['converged-DOE', 'unconverged-DOE']:
if mdao_architecture in ['converged-DOE', 'unconverged-DOE', 'BLISS-2000']:
if doe_settings['method'] not in fpg.OPTIONS_DOE_METHODS:
return "ERROR: Invalid DOE method selected, please select a DOE method from the dropdown list"
fpg.graph['problem_formulation']['doe_settings'] = doe_settings
if len(coupled_functions_groups) > 0:
fpg.graph['problem_formulation']['coupled_functions_groups'] = coupled_functions_groups
fpg.add_function_problem_roles()
mdg, mpg = fpg.impose_mdao_architecture()
# Add the graph with the updated function order to VISTOMS
newVistomsData = mdg.vistoms_add_json(graph_id=graphID, mpg=mpg)
# Save the graph in temp/tmp.kdms
......
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