infiniteopt / InfiniteOpt.jl

An intuitive modeling interface for infinite-dimensional optimization problems.
https://infiniteopt.github.io/InfiniteOpt.jl/stable
MIT License
251 stars 17 forks source link

Generalize Transformation API #349

Closed pulsipher closed 2 months ago

pulsipher commented 2 months ago

This replaces the optimizer model abstraction which was limited to JuMP Models with a new abstraction based on what is called transformation backends. This introduces AbstractTransformationBackend to enable the use of arbitrary backends for solving InfiniteModels. For backends that use JuMP, this also adds JuMPBackend <: AbstractTransformationBackend which provides a similar API to the old optimizer model interface except it is more polished and doesn't rely on hacky "optimizer model keys".

TranscriptionOpt now only exports TranscriptionBackend which is based on JuMPBackend. All the former TranscriptionOpt specific query functions have been dropped from main API in favor of the general purpose ones (e.g., transformation_variable).

This also adds a few missing JuMP methods which include:

It also cleans up the documentation and bit and uses the latest Documenter version.

Partly addresses #105 and #327. What remains for #105, is to decouple the transcription specific approaches from InfiniteOpt. This will require the following:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 99.83766% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.77%. Comparing base (6e1102d) to head (85c3ab5).

Files Patch % Lines
src/TranscriptionOpt/transcribe.jl 99.21% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #349 +/- ## ========================================== + Coverage 99.74% 99.77% +0.03% ========================================== Files 36 35 -1 Lines 6703 6712 +9 ========================================== + Hits 6686 6697 +11 + Misses 17 15 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pulsipher commented 2 months ago

For now, I am going to turn off the checkdocs since it appears to have a bug: https://github.com/JuliaDocs/Documenter.jl/issues/2545