<?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 solving multiple subprograms in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/solving-multiple-subprograms/m-p/412305#M2061</link>
    <description>&lt;P&gt;i know how i can to min / max a function with proc optmodel&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(example here)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   min  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but i want to minimize and maximize in the same proc optmodel. I know i can do two proc optmodel like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   min  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;


proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   max  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Sat, 11 Nov 2017 14:11:40 GMT</pubDate>
    <dc:creator>dali74</dc:creator>
    <dc:date>2017-11-11T14:11:40Z</dc:date>
    <item>
      <title>solving multiple subprograms</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/solving-multiple-subprograms/m-p/412305#M2061</link>
      <description>&lt;P&gt;i know how i can to min / max a function with proc optmodel&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(example here)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   min  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but i want to minimize and maximize in the same proc optmodel. I know i can do two proc optmodel like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   min  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;


proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   max  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
 quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2017 14:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/solving-multiple-subprograms/m-p/412305#M2061</guid>
      <dc:creator>dali74</dc:creator>
      <dc:date>2017-11-11T14:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it posible to min and max function with proc optmodel?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/solving-multiple-subprograms/m-p/412422#M2063</link>
      <description>&lt;P&gt;Yes, here's one way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   var x,y;
   number z=-3;
   number res=8;
   min  f1 =  y+x**3 + z*y**3;
   con c1: x*y = res;
   solve with nlp;
   max  f2 =  y+x**3 + z*y**3;
   solve with nlp;
 quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In general, you can make any model changes you want and call the same solver or different solvers as many times as you want in the same PROC OPTMODEL call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Several of the examples in &lt;A href="http://go.documentation.sas.com/?docsetId=ormpex&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;this book&lt;/A&gt; illustrate this functionality.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 16:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/solving-multiple-subprograms/m-p/412422#M2063</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-11-10T16:43:52Z</dc:date>
    </item>
  </channel>
</rss>

