Show/Hide Toolbars

CWT Software Configuration Handbook

Navigation: Examples

Tariff examples

Scroll Prev Top Next More

// Test4_package.txt

//

// Mon-Fr 8-18, Sat 8-13        5kr/h

// Mon-Sat 6-8                Free

// Other time                Blocked

 

PACKAGE "Test 4";

 

INTERVAL "normal";

timepredicate = "( ( ($weekday in [mon to fri]) and ($hour in [08 to 18[) ) or ( ($weekday = sat) and ($hour in [08 to 13[) ) )";

tariffrate = linear 5 per 60;

 

INTERVAL "free";

timepredicate = "(($weekday in [mon to sat]) and ($hour in [06 to 08[))";

tariffrate = flat 0 until end of interval;

 

INTERVAL "block" : priority 0;

timepredicate = #always;

blocked = true;


// Test5_package.txt

//

// Mon-Fr 8-18, Sat 8-13        7kr/h

// Other times                1kr/h

// max                        1 week

 

PACKAGE "Test 5";

max units = 10080;

 

INTERVAL "normal";

timepredicate = "( ( ($weekday in [mon to fri]) and ($hour in [08 to 18[) ) or ( ($weekday = sat) and ($hour in [08 to 13[) ) )";

tariffrate = linear 7 per 60;

INTERVAL "other times" : priority 0;

timepredicate = #always;

tariffrate = linear 1 per 60;


// Test6_package.txt

//

// Mon-Fr 8-18                5kr/h

// Mon-Fr 18-24                5kr/h, 15 kr until 24.00

// Sat    08-15                5kr/h, 25 kr until 24.00

// Other time                Free

// max                        1 week

 

PACKAGE "Test 6";

carryovermode = carryover without recalculation;

max units = 10080;

 

INTERVAL "days";

timepredicate = "(($weekday in [mon fri]) and ($hour in [08 18[))";

tariffrate = linear 5 per 60;

 

INTERVAL "evenings";

timepredicate = "(($weekday in [mon fri]) and ($hour in [18 24[))";

tariffrate = linear 5 per 60;

tariffrate = flat 15 until end of interval;

 

INTERVAL "saturdays";

timepredicate = "(($weekday = sat) and ($hour in [08 15[))";

tariffrate = linear 5 per 60;

tariffrate = flat 25 until end of interval;

 

INTERVAL "other times" : priority 0;

timepredicate = #always;

tariffrate = flat 0 until end of interval;


// Test7_package.txt

//

// Mon-Sun 8-18        5kr/h for 3 h, and thereafter 10kr/h

// Other times        2kr/h

// max time        1 week

 

PACKAGE "Test 7";

max units = 10080;

 

INTERVAL "days";

timepredicate = "($hour in [08 18[)";

tariffrate = linear 5 per 60 : tariffstep 1 duration 180;

tariffrate = linear 10 per 60 : tariffstep 2 duration #inf;

 

INTERVAL "other times" : priority 0;

timepredicate = #always;

tariffrate = linear 2 per 60;


// Test8_package.txt

//

// Mon-Sun 8-18                11kr/h for 3 h

//                        7kr/h for 3 h

//                        and thereafter 1kr/4h

// Other times                Free

// min fee                5 kr

// max time                1 week

 

PACKAGE "Test 8";

carryovermode = no carryover;

max units = 10080;

min ticks = 5;

 

INTERVAL "days";

timepredicate = "($hour in [08 18[)";

tariffrate = linear 11 per 60 : tariffstep 1 duration 180;

tariffrate = linear 7 per 60 : tariffstep 2 duration 180;

tariffrate = linear 1 per 240 : tariffstep 3 duration #INF;

 

INTERVAL "other times" : priority 0;

timepredicate = #ALWAYS;

tariffrate = flat 0 until end of interval;


// Test9_package.txt

//

// Mon-Sun 0-24                5kr=1h, 7kr=2h, 10kr=4h, 12kr=8h

// Other times                Free

