<?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: Road network optimization problem in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238680#M1188</link>
    <description>&lt;P&gt;I don't understand exactly how the problem is working. If the supply is at 0, does it mean there is no limit ? I am trying to write a simple example, but it does not compute...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Howerer, I thought of something else. I used the "Shortpath" statement in the Optnet procedure. It is giving me the shortest path between every pair of points I have in my data. I then use the number of nodes between each Source/sink as the weight for the TSP problem based on those paths. It's like creating fictive edges so that I can use each nodes more than once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, I am using SAS 9.3, so I cannot use the directed version of the problem, but the results are great. It covers a great part of the network. We might switch to 9.4 soon and I think that I would be able to solve the majority of my problem with this version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2015 13:11:41 GMT</pubDate>
    <dc:creator>Ceciestunnomtemporaire</dc:creator>
    <dc:date>2015-12-10T13:11:41Z</dc:date>
    <item>
      <title>Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238355#M1179</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to write an algorithm that would minimize the distance to travel&amp;nbsp;a series of roads. In input, I have the longitude and latitude of the beginning and the end of each road. This problem looks like&amp;nbsp;the Traveling Salesman Problem (&lt;A href="https://en.wikipedia.org/wiki/Travelling_salesman_problem)" target="_blank"&gt;https://en.wikipedia.org/wiki/Travelling_salesman_problem)&lt;/A&gt; or the Route inspection Problem (&lt;A href="https://en.wikipedia.org/wiki/Route_inspection_problem).&amp;nbsp;" target="_blank"&gt;https://en.wikipedia.org/wiki/Route_inspection_problem).&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have to pass through each one of these roads and backtracking is inevitable (there are some dead-ends). I found the optnet procedure on SAS help, but I cannot resolve my problem, because the TSP hypothesis is to pass once per point and only undirected graphs are accepted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the beginning of each roads as points, but it is not working as intended.&amp;nbsp;I would appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marc-Antoine&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 18:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238355#M1179</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2015-12-08T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238508#M1183</link>
      <description>&lt;P&gt;Can you please share your data and code, or at least some sample data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, although your problem is not TSP, note&amp;nbsp;that the TSP algorithm supports directed graphs in SAS/OR 14.1:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ornoaug/68159/HTML/default/viewer.htm#ornoaug_whatsnew_sect005.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ornoaug/68159/HTML/default/viewer.htm#ornoaug_whatsnew_sect005.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238508#M1183</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2015-12-09T15:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238514#M1184</link>
      <description>&lt;P&gt;My data looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input road_id $ length longitude_begin latitude_begin longitude_end latitude_end class $15.;&lt;BR /&gt;cards ;&lt;BR /&gt;H1 5000 -70.1 45.2 -70.3 45.1 Highway&lt;BR /&gt;H2 5200 -70.3 45.1 -70.5 45.3 Highway&lt;BR /&gt;H3 4200 -70.5 45.3 -70.6 45.7 Highway&lt;BR /&gt;R1 1200 -71.4 45.0 -71.3 45.1 Contiguous&lt;BR /&gt;R2 1000 -71.3 45.1 -71.2 45.1 Contiguous&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course there are way more than that (average of 2000 roads ID per group). In this example, the roads H1, H2 and H3 are connected and can be used in 1 direction only. The roads R1 and R2 and connected and can be used in both directions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time !&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238514#M1184</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2015-12-09T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238564#M1186</link>
      <description>&lt;P&gt;As described in Application 19.14 of &lt;EM&gt;Network Flows&lt;/EM&gt; (Ahuja, Magnanti, Orlin), the directed version of the problem can be formulated as a minimum-cost network flow problem with 0 supply at each node and a lower bound of 1 unit of flow on each arc. &amp;nbsp;You can use either PROC OPTNET...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ornoaug/68159/HTML/default/viewer.htm#ornoaug_optnet_details23.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ornoaug/68159/HTML/default/viewer.htm#ornoaug_optnet_details23.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...or the network solver in PROC OPTMODEL:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_networksolver_details19.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_networksolver_details19.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238564#M1186</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2015-12-09T19:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238680#M1188</link>
      <description>&lt;P&gt;I don't understand exactly how the problem is working. If the supply is at 0, does it mean there is no limit ? I am trying to write a simple example, but it does not compute...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Howerer, I thought of something else. I used the "Shortpath" statement in the Optnet procedure. It is giving me the shortest path between every pair of points I have in my data. I then use the number of nodes between each Source/sink as the weight for the TSP problem based on those paths. It's like creating fictive edges so that I can use each nodes more than once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, I am using SAS 9.3, so I cannot use the directed version of the problem, but the results are great. It covers a great part of the network. We might switch to 9.4 soon and I think that I would be able to solve the majority of my problem with this version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 13:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238680#M1188</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2015-12-10T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238725#M1189</link>
      <description>&lt;P&gt;Supply of 0 at a node just forces&amp;nbsp;inflow to be equal to outflow at that node. &amp;nbsp;There is no upper bound for&amp;nbsp;the flow on each arc, but the minimization objective will drive it to be as small possible, according to the arc costs. &amp;nbsp;If you post your simple example, I'll take a look. &amp;nbsp;One thing you might have missed is that the two-way arcs should be replaced with two one-way arcs in the input data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The undirected version of the problem is addressed in Application 19.15 of &lt;EM&gt;Network Flows&lt;/EM&gt;. &amp;nbsp;The solution approach does compute all-pairs shortest paths as the first step (as you mentioned), and this is also available in PROC OPTNET or PROC OPTMODEL. &amp;nbsp;Note here that the shortest paths are with respect to the sum of arc distances, not the number of arcs. &amp;nbsp;But the second step is a weighted matching problem on a complete graph consisting of the odd-degree nodes, where the new cost of edge (i,j) is the shortest path distance between i and j in the original graph. &amp;nbsp;You can solve this problem by using the MILP solver in PROC OPTMODEL. &amp;nbsp;There is a binary decision variable for each edge, and if the solver returns a value of 1 for edge (i,j), it means that all the arcs in the shortest path between i and j in the original network should be added. &amp;nbsp;In fact, you can call the network solver and then the MILP solver in the same PROC OPTMODEL session.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 16:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/238725#M1189</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2015-12-10T16:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/240076#M1192</link>
      <description>&lt;P&gt;Thanks, this is helping me a lot. Is is working for a great number of my groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to know, is there a way to know why is the problem&amp;nbsp;infeasible ? I am dividing my groups by connected components, but the ones with greater number of nodes are not running and the problem is said infeasible, and I do not find why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first thing I could think is my network need more links between the set of nodes, but I already added "fake links" to each pair of nodes. If I could find a way to find&amp;nbsp;the nodes I need to remove or the links I need to add to be able to have a feasible problem, that would be interesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2015 19:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/240076#M1192</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2015-12-18T19:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/240119#M1193</link>
      <description>&lt;P&gt;For network problems, adding dummy nodes and arcs with high cost is the usual approach to diagnose&amp;nbsp;infeasibility, as you have described. &amp;nbsp;But since you are having trouble with that approach,&amp;nbsp;you might consider using the IIS detection feature that diagnoses infeasibility for linear programming problems:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_lpsolver_details15.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_lpsolver_details15.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This method&amp;nbsp;requires an explicit LP formulation, and you can use the code in the following example, which solves a generic minimum-cost network flow problem:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_lpsolver_examples05.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_lpsolver_examples05.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should&amp;nbsp;replace the SOLVE statement with:&lt;/P&gt;
