Skip to content

Commit

Permalink
Merge pull request #332 from braktar/requires-entity
Browse files Browse the repository at this point in the history
Partition entity is mandatory
  • Loading branch information
fab-girard authored Jan 14, 2022
2 parents 6fece10 + 6c42f10 commit 7084d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v01/entities/vrp_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module VrpConfiguration
params :vrp_request_partition do
requires(:method, type: String, values: %w[hierarchical_tree balanced_kmeans], desc: 'Method used to partition')
optional(:metric, type: Symbol, desc: 'Defines partition reference metric. Values should be either duration, visits or any unit you defined in units.')
optional(:entity, type: Symbol, values: [:vehicle, :work_day], desc: 'Describes what the partition corresponds to. Available only if method in [balanced_kmeans hierarchical_tree].', coerce_with: ->(value) { value.to_sym })
requires(:entity, type: Symbol, values: [:vehicle, :work_day], desc: 'Describes what the partition corresponds to. Available only if method in [balanced_kmeans hierarchical_tree].', coerce_with: ->(value) { value.to_sym })
optional(:threshold, type: Integer, desc: 'Maximum size of partition. Available only if method in [iterative_kmean clique].')
end

Expand Down

0 comments on commit 7084d8d

Please sign in to comment.