<?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: purpose of FIX command in proc optmodel for  solving non linear optimization problem in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/purpose-of-FIX-command-in-proc-optmodel-for-solving-non-linear/m-p/596092#M2899</link>
    <description>&lt;P&gt;The &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_syntax11.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#ormpug.optmodel.npxfixstmt" target="_self"&gt;FIX statement&lt;/A&gt; fixes variables to the specified values.&amp;nbsp; If you want to minimize the function, don't fix anything, and the solver will find optimal values for the variables.&amp;nbsp; At a locally optimal solution, the dual values will be 0.&amp;nbsp; But to find the gradient at a given solution, you must fix the variables.&amp;nbsp; The resulting dual values (gradient) indicate the direction of steepest descent.&amp;nbsp; As you did in other questions, you would proceed with a line search to find the best step length alpha in that direction.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Oct 2019 19:29:58 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2019-10-13T19:29:58Z</dc:date>
    <item>
      <title>purpose of FIX command in proc optmodel for  solving non linear optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/purpose-of-FIX-command-in-proc-optmodel-for-solving-non-linear/m-p/595963#M2897</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I am trying to solve the following problem&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1main.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33101i5E576327CB773487/image-size/large?v=v2&amp;amp;px=999" role="button" title="1main.JPG" alt="1main.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I mean I want to minimize the function f(x).&lt;/P&gt;&lt;P&gt;I have written the following code (without the FIX commands)&lt;/P&gt;&lt;PRE&gt;proc optmodel;
var x1, x2 , x3;
min f = x1^2 + 2*(x2^2) + 5*(x3^2) -4*x1 -20*x2 -20*x3;
/* starting point */
x1 = 0;
x2 = 0;
x3 = 0;
solve; 
print x1 x2 x3 x1.dual x2.dual x3.dual;
quit;&lt;/PRE&gt;&lt;P&gt;and I get the following result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1nofix.JPG" style="width: 302px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33102i9884002A5394A6E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1nofix.JPG" alt="1nofix.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are no values for the dual but I get the value of objective function&lt;/P&gt;&lt;P&gt;But when I write the same code with fix commands (as given below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
var x1, x2 , x3;
min f = x1^2 + 2*(x2^2) + 5*(x3^2) -4*x1 -20*x2 -20*x3;
/* starting point */
fix x1 = 0;
fix x2 = 0;
fix x3 = 0;
solve; 
print x1 x2 x3 x1.dual x2.dual x3.dual;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then i get the following result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1fix.JPG" style="width: 283px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33103i199AF2841D8A4844/image-size/large?v=v2&amp;amp;px=999" role="button" title="1fix.JPG" alt="1fix.JPG" /&gt;&lt;/span&gt;+&lt;/P&gt;&lt;P&gt;now there are no values for the 3 variables and also no value for the objective function&lt;/P&gt;&lt;P&gt;Sorry I dont know exactly the function of "FIX" command.&lt;/P&gt;&lt;P&gt;Please can you explain the purpose of "FIX" command here.&lt;/P&gt;&lt;P&gt;Which code should I use to solve this problem?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2019 11:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/purpose-of-FIX-command-in-proc-optmodel-for-solving-non-linear/m-p/595963#M2897</guid>
      <dc:creator>rohailk</dc:creator>
      <dc:date>2019-10-12T11:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: purpose of FIX command in proc optmodel for  solving non linear optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/purpose-of-FIX-command-in-proc-optmodel-for-solving-non-linear/m-p/596092#M2899</link>
      <description>&lt;P&gt;The &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_syntax11.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#ormpug.optmodel.npxfixstmt" target="_self"&gt;FIX statement&lt;/A&gt; fixes variables to the specified values.&amp;nbsp; If you want to minimize the function, don't fix anything, and the solver will find optimal values for the variables.&amp;nbsp; At a locally optimal solution, the dual values will be 0.&amp;nbsp; But to find the gradient at a given solution, you must fix the variables.&amp;nbsp; The resulting dual values (gradient) indicate the direction of steepest descent.&amp;nbsp; As you did in other questions, you would proceed with a line search to find the best step length alpha in that direction.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 19:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/purpose-of-FIX-command-in-proc-optmodel-for-solving-non-linear/m-p/596092#M2899</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2019-10-13T19:29:58Z</dc:date>
    </item>
  </channel>
</rss>

