<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html xmlns:mml = "http://www.w3.org/1998/Math/MathML" lang = "en"><head><meta charset = "UTF-8"/><meta name = "copyright" content = "(C) Copyright 2020"/><meta name = "DC.rights.owner" content = "(C) Copyright 2020"/><meta name = "DC.type" content = "concept"/><meta name = "abstract" content = "The objective function depends on the results of the finite element analysis, such as compliance, displacements, stresses, reaction forces, internal forces, eigenfrequencies, or properties of the finite element model such as material volume or nodal positions."/><meta name = "description" content = "The objective function depends on the results of the finite element analysis, such as compliance, displacements, stresses, reaction forces, internal forces, eigenfrequencies, or properties of the finite element model such as material volume or nodal positions."/><meta name = "DC.relation" scheme = "URI" content = "tso-c-usr-terms-ovw.htm#tso-c-usr-terms-ovw"/><meta name = "DC.relation" scheme = "URI" content = "tso-c-usr-shape-objFunc-ctrl.htm#tso-c-usr-shape-objFunc-ctrl"/><meta name = "DC.relation" scheme = "URI" content = "../TsoCmdMap/tso-r-cmd-objFunc.htm#tso-r-cmd-objFunc"/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-terms-objFuncOvw"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Objective Function Overview</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script><script type = "text/javascript" src = "../MathJax/MathJax.js?config=DS-default,local/local">
  		/* */
  		</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-terms-objFuncOvw">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Objective Function Overview</h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3"><table class = "DocHeaderIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract">
<span class = "shortdesc">The objective function depends on the results of the finite element analysis, such as
      compliance, displacements, stresses, reaction forces, internal forces, eigenfrequencies, or
      properties of the finite element model such as material volume or nodal positions.</span>

</p>
<p>This page discusses: </p><ul><li><a href = "#tso-c-usr-terms-objFuncOvw__tso-c-usr-terms-objFuncOvw-expl" id = "toc_rg" title = "">Example</a></li><li><a href = "#tso-c-usr-terms-objFuncOvw__tso-c-usr-terms-objFuncOvw-remark" id = "toc_rg" title = "">Remarks</a></li></ul>
</p></td></tr></table></td><td class = "DocHeader2"><table class = "DocTopicsSeeAlso" id = "table13"><tr><td class = "TopicsTitle">See Also</td></tr><tr><td><a title = "To optimize something you need to know what to optimize. Do you want to minimize stresses? Or maximize all eigenvalues?" href = "tso-c-usr-terms-ovw.htm#tso-c-usr-terms-ovw">Overview of Optimization Terms</a></td></tr><tr><td><a title = "The objective function describes the optimization target. In general, one scalar value (sometimes combined from other scalars) is to be maximized or minimized." href = "tso-c-usr-shape-objFunc-ctrl.htm#tso-c-usr-shape-objFunc-ctrl">Objective Function for Controller-Based Shape Optimization</a></td></tr></table><table class = "DocTopicsInOtherGuides" id = "table14"><tr><td height = "8px"/></tr><tr><td class = "TopicsTitleNormal">In Other Guides</td></tr><tr><td><a title = "Defines the objective function of the optimization." href = "../TsoCmdMap/tso-r-cmd-objFunc.htm#tso-r-cmd-objFunc">OBJ_FUNC</a></td></tr></table></td></tr></table>




<div class = "body conbody">
<p>These results are combined to scalar values using the so-called 'design responses.' Initially,
      one or several responses for the objective function must be defined using the command
        <code class = "ph codeph">DRESP</code>. These responses are then added to the objective, as seen in the
      following figure:</p>
<p><table class = "table" id = "tso-c-usr-terms-objFuncOvw__xx918912"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><br/><img class = "image" id = "tso-c-usr-terms-objFuncOvw__image_B48502F0C26E42FBB09EB68156CF3B56" src = "../TsoUserImages/terms-objFuncDef.png" width = "450"/><br/></td>
</tr>
</tbody></table></p>

<p> Weight and reference values can be applied in the combination using
the command <code class = "ph codeph">OBJ_FUNC</code>.</p>
<pre class = "codeblock">
<code class = "ph codeph">
OBJ_FUNC
 ID_NAME = ...
 DRESP   = id_name_1, WEIGHT, REFERENCE
 DRESP   = id_name_2, WEIGHT, REFERENCE
 DRESP   = id_name_3, WEIGHT, REFERENCE
 DRESP   = id_name_4, WEIGHT, REFERENCE
 ...
 TARGET  = MIN | MAX | MINMAX | MAXMIN
