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

Yiqing Zhong yiqing.zhong at ugent.be
Tue Jan 27 07:31:39 EST 2009


Hi! Menal,

Thank you for the suggestion. In SYMPHONY 5.1.10, I cannot find the  
libOsiCpx project, maybe that's why CPLEX cannot be called.

I'm going on the 'MATCH' project(also 'USER' project, in the  
'Applications' of SYMPHONY 5.1.10). They worked, but if I hope check  
the LP solutions during the solving process (the relaxed LP solutions  
during Branch, Cut & Bound process), where can I find and see those LP  
solution? Or is it possible? Could you give some hints or suggestions  
for that?

Thanks a lot!

Bests!

Terry


Quoting Menal Guzelsoy <megb at lehigh.edu>:

> Terry,
>
> SYMPHONY needs the appropriate OSI derived class to access the underlying LP
> solver. In this case, instead of libOsiClp, you need to have the libOsiCpx
> project (should be in Osi\MSVisualStudio\v8\libOsiCpx) in the solution.
>
> Menal.
>
> On Wed, Jan 21, 2009 at 7:28 AM, claude philippe medard <
> claude.philippe.medard at gmail.com> wrote:
>
>> Hi Terry,
>>
>> The "VRP" problem in the O.R. literature reads "Given a fleet of x trucks,
>> ...", hence why most probably one has to specify the number of trucks.
>>
>> If you are trying to solve some variant of the VRP problem for your
>> industrial application, e.g. also determine the optimal number of trucks to
>> be used, may i suggest you think about it and do it yourself, and then add
>> your solution as open source into the repository as a "variant" problem.
>>
>> Thank you Ted for Symphony... (!)
>>
>> best regards,
>> Claude Ph Medard
>>
>>
>>
>>
>>
>> On Wed, Jan 21, 2009 at 11:29 AM, Yiqing Zhong <yiqing.zhong at ugent.be>wrote:
>>
>>> 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 <http://coral.ie.lehigh.edu/%7Eted>
>>>
>>>
>>>
>>> _______________________________________________
>>> Symphony mailing list
>>> Symphony at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/symphony
>>>






More information about the Symphony mailing list