[Bonmin] bonmin and ampl external function

Roy Chen ytboy0208 at gmail.com
Fri Mar 2 18:41:34 EST 2007


Hi, Andreas
The followings are what I tried with IPOPT
ampl: var x;
ampl: function Integral1(Reals,Reals,Reals);
ampl: minimize Z:Integral1(x,0,1)+x*x+x+1;
ampl: subject to cons:x<=4;
ampl: option solver ipopt;
ampl: solve;
Ipopt 3.2.2:
Cannot load library
/home/chen11q/ampl_student_linux/solvers/funclink/amplfunc.dll:
/home/chen11q/ampl_student_linux/solvers/funclink/amplfunc.dll: cannot open
shared object file: No such file or directory
function Integral1 not available
user-defined function not available
exit code 255
<BREAK>
Thanks a lot




On 3/2/07, Roy Chen <ytboy0208 at gmail.com> wrote:
>
> Hi, Andreas
>
> What I am sure is my code could just calculate the value of the
> integration function and it doesn't provide the first and second
> direvatives. Does this explain why Bonmin couldn't work with my external
> function? But why Bonmin couldn't load amplfunc.dll file? Does it have
> something to do with the first and second direvative?
> I will try IPOPT soon and give you the result soon.
>
> Thanks
>
> Roy
>
> On 3/2/07, Andreas Waechter <andreasw at watson.ibm.com> wrote:
> >
> > Hi Roy,
> >
> > Please keep replying to the mailing list, since other users might also
> > be
> > interested to get the follow up or might be able to help.
> >
> > > I don't think my bonmin executable works with AMPL's user defined
> > external
> > > function properly now, because it seems the external function works
> > well
> > > when I test it using some fixed value as input variables in AMPL,
> > however,
> > > when I tried to take it as a function and build a model in ampl using
> > bonmin
> > > to solve it, it doesn't work. I think this is very strange.
> >
> > Please verify that the external function is coded so that it can provide
> >
> > both first and second derivatives besides the function value itself,
> > otherwise it won't work.
> >
> > If you found out that your code also computes the derivatives, please
> > submit a ticket at the Bonmin Trac page.  Include the information
> > necessary to reproduce the problem, possibly including your code for the
> > external function (or a pointer where to get it).
> >
> > > By the way, could you tell me how to use my external function from
> > AMPL
> > > interpreter?
> >
> > I meant the program that comes up when you type 'ampl', so I assume that
> > you already have tested it and it seems to be working.  But as for as I
> > know that only asks for the function value from the external
> > function.  I
> > don't know how you could test that also first and second derivatives are
> > provided.
> >
> > Regards,
> >
> > Andreas
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/bonmin/attachments/20070302/1bb49fed/attachment.html


More information about the Bonmin mailing list