[Cbc] Two questions on Cbc Solver with AMPL

Feng Gao mangotree.gf at gmail.com
Mon Oct 2 19:37:52 EDT 2017


Thank you very much for the suggestion, Giacomo!

Dear CBC users, any other advice please.

Best Regards,

Feng

On Mon, Oct 2, 2017 at 11:17 AM, Giacomo Nannicini <giacomo.n at gmail.com>
wrote:

> Feng,
> I know how to compile it on Linux, but apparently it's not the same on
> Windows, so I'm afraid I cannot help you, sorry. Try to look for the
> instructions for MSV.
>
> Giacomo
>
> On Sun, Oct 1, 2017 at 10:21 PM, Feng Gao <mangotree.gf at gmail.com> wrote:
> > Dear Mr. Nannicini:
> >
> >     Sorry to bother you again...
> >
> >     I am able to compile AMPL ASL library from source code:
> "amplsolv.lib"
> > (both 64-bit and 32-bit)
> >
> > and
> >
> >     cbc solver from source code: "cbc.exe" (both 64-bit and 32-bit)
> >
> >      However, it is unsuccessful to "combine" there two images together,
> > i.e., it is unsuccessful to build a cbc solver "cbc.exe" embedded with
> > "amplsolv.lib". Do you have any advice? I am using MS Visual Studio 2010
> > (the compile is cl.exe).
> >
> > Thank you very much,
> >
> > Feng
> >
> > On Tue, Sep 26, 2017 at 12:27 PM, Feng Gao <mangotree.gf at gmail.com>
> wrote:
> >>
> >> All right, thank you for the advice.
> >>
> >> I am able to get the code.
> >>
> >> Best,
> >>
> >> Feng
> >>
> >> On Tue, Sep 26, 2017 at 12:11 PM, Giacomo Nannicini <
> giacomo.n at gmail.com>
> >> wrote:
> >>>
> >>> There should be a get.ASL file, but it might require cygwin on Windows.
> >>> I don't know how to get ASL automatically on Windows, I guess my best
> >>> advice is to look at the get.ASL file and repeat the steps on Windows.
> >>>
> >>> If you don't know how to do that, then just get the CBC binaries from
> >>> the AMPL website.
> >>>
> >>> On Mon, Sep 25, 2017 at 11:36 PM, Feng Gao <mangotree.gf at gmail.com>
> >>> wrote:
> >>> > All right. I have that folder. But there is ONLY configuration files/
> >>> > Makefiles in that folder? No need source code?
> >>> >
> >>> > Feng
> >>> >
> >>> > On Tue, Sep 26, 2017 at 11:24 AM, Giacomo Nannicini
> >>> > <giacomo.n at gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> You can get CBC binaries from the webpage you listed.
> >>> >>
> >>> >> To compile ASL with CBC, go to the ThirdPary/ASL folder, and
> get.ASL.
> >>> >>
> >>> >> G
> >>> >>
> >>> >> On Mon, Sep 25, 2017 at 11:22 PM, Feng Gao <mangotree.gf at gmail.com>
> >>> >> wrote:
> >>> >> > Dear Giacomo:
> >>> >> >
> >>> >> >    Thank you! Can you please let me know where to locate ASL code
> >>> >> > or
> >>> >> > binary
> >>> >> > image? I searched AMPL website---- opensource section, but could
> not
> >>> >> > find
> >>> >> > them...
> >>> >> >
> >>> >> > http://ampl.com/products/solvers/open-source/
> >>> >> >
> >>> >> > Thanks,
> >>> >> >
> >>> >> > Feng
> >>> >> >
> >>> >> > On Mon, Sep 25, 2017 at 8:10 PM, Giacomo Nannicini
> >>> >> > <giacomo.n at gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> Feng,
> >>> >> >> I believe you need to compile with the ASL solver, otherwise CBC
> >>> >> >> will
> >>> >> >> not
> >>> >> >> have an AMPL interface. Look into ThirdParty/ASL.
> >>> >> >>
> >>> >> >> You can probably also get binaries directly from the AMPL
> website,
> >>> >> >> in
> >>> >> >> the
> >>> >> >> open-source solver section.
> >>> >> >>
> >>> >> >> Giacomo
> >>> >> >>
> >>> >> >> On Sep 24, 2017 10:38 PM, "Feng Gao" <mangotree.gf at gmail.com>
> >>> >> >> wrote:
> >>> >> >>
> >>> >> >> Dear Cbc Users:
> >>> >> >>
> >>> >> >>       I have two questions regarding to Cbc Solver with AMPL.
> >>> >> >> Please
> >>> >> >> help.
> >>> >> >>
> >>> >> >> 1. I use AMPL + Cbc solve to run a case, however, AMPL issued an
> >>> >> >> error
> >>> >> >> message "Unable to open a file" where a solution is located. I
> >>> >> >> compiled
> >>> >> >> the
> >>> >> >> Cbc solver using VS and the solver is working fine in a
> stand-alone
> >>> >> >> mode.
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> ------------------------------------------------------------
> ------------------------------------------------------------
> ---------------------------------
> >>> >> >> ampl: solve
> >>> >> >> ampl? ;
> >>> >> >> Welcome to the CBC MILP Solver
> >>> >> >> Version: 2.9.9
> >>> >> >> Build Date: Sep 19 2017
> >>> >> >>
> >>> >> >> command line -
> >>> >> >> C:\COIN\Cbc\Cbc\MSVisualStudio\v10\x64-v100-Release\cbc.exe
> >>> >> >> C:\Users\Feng\AppData\Local\Temp\at2596 -AMPL (default strategy
> 1)
> >>> >> >> Unable to open file C:\Users\Feng\AppData\Local\Temp\at2596
> >>> >> >> No match for AMPL - ? for list of commands
> >>> >> >> Total time (CPU seconds):       0.00   (Wallclock seconds):
> >>> >> >> 0.00
> >>> >> >>
> >>> >> >> Error executing "solve" command:
> >>> >> >> can't open C:\Users\Feng\AppData\Local\Temp\at2596.sol
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> ------------------------------------------------------------
> ------------------------------------------------------------
> ---------------------------------
> >>> >> >>
> >>> >> >> 2. How to set a "MIP GAP" termination criteria in Cbc solver
> >>> >> >> command
> >>> >> >> line.
> >>> >> >> The manuals only provide a time limit or the maximal number of
> >>> >> >> iterations
> >>> >> >> termination criteria though.
> >>> >> >>
> >>> >> >> Thank you very much,
> >>> >> >>
> >>> >> >> Feng
> >>> >> >>
> >>> >> >>
> >>> >> >> _______________________________________________
> >>> >> >> Cbc mailing list
> >>> >> >> Cbc at list.coin-or.org
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.
> coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-
> ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=8FaVxIx99H879Ebkij38NpcRZoYLK-
> 7QMl1LqyvBccA&m=8SxEtjHupj81oGZfkVBTmkXuT1qwISmP_eNU8T5zAmQ&s=
> 5qs5HpSbbII0q41Boy-R7lKX6Ba0SWcp3LNU6kqLgDg&e=
> >>> >> >>
> >>> >> >>
> >>> >> >
> >>> >
> >>> >
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20171003/6342dd8d/attachment-0003.html>


More information about the Cbc mailing list