[Couenne] problems in using couenne
Pietro Belotti
pbelott at clemson.edu
Tue Sep 28 23:58:34 EDT 2010
Dear Xu,
first, I would appreciate if you send your comments or questions to the
Couenne mailing list, couenne at list.coin-or.org, so that the responses can
be useful to other users of Couenne.
Second, after a quick look at the model you have sent, it seems that your
model can be easily converted into a mixed integer LINEAR programming
(MILP) model, rather than a mixed integer nonlinear programming (MINLP)
one. One advantage of this is that MILP problems can be handled by faster
solvers, especially in a model like yours that admits tens of thousands of
variables/constraints.
In your model, the only nonlinear part is in the last constraint: it is a
sum of terms x[j]*y[i], where x[i] is a binary variable and y[i] is
between 0 and M, where M=10^10. You can obtain a similar result by writing
the same sum with only the y[i] terms, and then adding the constraint
y[i] <= M * x[j]
for all pairs (i,j) that defined terms x[j]*y[i] in the sum at the last
constraint. You get a MILP model that you can solve with Cbc, which
is another Coin-OR package.
> For my first question: I followed your suggestion to create a file
> couenne.opt with “time_limit 12000”. Indeed Couenne would stop at the
> time after running 12000 secconds, but it did not write a solution file
> with the values of objective and variables (I have attached the sol file
> that it generated, with name “1.sol”).
Based on the output file you sent, after that time limit Couenne did not
find any feasible solution: the upper bound is 10^50. The -17 is a lower
bound and does not correspond to any feasible solution, which is therefore
not saved.
> I have tried another parameter “art_lower”, for I know the objective of
> my MINLP model is about -17.1429, so I set “art_lower -17.1” and hope
> Couenne to stop and write the solution, but it did not stop. I have
> attached the output of Couenne in the two computation instances (no any
> option parameter set / time_limit = 12000, with name “2.txt”) and give
> the position where I hope Couenne to stop and write the solution at that
> time. How to do? How about to use “couenne_check”?
The parameter art_lower is used to set an artificial lower bound, and is
in general not useful outside debugging purposes. If you know of a
FEASIBLE solution whose value is, for example, 12345.0, I would suggest
specifying an option
art_cutoff 12345.0
which instructs Couenne to ignore all solutions with value larger than
that and may help finding an optimal solution. Notice that for this to
help there must be a solution with that value. If you know the value of
the x and y variables corresponding to that feasible solution, consider
using the "default" keyword in AMPL, which would store that solution and
allow Couenne to use it as an upper bound.
> For my second question: Indeed, Couenne will write a sol file as you
> said. But why do Ipopt, a solver for NLP and you know surely, not write
> a sol file after it complete the computation for a model? How to make it
> write while not using AMPL or other interfaces? Of course, Ipopt is not
> Couenne. If you know the answer, please tell me.
I believe there should be an option to instruct Ipopt to write a solution,
if any exists. I do not know Ipopt's options, so I'd refer you to Ipopt's
lists and web pages.
> For my third question: I have attached the instance that generated this
> problem with the names “3.nl” and “3.mod” (for AMPL). The version of
> Couenne is binary for windows (“Couenne-0.3.2-win32-msvc9.zip”,
> downloaded from http://www.coin-or.org/download/binary/Couenne/); the
> type of machine is “Intel(R) Core(TM)2 Duo CPU” with Microsoft Windows
> XP Professional (Service Pack 3).
The problem seems to be related to a reformulation bug, which is already
in the list of bugs I'm after.
> For my forth question: The version of Couenne is binary for Linux
> (Couenne-0.1.0-linux-x86_64-gcc4.3.2.tgz, also downloaded from
> http://www.coin-or.org/download/binary/Couenne/ ). the type of machine
> “Intel(R) Xeon(R) CPU” is with CentOS 5.5 and gcc version is less than
> 4.3.0
I would suggest downloading and compiling a more recent version of Couenne
(see https://projects.coin-or.org/Couenne for instructions). Apart from
giving you a more efficient solver, it may help configure and build an
executable that knows where the Fortran libraries are.
Hope this helps.
Best,
Pietro
--
Pietro Belotti
Dept. of Mathematical Sciences
Clemson University
email: pbelott at clemson.edu
phone: 864-656-6765
www: myweb.clemson.edu/~pbelott
On Wed, 29 Sep 2010, xzxnpu wrote:
>
> Dear Dr. Pietro
>
> Thanks for your reply.
>
> For my first question: I followed your suggestion to create a file couenne.opt with “time_limit 12000”. Indeed Couenne would stop at the time after running 12000 secconds, but
> it did not write a solution file with the values of objective and variables (I have attached the sol file that it generated, with name “1.sol”). I have tried another parameter
> “art_lower”, for I know the objective of my MINLP model is about -17.1429, so I set “art_lower -17.1” and hope Couenne to stop and write the solution, but it did not stop. I have
> attached the output of Couenne in the two computation instances (no any option parameter set / time_limit = 12000, with name “2.txt”) and give the position where I hope Couenne
> to stop and write the solution at that time. How to do? How about to use “couenne_check”?
>
>
>
> For my second question: Indeed, Couenne will write a sol file as you said. But why do Ipopt, a solver for NLP and you know surely, not write a sol file after it complete the
> computation for a model? How to make it write while not using AMPL or other interfaces? Of course, Ipopt is not Couenne. If you know the answer, please tell me.
>
>
>
> For my third question: I have attached the instance that generated this problem with the names “3.nl” and “3.mod” (for AMPL). The version of Couenne is binary for windows
> (“Couenne-0.3.2-win32-msvc9.zip”, downloaded from http://www.coin-or.org/download/binary/Couenne/); the type of machine is “Intel(R) Core(TM)2 Duo CPU” with Microsoft Windows XP
> Professional (Service Pack 3).
>
> For my forth question: The version of Couenne is binary for Linux (Couenne-0.1.0-linux-x86_64-gcc4.3.2.tgz, also downloaded from http://www.coin-or.org/download/binary/Couenne/
> ). the type of machine “Intel(R) Xeon(R) CPU” is with CentOS 5.5 and gcc version is less than 4.3.0
>
>
>
> Xu
>
> from CAS in china
>
>
> 2010-09-29
>
> __________________________________________________________________________________________________________________________________________________________________________________
> xzxnpu
> ---------------------------------------------------------
> 一键发送本地文件,请用网易闪电邮(fm.163.com)!
>
> __________________________________________________________________________________________________________________________________________________________________________________
> 发件人: Pietro Belotti <pbelott at clemson.edu>
> 发送时间: 2010-09-28 05:01
> 主 题: Re: [Couenne] problems in using couenne
> 收件人: xzx21c at 163.com
> 抄 送: couenne at list.coin-or.org
>
>
>
>
> Hello,
>
> > 1) I have used couenne, on AMPL, to solve one of my models which I sent
> > to you previously. But the computation time is very long, more than a week,
> > and now do not end. I hope to stop it while I hope to keep the computational
> > solution for maybe couenne has found the optimal solution. How will I do? In
> > the later, if I will make couenne to compute in a not
> > long time, which option parameters should I set for couenne?
>
> create a file couenne.opt, which has to be in the same directory where you
> run AMPL. The file should contain a line like the following
>
> time_limit 7200
>
> where the value of the parameter expresses the number of seconds after
> which Couenne should stop if it didn't find an optimal solution yet.
>
> > 2) Now I run couenne on AMPL. I hope to know: if I just use couenne to
> > solve a nl file (using “couenne *.nl” command, not on the platforms such as
> > AMPL or GAMS), how to know and display the solution results?
>
> Please check
>
> http://list.coin-or.org/pipermail/couenne/2009-July/000041.html
>
> If the file is MyFolder/MyInstance.nl, running the command "couenne
> MyFolder/MyInstance.nl" will generate a file MyFolder/MyInstance.sol. The
> last n lines of the .sol file contain the value of the variables in the
> best solution found by Couenne.
>
> > 3) I have used couenne of windows version, but it can run just on one
> > computer and can not run on other windows computers. If the computer have
> > installed visual studio, the error messages will be as
> >
> > An unhandled win32 exception occurred in couenne.exe [2660].
> >
> > Possible debuggers: New instance of Visual Studio 2008.
> >
> > Do you want to debug using the selected debugger?
> >
> > If the computer have not installed visual studio, couenne will stop and
> > the error messages will be as
> >
> > An unhandled win32 exception occurred in couenne.exe
> >
> > I don’t know what is the problem?
>
> I did not encounter such problem before. It might be useful if you send
> the instance that generated this problem and provide more information:
> the version of Couenne you have been using, the type of machine, the
> compiler version, etc.
>
> > 4) Couenne can not be run on my linux computer. When I run it, messages
> > as 'error while loading shared libraries: libgfortran.so.3: cannot open
> > shared object file: No such file or directory' will appear. I have doubted my
> > gcc version, so I tried several couenne version, similar message will appear
> > but the shared libraries libgfortran.so.* are different.
> > I do not know what is the problem as well?
>
> That might depend strongly on the configuration. According to a recent
> post,
>
> http://list.coin-or.org/pipermail/couenne/2010-September/000123.html
>
> the following configuration option might help:
>
> $ ../configure FFLAGS="-m64 -O3 -fomit-frame-pointer -pipe"
>
> Let me know if this helps.
>
> Regards,
> Pietro
>
>
> --
> Pietro Belotti
> Dept. of Mathematical Sciences
> Clemson University
> email: pbelott at clemson.edu
> phone: 864-656-6765
> www: myweb.clemson.edu/~pbelott
>
> On Mon, 27 Sep 2010, Pietro Belotti wrote:
>
> >
> > hello!
> >
> > I have encountered some problems in using couenne.
> >
> > 1) I have used couenne, on AMPL, to solve one of my models which I sent
> > to you previously. But the computation time is very long, more than a week,
> > and now do not end. I hope to stop it while I hope to keep the computational
> > solution for maybe couenne has found the optimal solution. How will I do? In
> > the later, if I will make couenne to compute in a not
> > long time, which option parameters should I set for couenne?
> >
> > 2) Now I run couenne on AMPL. I hope to know: if I just use couenne to
> > solve a nl file (using “couenne *.nl” command, not on the platforms such as
> > AMPL or GAMS), how to know and display the solution results?
> >
> > 3) I have used couenne of windows version, but it can run just on one
> > computer and can not run on other windows computers. If the computer have
> > installed visual studio, the error messages will be as
> >
> > An unhandled win32 exception occurred in couenne.exe [2660].
> >
> > Possible debuggers: New instance of Visual Studio 2008.
> >
> > Do you want to debug using the selected debugger?
> >
> > If the computer have not installed visual studio, couenne will stop and
> > the error messages will be as
> >
> > An unhandled win32 exception occurred in couenne.exe
> >
> > I don’t know what is the problem?
> >
> > 4) Couenne can not be run on my linux computer. When I run it, messages
> > as 'error while loading shared libraries: libgfortran.so.3: cannot open
> > shared object file: No such file or directory' will appear. I have doubted my
> > gcc version, so I tried several couenne version, similar message will appear
> > but the shared libraries libgfortran.so.* are different.
> > I do not know what is the problem as well?
>
> _______________________________________________
> Couenne mailing list
> Couenne at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/couenne
>
>
More information about the Couenne
mailing list