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

Expression interface #237

Open
5 tasks
glebbelov opened this issue Apr 22, 2024 · 0 comments
Open
5 tasks

Expression interface #237

glebbelov opened this issue Apr 22, 2024 · 0 comments
Assignees

Comments

@glebbelov
Copy link
Contributor

glebbelov commented Apr 22, 2024

For solvers accepting expression trees (SCIP 9, Xpress, Lindo), extend MP FlatConverter to support them.

Advantage: better numerical properties (see SCIP 8 release paper.)

Scope:

  • Allow mixing flat constraints with expressions. For example, SCIP supports resvar = AND(v1, ..., vn), along with expressions.
  • Keep the existing automatic redefinition mechanism.
  • Allow per-expression type setting, whether it should be passed to the solver, or redefined - similar to flat constraints.
  • This should obvously coexist with the mp::NLHandler and mp::Expr interfaces passing expression trees directly from the NL file. We need clear documentation when to use which.
  • Inline expressions wherever reasonable, e.g., linear expressions into each other.
@glebbelov glebbelov self-assigned this Apr 22, 2024
glebbelov added a commit that referenced this issue Apr 22, 2024
glebbelov added a commit that referenced this issue Apr 25, 2024
glebbelov added a commit that referenced this issue Apr 30, 2024
Mark as proper variables when expression not accepted and for non-algebraic static constraints
glebbelov added a commit that referenced this issue May 1, 2024
NL accepts expressions in the expression part
glebbelov added a commit that referenced this issue May 2, 2024
Make sure we only mark active expressions (not redefined ones). Changed the marking logic to start with all vars - mark expressions - mark arguments which need to be vars
glebbelov referenced this issue Aug 12, 2024
Remaining: add result explicifiers for those expressions which need it
glebbelov added a commit that referenced this issue Aug 13, 2024
Assign expression to a variable - extra API
glebbelov added a commit that referenced this issue Aug 15, 2024
plus conversion order (static -> func cons)
glebbelov added a commit that referenced this issue Aug 20, 2024
glebbelov added a commit that referenced this issue Aug 21, 2024
Restore SCIP::Cos() as 'not recommended' - seems slow

Fix Checker_AMPLS_ModeltTraits() signature
glebbelov added a commit that referenced this issue Aug 21, 2024
glebbelov added a commit that referenced this issue Aug 26, 2024
Others are flat constraints
glebbelov added a commit that referenced this issue Aug 26, 2024
glebbelov added a commit that referenced this issue Aug 27, 2024
glebbelov added a commit that referenced this issue Aug 27, 2024
Only for NL solvers with linear obj (SCIP). For proper expressions in obj, need more work in the emulator
glebbelov added a commit that referenced this issue Aug 27, 2024
glebbelov added a commit that referenced this issue Aug 28, 2024
Still explicify an expression via an auxiliary variable when the latter has stronger bounds

Refactor static/func constraint hierarchy, set some forgotten contexts
glebbelov added a commit that referenced this issue Aug 28, 2024
acc:_expr=1 default
glebbelov added a commit that referenced this issue Aug 30, 2024
Similar to NLEquivalence etc, dedicated high-level constraints for var <=/==/>= expr, flexible for more solver APIs
glebbelov added a commit that referenced this issue Sep 4, 2024
glebbelov added a commit that referenced this issue Sep 5, 2024
glebbelov added a commit that referenced this issue Sep 10, 2024
glebbelov added a commit that referenced this issue Sep 11, 2024
glebbelov added a commit that referenced this issue Oct 17, 2024
When logical argument required but an algerbaic expression is given, write it as !=0
glebbelov added a commit that referenced this issue Oct 28, 2024
glebbelov added a commit that referenced this issue Oct 28, 2024
glebbelov added a commit that referenced this issue Oct 29, 2024
glebbelov added a commit that referenced this issue Oct 29, 2024
Enable exp conic tests for Gurobi (although it might not solve them conically); enable many nonlinear tests to MP2NL
glebbelov added a commit that referenced this issue Oct 30, 2024
Don't linearize quadratics with acc:_expr=1 because we assume any nonlinear solver to accept quadratics; put objective's QP terms into the expression
glebbelov added a commit that referenced this issue Oct 30, 2024
glebbelov added a commit that referenced this issue Oct 30, 2024
glebbelov added a commit that referenced this issue Oct 30, 2024
glebbelov added a commit that referenced this issue Nov 8, 2024
glebbelov added a commit that referenced this issue Nov 12, 2024
glebbelov added a commit that referenced this issue Nov 12, 2024
They come first in the NL
glebbelov added a commit that referenced this issue Nov 13, 2024
glebbelov added a commit that referenced this issue Nov 13, 2024
glebbelov added a commit that referenced this issue Nov 15, 2024
glebbelov added a commit that referenced this issue Nov 15, 2024
glebbelov added a commit that referenced this issue Nov 15, 2024
glebbelov added a commit that referenced this issue Nov 15, 2024
glebbelov added a commit that referenced this issue Nov 18, 2024
PL approximation only works for general constraints
glebbelov added a commit that referenced this issue Nov 18, 2024
glebbelov added a commit that referenced this issue Nov 21, 2024
So that QP/nonlinearities can be combined before they are made expressions
glebbelov added a commit that referenced this issue Nov 27, 2024
Also: fix storage of sparsity patterns in MP2NL #237
glebbelov added a commit that referenced this issue Nov 28, 2024
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

1 participant