Hi, this is my first post here. The fact is i'm not a programmer and i need help. I have a software that i need to solve a vehicle routing problem for my thesis. But i only got the source code for it, one header file and 6 cpp files. I have tried compiling this with no success, the error messages mean nothing to me, maybe i'm missing something, files to compile on win32, i don't know. If any of you guys are willing to help, i would be gladly apreciated (should be no problem for a programmer).
Need this for win32 console.

http://rapidshare.com/files/221788134/sdvrp.zip

Regards,

Jorge

Recommended Answers

All 13 Replies

It doesn't compile in MinGW's GCC. Looks like MSVC code?

I'm getting these errors:

=|
sdvrp.h|18|warning: ignoring #pragma warning |
sdvrp.h|222|warning: no newline at end of file|
genius.cpp||In function `double genius(route*&, Nb&)':|
genius.cpp|732|warning: comparison between signed and unsigned integer expressions|
genius.cpp|733|warning: comparison between signed and unsigned integer expressions|
genius.cpp|736|error: no matching function for call to `std::vector<node*, std::allocator<node*> >::erase(node**)'|
vector.tcc|108|note: candidates are: typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|
vector.tcc|120|note:                 typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, __gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|
||=== Build finished: 1 errors, 4 warnings ===|

Maybe someone else can compile it tho.

Thank you for trying clockowl. Is there anything wrong with the code, or needs to be compiled with another software? Please help. I really need this.

Erm. I guess it can be compile in MSVC++. You can try to install MSVC++ Express and grab the platform SDK. Google is your friend. Can anybody else compile this code?

It's just compiling fine with me (it gives a lot of warnings), I'm using the Borland Compiler ...

Edit:: Using the Microsoft C++ compiler (from Visual C++ 2008 Express Edition) I'm also getting this error ...

You can get the Borland Compiler for free from here ...

I compiled it by running the following command inside the directory of the source files: bcc32 -etabu_sdvrp *.cpp

I tested this program and can confirm it works, but try running it with the wrong number of arguments (1 instead of 2) directly causes the program to crash, it's very 'crash-sensitive' ...

The program is also using 'old C++' code, for example old file handling using the FILE-pointer, etc. ...

So let's say: This program can be improved :)

I've attached the compiled file to this post ...
Enjoy it :P !!

tux4life

Thanks a lot tux4life. You're a life savior. It's normal the code not being optimized, this is only used for operational research, mainly for mathematicians, not programmers. Once again, thanks buddy.

Sorry to bother again, but how can i see the list of available arguments? I don't understand the meaning of the seed of random numbers. How do i use it?
tabu_sdvrp.exe input.cri (random number)?
It crashes this way.

Yes, that should be it. remember to use spaces tho. And put the input file in the same directory as tabu_sdvrp.exe of course.

Actually it should work, I tested it with the 'p01.cri' file which was in the fileset and it was working ...

Syntax: tabu_sdvrp [I]filename[/I].cri [I]random_number[/I]

LOL, i haven't seen that p01.cri had changed. That's why it kept crashing. On the info it says that creates a file named result_filename.cri, that's not true, using these commands, it gives the result on the input file.
Thanks again guys.

LOL, i haven't seen that p01.cri had changed. That's why it kept crashing. On the info it says that creates a file named result_filename.cri, that's not true, using these commands, it gives the result on the input file.
Thanks again guys.

OK, I've changed the code and it should work now :) ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.