I'm trying to use pgrouting pgr_trsp function but result is useless. Exactly same code with pgr_dijkstra working OK and find shortest path between start and stop but with pgr_trsp it is look like random jumps around map.
I'm using this code
SELECT a.seq, a.id1 AS node, a.id2 AS to, a.cost, cr_2po_4pgr.osm_name,
ST_AsText(ST_GeomFromEWKB(decode(cr_2po_4pgr.the_geom,'hex'))) as geodata FROM pgr_dijkstra ('SELECT gid as id, source, target, cost FROM cr_2po_4pgr', $start,$end,false, false) as a left join cr_2po_4pgr on a.id2 = cr_2po_4pgr.gid
Based on documentation trsp should be almost same as dijkstra but i can use turn restriction code. But even basic is not working. What i'm doing wrong ?