File: issue693.test.sql

package info (click to toggle)
pgrouting 3.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,520 kB
  • sloc: sql: 38,763; cpp: 21,049; ansic: 13,171; perl: 1,781; sh: 804; xml: 182; makefile: 48
file content (16 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- CopyRight(c) pgRouting developers
-- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/


    CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer);
    INSERT INTO routing (length, source, target, reverse_cost) VALUES
     (10000, 1, 2, 10000),
     (5, 3, 1, 5),
     (10, 4, 3, 10),
     (10, 2, 4, 10);

    SELECT pgr_trsp(
          'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing',
          1, 0.1, 1, 0.9, false, true
    );