// min fee                5

// max fee                36

 

PACKAGE "Test 9";

carryovermode = no carryover;

max ticks = 36;

min ticks = 5;

 

INTERVAL "always";

timepredicate = #always;

tariffrate = unit 5 per 60;

tariffrate = unit 7 per 120;

tariffrate = unit 10 per 240;

tariffrate = unit 12 per 480;


// Test10_package.txt

//

// Mon-Sun 0-24        Free 1 h, and thereafter 5kr/h for 3h

// max ticks        15

 

PACKAGE "Test 10";

max ticks = 15;

 

INTERVAL "always";

tariffrate = linear 5 per 60;

tariffrate = flat 0 until end of step : tariffstep 1 duration 60;


// Test14_package.txt

//

// Mon 06.00 - Fr 18.00        10kr/h, 75kr=12h, 120kr=24h

// Fr 18.00-Mon 06.00        5kr/h, 60kr=24h

 

PACKAGE "Test 14";

carryovermode = carryover without recalculation;

 

INTERVAL "weekdays";

timepredicate = "($timeofweek in [|mon 06:00| |fri 18:00|[ )";

tariffrate = linear 10 per 60;

tariffrate = unit 75 per 720;

tariffrate = unit 120 per 1440;

 

INTERVAL "weekends";

timepredicate = "($timeofweek in [|fri 18:00| |mon 06:00|[ )";

tariffrate = linear 5 per 60;

tariffrate = unit 60 per 1440;


// Test15_package.txt

//

// Mon-Sat 05-18        10kr/12min

//         18-24        10kr/12min, 25kr until 24.00

// Sun         05-18        10kr/60min

//         18-24        10kr/60min, 25kr until 24.00

// 220kr = 24 h

// Other times        Free

 

PACKAGE "Test 15";

carryovermode = carryover without recalculation;

 

INTERVAL "default" : priority 0;

timepredicate = #always;

tariffrate = flat 0 until end of interval;

 

INTERVAL "weekdays";

timepredicate = "(($weekday in [mon sat]) and ($hour in [05 18[))";

tariffrate = linear 10 per 12;

tariffrate = unit 220 per 1440;

 

INTERVAL "evenings";

timepredicate = "(($weekday in [mon sat]) and ($hour in [18 24[))";

tariffrate = linear 10 per 12;

tariffrate = flat 25 until end of interval;

tariffrate = unit 220 per 1440;

 

INTERVAL "sundays";

timepredicate = "(($weekday = sun) and ($hour in [05 18[))";

tariffrate = linear 10 per 60;

tariffrate = unit 220 per 1440;

 

INTERVAL "sunday evenings";

timepredicate = "(($weekday = sun) and ($hour in [18 24[))";

tariffrate = linear 10 per 60;

tariffrate = flat 25 until end of interval;

tariffrate = unit 220 per 1440;


// Test16_package.txt

//

// Mon-Sat  00-24                40kr/h

// Sun+weekends 00-24        10kr/h

// Mon-Fr         00-24                200kr/24h

// Sat         00-17                200kr/24h

// Sun         00-24                100kr/24h

// Mon-Sun 18-23                30kr

// Mon-Sun 23-08                30kr

 

PACKAGE "Test 16";

carryovermode = carryover without recalculation;

 

INTERVAL "2400";

timepredicate = "($timeofday = 00.00)";

 

INTERVAL "mon to sat";

timepredicate = "($weekday in [mon to sat])";

tariffrate = linear 40 per 60;

 

INTERVAL "sun";

timepredicate = "($weekday = sun)";

tariffrate = linear 10 per 60;

 

INTERVAL "weekdays unit";

timepredicate = "($weekday in [mon to fri])";

tariffrate = flat 200 until start of "2400";

 

INTERVAL "saturdays unit";

timepredicate = "(($weekday = sat) and ($hour in [0 to 17[))";

tariffrate = flat 200 until start of "2400";

 

INTERVAL "sundays unit";

timepredicate = "($weekday = sun)";

