GithubHelp home page GithubHelp logo

omuses / hqp Goto Github PK

View Code? Open in Web Editor NEW
28.0 16.0 12.0 4.65 MB

a solver for sparse nonlinear optimization

License: Other

Shell 0.55% Makefile 0.67% C 76.27% C++ 11.83% Tcl 3.11% Fortran 6.66% Awk 0.05% Modelica 0.36% Gnuplot 0.01% Lex 0.48%

hqp's Introduction

HQP: a solver for sparse nonlinear optimization

HQP is a numerical solver for nonlinearly constrained large-scale optimization. It is intended for optimization programs with sufficient regular sparse structure. Such programs arise e.g. from the numerical treatment of optimal control.

External interfaces allow the formulation of optimization programs based on widely used formats, including also simulation formats.

See also the HQP Project Pages for an overview, literature references and online documentation.

License

This software is free according to the conditions of the GNU LIBRARY GENERAL PUBLIC LICENSE, Version 2 (see COPYING.LIB).

The distribution contains several other open source software packages that underly copyright and license conditions of their respective authors. The matrix library Meschach is required and has been further developed (see meschach/version.c). Other contained packages are optional and need to be enabled explicitly.

hqp's People

Contributors

e-arnold avatar rfranke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hqp's Issues

Comparisons with other free solvers

Hello,

i've been working to make the Worhp solver (free for academics/testing) available as an NLP backend in the JuMP ecosystem.
Recently i discovered the existence of this package.
Do you suspect this package being competitive with Ipopt or Worhp when given access to the function, the gradient, the jacobian and hessian and the sparsity structures of the jacobian and hessian?

I am aware that his package offers more then just an NLP (or QP) solver however there is no standardized interface for the optimization of dynamic problems in Julia yet. So my interest in making those features available is limited for now.

Sincerely,
Johann-Tobias Schäg,
Student, I.-A., TU Ilmenau

Building on Mac OS X

Hello,

I'm curious if you've experimented with getting recent omuses/hqp to compile and run under Mac OS X. My own experiments suggests a fairly small number of issues:

  • Newer ADOL-C versions install under lib64 on x86_64 machines,
  • Shared libraries should be linked with e.g. -Wl,-install-name,@rpath/libomu.so for the dynamic linker to locate them (though I believe there are other ways to accomplish this),
  • The libomu.so linking step seems to not include -lhqp -ladolc for me.

Unless you happen to be working on Mac compatibility, I can research these a little further (my current solutions are probably amateurish), fork the project here on github, and see if there's a way to elegantly get them into the existing build without disturbing what's already there.

Hqp_IpsMehrotra.C fails if there are no inequality constraints

While running through simple test cases in some (very) old code of mine that uses Omuses, I found an error appearing immediately in the optimisation process:

"vecop.c", line 367: sizes of objects don't match in function v_min()
Result : error invoking sqp_qp_solve: v_min

Digging a little deeper, the culprit is Hqp_IpsMehrotra::step(), which starts out by calling v_min(_z). This test fails when _z->dim == 0, which I believe happens when _m == _qp->C->m == 0, i.e. no inequality constraints.

Perhaps this is not a critical issue for whatever reason, but I thought I would at least document it. Much of the rest of the class does try quite hard to respond correctly to the case of _m == 0.

Paths under Windows for fmus

The are still error for the fmu binaries path under Windows, although there were some fixes with the commit:
Fix pathes for FMI binaries under Win64 and LPSolve under Linux
73fe831

It seems to work for discrete problems but not for continous ones.
See the attached output of the mingw console:
Unfortunately it was not possible to upload it as screenshot.

kar2lo@LO-X18002 MINGW64 /d/Programs/HQP/hqp/odc
$ tclsh did_fmu.tcl
Running optimization...
it obj ||inf|| ||grdL|| [ qp res] ||s|| s'Qs stepsize
0 4 0.15 0.06667 [ 19 opt] 4.488 9.792 1
1 8.89576 1.011e-010 4.488e-008
19 qp-it
Result : optimal
Objective: 8.895757226232119
Obj-evals: 1
Plotting resulting signals...
Skipping plot as no blt::graph available.

kar2lo@LO-X18002 MINGW64 /d/Programs/HQP/hqp/odc
$ tclsh dic_fmu.tcl
Running optimization...
./.DIC/binaries/win32/DIC.dllerror invoking prg_setup_stages: LoadLibrary failed for FMU
while executing
"prg_setup_stages"
(file "dic_fmu.tcl" line 31)
Error from mdlInitializeSizes: LoadLibrary failed for FMU

Compiling FMU... error copying "tmp/DIC.fmu": no such file or directory

omc compiling not working. Even if, I copy the external generated fmu file into /odc/. It does not work. Could you please help ?

Terminal Output:

/workspaces/hqp/odc (master) $ ./run dic_fmu
Omuses 1.9.9.23.03.13
Compiling FMU...
error copying "tmp/DIC.fmu": no such file or directory
while executing
"file copy -force "tmp/$model_name.fmu" ."
(procedure "compileFMU" line 29)
invoked from within
"compileFMU DIC.mo"
(file "dic_fmu.tcl" line 12)
invoked from within
"source $fname"
invoked from within
"if [file exists $fname] {
source $fname
} else {

if [catch {prg_name $pname} result] {
puts stderr "Usage: run "
puts stderr $result
..."
(file "./run" line 28)

DID_FMU.log :

DIC_FMU.makefile:19: /usr/bin/../include/omc/cpp/ModelicaLibraryConfig_gcc.inc: No such file or directory
make: *** No rule to make target '/usr/bin/../include/omc/cpp/ModelicaLibraryConfig_gcc.inc'. Stop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.