<div dir="ltr">Dear Giacomo,<div>Thank you for your prompt reply. I already set the Path in the second line of the Python code, which is as follows:</div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(128,128,128)">settings = rbfopt.RbfoptSettings(minlp_solver_path='/home/chuong/bonmin-stable/build/bonmin',\<br></span><span style="color:rgb(128,128,128)">                                 nlp_solver_path='/home/chuong/bonmin-stable/build/ipopt')</span></pre></div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(204,120,50)">or</span></pre><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(204,120,50)">import </span>rbfopt<br>settings = rbfopt.RbfoptSettings(<span style="color:rgb(170,73,38)">minlp_solver_path</span>=<span style="color:rgb(106,135,89)">'Cygwin64/home/chuong/bonmin-stable/build/bonmin'</span><span style="color:rgb(204,120,50)">,</span>\<br>                                 <span style="color:rgb(170,73,38)">nlp_solver_path</span>=<span style="color:rgb(106,135,89)">'Cygwin64/home/chuong/bonmin-stable/build/ipopt'</span>)</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 24, 2020 at 10:43 AM Giacomo Nannicini <<a href="mailto:giacomo.n@gmail.com">giacomo.n@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I do not understand the order of the code in the Python snippet.<br>
If bonmin and ipopt are not in your part, you must set the<br>
corresponding options in the RbfoptSettings object that is passed to<br>
RbfoptAlgorithm.<br>
<br>
Giacomo<br>
<br>
On Wed, Sep 23, 2020 at 8:38 PM Chuong Thaidoan<br>
<<a href="mailto:chuongthaidoan@gmail.com" target="_blank">chuongthaidoan@gmail.com</a>> wrote:<br>
><br>
> Dear Giacomo,<br>
> Thank you for your advice. I have just to re-install Bonmin and run the code. It shows errors as follows. Could you please take a look and let me know some further comments?<br>
> Iter  Cycle  Action             Objective value      Time      Gap<br>
>   ----  -----  ------             ---------------      ----      ---<br>
>      0      0  Initialization           -0.782797      0.01   100.00 *<br>
>      0      0  Initialization           69.095477      0.01   100.00<br>
>      0      0  Initialization           20.000000      0.01   100.00<br>
>      0      0  GlobalStep               -9.829600      0.03   100.00 *<br>
>      1      0  GlobalStep               -9.946732      0.06   100.00 *<br>
>      2      0  GlobalStep               -0.133622      0.08   100.00<br>
>      3      0  GlobalStep               -8.304083      0.10   100.00<br>
>      4      0  GlobalStep               -9.999968      0.12   100.00 *<br>
> Traceback (most recent call last):<br>
>   File "C:/Users/chuong/PycharmProjects/LearningPython/Ipopt/RBFOpt_test_ipopt.py", line 14, in <module><br>
>     val, x, itercount, evalcount, fast_evalcount = alg.optimize()<br>
>   File "C:\ProgramData\Anaconda3\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 795, in optimize<br>
>     self.optimize_serial(pause_after_iters)<br>
>   File "C:\ProgramData\Anaconda3\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 1056, in optimize_serial<br>
>     self.node_is_noisy)<br>
>   File "C:\ProgramData\Anaconda3\lib\site-packages\rbfopt\rbfopt_algorithm.py", line 2438, in local_step<br>
>     categorical_info, node_pos, rbf_lambda, rbf_h, node_pos[fmin_index])<br>
>   File "C:\ProgramData\Anaconda3\lib\site-packages\rbfopt\rbfopt_aux_problems.py", line 297, in minimize_rbf<br>
>     if (not opt.available()):<br>
>   File "C:\ProgramData\Anaconda3\lib\site-packages\pyomo\opt\base\solvers.py", line 99, in available<br>
>     raise pyutilib.common.ApplicationError("Solver (%s) not available" % str(<a href="http://self.name" rel="noreferrer" target="_blank">self.name</a>))<br>
> pyutilib.common._exceptions.ApplicationError: Solver (bonmin) not available<br>
><br>
> Your code:<br>
><br>
> import rbfopt<br>
><br>
> settings = rbfopt.RbfoptSettings(minlp_solver_path='/home/chuong/bonmin-stable/build/bonmin',\<br>
>                                  nlp_solver_path='/home/chuong/bonmin-stable/build/ipopt')<br>
><br>
> import numpy as np<br>
> def obj_funct(x):<br>
>   return x[0]*x[1] - x[2]<br>
><br>
> bb = rbfopt.RbfoptUserBlackBox(3, np.array([0] * 3), np.array([10] * 3),<br>
>                                np.array(['R', 'I', 'R']), obj_funct)<br>
> settings = rbfopt.RbfoptSettings(max_evaluations=50)<br>
> alg = rbfopt.RbfoptAlgorithm(settings, bb)<br>
> val, x, itercount, evalcount, fast_evalcount = alg.optimize()<br>
><br>
><br>
> On Wed, Sep 23, 2020 at 11:43 PM Giacomo Nannicini <<a href="mailto:giacomo.n@gmail.com" target="_blank">giacomo.n@gmail.com</a>> wrote:<br>
>><br>
>> You need both executables. You can download them from AMPL's website. If you compile from scratch, then Bonmin will also compile Ipopt.<br>
>><br>
>> If the executables are not in the system path, you can specify their location via options.<br>
>><br>
>><br>
>> G<br>
>><br>
>><br>
>> On Wed, Sep 23, 2020, 9:36 AM Chuong Thaidoan <<a href="mailto:chuongthaidoan@gmail.com" target="_blank">chuongthaidoan@gmail.com</a>> wrote:<br>
>>><br>
>>> Dear Giacomo,<br>
>>> Thank you for your email. I am re-installing Bonmin because it still shows errors although I already specified the Path. Can I ask it is true that Bonmin contains Ipopt and so we only need to install Bonmin with Cygwin 64?<br>
>>> Best regards,<br>
>>> TD Chuong<br>
>>><br>
>>> On Wed, Sep 23, 2020 at 10:46 PM Giacomo Nannicini <<a href="mailto:giacomo.n@gmail.com" target="_blank">giacomo.n@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Chuong,<br>
>>>> please read the instruction manual, section 1.2. You need Bonmin and<br>
>>>> Ipopt to be in your system path, or otherwise you need to specify<br>
>>>> their location as options.<br>
>>>><br>
>>>> Best,<br>
>>>><br>
>>>> Giacomo<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Dear the authors,<br>
>>>> I am studying your interesting black-box function packages (RBFOpt),<br>
>>>> and I just install it with Bonmin-1.8.8 solver via Cygwin64. I put<br>
>>>> your "minimal working example" in Bonmin-1.8.8 folder and run it with<br>
>>>> Pycharm. However, it shows errors<br>
>>>> "pyutilib.common._exceptions.ApplicationError: Solver (bonmin) not<br>
>>>> available".<br>
>>>><br>
>>>> Could you please let me know some your advice? Thank you.<br>
>>>> Best regards,<br>
>>>> Chuong Thai Doan<br>
>>>> Research Fellow at School of Information Technology<br>
>>>> Deakin University, Melbourne, Australia<br>
</blockquote></div>