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

Tested and improved the mark_as_constraint() function and its usage in the...

Tested and improved the mark_as_constraint() function and its usage in the SSBJ script to enable double bounds.


Former-commit-id: cbb7b7e1ee48a5cd0f1739dd6f20bf1dd9ba1b63
parent 654a8b44
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 10 deletions
......@@ -139,11 +139,11 @@ fpg.mark_as_objective([nd for nd in rcg.find_all_nodes(category='variable') if n
# Assign constraints
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/sigmas' in nd], '<=', 1.09)
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/Theta' in nd], '<=', 1.04) # TODO: Add option to include two bounds for constraints!
fpg.mark_as_constraint([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/Theta' in nd][0], ['>=', '<='], [0.96, 1.04]) # TODO: Add option to include two bounds for constraints!
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/dpdx' in nd], '<=', 1.04)
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/ESF' in nd], '<=', 1.5) # TODO: Add option to include two bounds for constraints!
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/DT' in nd], '<=', 0.0)
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/Temp' in nd], '<=', 1.02) # TODO: Add option to include two bounds for constraints!
fpg.mark_as_constraint([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/ESF' in nd][0], ['>=', '<='], [0.5, 1.5]) # TODO: Add option to include two bounds for constraints!
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/DT' in nd], '<=', 0.0) # TODO: Check if two bounds are needed...
fpg.mark_as_constraints([nd for nd in rcg.find_all_nodes(category='variable') if '/mdo_data/constraints/propulsion/Temp' in nd], '<=', 1.02) # TODO: Check if two bounds are needed...
# Search for problem roles
fpg.add_function_problem_roles()
......
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
......@@ -3,14 +3,14 @@
<header>
<creator>Imco van Gent</creator>
<description>FPG CMDOWS file of the super-sonic business jet test case optimization problem</description>
<timestamp>2018-03-07T15:20:06.192462</timestamp>
<timestamp>2018-03-13T19:21:46.565692</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.7</cmdowsVersion>
<updates>
<update>
<modification>KADMOS export of a fundamental problem graph (FPG).</modification>
<creator>Imco van Gent</creator>
<timestamp>2018-03-07T15:20:06.192462</timestamp>
<timestamp>2018-03-13T19:21:46.565692</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.7</cmdowsVersion>
</update>
......@@ -634,8 +634,8 @@
<constraintVariable uID="__conVar__/data_schema/mdo_data/constraints/Theta">
<parameterUID>/data_schema/mdo_data/constraints/Theta</parameterUID>
<constraintType>inequality</constraintType>
<constraintOperator>&lt;=</constraintOperator>
<referenceValue>1.04</referenceValue>
<constraintOperator>&gt;=;&lt;=</constraintOperator>
<referenceValue>0.96;1.04</referenceValue>
</constraintVariable>
<constraintVariable uID="__conVar__/data_schema/mdo_data/constraints/propulsion/Temp">
<parameterUID>/data_schema/mdo_data/constraints/propulsion/Temp</parameterUID>
......@@ -670,8 +670,8 @@
<constraintVariable uID="__conVar__/data_schema/mdo_data/constraints/propulsion/ESF">
<parameterUID>/data_schema/mdo_data/constraints/propulsion/ESF</parameterUID>
<constraintType>inequality</constraintType>
<constraintOperator>&lt;=</constraintOperator>
<referenceValue>1.5</referenceValue>
<constraintOperator>&gt;=;&lt;=</constraintOperator>
<referenceValue>0.5;1.5</referenceValue>
</constraintVariable>
<constraintVariable uID="__conVar__/data_schema/mdo_data/constraints/sigmas/sigma5">
<parameterUID>/data_schema/mdo_data/constraints/sigmas/sigma5</parameterUID>
......
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