# These examples might require interaction to query the local keyring, or
# might fail due to network issues, so they are not run by default
if (FALSE) {
home_base <- c(2.35044, 48.71764)
vehicles <- vehicles(
id = 1:2,
profile = "driving-car",
start = home_base,
end = home_base,
capacity = 4,
skills = list(c(1, 14), c(2, 14)),
time_window = c(28800, 43200)
)
locations <- list(
c(1.98935, 48.701),
c(2.03655, 48.61128),
c(2.39719, 49.07611),
c(2.41808, 49.22619),
c(2.28325, 48.5958),
c(2.89357, 48.90736)
)
jobs <- jobs(
id = 1:6,
service = 300,
amount = 1,
location = locations,
skills = list(1, 1, 2, 2, 14, 14)
)
try( ors_optimization(jobs, vehicles) )
}
Run the code above in your browser using DataLab