<?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: Using Primalin to use results from previous run in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664098#M3155</link>
    <description>&lt;P&gt;No need to apologize for asking questions.&amp;nbsp; That's what this community is for.&amp;nbsp; To clarify, I mean the following, where ... indicates omitted statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   ...
   solve;
   ...
   solve with milp / primalin;
   ...
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_milpsolver_examples03.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;this documentation example&lt;/A&gt; for illustration.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 23:51:02 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2020-06-22T23:51:02Z</dc:date>
    <item>
      <title>Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/663935#M3150</link>
      <description>&lt;P&gt;Hello! I am using SAS Enterprise Guide. I wanted to use the Primalin option in the MILP solver to use the decision variable values from my previous run. How can I save the decision variable values so that I can use them in the next run for a warm start? And how do I use the Primalin option to specify this warm start? Thank you so much in advance. I am attaching an example decision variable here. How can I store the value of these two variables in a SAS datatset and use them in the next run?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
var Assign{i,j} binary; 
var Amount {i,j} &amp;gt;= 0;
max supply = sum{i,j} Amount[i,j];
con Test: sum{i,j] Assign[i,j]=4;
solve obj supply with MILP;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jun 2020 09:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/663935#M3150</guid>
      <dc:creator>thossain</dc:creator>
      <dc:date>2020-06-22T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664081#M3151</link>
      <description>&lt;P&gt;To use the PRIMALIN option, just include the keyword in the SOLVE statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;solve obj supply with MILP / primalin;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The solver uses the current values of the decision variables as a warm start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can execute the SOLVE statement multiple times from the same PROC OPTMODEL session, so there is no need to save the values to a data set and read them back in just for the purpose of using PRIMALIN.&amp;nbsp; However, if you want to do that, you can use the CREATE DATA and READ DATA statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a few syntax errors in your code, so it will not run as is.&amp;nbsp; Please see &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_gettingstarted03.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;this documentation example&lt;/A&gt; that shows how to solve a similar problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note also that PROC OPTMODEL is interactive and uses a QUIT statement instead of RUN.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 22:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664081#M3151</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-06-22T22:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664083#M3152</link>
      <description>&lt;P&gt;Thank you so much for your help! So sorry for the errors.&amp;nbsp; My original code was so big, just wrote a demo one to explain myself. And yes, I have included this primalin statement in the options after MILP. So if I run my code, once it finishes running and show me all the results and then if I start running the code again with primalin, it will start using those previous values of my decision variables as a warm start? Sorry that I got confused from the documentation where it was mentioned that by default primalin uses zero values for the decision variables.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 22:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664083#M3152</guid>
      <dc:creator>thossain</dc:creator>
      <dc:date>2020-06-22T22:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664084#M3153</link>
      <description>&lt;P&gt;Sorry for all my questions! Are you referring to something different when you said executing the solve statement multiple times within the same optmodel session?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 22:34:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664084#M3153</guid>
      <dc:creator>thossain</dc:creator>
      <dc:date>2020-06-22T22:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664097#M3154</link>
      <description>&lt;P&gt;I suspect that you are referring to this sentence in the &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmodel_syntax03.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#ormpug.optmodel.npxvarstmt" target="_self"&gt;VAR statement&lt;/A&gt; documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN class=" aa-term "&gt;&lt;SPAN class=" aa-keyword"&gt;INIT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=" aa-argument"&gt;expression&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;sets an initial value for the variable. The expression is used only the first time the value is required. If no initial value is specified, then 0 is used by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;These initial values (or 0) are replaced by the output of the first SOLVE.&amp;nbsp; So the next SOLVE uses the output from the first SOLVE, as long as you are in the same PROC OPTMODEL session.&amp;nbsp; Once you execute QUIT, all values are forgotten.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 23:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664097#M3154</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-06-22T23:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664098#M3155</link>
      <description>&lt;P&gt;No need to apologize for asking questions.&amp;nbsp; That's what this community is for.&amp;nbsp; To clarify, I mean the following, where ... indicates omitted statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   ...
   solve;
   ...
   solve with milp / primalin;
   ...
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_milpsolver_examples03.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;this documentation example&lt;/A&gt; for illustration.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 23:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/664098#M3155</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-06-22T23:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Primalin to use results from previous run</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/666000#M3185</link>
      <description>Thank you so very much, Rob! This was a great help!</description>
      <pubDate>Tue, 30 Jun 2020 06:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Using-Primalin-to-use-results-from-previous-run/m-p/666000#M3185</guid>
      <dc:creator>thossain</dc:creator>
      <dc:date>2020-06-30T06:32:32Z</dc:date>
    </item>
  </channel>
</rss>

