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

Adds field indicating integrality of the opt vars #271

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

ValentinKaisermayer
Copy link
Contributor

closes #270

@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Merging #271 (a408227) into master (1b15460) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #271   +/-   ##
=======================================
  Coverage   54.84%   54.84%           
=======================================
  Files          41       41           
  Lines        2961     2961           
=======================================
  Hits         1624     1624           
  Misses       1337     1337           
Impacted Files Coverage Δ
src/problems/basic_problems.jl 87.87% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ValentinKaisermayer ValentinKaisermayer marked this pull request as ready for review October 10, 2022 08:28
Copy link
Member

@Vaibhavdixit02 Vaibhavdixit02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I am curious about how you plan to use it. Do you have an example you tested this out on that you can show?

@Vaibhavdixit02 Vaibhavdixit02 merged commit e422b74 into SciML:master Oct 14, 2022
@ValentinKaisermayer ValentinKaisermayer deleted the vk-adds-int-field branch October 15, 2022 13:10
@ValentinKaisermayer
Copy link
Contributor Author

Looks good, but I am curious about how you plan to use it. Do you have an example you tested this out on that you can show?

I'm working on it, see SciML/ModelingToolkit.jl#1786

@ValentinKaisermayer
Copy link
Contributor Author

For instance, now it is trivial to add support for it with NOMAD.jl, in:
https://github.com/SciML/Optimization.jl/blob/b67636eeb5ee854fa53569e67bff3a21c5ed7a97/lib/OptimizationNOMAD/src/OptimizationNOMAD.jl#L80

Depending on the variable bounds lb and ub and the integrality indicator int the variable types can be inferred and are either "R", "B" or "I".

MTK got support for binary and integer variable metadata in SciML/ModelingToolkit.jl#1798.
And I'm planning to add support for other MOI solvers like CBC, or Gurobi, that support such variable types in SciML/Optimization.jl#381.

It should be just a matter of connecting all of it now. 😃

@Vaibhavdixit02
Copy link
Member

I see, cool!

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.

Add int field to OptimizationProblem
2 participants