Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What dose 'Mesh minimum precision reached' mean? #173

Open
JinsongLiu6 opened this issue Jul 1, 2024 · 10 comments
Open

What dose 'Mesh minimum precision reached' mean? #173

JinsongLiu6 opened this issue Jul 1, 2024 · 10 comments

Comments

@JinsongLiu6
Copy link

When I successfully solve some problems, it appears in the log: 'Mesh minimum precision reached (Algo) '.
I did't find the explanation of 'Mesh minimum precision' in the parameters, is it MIN_MESH_SIZE or MIN_FRAME_SIZE? What is the default value and how can I adjust it?

@ctribes
Copy link
Contributor

ctribes commented Jul 2, 2024

The 'Mesh minimum precision reached (Algo)' stopping criterion corresponds to the situation where Nomad cannot produce new points within its precision. It happens when the mesh size is small enough. This is an inner stopping criterion not controlled by user.

As mentioned in the user guide, parameters MIN_MESH_SIZE and MIN_FRAME_SIZE have no default value.

If you want a finer control on the mesh/frame stopping criterion you should set MIN_MESH_SIZE OR MIN_FRAME_SIZE (one is enough as they are related). Please note that the 'Mesh minimum precision' criterion is still active, so it may be triggered before the MIN_MESH_SIZE criterion if you provide a value that is too small.

Please note, that you can also control the minimum granularity of the variables. This can be set if you know in advance, for some (or all) variables, that adding more digits than necessary to variables is meaningless for a given problem. In that case, you should set a proper MAX_BB_EVAL to prevent the algo to spin for too long.

@JinsongLiu6
Copy link
Author

Thanks for your reply. As for stopping criterion, is it possible to stop when the infeasibility is less than a certain value for feasibility problems?

@ctribes
Copy link
Contributor

ctribes commented Jul 3, 2024

I recommend to check the following parameters in the user guide to see what better suits you

H_MIN
STOP_IF_FEASIBLE
STOP_IF_PHASE_ONE_SOLUTION -> requires initially infeasible constraint to be set to EB

If you cannot find something that works for you, you may want to use NOMAD in library mode and specify a custom callback function to stop according to your own criterion.

@JinsongLiu6
Copy link
Author

The parameter STOP_IF_FEASIBLE works for me.

But what is the default tolerance of infeasibility and how can I set a certain tolerance of infeasibility?
Because I can not find the parameter H_MIN in the user guide, and I tried

PyNomad.help('H_MIN')
but I get
No help found for H_MIN

I also tried to set H_MIN=0.1 in the params as I guess nomad stops if infeasibility < H_MIN when setting STOP_IF_FEASIBLE=true, but it seems not work.

@ctribes
Copy link
Contributor

ctribes commented Jul 4, 2024

The PyNomad help do not like the "_". You can try with "hmin" or "feasibility".

I will check that the combining H_MIN and STOP_IF_FEASIBLE works.

@ctribes
Copy link
Contributor

ctribes commented Jul 4, 2024

Sorry, h_min is not available in version 4.4.0. But the good news is that it is available in the development version.
and H_MIN and STOP_IF_FEASIBLE can work together.

An alternative solution consists in "shifting" your constraints. Let's say you compute 'g1(x)'. The constraint is 'g1(x)<=0'. You can return 'g2(x)=g1(x)-s' instead.

@ctribes
Copy link
Contributor

ctribes commented Jul 4, 2024

... the development version is private and will not be released before end of 2024.

@JinsongLiu6
Copy link
Author

OK, I will try the new version when it is available.
And what is the default infeasibility tolerance when STOP_IF_FEASIBLE=true?

@ctribes
Copy link
Contributor

ctribes commented Jul 5, 2024

h(x)<epsilon with DEFAULT_EPSILON = 1e-13.
Note: it is not recommended to modify epsilon. It is used for all comparisons of NOMAD::Double.

@JinsongLiu6
Copy link
Author

OK, thanks for your patient reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants