nomad icon indicating copy to clipboard operation
nomad copied to clipboard

4.x Constraint Tolerance Parameter Equivalent

Open Arrowstar opened this issue 2 years ago • 8 comments

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.

Arrowstar avatar Dec 28 '22 01:12 Arrowstar

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 avatar Jan 09 '23 15:01 ctribes

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.

ctribes avatar Jan 09 '23 16:01 ctribes

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!

Arrowstar avatar Jan 09 '23 16:01 Arrowstar

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;

        }

....`

ctribes avatar Jan 09 '23 16:01 ctribes

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 avatar Jan 11 '23 19:01 Arrowstar

Did anything related to this get added in release 4.4?

Arrowstar avatar Jan 10 '24 19:01 Arrowstar

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.

ctribes avatar Jan 10 '24 20:01 ctribes

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!

Arrowstar avatar Jan 10 '24 20:01 Arrowstar