<?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: Airline Rubix in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153274#M794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you looking for ? and what output should be ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 13:08:50 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2014-12-17T13:08:50Z</dc:date>
    <item>
      <title>Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153273#M793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have been solving an airline demand, price and value combination problem with Excel solver pro.&lt;/P&gt;&lt;P&gt;However the input size has grown beyond the limits of excel and therefore I am trying to solve it with SAS OR.&lt;/P&gt;&lt;P&gt;Below is only masked dummy data containing 12 rows. The actual data would have 500,000 rows.&lt;/P&gt;&lt;P&gt;Thanking you in anticipation.&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text file is attached for easy download and execution. n,&amp;nbsp; &lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data TABLE1;&lt;/P&gt;&lt;P&gt;input RGN $7. MTH $4. CNTRY $3. CLS $3. MKT $7. MKTTYPE $7. DMD PRICE VALUE;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;GGGGGG APR JJ RR AAACCC OTHOTH 4.072487387 5073.712404 1245.85098&lt;/P&gt;&lt;P&gt;GGGGGG APR LL RR AAACCC OTHOTH 0.759277544 527.855155 695.2071207&lt;/P&gt;&lt;P&gt;ROMANN APR SS RR ARNSSS TTTTTT 13.6940138 20710.54229 1512.379248&lt;/P&gt;&lt;P&gt;GGGGGG APR BB RR BAADDD OTHOTH 3.858234121 1971.730438 511.044788&lt;/P&gt;&lt;P&gt;BUHBUH APR QQ RR CAAHHH TTTTTT 670.3483179 607903.4554 906.8471407&lt;/P&gt;&lt;P&gt;GGGGGG APR KK RR DEEKKK TTTTTT 22.93870547 11473.72103 500.1904334&lt;/P&gt;&lt;P&gt;LIONNN APR UG RR EEEFFF OTHOTH 1.314052632 1776.681947 1352.063002&lt;/P&gt;&lt;P&gt;ROMANN APR IT RR DDMFCC OTHOTH 18.18630498 34948.34188 1921.684582&lt;/P&gt;&lt;P&gt;NOODLE APR AA RR MMMMUC TTTTTT 38.07123286 107524.5245 2824.298464&lt;/P&gt;&lt;P&gt;ROMANN APR IT WW BBRNNN OTHOTH 6.842336232 3142.693913 459.301298&lt;/P&gt;&lt;P&gt;NOODLE FEB PP RR GGGIII OTHOTH 1.240267277 3507.439478 2827.970665&lt;/P&gt;&lt;P&gt;BUHBUH JUL QQ RR AEEPPP UNDISC 0.610535011 282.9336958 463.419281&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;In the above data; &lt;/P&gt;&lt;P&gt;CNTRY is a branch of RGN. &lt;/P&gt;&lt;P&gt;But MKTs, MTHs, MKTTYPE can exist for all RGNs and CNTRYs.&lt;/P&gt;&lt;P&gt;VALUE = DMD*PRICE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some constant PRICE and VALUE targets at various levels:&lt;/P&gt;&lt;P&gt;- RGN level&lt;/P&gt;&lt;P&gt;- CNTRY level&lt;/P&gt;&lt;P&gt;- CLS level&lt;/P&gt;&lt;P&gt;And the overall VALUE and DMD should also meet MTH level targets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a start I created just some RGN level target using the below:&lt;/P&gt;&lt;P&gt;------------------------------------&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_TGT as&lt;/P&gt;&lt;P&gt;select unique RGN, &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(VALUE)*1.1 as VALUE_TGT format dollar16.0, &lt;/P&gt;&lt;P&gt;&amp;nbsp; 0.95*(sum(VALUE)/sum(DMD)) as PRICE_TGT format dollar16.0&lt;/P&gt;&lt;P&gt;from TABLE1&lt;/P&gt;&lt;P&gt;group by RGN;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;-------------------------------------&lt;/P&gt;&lt;P&gt;My decision variables are DMD &amp;amp; PRICE.&lt;/P&gt;&lt;P&gt;PRICE would be constrained to +/- 10% change from the starting value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below full code gives errors&lt;/P&gt;&lt;P&gt;/************************************************************************/&lt;/P&gt;&lt;P&gt;--------------------- Full Code ------------------------------------------&lt;/P&gt;&lt;P&gt;data TABLE1;&lt;/P&gt;&lt;P&gt;input RGN $7. MTH $4. CNTRY $3. CLS $3. MKT $7. MKTTYPE $7. DMD PRICE VALUE;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;GGGGGG APR JJ RR AAACCC OTHOTH 4.072487387 5073.712404 1245.85098&lt;/P&gt;&lt;P&gt;GGGGGG APR LL RR AAACCC OTHOTH 0.759277544 527.855155 695.2071207&lt;/P&gt;&lt;P&gt;ROMANN APR SS RR ARNSSS TTTTTT 13.6940138 20710.54229 1512.379248&lt;/P&gt;&lt;P&gt;GGGGGG APR BB RR BAADDD OTHOTH 3.858234121 1971.730438 511.044788&lt;/P&gt;&lt;P&gt;BUHBUH APR QQ RR CAAHHH TTTTTT 670.3483179 607903.4554 906.8471407&lt;/P&gt;&lt;P&gt;GGGGGG APR KK RR DEEKKK TTTTTT 22.93870547 11473.72103 500.1904334&lt;/P&gt;&lt;P&gt;LIONNN APR UG RR EEEFFF OTHOTH 1.314052632 1776.681947 1352.063002&lt;/P&gt;&lt;P&gt;ROMANN APR IT RR DDMFCC OTHOTH 18.18630498 34948.34188 1921.684582&lt;/P&gt;&lt;P&gt;NOODLE APR AA RR MMMMUC TTTTTT 38.07123286 107524.5245 2824.298464&lt;/P&gt;&lt;P&gt;ROMANN APR IT WW BBRNNN OTHOTH 6.842336232 3142.693913 459.301298&lt;/P&gt;&lt;P&gt;NOODLE FEB PP RR GGGIII OTHOTH 1.240267277 3507.439478 2827.970665&lt;/P&gt;&lt;P&gt;BUHBUH JUL QQ RR AEEPPP UNDISC 0.610535011 282.9336958 463.419281&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_RGN as&lt;/P&gt;&lt;P&gt;select unique RGN from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_MN as&lt;/P&gt;&lt;P&gt;select unique MTH from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_PS as&lt;/P&gt;&lt;P&gt;select unique CNTRY from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_CM as&lt;/P&gt;&lt;P&gt;select unique CLS from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_ND as&lt;/P&gt;&lt;P&gt;select unique MKT from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_OT as&lt;/P&gt;&lt;P&gt;select unique MKTTYPE from TABLE1; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*****************************************************************************************/&lt;/P&gt;&lt;P&gt;/* Dummy data set only to provide constant targets */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table TABLE_TGT as&lt;/P&gt;&lt;P&gt;select unique RGN, &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(VALUE)*1.1 as VALUE_TGT format dollar16.0, &lt;/P&gt;&lt;P&gt;&amp;nbsp; 0.95*(sum(VALUE)/sum(DMD)) as PRICE_TGT format dollar16.0&lt;/P&gt;&lt;P&gt;from TABLE1&lt;/P&gt;&lt;P&gt;group by RGN;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;/*****************************************************************************************/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing=0;&lt;/P&gt;&lt;P&gt;proc optmodel;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* declare index sets and read values from data sets*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; RGN_I;&lt;/P&gt;&lt;P&gt;read data TABLE_RGN nomiss into RGN_I = [RGN];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; MTH_I;&lt;/P&gt;&lt;P&gt;read data TABLE_MN nomiss into MTH_I = [MTH];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; CNTRY_I;&lt;/P&gt;&lt;P&gt;read data TABLE_PS nomiss into CNTRY_I = [CNTRY];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; CLS_I;&lt;/P&gt;&lt;P&gt;read data TABLE_CM nomiss into CLS_I = [CLS];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; MKT_I;&lt;/P&gt;&lt;P&gt;read data TABLE_ND nomiss into MKT_I = [MKT];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &amp;lt;str&amp;gt; MKTTYPE_I;&lt;/P&gt;&lt;P&gt;read data TABLE_OT nomiss into MKTTYPE_I = [MKTTYPE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* declare parameters and read from data sets */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num DMD {RGN_I, MTH_I, CNTRY_I, CLS_I, MKT_I, MKTTYPE_I};&lt;/P&gt;&lt;P&gt;read data TABLE1 nomiss into [RGN MTH CNTRY CLS MKT MKTTYPE] DMD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num PRICE {RGN_I, MTH_I, CNTRY_I, CLS_I, MKT_I, MKTTYPE_I};&lt;/P&gt;&lt;P&gt;read data TABLE1 nomiss into [RGN MTH CNTRY CLS MKT MKTTYPE] PRICE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num VALUE_TGT {RGN_I};&lt;/P&gt;&lt;P&gt;read data TABLE_TGT nomiss into RGN_I =[RGN] VALUE_TGT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num PRICE_TGT {RGN_I};&lt;/P&gt;&lt;P&gt;read data TABLE_TGT nomiss into RGN_I =[RGN] PRICE_TGT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* test that the data is read*/&lt;/P&gt;&lt;P&gt;print VALUE_TGT PRICE_TGT;&lt;/P&gt;&lt;P&gt;print DMD PRICE; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* declare variables */&lt;/P&gt;&lt;P&gt;var x {RGN_I, MTH_I, CNTRY_I, CLS_I, MKT_I, MKTTYPE_I};&lt;/P&gt;&lt;P&gt;var y {RGN_I, MTH_I, CNTRY_I, CLS_I, MKT_I, MKTTYPE_I};&lt;/P&gt;&lt;P&gt;impvar z {rc in RGN_I} &lt;/P&gt;&lt;P&gt;= sum{r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I} &lt;/P&gt;&lt;P&gt;x[r,m,p,c,k,t]*y[r,m,p,c,k,t];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* define constraints */&lt;/P&gt;&lt;P&gt;con z_CON {rc in RGN_I}: &lt;/P&gt;&lt;P&gt;sum {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I}&lt;/P&gt;&lt;P&gt;x[r,m,p,c,k,t]*y[r,m,p,c,k,t] = VALUE_TGT[rc];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;con y_CON {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I}: &lt;/P&gt;&lt;P&gt;y [r,m,p,c,k,t] = (if PRICE[r,m,p,c,k,t]=. then y [r,m,p,c,k,t]=0 &lt;/P&gt;&lt;P&gt;&amp;nbsp; else (y [r,m,p,c,k,t]&amp;gt;=PRICE[r,m,p,c,k,t]*0.9 and y [r,m,p,c,k,t]&amp;lt;=PRICE[r,m,p,c,k,t]*1.1));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Objective Function */&lt;/P&gt;&lt;P&gt;min MSE = sum{r in RGN_I}&lt;/P&gt;&lt;P&gt;&amp;nbsp; (z&lt;R&gt; - VALUE_TGT&lt;R&gt;)**2;&lt;/R&gt;&lt;/R&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;solve;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print z;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------- Errors ----------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; con y_CON {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I}:&lt;/P&gt;&lt;P&gt;126&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y [r,m,p,c,k,t] = (if PRICE[r,m,p,c,k,t]=. then y [r,m,p,c,k,t]=0&lt;/P&gt;&lt;P&gt;127&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else (y [r,m,p,c,k,t]&amp;gt;=PRICE[r,m,p,c,k,t]*0.9 and y [r,m,p,c,k,t]&amp;lt;=PRICE[r,m,p,c,k,t]*1.1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ____&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 531&lt;/P&gt;&lt;P&gt;ERROR 531-782: The ELSE does not match an IF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;129&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Objective Function */&lt;/P&gt;&lt;P&gt;130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min MSE = sum{r in RGN_I}&lt;/P&gt;&lt;P&gt;131&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (z&lt;R&gt; - VALUE_TGT&lt;R&gt;)**2;&lt;/R&gt;&lt;/R&gt;&lt;/P&gt;&lt;P&gt;132&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;133&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; solve;&lt;/P&gt;&lt;P&gt;NOTE: Problem generation will use 4 threads.&lt;/P&gt;&lt;P&gt;NOTE: Previous errors might cause the problem to be resolved incorrectly.&lt;/P&gt;&lt;P&gt;ERROR: &lt;SPAN style="color: #ff0000;"&gt;The constraint 'y_CON' has an incomplete declaration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NOTE: The problem has 19800 variables (19800 free, 0 fixed).&lt;/P&gt;&lt;P&gt;NOTE: The problem uses 5 implicit variables.&lt;/P&gt;&lt;P&gt;NOTE: The problem has 0 linear constraints (0 LE, 0 EQ, 0 GE, 0 range).&lt;/P&gt;&lt;P&gt;NOTE: The problem has 5 nonlinear constraints (0 LE, 5 EQ, 0 GE, 0 range).&lt;/P&gt;&lt;P&gt;NOTE: Unable to create problem instance due to previous errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------- End --------------------------------------------------&lt;/P&gt;&lt;P&gt;/*****************************************************************************************************/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 08:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153273#M793</guid>
      <dc:creator>PraveenBala</dc:creator>
      <dc:date>2014-12-17T08:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153274#M794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you looking for ? and what output should be ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 13:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153274#M794</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-17T13:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153275#M795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;require values for x &amp;amp; y that meet the constraints and for minimum MSE.&lt;/P&gt;&lt;P&gt;I am more interested in storing x &amp;amp; y in a data set (for their index values).&lt;/P&gt;&lt;P&gt;MSE should be pretty low.&lt;/P&gt;&lt;P&gt;I could do it in excel easily.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 13:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153275#M795</guid>
      <dc:creator>PraveenBala</dc:creator>
      <dc:date>2014-12-17T13:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153276#M796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way to express the desired constraints by using two sets of constraints with logical conditions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;con y_CON1 {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I: PRICE[r,m,p,c,k,t] = .}:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; y[r,m,p,c,k,t] = 0;&lt;/P&gt;&lt;P&gt;con y_CON2 {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I: PRICE[r,m,p,c,k,t] ne .}:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; PRICE[r,m,p,c,k,t]*0.9 &amp;lt;= y[r,m,p,c,k,t] &amp;lt;= PRICE[r,m,p,c,k,t]*1.1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is an alternative approach that uses one set of range constraints with two IF-THEN-ELSE expressions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;con y_CON {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I}:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (if PRICE[r,m,p,c,k,t] = . then 0 else PRICE[r,m,p,c,k,t]*0.9)&lt;BR /&gt;&amp;lt;= y[r,m,p,c,k,t]&lt;BR /&gt;&amp;lt;= (if PRICE[r,m,p,c,k,t] = . then 0 else PRICE[r,m,p,c,k,t]*1.1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A third approach is to use the FIX statement when PRICE is missing: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I: PRICE[r,m,p,c,k,t] = .}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fix y[r,m,p,c,k,t] = 0;&lt;/P&gt;&lt;P&gt;con y_CON {r in RGN_I, m in MTH_I, p in CNTRY_I, c in CLS_I, k in MKT_I, t in MKTTYPE_I: PRICE[r,m,p,c,k,t] ne .}:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; PRICE[r,m,p,c,k,t]*0.9 &amp;lt;= y[r,m,p,c,k,t] &amp;lt;= PRICE[r,m,p,c,k,t]*1.1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 14:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153276#M796</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-12-17T14:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153277#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh. It is IML question. Post it at &lt;A _jive_internal="true" data-containerid="2007" data-containertype="14" data-objectid="47" data-objecttype="14" href="https://communities.sas.com/community/support-communities/sas_iml_and_sas_iml_studio" style="font-size: 12.727272033691406px; color: #0e66ba; background-color: #f0f8fb;"&gt;SAS/IML Software and Matrix Computations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Dr Rick will help you . If use data step to get it ,that would be very messy and clumsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;And&amp;nbsp; what are constraints for &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px; background-color: #ffffff;"&gt; x &amp;amp; y&lt;/SPAN&gt;&amp;nbsp; and how do you define MSE&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153277#M797</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-17T16:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153278#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, you also need to initialize PRICE to missing if you want to be able to check its value everywhere:&lt;/P&gt;&lt;P&gt;num PRICE {RGN_I, MTH_I, CNTRY_I, CLS_I, MKT_I, MKTTYPE_I} init .;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153278#M798</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2014-12-17T16:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Airline Rubix</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153279#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob.&lt;/P&gt;&lt;P&gt;All 3 options worked. The "init ." did the trick.&lt;/P&gt;&lt;P&gt;SAS OR actually was prompting me for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now extending the model with more variables, more constraints and more data.&lt;/P&gt;&lt;P&gt;May need your help again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one is answered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Praveen &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Dec 2014 12:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Airline-Rubix/m-p/153279#M799</guid>
      <dc:creator>PraveenBala</dc:creator>
      <dc:date>2014-12-21T12:57:17Z</dc:date>
    </item>
  </channel>
</rss>

