Comments (8)
Hi,
Is there any more info I can provide to help with this question?
Thanks,
Andy
from cppadcodegen.
Hello Andy,
From what I can see from CppAD's support for Ipopt this would require a re-implementation for CppADCodeGen since CppAD uses AD::ADFun and CppADCodeGen uses different types and requires additional steps (compilation step).
Unfortunately, there is no simple way to just start using CppAD's support for Ipopt.
Kind regards,
João
from cppadcodegen.
I think that working on a faster than CppAD::ipopt::solve interface to ipopt, along the lines suggested above, is worth while but not a simple effort. If someone is interested in taking the lead on this, I would be willing to will to help.
from cppadcodegen.
Thank you for the advice.
from cppadcodegen.
@bradbell and @joaoleal what would be the first and simplest step to make progress on using cppadcodegen for ipopt via cppad?
How do we make progress towards converting the example I first linked to so it can work with cppadcodegen?
from cppadcodegen.
I suggest you start by programming up the simple ipopt example
https://github.com/bradbell/cppad_mixed/blob/master/example/ipopt_run.cpp
And modifying it so that the derivative functions are calculated using CppADCodeGen.
Once you have done that, you can extend it to work with an arbitrary function.
You will note that the example above is documented using omhelp.
I am working on a program that converts omhelp to sphinx (I do not plan to continue supporting omhelp).
I expect the omhelp to eventually be converted to the following extension of sphinx:
https://bradbell.github.io/xrst/doc/user_guide.html#purpose
from cppadcodegen.
@bradbell thanks for the suggestion. @joaoleal can you suggest a good cppadcodegen example that will help with this task?
from cppadcodegen.
There is an example that creates a model for a Lagrangian here:
https://github.com/joaoleal/CppADCodeGen/blob/master/example/lagrangian.cpp
I would, however, not do it like this. Nevertheless, it can be used as a starting point.
I would instead create two models:
- a model for the objective function
- a model for the NLP with the objective function and the constraints (to determine Lagrangian-related information)
For the NLP model I would configure a custom sparse hessian sparsity with only half of the Hessian (to improve performance).
You can also get away with only the NLP model but there are cases where there is no need to compute information related to the constraints (e.g., eval_grad_f
).
If there are any parameters in the model I would also remove them from the sparsity patterns.
from cppadcodegen.
Related Issues (20)
- CppADCodeGen support for Eigen `.transpose()` operation HOT 6
- Found CppAD version '' but at least version '20200000.1' is required HOT 5
- Loops reusing intermediate results HOT 1
- Using LLVM to improve CppAD HOT 4
- Question about wrong type argument error
- Examples on using CppADCodeGen with Eigen HOT 5
- Use CppADCodeGen with variable number of independent variable arrays HOT 2
- GreaterThanZero cannot be called for non-parameters for eigen determinant HOT 2
- Code generation with if/else statements HOT 18
- Large computational graphs fail at link time HOT 4
- cppad_ipopt dependency HOT 3
- How to get the value of a CppADCodeGen scalar type HOT 1
- Generating Jacobians as Tensors HOT 12
- icpc build fails for dynamic_linux.cpp example HOT 1
- make build_tests fails HOT 1
- Supporting runtime compilation and dynamic linking in MacOSX M1,2 chips HOT 2
- model->Domain() returns size for previous model
- Running the test program Jacobian module listwith cppAD library gives a lot of errors HOT 6
- error when complie function library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppadcodegen.