<?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 Selecting modes and service levels from Origin to Destination in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875424#M3903</link>
    <description>&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;I am trying to solve this problem.&amp;nbsp;I have a set of Origins (O), set of destinations (D). I have two set of products (called p1 and p2).&amp;nbsp; In between these origins and destinations, Between the origin and destinations, I have 3 modes of transport possible (Air, Ocean and Truck). In Air, I have two service levels STD/EXP.&amp;nbsp;In truck I have 2DAY/5DAY/7DAY. In Ocean, I have Slow/Fast. All these modes and service levels from O and D comes with a cost and we want to chose minimal cost of routing a shipment. The constraints that I have is for any give product, I can only choose one of the mode (either Air, Ocean or Truck). But I have the liberty to choose any service level for a given mode. For example, for product p1, for a shipment 1, if the model deems Air as the optimal mode, for some shipments for p1 product, I can chose STD and I can chose EXP for some other shipments for p1.&amp;nbsp; The input that we have is Shipments (shipment numbers 1 to 100) from O to D. Each shipment has its own weight.&amp;nbsp; We want to find , for a given shipment, what is the minimal cost way to ship . Of course, there are other constraints like if we are using STD for example, the shipment weight has to be at least 50 kgs.&amp;nbsp; If it is 7 DAY then it needs to be at least 100 Kgs.&amp;nbsp; The trouble I am having is I don't know how to select only 1 out of 3 modes for all shipments, yet can have the model allocate among many service levels for a given mode . Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 11:21:44 GMT</pubDate>
    <dc:creator>Santha</dc:creator>
    <dc:date>2023-05-12T11:21:44Z</dc:date>
    <item>
      <title>Selecting modes and service levels from Origin to Destination</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875424#M3903</link>
      <description>&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;I am trying to solve this problem.&amp;nbsp;I have a set of Origins (O), set of destinations (D). I have two set of products (called p1 and p2).&amp;nbsp; In between these origins and destinations, Between the origin and destinations, I have 3 modes of transport possible (Air, Ocean and Truck). In Air, I have two service levels STD/EXP.&amp;nbsp;In truck I have 2DAY/5DAY/7DAY. In Ocean, I have Slow/Fast. All these modes and service levels from O and D comes with a cost and we want to chose minimal cost of routing a shipment. The constraints that I have is for any give product, I can only choose one of the mode (either Air, Ocean or Truck). But I have the liberty to choose any service level for a given mode. For example, for product p1, for a shipment 1, if the model deems Air as the optimal mode, for some shipments for p1 product, I can chose STD and I can chose EXP for some other shipments for p1.&amp;nbsp; The input that we have is Shipments (shipment numbers 1 to 100) from O to D. Each shipment has its own weight.&amp;nbsp; We want to find , for a given shipment, what is the minimal cost way to ship . Of course, there are other constraints like if we are using STD for example, the shipment weight has to be at least 50 kgs.&amp;nbsp; If it is 7 DAY then it needs to be at least 100 Kgs.&amp;nbsp; The trouble I am having is I don't know how to select only 1 out of 3 modes for all shipments, yet can have the model allocate among many service levels for a given mode . Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 11:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875424#M3903</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2023-05-12T11:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting modes and service levels from Origin to Destination</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875472#M3904</link>
      <description>&lt;P&gt;For simplicity, I will demonstrate for only one O-D pair and omit those indices.&amp;nbsp; Suppose binary decision variable IsProductShipmentModeLevel[p,s,m,sl] indicates whether product p and shipment s use mode m with service level sl and&amp;nbsp;binary decision variable IsProductMode[p,m] indicates whether product p uses mode m.&amp;nbsp; Then impose the following constraints:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   con OneModeLevel {p in PRODUCTS, s in SHIPMENTS}:
      sum {&amp;lt;m,sl&amp;gt; in MODE_LEVEL} IsProductShipmentModeLevel[p,s,m,sl] = 1;

   con ModeLevelImpliesMode {p in PRODUCTS, s in SHIPMENTS, m in MODES}:
      sum {&amp;lt;(m),sl&amp;gt; in MODE_LEVEL} IsProductShipmentModeLevel[p,s,m,sl] &amp;lt;= IsProductMode[p,m];

   con OneMode {p in PRODUCTS}:
      sum {m in MODES} IsProductMode[p,m] = 1;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 May 2023 14:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875472#M3904</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2023-05-12T14:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting modes and service levels from Origin to Destination</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875812#M3905</link>
      <description>&lt;P&gt;thank you rob.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I got it/&amp;nbsp; The MODE_Level that one is that a cartesian join of all modes and service levels possible?&lt;/P&gt;&lt;P&gt;thanks a lot again&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875812#M3905</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2023-05-15T13:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting modes and service levels from Origin to Destination</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875833#M3906</link>
      <description>&lt;P&gt;Not a Cartesian product, but a union of Cartesian products:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   set MODE_LEVEL = (/Air/ cross /STD EXP/) union (/Truck/ cross /'2DAY' '5DAY' '7DAY'/) union (/Ocean/ cross /Slow Fast/);
   put MODE_LEVEL=;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;MODE_LEVEL={&amp;lt;'Air','STD'&amp;gt;,&amp;lt;'Air','EXP'&amp;gt;,&amp;lt;'Truck','2DAY'&amp;gt;,&amp;lt;'Truck','5DAY'&amp;gt;,&amp;lt;'Truck','7DAY'&amp;gt;,&amp;lt;'Ocean','Slow'&amp;gt;,&amp;lt;'Ocean','Fast'&amp;gt;}
&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2023 14:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875833#M3906</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2023-05-15T14:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting modes and service levels from Origin to Destination</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875836#M3907</link>
      <description>&lt;P&gt;wow this is awesome. i never knew this syntax.&lt;/P&gt;&lt;P&gt;thank you for everything.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 14:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Selecting-modes-and-service-levels-from-Origin-to-Destination/m-p/875836#M3907</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2023-05-15T14:51:07Z</dc:date>
    </item>
  </channel>
</rss>