tariffrate = flat 100 until start of "2400";

 

INTERVAL "evenings flat";

timepredicate = "($hour in [18 to 23[)";

tariffrate = flat 30 until end of interval;

 

INTERVAL "nights flat";

timepredicate = "($hour in [23 to 08[)";

tariffrate = flat 30 until end of interval;


// alvik_package.txt

//

// Mon-Fr 00-24 5kr=1h, thereafter 15kr/h

// Sat-Sun + weekends 00-24 2h Free, thereafter 5kr=1h,
// thereafter 15kr/h

// Night Mon-Sun 18-09 30kr=>09:00

// Day Mon-Sun 07-18 80kr=>18:00

 

PACKAGE "alvik";

 

INTERVAL "weekdays";

timepredicate = "($weekday in [mon to fri])";

tariffrate = unit 5 per 60 : tariffstep 1 duration 60;

tariffrate = unit 15 per 60 : tariffstep 2 duration #inf;

 

INTERVAL "weekends";

timepredicate = "($weekday in [sat to sun])";

tariffrate = flat 0 until end of step : tariffstep 1 duration 120;

tariffrate = unit 5 per 60 : tariffstep 2 duration 60;

tariffrate = unit 15 per 60 : tariffstep 3 duration #inf;

 

INTERVAL "nights";

timepredicate = "($hour in [18 to 09[)";

tariffrate = flat 30 until end of interval;

 

INTERVAL "days";

timepredicate = "($hour in [07 to 18[)";

tariffrate = flat 80 until end of interval;


// blockedgarage_package.txt

//

// Tests $timeSinceOrigin, interval level max

//

// Mon-Sun 08-18: $10 per hour, max 2 hours

// Mon-Sun 18-24: $5 per hour

// Mon-Sun 24-08: Free

//

// If arrived before midnight, block at 01.00

 

PACKAGE "blocked garage";

 

INTERVAL "days";

timepredicate = "($hour in [08 to 18[)";

tariffrate = linear 10 per 60;

max units = 120;

 

INTERVAL "evenings";

timepredicate = "($hour in [18 to 24[)";

tariffrate = linear 5 per 60;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;

 

INTERVAL "block";

timepredicate = "(($timeofday = 01.00) and ($timesinceorigin > 60))";

blocked = true;


// cocacola_package.txt

//

// Tests non-time based units

//

// For some reason, there's a discount on Coca Colas on weekends

//

// mon-fri 00-24:        1 can $3, 2 cans $5

// sat-sun 00-24:        1 can $2

 

PACKAGE "coca cola";

unit stride = 0;

max run length = 5;        // To increase performance

 

INTERVAL "weekdays";

timepredicate = "($weekday in [mon to fri])";

tariffrate = unit 3 per 1;

tariffrate = unit 5 per 2;

 

INTERVAL "weekends";

timepredicate = "($weekday in [sat to sun])";

tariffrate = unit 2 per 1;


// fleming_package.txt

//

// Mon-Sun 00-24: 35kr/h

// Mon-Sun 18-24: 30kr=>24:00

// Mon-Sun 00-08: 30kr=>08:00

// Mon-Sun 00-24: 170kr/24h

// Weekend parking, Fr 18:00-Mon 08:00 150kr=>08:00

 

PACKAGE "fleming";

 

INTERVAL "always";

tariffrate = linear 35 per 60;

tariffrate = unit 170 per 1440;

 

INTERVAL "evenings";

timepredicate = "($hour in [18 to 24[)";

tariffrate = flat 30 until end of interval;

 

INTERVAL "mornings";

timepredicate = "($hour in [00 to 08[)";

tariffrate = flat 30 until end of interval;

 

INTERVAL "weekends";

timepredicate = "($timeofweek in [|fri 18.00| to |mon 08.00|[)";

tariffrate = flat 150 until end of interval;


// freeunits_package.txt

//

// Tests free units.

//

// Mo-Su 08-12, 13-18 $5/hour, 120 free minutes