&lt;P&gt;solve with LP / iis=on;&lt;/P&gt;
&lt;P&gt;expand / iis;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2015 21:41:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/240119#M1193</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2015-12-18T21:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251241#M1226</link>
      <description>&lt;P&gt;Thanks for the tips, it helped me a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for some groups, I am having an error and I can't find and solution on google. The error is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;ERROR: objValue:12356273 objValueLB:12356273&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it may be an error of memory (the value is &lt;STRIKE&gt;the the&lt;/STRIKE&gt;&amp;nbsp;not the same every time). I tried some options, but the problem is still happening. Do you have an idea of where it might come from?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 19:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251241#M1226</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2016-02-19T19:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251251#M1227</link>
      <description>&lt;P&gt;Can you please attach data and code for one of the groups that yields this error?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 19:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251251#M1227</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-02-19T19:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251265#M1228</link>
      <description>&lt;P&gt;The example is joined (names have been changed) and the code I'm using is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	proc optnet 
		graph_direction=directed

	   /*loglevel   = none*/
	   data_links = optimize;
/*	   out_nodes  = not_test_out2;*/
	   tsp out = Test_out2 cutstrategy=2 emphasis=1 HEURISTICS=3 CONFLICTSEARCH=2;
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I've tried with and without the TSP options, but it's not different.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 20:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251265#M1228</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2016-02-19T20:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251339#M1229</link>
      <description>&lt;P&gt;I am able to replicate this behavior, and it turns out to be a known issue in the TSP solver when the objective value is large. &amp;nbsp;It will be fixed in the next release, but as a workaround you can scale the input weights by dividing by 1000. &amp;nbsp;Doing so averted the issue for me.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2016 17:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251339#M1229</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-02-20T17:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Road network optimization problem</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251575#M1230</link>
      <description>&lt;P&gt;Yes, it worked for me too and for my other groups I had problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time, it is really appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 16:34:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Road-network-optimization-problem/m-p/251575#M1230</guid>
      <dc:creator>Ceciestunnomtemporaire</dc:creator>
      <dc:date>2016-02-22T16:34:28Z</dc:date>
    </item>
  </channel>
</rss>

