<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Minimize function strange result in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29741#M12021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, if you wonder why the minimum I found (2975) is larger than what e.g. Werner (2886.4) found? &lt;/P&gt;&lt;P&gt;The reason may be because I changed the constants 750, 3600 and 360 in the formulae to the variables (R_ref, R3 and R4 respectively) I think they should be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2016 05:53:51 GMT</pubDate>
    <dc:creator>LucMeekes</dc:creator>
    <dc:date>2016-04-26T05:53:51Z</dc:date>
    <item>
      <title>Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29733#M12013</link>
      <description>Hi all,I hope this is the right sub-forum to post this address.I am trying to make use of some Mathcad in-built capabilities, like for instance the Minimize or Maximize function.Please have a look at the attached file. I have some functions defined there which ultimately are used</description>
      <pubDate>Thu, 03 May 2018 14:32:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29733#M12013</guid>
      <dc:creator>cberceanu</dc:creator>
      <dc:date>2018-05-03T14:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29734#M12014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mathcad will find a relative minimum, no necessarily the absolute minimum.&lt;/P&gt;&lt;P&gt;Maybe your problem is conditioned in a way that you have a lot of local minima very near and changing the guess values slighty may yield one or the other.&lt;/P&gt;&lt;P&gt;Its strange that I get a better result when I increase the value of CTOL - would have expected the opposite effect.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/100602_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 18:31:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29734#M12014</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-19T18:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29735#M12015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;So am I doing something wrong or is this simply a strange function?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Neither. It is the nature of non-linear solvers. They are iterative. They start at the guess values, then head downhill on the error surface until the error changes by less than a certain amount, and then stop. In Mathcad the built in variable CTOL determines what "less than a certain amount" means. So if your error surface has many local minima, or large areas that are nearly flat, the solver may not find the global minimum. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 22:03:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29735#M12015</guid>
      <dc:creator>RichardJ</dc:creator>
      <dc:date>2016-04-19T22:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29736#M12016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your replies!&lt;/P&gt;&lt;P&gt;I was out of office for a couple of days, but I will give it a try (playing with the CTOL value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really curious to see what the real minimum of this function is!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 05:32:25 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29736#M12016</guid>
      <dc:creator>cberceanu</dc:creator>
      <dc:date>2016-04-25T05:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29737#M12017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A numeric algorithm will always present you a local minimum and it depends on the guess values, the given allowed tolerances and of course the nature of your function.&lt;/P&gt;&lt;P&gt;So you will need a lot of luck to find the absolute minimium of your function, I guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 10:25:22 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29737#M12017</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-25T10:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29738#M12018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Werner Exinger написал(а):&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A numeric algorithm will always present you a local minimum and it depends on the guess values&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See please &lt;A href="https://www.ptcusercommunity.com/videos/1460"&gt; Video Link : 1460&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:28:13 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29738#M12018</guid>
      <dc:creator>ValeryOchkov</dc:creator>
      <dc:date>2016-04-25T18:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29739#M12019</link>
      <description>&lt;P&gt;Your minimum value for Function1 is somewhere near 2975.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With thanks to the neat algorithm that Viktor Korobov made, and Valery Ochkov pointed to&amp;nbsp;&lt;A href="https://community.ptc.com/t5/PTC-Mathcad-Videos/Local-amp-Global-minimum-of-the-function-f-x-y/m-p/440019#comment-1814" target="_blank"&gt;https://community.ptc.com/t5/PTC-Mathcad-Videos/Local-amp-Global-minimum-of-the-function-f-x-y/m-p/440019#comment-1814&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I've expanded it to functions of an arbitrary number of parameters&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG style="max-width: 1200px; max-height: 900px;" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/100830_pastedImage_0.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;See attachment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 20:07:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29739#M12019</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2021-03-31T20:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29740#M12020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We can use the genetic algorithm too&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.ptcusercommunity.com/docs/DOC-2565"&gt;Optimization with Genetic algorithm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 02:48:24 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29740#M12020</guid>
      <dc:creator>ValeryOchkov</dc:creator>
      <dc:date>2016-04-26T02:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29741#M12021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, if you wonder why the minimum I found (2975) is larger than what e.g. Werner (2886.4) found? &lt;/P&gt;&lt;P&gt;The reason may be because I changed the constants 750, 3600 and 360 in the formulae to the variables (R_ref, R3 and R4 respectively) I think they should be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 05:53:51 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29741#M12021</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2016-04-26T05:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29742#M12022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;LucMeekes wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;By the way, if you wonder why the minimum I found (2975) is larger than what e.g. Werner (2886.4) found? &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The values which result in 2886.4 were not my findings - the were already in the sheet and I guess Cristian found them by some means.&lt;/P&gt;&lt;P&gt;What I did was simply to increase(!) the value of CTOL from the default 10^-3 to 10^-1 and Minimize found better values which yield a result of 2754.3. I still don't understand why &lt;STRONG&gt;in&lt;/STRONG&gt;creasing CTOL gets me better values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Werner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:30:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29742#M12022</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-26T12:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29743#M12023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly because it gives the variable I2 much more range than the limited +/- 10^-7 it should have according the OP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've rerun the brute foce/Monte Carlo algorithm over 20000 runs with R_ref, R3 and R4 back to 750, 3600 and 360 in the formula for Computed_R_NTC_range1 and now found 2898.6 as a minimum. But I still think my 2975 is the better result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:21:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29743#M12023</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2016-04-27T17:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29744#M12024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;LucMeekes wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;By the way, if you wonder why the minimum I found (2975) is larger than what e.g. Werner (2886.4) found?&lt;/P&gt;
