<?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 Example 8.2 Multicommodity Transshipment in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352608#M1773</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A question related to this example&lt;/P&gt;&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_milpsolver_examples02.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_milpsolver_examples02.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to define&amp;nbsp;the supply details &amp;amp; constraints related to it, if the supply is on the farm level across all commodities not for each indvidual one. for example farm-a in total can supply 200 and farm-b in total can supply 100, where the demand from NY remains the same for each commodity. or vice versa where capacity in DC is across allo commodities not for each&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sun, 23 Apr 2017 16:40:01 GMT</pubDate>
    <dc:creator>AAZ</dc:creator>
    <dc:date>2017-04-23T16:40:01Z</dc:date>
    <item>
      <title>Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352608#M1773</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A question related to this example&lt;/P&gt;&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_milpsolver_examples02.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_milpsolver_examples02.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to define&amp;nbsp;the supply details &amp;amp; constraints related to it, if the supply is on the farm level across all commodities not for each indvidual one. for example farm-a in total can supply 200 and farm-b in total can supply 100, where the demand from NY remains the same for each commodity. or vice versa where capacity in DC is across allo commodities not for each&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 16:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352608#M1773</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-23T16:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352743#M1774</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple ways of modeling this. One is to add a new constraint on the outflow of the nodes (i.e. the sum over all DC and commodities from farm a must be less than the total capacity)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To achieve this with the code in the example I have changed the supply_data dataset by adding all nodes (i.e. add the DCs here) and adding an extra variable indicating the max flow through the node. In the optmodel &amp;nbsp;code I have added a new "num" statement to hold the new capacity data and added it to the 'read data' statement. Finally, I've added a new constraint 'flow_cap' that sums over all flow out of a node (the constraint is defined over all nodes 'i' but the sum is only done over the arcs that start in 'i').&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached the modified program. With the data I've added you should see the overall (flow) capacity constraints on farm b and through the Chicago DC kick in and make the overall optmial flow more expensive&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 07:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352743#M1774</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-24T07:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352754#M1775</link>
      <description>&lt;P&gt;Great Thanks, I assume&amp;nbsp;DATA NODE_CAP; is there for testing? as it's not refered in the body .&lt;/P&gt;&lt;P&gt;Another question, How to print total quanity/cost for each product ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on a different note, If I don't want to define a dataset and do it in the matrix way. so, if I have a variably&amp;nbsp;number DCProduct {dc,product}= [&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2.4&lt;/TD&gt;&lt;TD&gt;2.8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;7.5&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;10.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and Where there are 2 products through these 3&amp;nbsp;DCs, and I want to some the first two columns and put it in avariable ProductA and the last 2 and put it in another variable product b. how to write this one.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 08:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352754#M1775</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-24T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352767#M1776</link>
      <description>Yes, sorry about that. NODE_CAP is obsolete</description>
      <pubDate>Mon, 24 Apr 2017 09:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352767#M1776</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-24T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352771#M1777</link>
      <description>&lt;P&gt;I am not quite sure I understand what you are trying to achieve. You can easily have a variable number of DCs using a dataset as an input. Likewise, you can do any data manipulation with the grouping of commodities. Are you hinting at restricting the number of types of commodities flowing through a DC? E.g. there are 4 types but any one DC can only handle 2 of them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please elaborate&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 09:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352771#M1777</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-24T09:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352780#M1778</link>
      <description>&lt;P&gt;Yes, I want to force specific&amp;nbsp;commodities&amp;nbsp;to flow from certain farms as you said. and&amp;nbsp;want to calculate the total quantity/cost flowing from plant to dc, to be able to know the unit cost of each commodity, where further I can add a constraint on the unit cost.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 10:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352780#M1778</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-24T10:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352802#M1781</link>
      <description>&lt;P&gt;ok, so the idea is to add a new binary decision variable controlling which commodities are supplied from which node (i.e. 1=supplied, 0=not supplied). From here two new constraints are added. One limiting the number of commodities supplied from each node and one that binds this new variable to the flow (no supply infers no flow). The limits of commodities for each node (incl. DC and sink node for simplicity) have been added to the supply_data dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached the modified program&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352802#M1781</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-24T12:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352820#M1782</link>
      <description>&lt;P&gt;Thanks a ton! what about the total quantity/ total unit cost for each product&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/352820#M1782</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-24T12:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353125#M1789</link>
      <description>I am not sure I understand what you are missing. The flow cost is an input vector/matrix and the actual commodities are a direct output of the decision variables. From here it should be a simple output transformation/aggregation using PROC SUMMARY/SQL to get the data structure you seek. Is there something I am missing in waht you are trying to achieve?</description>
      <pubDate>Tue, 25 Apr 2017 08:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353125#M1789</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-25T08:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353594#M1795</link>
      <description>&lt;P&gt;was missing the sql part, will see how to incorperate than that in the code. In the latest&amp;nbsp;version with cap and limit, can we inforce product capacity on chicago with respecting the overal capacity. for example Chicago capacity for C3 shouldn't exceed 30 it still can process the other numer of items without exceeding the total capacity. I tried inforcing it by enering the required capacity in chicago and St but it didn't go, it works fine for the farms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;farm-a 100 100 40 . 240 4&lt;BR /&gt;farm-b 100 200 50 50 160 2&lt;BR /&gt;farm-c 40 100 75 100 250 4&lt;BR /&gt;Chicago 0 0 30 0 300 4&lt;BR /&gt;StLouis 0 0 0 0 1000 4&lt;BR /&gt;NY -150 -200 -50 -75 . .&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 10:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353594#M1795</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-26T10:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353688#M1796</link>
      <description>&lt;P&gt;By changing the supply_data dataset you are specifying that Chicago can provide 30 units of commodity 3, which is not what your want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The specific example you provide can be solved by adding the following constraint to your model&lt;/P&gt;
&lt;P&gt;con restrict_C3_Chicago: AmountShipped["Chicago","NY",3]&amp;lt;=30;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what is does is that is restricts the flow from Chicago to NY to 30, which solves what you need as long as NY is the only sink node in the network.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 13:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353688#M1796</guid>
      <dc:creator>berlinnov</dc:creator>
      <dc:date>2017-04-26T13:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Example 8.2 Multicommodity Transshipment</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353720#M1797</link>
      <description>&lt;P&gt;that's how I understand it, the supply dataset contains the supply and demand data, identified by +/- . so when I mention that chicago can supply 30,&amp;nbsp; that part of the code will prevent chicago from supplying more than the mentioned amount, that's how it worked for farms, please clarify ?&lt;/P&gt;&lt;P&gt;con flow_balance {i in NODES, c in COMMODITIES}:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum {&amp;lt;(i),j&amp;gt; in ARCS} AmountShipped[i,j,c] -&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum {&amp;lt;j,(i)&amp;gt; in ARCS} AmountShipped[j,i,c] &amp;lt;= supply[i,c];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the above is not the right way and it's required to restrict multiple Nodes, do I need to create another data set&amp;nbsp; specifying the the limit for each node?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 14:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Example-8-2-Multicommodity-Transshipment/m-p/353720#M1797</guid>
      <dc:creator>AAZ</dc:creator>
      <dc:date>2017-04-26T14:40:46Z</dc:date>
    </item>
  </channel>
</rss>