// Other times free

 

PACKAGE "free units";

 

INTERVAL "day" : priority 1;

timepredicate = "($hour in [08 to 18[)";

tariffrate = flat 0 until end of step : tariffstep 1 duration 120;

tariffrate = linear 5 per 60;

contiguous = true;

 

INTERVAL "lunch" : priority 2;

timepredicate = "($hour = 12)";

tariffrate = flat 0 until end of interval;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// Fyrishov_package.txt

//

// Mon-Su 08-21: 9kr/h

// Mon-Su 21-08: 3kr/h

// Night tariff 18-06: 25kr=>06:00

// 50kr=>05:00

 

PACKAGE "Fyrishov";

 

INTERVAL "days";

timepredicate = "($hour in [08 to 21[)";

tariffrate = linear 9 per 60;

 

INTERVAL "eves";

timepredicate = "($hour in [21 to 08[)";

tariffrate = linear 3 per 60;

 

INTERVAL "nights";

timepredicate = "($hour in [18 to 06[)";

tariffrate = flat 25 until end of interval;

 

INTERVAL "05.00";

timepredicate = "($timeofday = 05.00)";

 

INTERVAL "always";

timepredicate = #always;

tariffrate = flat 50 until start of "05.00";


// Grevture_package.txt

//

// Mon-Fr 01:00-18:00 12kr/10min

// Sat-Sun 01:00-18:00 10kr/12min

// Mon-Sun 18:00-01:00 20kr/60min

// Mon-Sun 01:00-08:00 50kr=>08:00

// Mon-Sun 00:00-24:00 300kr/24h

 

PACKAGE "Grevture";

 

INTERVAL "days";

timepredicate = "(($weekday in [mon to fri]) and ($hour in [01 to 18[))";

tariffrate = unit 12 per 10;

 

INTERVAL "weekends";

timepredicate = "(($weekday in [sat to sun]) and ($hour in [01 to 18[))";

tariffrate = unit 10 per 12;

 

INTERVAL "evenings";

timepredicate = "($hour in [18 to 01[)";

tariffrate = unit 20 per 60;

 

INTERVAL "nights";

timepredicate = "($hour in [01 to 08[)";

tariffrate = flat 50 until end of interval;

 

INTERVAL "flat rate";

timepredicate = #always;

tariffrate = unit 300 per 1440;


// Göteborg_package.txt

//

// Mon-Sun 00-24: 3kr/h

// Mon-Sun 07-17: 15kr=>18:00

// Mon-Sun 17-07: 15kr=>08:00

 

PACKAGE "Goteborg";

 

INTERVAL "always";

tariffrate = linear 3 per 60;

 

INTERVAL "18.00";

timepredicate = "($timeofday = 18.00)";

 

INTERVAL "08.00";

timepredicate = "($timeofday = 08.00)";

 

INTERVAL "days";

timepredicate = "($hour in [07 to 17[)";

tariffrate = flat 15 until start of "18.00";

 

INTERVAL "nights";

timepredicate = "($hour in [17 to 07[)";

tariffrate = flat 15 until start of "08.00";


// intervallmax_package.txt

//

// Tests interval max, contiguous

//

// Mon-Sun 08-18, $5/hour, max 2 hours TOTAL

// Other times free

 

PACKAGE "Interval max";

 

INTERVAL "day";

timepredicate = "($hour in [08 18[)";

tariffrate = linear 5 per 60;

max units = 120;

contiguous = true;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// minpaid_package.txt

//

// Tests minimum paid units

//

// Mo-Su 08-18 $5/hour

// Other times free

// Minimum 1 paid hour

 

PACKAGE "min paid";

min paid units = 60;

 

INTERVAL "day";

timepredicate = "($hour in [08 18[)";

tariffrate = linear 5 per 60;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// minticks_package.txt

//

// Tests minimum ticks constraint.

//

// Mon-Sun 08-18 $5/hour

// Other times free

// Minimum fee $2

 

