<?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 logic of the heuristic scheme is explained."/><meta name = "description" content = "The logic of the heuristic scheme is explained."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-sizing-discrete-logic"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Explanation of the Algorithm</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-sizing-discrete-logic">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Explanation of the Algorithm</h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3" colspan = "2"><table class = "DocThemeIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract">
<span class = "shortdesc">
The logic of the heuristic scheme is explained. </span>
</p>

</p></td></tr></table></td></tr></table>





<div class = "body conbody">
<p>The flowchart for the implemented algorithm is shown below.</p>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry">
<img class = "image" src = "../TsoUserImages/History_algo_discrete.png" height = "605"/></td>
</tr>
</tbody></table>
<p>The table below explains the terms used in the flowchart:</p>
<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
<tr class = "row">
<th class = "entry" id = "tso-c-usr-sizing-discrete-logic__entry__2">NAME OF THE PARAMETER</th>
<th class = "entry" id = "tso-c-usr-sizing-discrete-logic__entry__3">  DESCRIPTION </th>
</tr>
</thead><tbody class = "tbody">
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"> <code class = "ph codeph">DISCR_CYCLE </code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3"> Initial cycles to be allowed before constraining. </td></tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"> <code class = "ph codeph">DISCR_INTERVAL </code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3"> Cycles between the fixing of DVs. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"> <code class = "ph codeph">DISCR_FRACTION </code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3"> Fraction of the DVs to be fixed in one cycle. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"> <code class = "ph codeph">DISCR_CHANGE </code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3"> The maximum allowed change in the individual DVs over two iterations. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"><code class = "ph codeph">ELEM_IS_CONSTRAINED</code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3">History array for discrete values.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"><code class = "ph codeph">RHO, RHO_OLD, RHO_OLDER</code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3"> Arrays with values of the DVs over the current and past two iterations respectively.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__2"><code class = "ph codeph">DIFF_RHO</code></td>
<td class = "entry" headers = "tso-c-usr-sizing-discrete-logic__entry__3">The change of each DV is calculated over the past two iterations. </td>
</tr>
</tbody></table>
<p>The algorithm requires the following inputs from the user: 
  number of cycles before the constraining starts, number of cycles between constraining, maximum  change in each design variable, maximum fraction 
  of variables to be constrained per cycle. </p>
<p>The first check is if the initial number of cycles is reached, this parameter allows the
  model to achieve some convergence before the constraining begins. The change of each design variable is calculated over the past two iterations. 
  This change is stored in an array. Then this array is sorted and the specified percentage of variables with the lowest change is selected. 
  These variables are fixed to their nearest discrete values and the corresponding discrete value is stored in the History array for discrete values. 
  Further constraining cycles are  done according to the interval <code class = "ph codeph">DISCR_INTERVAL</code>.</p>

</div>

</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
