Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Concorde TSP solver and CPLEX

    Posted Fri November 23, 2012 11:58 PM

    Originally posted by: LeandroCC


    Hello,

    Are you aware of any documentation/tutorial on how to install concorde using cplex as the solver? Concorde's latest release dates back to 2003, when CPLEX was latest version was 8. In their documentation they expect libcplex.a and cplex.h to be in the same folder, which is not currently the case.

    How do you guys do it?

    Thanks

    ps: do you know any alternative software as good as concorde?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Concorde TSP solver and CPLEX

    Posted Sun November 25, 2012 09:00 PM

    Originally posted by: LeandroCC


    In case it helps, this is the Concorde website: http://www.tsp.gatech.edu/concorde.html

    And here is the documentation I mentioned: http://www.tsp.gatech.edu/concorde/DOC/README.html
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Concorde TSP solver and CPLEX

    Posted Mon November 26, 2012 02:17 AM

    Originally posted by: SystemAdmin


    One simple way to get that going would be to create a directory with symlinks to cplex.h and libcplex.a:
    mkdir cplexforconcorde
    cd cplexforconcorde
    ln -s /path/to/cos/include/ilcplex/*.h . ln -s /path/to/cos/.../libcplex.a .
    

    That should probably do the trick (at least I don't see why it should not).
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Concorde TSP solver and CPLEX

    Posted Tue November 27, 2012 05:21 PM

    Originally posted by: LeandroCC


    I wish it was that simple.

    After having created simlinks to

    libcplex.a
    cplex.h
    cpxconst.h
    and even to all the .h in include/ilcplex/ as Daniel suggested,

    and I get several of the following compilation errors:

    undefined reference to `pthread_rwlock_trywrlock'
    undefined reference to `pthread_rwlock_wrlock'
    undefined reference to `pthread_rwlock_unlock'

    More ideas?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Concorde TSP solver and CPLEX

    Posted Wed November 28, 2012 01:38 AM

    Originally posted by: SystemAdmin


    These functions are defined in the pthread library. You need to add -lpthread to the command that tries to link the code (if I remember correctly there was a hint about that in the Concorde installation instructions you quoted).
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Concorde TSP solver and CPLEX

    Posted Wed November 28, 2012 07:26 AM

    Originally posted by: LeandroCC


    Yes, I added -lpthread to the makefile in ./TSP as suggested in the documentation.

    These error messages are obtained after the modification.
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Concorde TSP solver and CPLEX

    Posted Wed November 28, 2012 07:33 AM

    Originally posted by: SystemAdmin


    That is weird. Can you show us the linker command that triggers this error?
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Concorde TSP solver and CPLEX

    Posted Wed November 28, 2012 08:34 AM

    Originally posted by: LeandroCC


    Fixed it after making 2 modifications:

    1. in the concorde documentation, they say "pthreads", when in fact the correct is "pthread".

    2. in the documentation they suggested adding it to the TSP/Makefile. I also added it to ./Makefile

    Done, it is now running.

    Thanks for your attention, Daniel.
    #CPLEXOptimizers
    #DecisionOptimization