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

Update optimize API #46

Open
1 of 2 tasks
jmejia8 opened this issue Oct 23, 2022 · 2 comments
Open
1 of 2 tasks

Update optimize API #46

jmejia8 opened this issue Oct 23, 2022 · 2 comments

Comments

@jmejia8
Copy link
Owner

jmejia8 commented Oct 23, 2022

The optimize API will be extended mainly to:

  • Handle starting points.
  • Define complex search spaces (e.g., mixed-integer variables)

Starting Solutions

# example 1
optimize(f, [0.1, 0.3, -1.5], OPTIMIZER)
# example 2
optimize(f, StartingSolution([0.1, 0.3, -1.5]), OPTIMIZER)

Search Space

# current implementation
optimize(f, bounds, OPTIMIZER)
# new
optimize(f, SearchSpace(...), OPTIMIZER)

The search space can be defined as follows:

SearchSpace(bounds)
SearchSpace(Bool, 10) # Bit arrays with size 10
SearchSpace(integer_variables=bounds_int, real_variables=bounds_float) # for mixed-integer problems. 
SearchSpace(:x => [-1.0, 1.0], :y => [0, 100]) #  other possible application
@jbytecode
Copy link
Contributor

nice design, but this breaks previous uses right? A new breaking version or making it backward compatible somehow?

@jmejia8
Copy link
Owner Author

jmejia8 commented Oct 23, 2022

It could be an extension for implementing newer optimizers solving different problems (e.g., dynamic optimization, mixed-integer optimization, etc). There are no plans to remove the current optimize API but extended it.

jmejia8 added a commit that referenced this issue Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants