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

[FEATURE] Nonlinear Expressions #16

Closed
pulsipher opened this issue Nov 1, 2019 · 3 comments · Fixed by #161
Closed

[FEATURE] Nonlinear Expressions #16

pulsipher opened this issue Nov 1, 2019 · 3 comments · Fixed by #161
Labels
enhancement New feature or request
Milestone

Comments

@pulsipher
Copy link
Collaborator

pulsipher commented Nov 1, 2019

Enable nonlinear expression support with @NLconstraint, @NLexpression, and @NLobjective. This probably will involve making our own graph storage structure to account for different variable types unlike JuMP. This structure will then need to be transcribable such that it can interface with JuMP so we can use JuMP's differentiation tools. Also, it should accommodate extensions.

@pulsipher pulsipher added the enhancement New feature or request label Nov 1, 2019
@pulsipher pulsipher changed the title Nonlinear Expressions [FEATURE] Nonlinear Expressions Mar 25, 2020
@pulsipher
Copy link
Collaborator Author

pulsipher commented May 7, 2020

With the current JuMP system, this can probably be accomplished by defining the following:

  • make our own nodetypes for JuMP._Derivatives.NodeData to account for our unique variables
  • make a data type for nlp data and store in in model.nlp_data
  • make our own version of JuMP._NonlinearExpressionData
  • extend JuMP._parse_NL_expr_runtime to enable the use of JuMP._parse_NL_expr
  • make our own version of JuMP._process_NL_expr to call JuMP._parse_NL_expr an form our nonlinear expression data type
  • extend the appropriate methods to form nonlinear expressions/objectives/constraints
  • make methods to convert our nl expressions into JuMP nl expressions using transcription mapping (either by forming the JuMP._NonlinearExpressionData directly or by converting to a Julia expression first and then calling the JuMP public methods)
    Hopefully, JuMP is able to redo their interface in the fall as planned to make this all more straightforward.

@pulsipher
Copy link
Collaborator Author

The above response is insufficient since it heavily relies on private JuMP functions. Thus, our 2 options going forward are as follows:

  • wait until MOI/JuMP overhaul their NLP abstraction
  • implement our own NLP definition abstraction from the ground up.

@pulsipher
Copy link
Collaborator Author

For building our own abstraction, AbstractTrees.jl could be useful for building expression trees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant