[Symphony] How to get the solutions in MSVC++ IDE

Yiqing Zhong yiqing.zhong at ugent.be
Wed Jan 21 06:29:09 EST 2009


Hi! Ted,

Thank you! I understand now the number of trucks should be specified  
before the solving in the VRP project. But if so for any given data,  
that seems not very intelligent.


Hi! Menal,

Thank you very much for your help. The problem "GLPK" was fixed, gmpl  
model can be read. I added the library 'glpk' as an external file, but  
in MSVC++ Express Edition 2005, it seems cannot be set on the  
dependencies. Anyway it worked now!

But  one is gone, one is coming...-_-:

I am trying to use CPLEX solver in SYMPHONY, I change the preprocessor  
definition in the projects from "__OSI_CLP__" to "__OSI_CPLEX__", also  
change the path definitions of the include files: add  
"..\..\..\..\COIN\Osi\OsiCpx" and "C:\ILOG\cplex81\include\ilcplex"  
(assuming CPLEX is installed here) as the
solver's header files path definitions, but the errors are happened  
during the BBuilding process:

"7>libsymphony.lib(lp_solver.obj) : error LNK2019: unresolved external  
symbol "public: __thiscall  
OsiCpxSolverInterface::OsiCpxSolverInterface(void)"  
(??0OsiCpxSolverInterface@@QAE at XZ) referenced in function "void  
__cdecl open_lp_solver(struct LPDATA *)"  
(?open_lp_solver@@YAXPAULPDATA@@@Z)
7>libsymphony.lib(lp_solver.obj) : error LNK2019: unresolved external  
symbol _CPXgetslack at 20 referenced in function "void __cdecl  
get_slacks(struct LPDATA *)" (?get_slacks@@YAXPAULPDATA@@@Z)
7>libsymphony.lib(lp_solver.obj) : error LNK2019: unresolved external  
symbol "public: struct cpxenv * __thiscall  
OsiCpxSolverInterface::getEnvironmentPtr(void)"  
(?getEnvironmentPtr at OsiCpxSolverInterface@@QAEPAUcpxenv@@XZ)  
referenced in function "void __cdecl get_slacks(struct LPDATA *)"  
(?get_slacks@@YAXPAULPDATA@@@Z)
7>libsymphony.lib(lp_solver.obj) : error LNK2019: unresolved external  
symbol "public: struct cpxlp * __thiscall  
OsiCpxSolverInterface::getLpPtr(int)"  
(?getLpPtr at OsiCpxSolverInterface@@QAEPAUcpxlp@@H at Z) referenced in  
function "void __cdecl get_slacks(struct LPDATA *)"  
(?get_slacks@@YAXPAULPDATA@@@Z)
7>D:\Microsoft Visual Studio  
8\SYMPHONY-5.1.10\SYMPHONY\MSVisualStudio\v8\Release\symphony.exe :  
fatal error LNK1120: 4 unresolved externals
7>Build log was saved at "file://d:\Microsoft Visual Studio  
8\SYMPHONY-5.1.10\SYMPHONY\MSVisualStudio\v8\Release\BuildLog.htm"
7>symphony - 5 error(s), 0 warning(s)
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped =========="

I try the "__CPLEX__" again, it connot work yet. What's the possible problem?

Thank you!

Bests!

Terry


Quoting Ted Ralphs <ted at Lehigh.EDU>:

> Yiqing Zhong wrote:
>> Hi! Menal,
>>
>> Thank you very much for your answer. Followed with your   
>> instruction, I can execute the project now. However in the 'VRP'   
>> project, there still  some problems:
>>
>> I set the arguments "-F ..\..\sample.vrp" to try to check the   
>> sample  solution under the VRP folder, but the error is shown:
>>
>> "PROBELM NAME: ei151
>>  TYPE: CVRP
>>  DIMENSION: 51
>>  ERROR: Number of trucks not specified or computed for VRP"
>
> For the SYMPHONY VRP solver, you need to specify the number of trucks
> on the command line with "-N 5" for instance. You're getting the error
> because you haven't done that. I thought that the README specified
> this, but if it doesn't, I guess we need to add it. Thanks for using
> SYMPHONY.
>
> Cheers,
>
> Ted
> -- 
> Dr. Ted Ralphs
> Associate Professor, Lehigh University (permanent)
> Visiting Lecturer, Operations Research Society of New Zealand (current)
> (610)628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted






More information about the Symphony mailing list