[pgrouting-users] Shortest Path Shooting-Star Ignore Reverse Cost

Jorge Eliécer Osorio Caro jorgeliecer.osorio at gmail.com
Mon Jan 30 16:19:59 EST 2012


Hi Steve,

I compile that version but i dont know very well the params that i need to
send to:

now we have via_path, means that edges where i can have access? its in
replacement of rule?
now we have that parameter to:

sql text,

		source_id integer,

        target_id integer,

        directed boolean,

        has_reverse_cost boolean,

        turn_restrict_sql text)


turn_restrict_sql what i need to pass there?


i have something like this:

SELECT
		*
	FROM
		turn_restrict_shortest_path(
			'SELECT

				routing.network.segment as id,
				routing.network.source,
				routing.network.target,
				routing.network.length as cost,
				routing.network.reverse_length as reverse_cost,

				routing.network.x1,
				routing.network.y1,
				routing.network.x2,
				routing.network.y2,

				routing.network.rule as via_path,
				routing.network.to_cost

			FROM
				routing.network',
			
			-- node_from, node_to
			15365,
			15366,
			--15242,

			false, -- directed
			true, -- reverse_cost
			'¿?'
		)


thanks steve.


2012/1/30 Stephen Woodbridge <woodbri at swoodbridge.com>

> Jorge,
>
> I have posted a few times on this problem, you can check the archives. The
> short story is the shooting star is broken. I think the last version that
> worked is 1.03. In my posts is also some information on a new algorithm
> turn_restricted_shortest_path (trsp) that is in a branch. The current code
> in a git branch works but is likely to see changes before it is released,
> but we do not have a release plan yet.
>
> -Steve
>
> On 1/30/2012 2:30 PM, Jorge Eliécer Osorio Caro wrote:
>
>> Im having a issue when try to calculate the shortest path using turn
>> restricctions this functions ignores the reverse_cost param.
>>
>> here the SQL:
>>
>> |SELECT
>>
>>         *
>>
>>     FROM
>>
>>         shortest_path_shooting_star(
>>
>>             'SELECT
>>
>>
>>                 routing.network.segment as id,
>>                 routing.network.source,
>>                 routing.network.target,
>>                 routing.network.length as cost,
>>                 routing.network.reverse_length as reverse_cost,
>>
>>
>>                 routing.network.x1,
>>                 routing.network.y1,
>>                 routing.network.x2,
>>                 routing.network.y2,
>>
>>                 routing.network.rule,
>>                 routing.network.to_cost
>>
>>
>>             FROM
>>                 routing.network',
>>
>>
>>             -- node_from, node_to
>>
>>             15365,
>>
>>             15366,
>>
>>             --15242,
>>
>>
>>             false,  -- directed
>>
>>             true-- reverse_cost
>>
>>         )
>>
>> |
>>
>> this generate that route:
>>
>> http://cl.ly/**242E2T0A2C410F1S0F3g <http://cl.ly/242E2T0A2C410F1S0F3g>
>>
>> that method generate the route but it ignores the one_way restriction ,
>> the restriction is ok, but take a route where ignores that.
>>
>> now in the next image i need the marked red lines are the correct route
>> because the 15229 and 15228 has both ways.
>>
>> http://cl.ly/**3t2O38343F0F0C0o3P2c <http://cl.ly/3t2O38343F0F0C0o3P2c>
>>
>> here how look my table:
>>
>> id source target cost reverse:cost rule to_cost x1, y1, x2, y2
>> 15245 9082 9150 0.02 100.00021 15214 101.00021 -74.79981 10.94605
>> -74.7996 10.94605
>>
>> how i cant fix that i compiled the last version of pgrouting from git
>> repo.
>>
>>
>>
>> ______________________________**_________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.**org <Pgrouting-users at lists.osgeo.org>
>> http://lists.osgeo.org/**mailman/listinfo/pgrouting-**users<http://lists.osgeo.org/mailman/listinfo/pgrouting-users>
>>
>
> ______________________________**_________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.**org <Pgrouting-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/pgrouting-**users<http://lists.osgeo.org/mailman/listinfo/pgrouting-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120130/5508261b/attachment-0001.html


More information about the Pgrouting-users mailing list