bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
114 stars 24 forks source link

4.x Constraint Tolerance Parameter Equivalent #120

Open Arrowstar opened 1 year ago

Arrowstar commented 1 year ago

What are the NOMAD 4.x equivalent parameters to the 3.x parameters "h_min" and "h_norm"? I don't see anything that is roughly the same as these in the 4.x parameter list.

ctribes commented 1 year ago

Parameters h_min and h_norm have not yet been transferred to Nomad 4. I increased the priority of this modif in the todo list.

ctribes commented 1 year ago

It is still possible to patch your version to get the equivalent of h_min and h_norm. Computation of H is done in the Eval class.

Arrowstar commented 1 year ago

It is still possible to patch your version to get the equivalent of h_min and h_norm. Computation of H is done in the Eval class.

Could you provide instructions on how I would go about this? Thank you!

ctribes commented 1 year ago

In what follows, you can replace the NOMAD::Double::getEpsilon() with your value of H_MIN.

`bool NOMAD::Eval::isFeasible(NOMAD::ComputeType computeType) const {

if (NOMAD::EvalStatusType::EVAL_OK != _evalStatus)

{

    throw NOMAD::Exception(__FILE__,__LINE__,"Eval::isFeasible: Needs status type EVAL_OK");

}

NOMAD::Double h = getH(computeType);

return (h.isDefined() && h.todouble() < NOMAD::Double::getEpsilon());

}`

In what follows, you can change how hTemp is computed

`NOMAD::Double NOMAD::Eval::computeHStandard() const {

....

else if (NOMAD::BBOutputType::PB == bbOutputType)

        {

            hTemp = bboI * bboI;

        }

....`

Arrowstar commented 1 year ago

Thank you for the code. I've taken a look and it looks like I'd have to substitute my own static value before compiling. Unfortunately I need my users to be able to specify this value themselves, so it looks like I need to wait for the h_min parameter to get implemented properly in NOMAD 4. I appreciate you increasing the priority of these two parameters. Thank you!

Arrowstar commented 7 months ago

Did anything related to this get added in release 4.4?

ctribes commented 7 months ago

Not yet. I was passing through the issues today when I realized I did not do it. I am currently looking how to do it. I will push the modif into the master branch when done and will let you know. It will make its way into v.4.4.1 after that.

Arrowstar commented 7 months ago

Not yet. I was passing through the issues today when I realized I did not do it. I am currently looking how to do it. I will push the modif into the master branch when done and will let you know. It will make its way into v.4.4.1 after that.

That'll be fine, thank you!