Giter VIP home page Giter VIP logo

vrptw_cpp's People

Contributors

adcds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vrptw_cpp's Issues

Difficulty properly reading in input file, and subsequent bug

Hi Adriel,

I cloned the repo and in stepping through the code as is, and setting up a breakpoint on

Utils::origin = std::make_shared<VehicleState>(*Utils::raw_rows.begin());

I observe that as expected, Utils::raw_rows.size() = 1001 for a 1000 customer problem.

Then, I tried to run this for RC208-25 node problem, with input file as attached
rc208.txt

even though the file has 25 customers, Utils::raw_rows.size() = 27, while I would expect it to be size 26.

On checking this further, it appears that the 25th customer's data is being repeated in raw_rows[25] and raw_rows[26].

Then, I changed the code so that for this input file, raw_rows[26] is not populated, just to see how the code performs on the problem. I did the following change:

	if (Utils::raw_rows.size() < 26)
		Utils::raw_rows.push_back(new Point(aux[0], aux[1], aux[2], aux[3], aux[4], aux[5], aux[6]));

Then, there is a segfault at the following line:

auto off = rand() % (vehicles.size() - 2 + 1) + 1;

with the error being:

Unhandled exception at 0x00007FF6DCA73FD1 in VRPTW.exe: 0xC0000094: Integer division by zero.

The call stack when this error occurs is :

	VRPTW.exe!Solution::mutate_swap() Line 136	C++
 	VRPTW.exe!Solution::mutate() Line 254	C++
 	VRPTW.exe!Genetic::run(int max_iter) Line 272	C++
 	VRPTW.exe!main::__l4::<lambda>() Line 53	C++
 	[External Code]	

Could you please help diagnose this problem?

Thanks for your time.
Prahalad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.