GithubHelp home page GithubHelp logo

matthelb / concorde Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 23.0 948 KB

Concorde is a computer code for the symmetric traveling salesman problem (TSP) and some related network optimization problems. It was created by David Applegate, Robert E. Bixby, Vašek Chvátal, and William J. Cook.

Home Page: http://www.math.uwaterloo.ca/tsp/concorde/index.html

C 99.77% C++ 0.06% Awk 0.02% Scilab 0.02% Shell 0.14%

concorde's People

Contributors

matthelb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

concorde's Issues

Error: OVERFLOW in CCbigguy_addmult (4), BIGGUY errors are fatal

Hey,

I am trying to run the Concorde on a TSP generated from a distance matrix. Here is my Code

data_4 = matrix(sample.int(15, size = 9*100, replace = TRUE), nrow = num_rows, ncol = num_cols)
data_4[data_4<floor(mean(data_4))] = 1
data_4[data_4>=floor(mean(data_4))] = 2

atsp <- ATSP(data_4)
tsp <- reformulate_ATSP_as_TSP(atsp)
o2 <- solve_TSP(tsp, method = "concorde",rep=10)

When I run the above code, I get the following error

OVERFLOW in CCbigguy_addmult (4)
BIGGUY errors are fatal
FATAL ERROR - received signal SIGABRT (6/6)
sleeping 1 more hours to permit debugger access

Can anyone tell me that what am I doing wrong?

ERROR: SIGSEGV (11/11) in linkern.c

I am running concorde in WSL2 in Windows 10, Debian, LInux v

master@Dell:~$ uname -s
Linux
master@Dell:~$ uname -r
4.19.128-microsoft-standard 

I installed concorde according to the README.
I can run concorde fine for most instances, but got a FATAL ERROR: SIGSEGV (11/11) when running the instance 1000.txt.tsp
1000.txt

i debugged it with gdb and found that in linkern.c, at line 1862 i ran into the error.

static void find_close_four (graph *G, distobj *D, CClk_flipper *F, int *t1,
        int *t2, int *t3, int *t4, int *t5, int *t6, int *t7, int *t8)
{
...
for (k = 0; k < RAND_TRYS; k++) tdist[k] = BIGINT;
    tdist[RAND_TRYS] = -BIGINT;
    for (i = 0; i < count; i++) {
        try1 = CCutil_lprand (G->rstate) % G->ncount;
        trydist = Edgelen (try1, s1, D);                                        // if trydist > BIGINT for most instances, than the faulty state is entered
        if (trydist < tdist[0]) {
            for (k = 0; tdist[k + 1] > trydist; k++) {
                tdist[k] = tdist[k + 1];                       //  line 1862: SIGSEG comes from here
                trials[k] = trials[k + 1];
            }
            tdist[k] = trydist;
            trials[k] = try1;
        }
    }

The problem lies with trydist, when it never is set to some int smaller than BIGINT (=2000000000 ). This will result in the loop not exiting, k becoming increased and set to 7. Then an Array out of Bounds Error (in C: Segmentation fault) happens.

I can change my input (I am using a big M constant, so there is some room...) but others might not be so lucky.

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.