Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Can an MOF file be read in to create a MOI.NLPBlock #37

Open
odow opened this issue Jan 11, 2019 · 6 comments
Open

Can an MOF file be read in to create a MOI.NLPBlock #37

odow opened this issue Jan 11, 2019 · 6 comments
Labels
File format: MOF Relates to the MOF file format

Comments

@odow
Copy link
Owner

odow commented Jan 11, 2019

In essence: JuMP -> MOF -> MOI -> AmplNLWriter

This would aid the creation of MOI NLP tests.

@odow odow added the File format: MOF Relates to the MOF file format label Jan 11, 2019
@odow
Copy link
Owner Author

odow commented Jan 16, 2019

Here is a hacky way using Calculus.jl's symbolic differentiation:
https://gist.github.com/odow/58a3469c9119b58069ab708431426905

@odow
Copy link
Owner Author

odow commented Jan 17, 2019

It's now significantly less hacky. The parsed functions are fast and non-allocating :)

@mlubin
Copy link
Collaborator

mlubin commented Jan 17, 2019

Instead of writing an AD framework, I'd recommend letting JuMP do the work. Load the expressions via set_NL_objective and add_NL_constraint: http://www.juliaopt.org/JuMP.jl/dev/nlp/#Raw-expression-input-1.

@odow
Copy link
Owner Author

odow commented Jan 17, 2019

That means having JuMP as a dependency of MathOptFormat? 😢

@mlubin
Copy link
Collaborator

mlubin commented Jan 18, 2019

That means having JuMP as a dependency of MathOptFormat?

Or ReverseDiff or Zygote or Casadi or CppAD or pytorch or your favorite AD framework. Using Calculus with symbolic derivatives will not scale to reasonably large models.

@mlubin
Copy link
Collaborator

mlubin commented Jan 18, 2019

I can say this because I tried using Calculus for JuMP before I knew about reverse-mode AD.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
File format: MOF Relates to the MOF file format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants