From 89c39a239dbdc0de4eaa2a413683711faee6c351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gw=C3=A9na=C3=ABl=20Rault?= Date: Wed, 18 Dec 2024 15:55:39 +0100 Subject: [PATCH] Add new router_options --- api/v01/entities/vrp_input.rb | 2 ++ lib/routers/router_wrapper.rb | 2 ++ models/vehicle.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/api/v01/entities/vrp_input.rb b/api/v01/entities/vrp_input.rb index fb054a87..6a6d0821 100644 --- a/api/v01/entities/vrp_input.rb +++ b/api/v01/entities/vrp_input.rb @@ -607,6 +607,8 @@ module VrpVehicles optional :track, type: Boolean, default: true, desc: 'Use track or not' optional :motorway, type: Boolean, default: true, desc: 'Use motorway or not' optional :toll, type: Boolean, default: true, desc: 'Use toll section or not' + optional :low_emission_zone, type: Boolean, default: true, desc: 'Go into Low Emission Zone or not.' + optional :large_light_vehicle, type: Boolean, default: true, desc: 'Large Light Vehicule.' optional :trailers, type: Integer, desc: 'Number of trailers' optional :weight, type: Float, desc: 'Vehicle weight including trailers and shipped goods, in tons' optional :weight_per_axle, type: Float, desc: 'Weight per axle, in tons' diff --git a/lib/routers/router_wrapper.rb b/lib/routers/router_wrapper.rb index 5a847dcd..170abe4a 100644 --- a/lib/routers/router_wrapper.rb +++ b/lib/routers/router_wrapper.rb @@ -199,6 +199,8 @@ def params(mode, dimension, options) track: options[:track], motorway: options[:motorway], toll: options[:toll], + low_emission_zone: options[:low_emission_zone], + large_light_vehicle: options[:large_light_vehicle], trailers: options[:trailers], weight: options[:weight], weight_per_axle: options[:weight_per_axle], diff --git a/models/vehicle.rb b/models/vehicle.rb index 8fe50ecb..3cda7081 100644 --- a/models/vehicle.rb +++ b/models/vehicle.rb @@ -43,6 +43,8 @@ class Vehicle < Base field :motorway, default: true field :track, default: true field :toll, default: true + field :low_emission_zone, default: true + field :large_light_vehicle, default: true field :trailers, default: nil field :weight, default: nil field :weight_per_axle, default: nil