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

Add COBYQA optimizer #153

Open
wants to merge 53 commits into
base: dev
Choose a base branch
from
Open

Add COBYQA optimizer #153

wants to merge 53 commits into from

Conversation

schmoelder
Copy link
Contributor

@schmoelder schmoelder commented Jun 29, 2024

This PR adds the COBYQA optimizer which was recently added to SciPy, in v1.14.

To do

  • Update parameters
  • Upstream issue: "ValueError: x0 is infeasible with respect to some inequality constraint even though it is within bounds." (see #155)
  • Add switch for callback methods depending on selected method (see below)

Open question

This PR also updates the callback function for scipy optimizers. I was hoping that this would include the current best point instead of simply the latest point. This would remove the need to determine the optimal points ourselves using the ParetoFront class. However, this is not how it's implemented in COBYQA (see here).

Note, this interface is not supported by COBYLA and SLSQP, so these optimizers would have to be removed from CADET-Process when using the newer interface. Since COBYQA can replace COBYLA, I don't mind it going but SLSQP might be handy to keep around. So should we revert these changes (for now)?

Edit: Instead of removing COBYLA and SLSQP, provide both interfaces and switch depending on the selected method.

ronald-jaepel and others added 30 commits June 18, 2024 21:13
Previously, there were two interfaces in the `OptimizationProblem` for calling evaluation functions (e.g. objectives): one for evaluating individuals, and one for populations.
To simplify the code base, these two methods were now unified.
To ensure backward compatibility, a 1D-Array is returned if a single individual is passed to the function.
Previously, the cadet path set in Cadet(install_path="path") was not inherited into cadet instances created from the run() method.
Fix and extend tests about .calculate_interstitial_rt/velocity
Previously, this was required because CADET-Core was not setting the
PATH correctly.
Now, this can lead to inconsistent behaviour.
Note, this requires CADET>4.4.0
Recently, the option to (not) plot the time axis using minutes was
introduced.
This commit fixes some methods that were not properly implemented.
Moreover, the name of the flag was changed from `use_minutes` to
`x_axis_in_minutes` to make clear that only plotting is affected and not
other parameter values (e.g. start and end times).
@schmoelder schmoelder changed the base branch from dev to optimizer_improvements June 29, 2024 12:04
@schmoelder schmoelder force-pushed the optimizer_improvements branch from 7dd6b54 to 8261d6f Compare July 23, 2024 14:14
@schmoelder schmoelder force-pushed the optimizer_improvements branch 4 times, most recently from db2a9ee to 4062efa Compare August 6, 2024 11:45
Base automatically changed from optimizer_improvements to dev August 6, 2024 11:53
@schmoelder schmoelder force-pushed the dev branch 11 times, most recently from 35e0c67 to d97cf31 Compare December 4, 2024 16:47
@schmoelder schmoelder modified the milestones: v0.10.0, v0.11.0 Dec 5, 2024
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

Successfully merging this pull request may close these issues.

3 participants