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

Dimension elimination for CRS2_LM #13

Closed
artuuuro opened this Issue Feb 20, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@artuuuro
Copy link

artuuuro commented Feb 20, 2014

Is there a reason why the dimension with the boundary conditions ub==lb are not truncated for CRS algorithm.

Simple fix would be to add
case NLOPT_GN_CRS2_LM:
into elimdim_wrapcheck function in api/optimize.c

@stevengj

This comment has been minimized.

Copy link
Owner

stevengj commented Feb 20, 2014

My recollection is that it wasn't actually necessary for CRS. The crs.c code should already be work fine even for empty dimensions. Did you observe a problem in this case?

@artuuuro

This comment has been minimized.

Copy link
Author

artuuuro commented Feb 20, 2014

First issue is that the selection of default population is made based on the dimensions. Thus you have to do more steps than in the case where the truncation of dimensions is carried out. Thus if you initially have 20 dimensions and only 2 are not ub==lb then you have to do more steps.

But a more important issue that we think might influence algorithm in a bad way is the calculation of centroid. Again for the same case if you have 20 dimensions and two aro nout bound with ub==lb, then the centroid will still be calculated using 20 points. Thus if you now mirror one point the centroid will probably not move at all. Thus the sampling might occur only around the centroid that does not move.

Some tests that we tried did not converge without truncation than when the truncation was applied.

Sorry for the bad english.

@stevengj stevengj closed this in e7f9539 Feb 20, 2014

@stevengj

This comment has been minimized.

Copy link
Owner

stevengj commented Feb 20, 2014

Fair enough. It seems painful enough to change the CRS algorithm to detect this case that it's better to just use the elimdim code. (The elimdim wrapper imposes a slight overhead, but this should be negligible in the low dimensions where CRS is useful.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment