Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxTransfers is logical in otp_validate_routing_options when it should be integer #69

Closed
rafavdz opened this issue Aug 4, 2020 · 2 comments

Comments

@rafavdz
Copy link

rafavdz commented Aug 4, 2020

Hi,

Great package I am enjoying it a lot! Thanks for the contribution.

I tried to edit otp_routing_options to limit the number of transfers in a request. However, when using otp_validate_routing_options it fails since it expecting a logical value when it should be an integer.

 routingOptions <- otp_routing_options()
 routingOptions$maxTransfers <- 3
 routingOptions <- otp_validate_routing_options(routingOptions)

Returns:

Error in otp_validate_routing_options(routingOptions) : 
  Assertion on 'opts$maxTransfers' failed: Must be of type 'logical' (or 'NULL'), not 'double'.

Best,
Rafa

mem48 added a commit that referenced this issue Aug 5, 2020
@mem48
Copy link
Contributor

mem48 commented Aug 5, 2020

Thanks, @rafavdz I've just committed a fix to a branch that I'm working on. So will come to the CRAN package eventually. In the meantime, you could manually edit the config JSON to add the maxTransfers value you want.

@mem48 mem48 closed this as completed Aug 5, 2020
@jc-ulles
Copy link

Hi, I have exactly the same problem with version 0.5.1. I solved the problem by defining:

router_config <- otp_make_config(type = "router")  
router_config$routingDefaults$maxTransfers <- as.integer(1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants