-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add reconstruct_objs feature #576
base: main
Are you sure you want to change the base?
Conversation
A new feature is added to the iterative process of the optimization algorithm. Users can customize a function and assign it to the Algorithm through kwsargs, call the function in each iteration in run() and update the objs to implement the dynamic objective function in the iteration.
Can you eloborate a little more on the use case? Why can someone not change use the ask-and-tell interface and set the |
A new feature is added to the iterative process of the optimization algorithm. Users can customize a function and assign it to the Algorithm through kwsargs, call the function in each iteration in run() and update the objs to implement the dynamic objective function in the iteration. reconstruct_objs_func() is required to include the arguement algo and can be used to complete the objs reconstruction using the information in algo.
Thanks for your comment! A new commit reconstruct_objs according algorithm self was added. Following is a use case of committed reconstruct_objs_func feature. A multi-objective function dimensionality reduction solution implemented by reconstruct_objs_func, reconstruct_objs_func() can be customized by the user and called in each iteration to update the objs, in this case, the reconstruct_objs_func() is designed to input the fixed sub-objective function, random sub-objective function, number of samples, number of random sub-objectives and the algorithm object, and are used to reconstruct the new multi-objective function by sampling part of the random objective function according to information from algo object. First, define the base func of reconstruct_objs.
Due to the form of the
This case shows how to design reconstruct_objs_func function to achieve the iterative-based dynamic objective functions that the user wants. I prefer to assign the new objectives to objs member variables than set the I understand that changing the objective function during optimization may sound unusual. Still, in real engineering problems, it may be difficult to determine the appropriate objective function, and constantly adjusting the objective function during the optimization process may be a solution. The use of a new objective function (problem) in an iteration by each individual is the way to facilitate this approach. In the case I gave, the fixed objective function represents the primary objective and must occupy a position in each iteration, while the random objective function represents the minor, redundant, and auxiliary objective function, which can optionally be added to reduce the pressure on the objective dimension. For reconstruct_objs_func feature, users have the freedom to design customized dynamic objective function schemes to solve their problems. By the way, it's unfortunate that the commit doesn't pass the Testing/testing checks (tests/algorithms/test_no_modfication.py::test_no_mod[zdt1-entry0] is failed), and I'm a newbie about this. In my view, the commit is OK and expected to pass the test. I'm now stuck with how to debug to pass testing. |
I would like to call out that changing the objective function during the optimization is part of dynamic optimization. Most algorithms are proposed for the static use case. I agree that dynamic optimization has also quite a few use cases though! There is also an algorithm in pymoo (https://pymoo.org/algorithms/moo/dnsga2.html) which re-evaluates then the objective function to adapt the current population to the change in the objective. I will keep this issue open for now and want to see if other uses also see the need for having this as a standard method in pymoo. Right now my feeling is the is a very special behavior for actually dynamic optimization problems. |
A new feature is added to the iterative process of the optimization algorithm. Users can customize a function and assign it to the Algorithm through kwsargs, call the function in each iteration in run() and update the objs to implement the dynamic objective function in the iteration.
For some engineering problems, it may be desirable to dynamically change the objective functions of this iteration at iteration time to solve some issue, which I believe will be an exciting feature.