END_
</code>
</pre>
<ul class = "ul"><li class = "li">The <code class = "ph codeph">ID_NAME</code> of the <code class = "ph codeph">OBJ_FUNC</code>
must be referenced in the <code class = "ph codeph">OPTIMIZE</code>
command to activate the objective function.</li><li class = "li">The <code class = "ph codeph">WEIGHT</code> and <code class = "ph codeph">REFERENCE</code> values
are optional.</li>
<li class = "li">The default weighting factor is 
<span class = "ph inlineequation"><math class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">w</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">i</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">1</mn></math></span>
and the default reference value is
<span class = "ph inlineequation"><math class = "- topic/foreign "><msubsup class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi><mi class = "- topic/foreign ">i</mi><mtext class = "- topic/foreign ">ref</mtext></msubsup><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">0</mn></math></span>.
<table class = "Remark" id = "table132"><tr><td class = "Remark"><span class = "run-in.important">Important:
				</span><span class = "notecontent"><ul class = "ul">
<li class = "li">For controller-based shape optimization the reference value (
<span class = "ph inlineequation"><math class = "- topic/foreign "><msubsup class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi><mi class = "- topic/foreign ">i</mi><mtext class = "- topic/foreign ">ref</mtext></msubsup></math></span>
) has a special meaning.
The reference value is the value around which
<span class = "ph">Tosca Structure</span>
homogenizes the stress. Thus, a value
<span class = "ph inlineequation"><math class = "- topic/foreign "><msubsup class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi><mi class = "- topic/foreign ">i</mi><mtext class = "- topic/foreign ">ref</mtext></msubsup><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">0</mn></math></span>
usually does not make sense and 
<span class = "ph">Tosca Structure</span>
calculates a default reference value if <code class = "ph codeph">REFERENCE</code> (
<span class = "ph inlineequation"><math class = "- topic/foreign "><msubsup class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi><mi class = "- topic/foreign ">i</mi><mtext class = "- topic/foreign ">ref</mtext></msubsup></math></span>  
) is unset. The reference calculated can be seen in <code class = "ph codeph">TOSCA.OUT</code>:
<br/><img border = "1" class = "image" src = "../TsoUserImages/terms_objFuncRef.png" width = "450"/><br/></li>
<li class = "li">For controller-based shape optimization the user must either set
all <code class = "ph codeph">REFERENCE</code>-values or none at all (automatic reference
value calculation).
</li></ul></span></td></tr></table>
</li>
<li class = "li">The user does not need to define <code class = "ph codeph">WEIGHT</code>
and <code class = "ph codeph">REFERENCE</code> for the most common optimization formulations. 
The default values of <code class = "ph codeph">WEIGHT=1.0</code> and <code class = "ph codeph">REFERENCE=0.0</code> 
are good settings for most common cases.</li>
<li class = "li">The command <code class = "ph codeph">TARGET</code> can be set to <code class = "ph codeph">MIN</code>, <code class = "ph codeph">MAX</code>,
<code class = "ph codeph">MINMAX</code>, or <code class = "ph codeph">MAXMIN</code>, indicating if the objective function
is minimized or maximized or if a min-max or a max-min formulation is used.<table class = "Remark" id = "table132"><tr><td class = "Remark"><span class = "run-in.important">Important:
				</span><span class = "notecontent">
<ol class = "ol" id = "tso-c-usr-terms-objFuncOvw__ol_10839C259B2749F2A18CE23A00864C27">
<li class = "li">The reference value for the
<code class = "ph codeph">MINMAX</code> function differs from the above definition by eigenfrequency
optimization for the sensitivity-based algorithm. </li>
<li class = "li"><code class = "ph codeph">MAXMIN</code> is not allowed for
eigenfrequency optimization. </li>
<li class = "li">The reference value for von Mises stresses
in topology optimization differs from the above definition. </li>
</ol>
</span></td></tr></table>
</li></ul>
<ul class = "ul"><li class = "li">The design responses
listed in <code class = "ph codeph">OPTIMZE</code> will be summed up taking into account
the individual weighting and reference values 
if <code class = "ph codeph">TARGET</code> is set to <code class = "ph codeph">MIN</code> or <code class = "ph codeph">MAX</code>.</li><li class = "li">A min-max / max-min formulation is applied if <code class = "ph codeph">TARGET</code> is set
to <code class = "ph codeph">MINMAX / MAXMIN</code>. Then the design responses 
are dealt with individually in a multidisciplinary optimization taking
into account the individual weighting and reference values.</li></ul>
<p>In the log file <code class = "ph codeph">TOSCA.OUT</code> the object function value can
be monitored:</p>
<p><br/><img border = "1" class = "image" id = "tso-c-usr-terms-objFuncOvw__image_94A9901A885641CB8E276055F34E6A91" src = "../TsoUserImages/terms_objFuncLog.png" width = "450"/><br/></p>
<p>In the above example, the total objective function is
<span class = "ph inlineequation"><math class = "- topic/foreign "><mi class = "- topic/foreign ">Φ</mi><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">68.9636</mn></math></span>, 
the <span class = "ph uicontrol">DRESP</span>s have values
<span class = "ph inlineequation"><math class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">1</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><mtext class = "- topic/foreign ">DRESP_MAX_MISES1</mtext><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">161.820</mn></math></span>
and 
<span class = "ph inlineequation"><math class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">2</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><mtext class = "- topic/foreign ">DRESP_MAX_MISES2</mtext><mo class = "- topic/foreign ">=</mo><mn class = "- topic/foreign ">80.9101</mn></math></span>. </p>
<p>Also the above example shows the weight and reference value of each
term. These values can also be found in two extra log-files, <code class = "ph codeph">optimization_report.csv</code>
and <code class = "ph codeph">optimization_status_all.csv</code>. The first file only
lists <code class = "ph codeph">DRESP</code>s that are included in the optimization task
as objective function or constraint. The latter lists all <code class = "ph codeph">DRESP</code>s
defined in the parameter file.</p>