&lt;P&gt;The reason may be because I changed the constants 750, 3600 and 360 in the formulae to the variables (R_ref, R3 and R4 respectively) I think they should be.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Luc&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not really. These values must be fixed. The whole function models the calculation that would need to take place inside a microcontroller which must then determine a resistance value in a network that is feeding the ADC. When computing the digital value that could come out of the ADC, the extremes of the resistors variation interval must be used, of course. But when the microcontroller computes the resistor value, it only knows the conversion result and the nominal values of the external components.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 05:56:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29744#M12024</guid>
      <dc:creator>cberceanu</dc:creator>
      <dc:date>2016-04-29T05:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29745#M12025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Werner Exinger wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Mathcad will find a relative minimum, no necessarily the absolute minimum.&lt;/P&gt;
&lt;P&gt;Maybe your problem is conditioned in a way that you have a lot of local minima very near and changing the guess values slighty may yield one or the other.&lt;/P&gt;
&lt;P&gt;Its strange that I get a better result when I increase the value of CTOL - would have expected the opposite effect.&lt;/P&gt;
&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="136" src="https://community.ptc.com/legacyfs/online/101039_pastedImage_0.png" style="max-width: 746px;" width="746" /&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Werner, did you do anything else apart from assigning CTOL a value of 10^-1? Because if I do that, the result in my file does not really change! Please see the attached file called minmax_no_external_file_with_CTOL_set_to_0.1.xmcd&lt;/P&gt;&lt;P&gt;On the other hand, I was able to find a smaller value by doing these things simultaneously:&lt;/P&gt;&lt;P&gt;- decrease the value of CTOL (down to 10^-7)&lt;/P&gt;&lt;P&gt;- set the guess values at the beginning (or end) of their variation interval&lt;/P&gt;&lt;P&gt;By doing this, I did find a minimum slightly smaller than the one I could manually find, see attached file called minmax_no_external_file_with_guess_values_set_at_the_beginnig_of_the_variation_interval.xmcd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would be close of trusting this minimum I found, but I am really puzzled by the 2754.3 value you present above and which I cannot replicate. Would you kindly screenshot the results of the minimize function (the value of the variables) that you get when setting the CTOL to 10^1 on your machine? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:20:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29745#M12025</guid>
      <dc:creator>cberceanu</dc:creator>
      <dc:date>2016-04-29T06:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29746#M12026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In which case the minimum would be (near) 2898.6.&lt;/P&gt;&lt;P&gt;Note that the Monte Carlo method that I used does not depend on any tolerance setting, but instead on the number of runs. You might consider increasing that a factor of 10 to see if the result is much different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:46:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29746#M12026</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2016-04-29T06:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29747#M12027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does depend on the number of runs but also on ... luck, does it not? Of course you can minimize the risk by increasing the iterations, but it is never really going to be 0, is it?&lt;/P&gt;&lt;P&gt;Then again, even an iterative solver suffers the same : it will never really give you the absolute minimum, but the minimum with a tolerance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, can you share the method you applied Monte Carlo on this function? I searched the help (I have Mathcad 14) but yielded no results when searching for Monte Carlo, or Monte-Carlo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The minimum is significantly smaller than 2898.6.&lt;/P&gt;&lt;P&gt;As mentioned above (in a post probably not yet visible because it is awaiting moderation - I attached some files) I can find a minimum even smaller than 2886.4 - which is the value I managed to find manually (maybe by luck).&lt;/P&gt;&lt;P&gt;If I play with the CTOL value (decreasing it sharply) and if I set the guess values to the beginning or end of the variation interval (as opposed to the middle, as in the initial example) I get a minimum of 2886.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 07:21:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29747#M12027</guid>
      <dc:creator>cberceanu</dc:creator>
      <dc:date>2016-04-29T07:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29748#M12028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Werner, did you do anything else apart from assigning CTOL a value of 10^-1?&lt;/P&gt;&lt;P&gt;No, nothing. I just tried again with the same result. And I also get the same low result with CTOL set to 1 or even to incredible 10! Not sure, why this works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you have to set CTOL before the solve block (I used a global assignment for the screen shot) or via menu (Tools - Worksheet options - Built-in Variables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I just opened your file and get the same (low) result. See the screenshot:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="101063" alt="" class="jive-image image-1" height="343" src="https://community.ptc.com/legacyfs/online/101063_pastedImage_0.png" style="width: 491.771px; height: 343px;" width="492" /&gt;&lt;/P&gt;&lt;P&gt;I am using Mathcad 15 M030.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the 12 values for easier copy and paste:&lt;/P&gt;&lt;P&gt;12.075438396003252&lt;/P&gt;&lt;P&gt;3.708e3&lt;/P&gt;&lt;P&gt;370.8&lt;/P&gt;&lt;P&gt;1.0150000000000001e-7&lt;/P&gt;&lt;P&gt;1.0000000000000222&lt;/P&gt;&lt;P&gt;0.05&lt;/P&gt;&lt;P&gt;1.2210011707882724e-5&lt;/P&gt;&lt;P&gt;1.2210011707882724e-5&lt;/P&gt;&lt;P&gt;1.2210011707882724e-5&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1.2210011707882724e-5&lt;/P&gt;&lt;P&gt;8.676833784435876e-12&lt;/P&gt;&lt;P&gt;772.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I open the other file (with CTOL = 10^-7) I see the result 2886,2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Werner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 14:50:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29748#M12028</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-29T14:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29749#M12029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One additional remark: The constraints in that kind of solve block are soft constraint. So you may notice that nit all values in result are within the desired range (see the screenshots at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, as you don't allow any changes on "Gain", it has to be 1, why do you include it as an argument in "Function1". Omit it and call the other functions with 1, instead if Gain.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="101065" alt="" class="jive-image image-1" height="471" src="https://community.ptc.com/legacyfs/online/101065_pastedImage_0.png" style="width: 458px; height: 470.806px;" width="458" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" height="432" src="https://community.ptc.com/legacyfs/online/101082_pastedImage_0.png" style="width: 472px; height: 431.652px;" width="472" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 15:29:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29749#M12029</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-29T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29750#M12030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree, Monte Carlo is luck, but minimize is tolerance. You should be able to get the input values for each of the parameters at the minimum, and check if they are within their respective range and check the result.&lt;/P&gt;&lt;P&gt;The Monte Carlo method (implemented in that Global_Extreme() function) is attached to the post where it is presented, here above: &lt;A href="https://www.ptcusercommunity.com/message/449177"&gt;Re: Minimize function strange result&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 19:29:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29750#M12030</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2016-04-29T19:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29751#M12031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Playing around with a Monte Carlo simulation for a while (refining by narrowing the allowed range of the arguments) I come to the conclusion, that you get your minimum if you choose argument values from the end of your ranges - mostly the upper bounds (in red below), but three times the lower bounds (green) as well (Gain remains 1):&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="58" src="https://community.ptc.com/legacyfs/online/101098_pastedImage_0.png" style="width: 651.02px; height: 58px;" width="651" /&gt;&lt;/P&gt;&lt;P&gt;I suspect that you will not be able to beat 2886,038457 with arguments all within the allowed range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Werner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 21:11:06 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29751#M12031</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2016-04-29T21:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Minimize function strange result</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29752#M12032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checked.&lt;/P&gt;&lt;P&gt;You're right, Werner.&lt;/P&gt;&lt;P&gt;(OK, I beat it by 2e-11 &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/happy.png" /&gt;, with a result of 2886.03845714428, but at the same input values.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incidentally,&lt;/P&gt;&lt;P&gt;I improved the Monte Carlo algorithm. It was transposing the variables matrix a bit too often. Now it runs 1 million runs in about 20 s on my machine.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.ptc.com/legacyfs/online/101127_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Apr 2016 09:47:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Minimize-function-strange-result/m-p/29752#M12032</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2016-04-30T09:47:20Z</dc:date>
    </item>
  </channel>
</rss>

