[RBFOpt] Rbfop, objective function value

Giacomo Nannicini giacomo.n at gmail.com
Sun Nov 11 18:16:32 EST 2018


The code only prints 6 digits of precision after the decimal dot.
If you want to print very small numbers, you have two options:
1) You modify the code in the function update_log() in
rbfopt_algorithm.py to display more digits.
2) You multiply the function values by some large number (say, 10^6)
in evaluate(), before returning them. RBFOpt automatically scales
function values if necessary for numerical reasons so it is unlikely
that rescaling causes issues during the optimization, but if will
always display the function value exactly as returned.

G
On Sun, Nov 11, 2018 at 6:04 PM Isabella Viarchi
<isabella.viarchi at gmail.com> wrote:
>
> Yes, the objective function is very small,
>
> somenthing like this 1.1947598052285201e-10 or even smaller.
>
> Is there any way to get the actual value shown in the output?
>
>
>
> Thanks again,
>
> Isabella
>
> Da: Giacomo Nannicini
> Inviato: domenica 11 novembre 2018 23:59
> A: isabella.viarchi at gmail.com
> Oggetto: Re: [RBFOpt] Rbfop, objective function value
>
>
>
> Is it possible that the objective function is scaled so that its
>
> values are close to zero?
>
> Everything looks in order to me, I would think that the values
>
> returned by evaluate are very small. In fact, in the output that you
>
> show the returned value is not zero, but very close to it.
>
>
>
> I would recommend printing your "result" and "yValue" to screen before
>
> returning them in evaluate. If you get different values shown compared
>
> to what RBFOpt shows, please let me know because that would suggest
>
> that there is a bug.
>
>
>
> G
>
> On Sun, Nov 11, 2018 at 5:32 PM Isabella Viarchi
>
> <isabella.viarchi at gmail.com> wrote:
>
> >
>
> > Hi,
>
> > I attach both the output of rbfopt and the code of the evaluation method in new.py.
>
> > The function prob is defined above it and contains the code of the problem i am trying to optimize.
>
> >
>
> > I have also done some print earlier today to check if everything goes as it is supposed, and i think it is.
>
> >
>
> > Thanks a lot for your reply,
>
> > Isabella
>
> >
>
> > Il giorno dom 11 nov 2018 alle ore 20:39 Giacomo Nannicini <giacomo.n at gmail.com> ha scritto:
>
> >>
>
> >> Hi Isabella,
>
> >> the syntax looks correct.
>
> >> Can you post the output of the log file and the contents of new.py to
>
> >> see how your black box is constructed? Alternatively, try to print a
>
> >> line in the evaluate() function in new.py when you subclass the
>
> >> RbfoptBlackBox to check that it is being called at different points.
>
> >>
>
> >> Cheers
>
> >>
>
> >> Giacomo
>
> >> On Sun, Nov 11, 2018 at 1:54 PM Isabella Viarchi
>
> >> <isabella.viarchi at gmail.com> wrote:
>
> >> >
>
> >> > Hi, i am working with rbfopt to minimize a problem.
>
> >> > I have dowloaded and installed everything and now i am trying to run it.
>
> >> >
>
> >> > I have created a user_blackBox_class with the code i have to run: specifically for each configuration i have to invoke a bash program and get the result of it. Everything seems to work, but i get the same output, and the objective funcion seem always to be zero.
>
> >> > Does anyone have any clue of what i am doing wrong.
>
> >> >
>
> >> > I use this sintax for launch the program:
>
> >> > rbfopt_cl_interface.py --max_evaluations 20 /mnt/c/Users/isabe/Documents/Tesi_Magistrale/rbfopt-master/my_src/rbfopt/saxpy/new.py --minlp_solver_path='/mnt/c/Users/isabe/Documents/Tesi_Magistrale/rbfopt-master/bonmin-linux64/bonmin'
>
> >> >
>
> >> > Do i need to specify something else?
>
> >> >
>
> >> > Thanks in advance
>
> >> >
>
> >> > _______________________________________________
>
> >> > RBFOpt mailing list
>
> >> > RBFOpt at list.coin-or.org
>
> >> > https://list.coin-or.org/mailman/listinfo/rbfopt
>
>



More information about the RBFOpt mailing list