Skip to content

Commit

Permalink
Add new router_options
Browse files Browse the repository at this point in the history
  • Loading branch information
braktar committed Dec 18, 2024
1 parent c0d98c9 commit 89c39a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v01/entities/vrp_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions lib/routers/router_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions models/vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89c39a2

Please sign in to comment.