<?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: Writing a step pulse function in Proc optmodel in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420976#M2133</link>
    <description>&lt;P&gt;If y - x is in [-M_1,M_1] and y - (20 - x) is in [-M_2,M_2] for suitably chosen constants M_1 and M_2, you can linearize the relationship between x and y by introducing a binary variable z and the following constraints:&lt;/P&gt;
&lt;P&gt;-M_1 * z &amp;lt;= y - x &amp;lt;= M_1 * z&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-M_2 * (1 - z) &amp;lt;= y - (20 - x) &amp;lt;= M_2 * (1 - z)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If z = 0, the first pair of constraints force y = x.&amp;nbsp;&amp;nbsp;If z = 1, the second pair of constraints force y = 20 - x.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Depending on your objective and other constraints, you might be able to avoid the bounds and binary variables.&amp;nbsp; For example, if you want to maximize y, you can just impose y &amp;lt;= x and y &amp;lt;= 20 - x.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 20:21:09 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2017-12-13T20:21:09Z</dc:date>
    <item>
      <title>Writing a step pulse function in Proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420948#M2130</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to use something similar to Heaviside function to create a unit pulse. Unit pulse is required because I want to define some objective function and constraint which are piece-wise linear. For example from x=0 to 10, y=x , x&amp;gt;=10 , y=20-x. I am unable to find out a function which could help me to write such formulation without having to write multiple if-else statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 19:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420948#M2130</guid>
      <dc:creator>gupta_shubham</dc:creator>
      <dc:date>2017-12-13T19:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a step pulse function in Proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420954#M2131</link>
      <description>&lt;P&gt;Does your x variable have an upper bound?&amp;nbsp; Is the rest of your optimization model linear?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 19:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420954#M2131</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-12-13T19:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a step pulse function in Proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420961#M2132</link>
      <description>&lt;P&gt;Ideally I don't want to have any upper bound on x. Lower bound is x&amp;gt;0. Also my whole optimization has non linear constraints and objective function but I can simple approximated version with linear constraints&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 19:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420961#M2132</guid>
      <dc:creator>gupta_shubham</dc:creator>
      <dc:date>2017-12-13T19:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a step pulse function in Proc optmodel</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420976#M2133</link>
      <description>&lt;P&gt;If y - x is in [-M_1,M_1] and y - (20 - x) is in [-M_2,M_2] for suitably chosen constants M_1 and M_2, you can linearize the relationship between x and y by introducing a binary variable z and the following constraints:&lt;/P&gt;
&lt;P&gt;-M_1 * z &amp;lt;= y - x &amp;lt;= M_1 * z&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-M_2 * (1 - z) &amp;lt;= y - (20 - x) &amp;lt;= M_2 * (1 - z)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If z = 0, the first pair of constraints force y = x.&amp;nbsp;&amp;nbsp;If z = 1, the second pair of constraints force y = 20 - x.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Depending on your objective and other constraints, you might be able to avoid the bounds and binary variables.&amp;nbsp; For example, if you want to maximize y, you can just impose y &amp;lt;= x and y &amp;lt;= 20 - x.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 20:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Writing-a-step-pulse-function-in-Proc-optmodel/m-p/420976#M2133</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-12-13T20:21:09Z</dc:date>
    </item>
  </channel>
</rss>

