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

Break issue - ComponentRange error #165

Open
neemanjabu opened this issue Feb 7, 2025 · 2 comments
Open

Break issue - ComponentRange error #165

neemanjabu opened this issue Feb 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@neemanjabu
Copy link

neemanjabu commented Feb 7, 2025

Reproduction steps:

  1. run solver as vrp-cli solve pragmatic problem.json (two problem.json attached, both cause the same error)
  2. error occurs with the following message:
thread 'main' panicked at vrp-pragmatic/src/lib.rs:51:97:
called `Result::unwrap()` on an `Err` value: ComponentRange { name: "timestamp", minimum: -377705116800, maximum: 253402300799, value: 9223372036854775807, conditional_range: false }
stack backtrace:
   0:     0x713215e158b2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h56c396e6ec1a6d25
   1:     0x713215dc2a9b - core::fmt::write::h8d9f62e4196a6251
   2:     0x713215dedeb2 - std::io::Write::write_fmt::hfeda4b672809964d
   3:     0x713215e1ab89 - std::sys_common::backtrace::print::h92792842c9200fcf
   4:     0x713215e1a3ae - std::panicking::default_hook::{{closure}}::h4fa40162feafd3ea
   5:     0x713215e1b5d4 - std::panicking::rust_panic_with_hook::h33e85abbf3f92159
   6:     0x713215e1aef2 - std::panicking::begin_panic_handler::{{closure}}::h6e89e0968a11dcc7
   7:     0x713215e1ae49 - std::sys_common::backtrace::__rust_end_short_backtrace::h6f80b72bde67d6fa
   8:     0x713215e1ae36 - rust_begin_unwind
   9:     0x713215c24ec2 - core::panicking::panic_fmt::hb37c2646452904e3
  10:     0x713215c252d5 - core::result::unwrap_failed::h95d9de04097dd2c4
  11:     0x713215f47a4d - vrp_pragmatic::format_time::hfb0f8b0c521a6f24
  12:     0x713215fc6310 - vrp_pragmatic::format::solution::solution_writer::create_tour::h951bc14512f91ca7
  13:     0x713215fc37c7 - vrp_pragmatic::format::solution::solution_writer::create_solution::hbe1d921567365674
  14:     0x713215c84d19 - vrp_pragmatic::format::solution::write_pragmatic::h0eafee619269b34d
  15:     0x713215d638e3 - vrp_cli::commands::solve::add_pragmatic::{{closure}}::h199290cbbed79869
  16:     0x713215d69af4 - vrp_cli::commands::solve::run_solve::h8817575db3bbc162
  17:     0x713215d7e678 - vrp_cli::cli::run_subcommand::h564d9de34c729393
  18:     0x713215d6fb66 - vrp_cli::main::hc0f39bb4a070fa2e
  19:     0x713215c91cb3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1cf440c697908a17
  20:     0x713215d81716 - main

It seems that the issue lies somewhere in having a break with a short duration and the break time window at the same time as the job's time window end.

problem.json
problem2.json

@reinterpretcat
Copy link
Owner

Thanks for reporting! I can confirm the issue: there is an overflow happens in activity place schedule times. I would need to find time to dig into it to understand what went wrong..

@reinterpretcat reinterpretcat added the bug Something isn't working label Feb 19, 2025
@reinterpretcat
Copy link
Owner

Basically, the reason is that you're using required break feature which is kind of experimental:

	"breaks": [
		{
			"time": {
				"earliest": "2025-02-10T12:00:00.000Z",
				"latest": "2025-02-10T12:00:00.000Z"
			},
			"duration": 300
		}
	]

One possible solution is to switch to optional break feature which is considered as a stable:

	"breaks": [
		{
			"time": ["2025-02-10T12:00:00.000Z", "2025-02-10T12:00:00.000Z"],
			"places": [{ "duration": 300 }]
		}
	]

The crash still needs to be fixed, it is good that you provided minimalistic reproducible example, this will help a lot when I find time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants