<?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 PROC OPTMILP - write solution detail into file in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMILP-write-solution-detail-into-file/m-p/685560#M3214</link>
    <description>&lt;P&gt;Hi, I am using&amp;nbsp;PROC OPTMILP. I need to solve many problem instances. When time limit is reached, I want to write the following into a text file; best objective value found and gap. What is the best way to do this?&lt;/P&gt;&lt;P&gt;I am using SAS EG 8.2&amp;nbsp; (not Viya).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 02:21:19 GMT</pubDate>
    <dc:creator>pathfinder1_1</dc:creator>
    <dc:date>2020-09-22T02:21:19Z</dc:date>
    <item>
      <title>PROC OPTMILP - write solution detail into file</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMILP-write-solution-detail-into-file/m-p/685560#M3214</link>
      <description>&lt;P&gt;Hi, I am using&amp;nbsp;PROC OPTMILP. I need to solve many problem instances. When time limit is reached, I want to write the following into a text file; best objective value found and gap. What is the best way to do this?&lt;/P&gt;&lt;P&gt;I am using SAS EG 8.2&amp;nbsp; (not Viya).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 02:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMILP-write-solution-detail-into-file/m-p/685560#M3214</guid>
      <dc:creator>pathfinder1_1</dc:creator>
      <dc:date>2020-09-22T02:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC OPTMILP - write solution detail into file</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMILP-write-solution-detail-into-file/m-p/685727#M3215</link>
      <description>&lt;P&gt;The &lt;A href="https://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_optmilp_details18.htm&amp;amp;docsetVersion=15.2&amp;amp;locale=en" target="_self"&gt;_OROPTMILP_ macro variable&lt;/A&gt; contains this information.&amp;nbsp; You can use the following DATA step to append the desired values to a text file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   file 'myfile.txt' mod;
   oroptmilp = symget('_OROPTMILP_');
   index = index(oroptmilp, 'OBJECTIVE');
   objective = scan(substr(oroptmilp, index), 2, ' =');
   index = index(oroptmilp, 'RELATIVE_GAP');
   relative_gap = scan(substr(oroptmilp, index), 2, ' =');
   put objective relative_gap;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;By the way, in PROC OPTMODEL these values are more simply accessible as&lt;/P&gt;
&lt;P&gt;_OROPTMODEL_NUM_['OBJECTIVE'] and&amp;nbsp;_OROPTMODEL_NUM_['RELATIVE_GAP'].&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 15:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/PROC-OPTMILP-write-solution-detail-into-file/m-p/685727#M3215</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2020-09-22T15:06:02Z</dc:date>
    </item>
  </channel>
</rss>