<div class = "section" id = "tso-c-usr-terms-objFuncOvw__tso-c-usr-terms-objFuncOvw-expl"><h2 class = "title sectiontitle">Example</h2>

<p>The following figure shows the <code class = "ph codeph">optimization_report.csv</code> imported into a spread
sheet:</p>
<br/><img class = "image" id = "tso-c-usr-terms-objFuncOvw__image_27965FF76572445799CD5981A0C59F5F" src = "../TsoUserImages/terms_opt_report.png" width = "450"/><br/>
<ul class = "ul"><li class = "li">In the above example, first the total objective function 
<span class = "ph inlineequation"><math class = "- topic/foreign "><mi class = "- topic/foreign ">Φ</mi></math></span> 
is listed for each iteration
as <span class = "ph uicontrol">MINIMIZE_MAX_MISES</span>. The objective function is always
the first column.</li><li class = "li">Then each <code class = "ph codeph">DRESP</code> in the
<span class = "ph inlineequation"><math class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">1</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><mtext class = "- topic/foreign ">DRESP_MAX_MISES1</mtext></math></span>
and
<span class = "ph inlineequation"><math class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi mathvariant = "normal" class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">2</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><mtext class = "- topic/foreign ">DRESP_MAX_MISES2</mtext>        </math></span>
are listed as <span class = "ph uicontrol">OBJ_FUNC_DRESP:DRESP_MAX_MISES1</span> and <span class = "ph uicontrol">OBJ_FUNC_DRESP:
DRESP_MAX_MISES2</span>.</li><li class = "li">After each <code class = "ph codeph">DRESP</code> the terms
are listed: <span class = "ph uicontrol">OBJ_FUNC_TERM:DRESP_MAX_MISES1</span> and <span class = "ph uicontrol">OBJ_FUNC_TERM:
DRESP_MAX_MISES2</span>. </li></ul>
<p>The terms include weight and reference value
and are given as:</p>
<table class = "table" id = "tso-c-usr-terms-objFuncOvw__xx821721"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><p><span class = "ph inlineequation"><math class = "- topic/foreign "><mrow class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">t</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">i</mi></mrow></msub><mo class = "- topic/foreign ">=</mo><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">w</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">i</mi></mrow></msub><mrow class = "- topic/foreign "><mo class = "- topic/foreign ">(</mo><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">i</mi></mrow></msub><mo class = "- topic/foreign ">−</mo><msup class = "- topic/foreign "><mrow class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">φ</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">i</mi></mrow></msub></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">r</mi><mi class = "- topic/foreign ">e</mi><mi class = "- topic/foreign ">f</mi></mrow></msup><mo class = "- topic/foreign ">)</mo></mrow></mrow></math></span></p></td>
</tr>
</tbody></table>

<p>If constraints are defined in the optimization task, these are also included in
          <code class = "ph codeph">optimization_report.csv</code> and
        <code class = "ph codeph">optimization_status_all.csv</code>.</p>
</div>

<div class = "section" id = "tso-c-usr-terms-objFuncOvw__tso-c-usr-terms-objFuncOvw-remark"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Remarks</h2>

<ul class = "ul">
<li class = "li">For controller-based shape optimization, the "reference value" has a special meaning and is very
          important. See "Reference Stress" in the shape optimization section "Objective Function
          for Controller-Based Shape Optimization." </li>
<li class = "li">For all other optimization approaches, the reference value and weight is only of limited importance. 
A case for using weights in sensitivity-based optimization is when you use two different types of DRESPs 
in the objective function and they might have very different value intervals. This is not recommended and 
in most cases you will have a better optimization setup by using one type of DRESP in OBJ_FUNC and 
the others as constraints.
</li>
</ul>
</div>
  
</div>


<div class = "related-links"/>
</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