PACKAGE "minticks";

min ticks = 2;

 

INTERVAL "days";

timepredicate = "($hour in [08 to 18[)";

tariffrate = linear 5 per 60;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// minunits_package.txt

//

// Tests interval min units

//

// 08-18 $5/hour, min 60 minutes

// 18-24 $1/hour, min 120 minutes

// Other times free

 

PACKAGE "Min units";

 

INTERVAL "days";

timepredicate = "($hour in [08 18[)";

tariffrate = linear 5 per 60;

min units = 60;

 

INTERVAL "evenings";

timepredicate = "($hour in [18 24[)";

tariffrate = linear 1 per 60;

min units = 120;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// Newcastle_package.txt

//

// Tests inertia

//

// Mon-Sat 08-18 60p/hour

// Mon-Sat 18-22 £1 flat

// Mon-Sun 22-08 £1 flat

// Sun 08-18 £1 flat

// Sun 18-22 £1.30 flat

 

PACKAGE "Newcastle";

carryovermode = no carryover;

 

INTERVAL "day";

timepredicate = "(($weekday in [mon,sat]) and ($hour in [08,18[))";

tariffrate = linear 60 per 60;

inertia = 60;

 

INTERVAL "evenings";

timepredicate = "(($weekday in [mon,sat]) and ($hour in [18,22[))";

tariffrate = flat 100 until end of interval;

 

INTERVAL "nights";

timepredicate = "($hour in [22,8[)";

tariffrate = flat 100 until end of interval;

 

INTERVAL "sunday days";

timepredicate = "(($weekday = sun) and ($hour in [08,18[))";

tariffrate = flat 100 until end of interval;

 

INTERVAL "sunday evenings";

timepredicate = "(($weekday = sun) and ($hour in [18,22[))";

tariffrate = flat 130 until end of interval;


// origin_package.txt

//

// Tests must contain origin, $timeSinceOrigin

//

// Mon-Sun 10-18, 2 hours free, then $5/hour

// Other times free

//

// Free units only given once, and only when

// arrival time is after 10.

 

PACKAGE "Origin";

 

INTERVAL "days";

timepredicate = "($hour in [10 to 18[)";

tariffrate = linear 5 per 60;

 

INTERVAL "free";

timepredicate = "( ($hour in [10 to 18[) and ($timesinceorigin < 120))";

tariffrate = flat 0 until end of step : tariffstep 1 duration 120;

must contain origin;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;


// recalculation_package.txt

//

// Tests carryover with recalculation

//

// mon-sun 08-18 $5/hour, $10=6 hours

// Other times $2/hour

 

PACKAGE "Recalculation";

carryovermode = carryover with recalculation;

 

INTERVAL "days";

timepredicate = "($hour in [08 to 18[)";

tariffrate = linear 5 per 60;

tariffrate = unit 10 per 360;

 

INTERVAL "other times" : priority 0;

tariffrate = linear 2 per 60;


// Rounding_package.txt

//

// Tests pre and post payment rounding behaviour

//

// Mon-Sun 00-24 $7/hour

 

PACKAGE "rounding";

 

INTERVAL "always";

tariffrate = linear 7 per 60;


// örebro_package.txt

//

// M-L 08-18(9-13): 5kr/h, 10kr=3h, thereafter 5kr/h.

// M-F 18-22: 2kr/h

 

PACKAGE "Orebro";

 

INTERVAL "days";

timepredicate = "(( ($weekday in [mon to fri]) and ($hour in [08 to 18[)  ) or

           ( ($weekday = sat)           and ($hour in [09 to 13[)  )     )";

tariffrate = unit 10 per 180 : tariffstep 1 duration 180;

tariffrate = linear 5 per 60;

contiguous = true;

 

INTERVAL "eves";

timepredicate = "( ($weekday in [mon to fri]) and ($hour in [18 to 22[) )";

tariffrate = linear 2 per 60;

 

INTERVAL "other times" : priority 0;

tariffrate = flat 0 until end of interval;