Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package Ipopt for openSUSE:Factory checked in at 2023-04-13 17:32:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/Ipopt (Old) and /work/SRC/openSUSE:Factory/.Ipopt.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "Ipopt" Thu Apr 13 17:32:54 2023 rev:18 rq:1079215 version:3.14.12 Changes: -------- --- /work/SRC/openSUSE:Factory/Ipopt/Ipopt.changes 2022-10-27 13:55:06.932856181 +0200 +++ /work/SRC/openSUSE:Factory/.Ipopt.new.19717/Ipopt.changes 2023-04-13 17:32:56.766123821 +0200 @@ -1,0 +2,21 @@ +Mon Apr 10 03:40:51 UTC 2023 - Atri Bhattacharya <[email protected]> + +- Update to version 3.14.12: + * Fix that a source file was installed and install more header + files [gh#coin-or/Ipopt#641, gh#coin-or/Ipopt#642]. + * Fixed crash of GetIpoptCurrentIterate() and + GetIpoptCurrentViolations() in C interface when called before + or after IpoptSolve() [gh#coin-or/Ipopt#644, + gh#coin-or/Ipopt#645]. + * Updated HSL_MA97 header file to the one from HSL MA97 2.8.0 + [gh#coin-or/Ipopt#646]. + * Fixed crash when trying to solve problem without variables and + constraints [gh#coin-or/Ipopt#648]. + * Added optional argument to AlgorithmBuilder constructor to + provide name of custom solver [gh#coin-or/Ipopt#618]. + * Changed handling of dual solution for square problems. + * Updated HSL_MC86 header file to the one from HSL MC68 3.3.3 + [gh#coin-or/Ipopt#653]. +- Make java package noarch (rpmlint recommends). + +------------------------------------------------------------------- Old: ---- Ipopt-3.14.10.tar.gz New: ---- Ipopt-3.14.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Ipopt.spec ++++++ --- /var/tmp/diff_new_pack.HfZuS0/_old 2023-04-13 17:32:57.238126573 +0200 +++ /var/tmp/diff_new_pack.HfZuS0/_new 2023-04-13 17:32:57.246126620 +0200 @@ -1,7 +1,7 @@ # # spec file for package Ipopt # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define sover 3 %define shlib libipopt%{sover} Name: Ipopt -Version: 3.14.10 +Version: 3.14.12 Release: 0 Summary: A software package for large-scale nonlinear optimization methods License: EPL-2.0 @@ -72,6 +72,7 @@ %package java Summary: Java bindings for %{name} Group: Development/Libraries/C and C++ +BuildArch: noarch %description java This package provides the java bindings for %{name} in a jar file. ++++++ Ipopt-3.14.10.tar.gz -> Ipopt-3.14.12.tar.gz ++++++ ++++ 6362 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/ChangeLog.md new/Ipopt-releases-3.14.12/ChangeLog.md --- old/Ipopt-releases-3.14.10/ChangeLog.md 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/ChangeLog.md 2023-04-05 11:18:06.000000000 +0200 @@ -7,6 +7,34 @@ ## 3.14 +### 3.14.12 (2023-04-05) + +- Fix that a source file was installed and install more header files. + [#641, #642, by Joao Sousa Pinto] +- Fixed crash of GetIpoptCurrentIterate() and GetIpoptCurrentViolations() in + C interface when called before or after IpoptSolve(). [#644, #645, by Robbybp] +- Fixed crash when trying to solve problem without variables and constraints. [#648] +- Added optional argument to `AlgorithmBuilder` constructor to provide name of custom solver. [#618] +- Changed handling of dual solution for square problems: When solving a problem + with as many equations as variables, Ipopt used to ignore the violation of + dual feasibility and complementarity in the convergence check and computed + a final dual solution via a least-square estimate. If this failed, Ipopt would + claim a square problem to be solved to optimality without providing a solution + that satisfies optimality conditions. With this version, the behavior has + been changed so that dual feasibility is no longer ignored by the convergence + check, the least-square estimate is only computed if optimality is not proven + already, and the normal Ipopt algorithm continues if the least-square estimate + does not satisfy optimality conditions. +- Updated HSL_MC86 header file to the one from HSL MC68 3.3.3 [#653, by Jari Fowkes]. + +### 3.14.11 (2023-02-07) + +- Added `IpoptData::TimingStats() const` [#611] +- Assume DLL library extension in linear solver library loader on Windows + also when building with other compiler than MSVC/Intel [#628]. +- Updated buildsystem files after upgrading to most recent versions of autotools. +- Install some additional header files [#637]. + ### 3.14.10 (2022-10-11) - Added option `grad_f_constant` to specify that objective function is linear. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/README.md new/Ipopt-releases-3.14.12/README.md --- old/Ipopt-releases-3.14.10/README.md 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/README.md 2023-04-05 11:18:06.000000000 +0200 @@ -113,8 +113,6 @@ - **[Ipopt releases page](https://github.com/coin-or/Ipopt/releases)** provides libraries and executables for Windows - **[JuliaBinaryWrappers](https://github.com/JuliaBinaryWrappers/Ipopt_jll.jl/releases)** provides libraries and executables - **[IDEAS](https://github.com/IDAES/idaes-ext/releases)** provides executables; these executables include HSL solvers -- **[AMPL](http://ampl.com/products/solvers/open-source/#ipopt)** provides executables -- **[Pardiso project](https://pardiso-project.org/index.html#binaries)** provides libraries for using Ipopt with Pardiso through Matlab (Matpower) Getting Help ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/ar-lib new/Ipopt-releases-3.14.12/ar-lib --- old/Ipopt-releases-3.14.10/ar-lib 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/ar-lib 2023-04-05 11:18:06.000000000 +0200 @@ -4,7 +4,7 @@ me=ar-lib scriptversion=2019-07-04.01; # UTC -# Copyright (C) 2010-2020 Free Software Foundation, Inc. +# Copyright (C) 2010-2021 Free Software Foundation, Inc. # Written by Peter Rosin <[email protected]>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/compile new/Ipopt-releases-3.14.12/compile --- old/Ipopt-releases-3.14.10/compile 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/compile 2023-04-05 11:18:06.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/configure.ac new/Ipopt-releases-3.14.12/configure.ac --- old/Ipopt-releases-3.14.10/configure.ac 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/configure.ac 2023-04-05 11:18:06.000000000 +0200 @@ -8,7 +8,7 @@ # Names and other basic things # ############################################################################# -AC_INIT([Ipopt],[3.14.10],[https://github.com/coin-or/Ipopt/issues/new],[],[https://github.com/coin-or/Ipopt]) +AC_INIT([Ipopt],[3.14.12],[https://github.com/coin-or/Ipopt/issues/new],[],[https://github.com/coin-or/Ipopt]) AC_COPYRIGHT([ Copyright 2004, 2011 International Business Machines and others. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/doc/install.dox new/Ipopt-releases-3.14.12/doc/install.dox --- old/Ipopt-releases-3.14.10/doc/install.dox 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/doc/install.dox 2023-04-05 11:18:06.000000000 +0200 @@ -328,6 +328,10 @@ and you also need to provide the linker flags for MUMPS with the `--with-mumps-lflags` flag. +A precompiled MUMPS library is sometimes also provided by a distributions package manager. +For example, on a Debian system, one may install package [libmumps-seq-dev](https://packages.debian.org/bullseye/libmumps-seq-dev) +and use the configure flags `--with-mumps-cflags=-I/usr/include/mumps_seq --with-mumps-lflags=-ldmumps_seq`. + \subsection DOWNLOAD_PARDISO Pardiso (Parallel Sparse Direct Linear Solver) from Pardiso Project If you would like to use %Ipopt with Pardiso from Pardiso Project, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/doc/options.dox new/Ipopt-releases-3.14.12/doc/options.dox --- old/Ipopt-releases-3.14.10/doc/options.dox 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/doc/options.dox 2023-04-05 11:18:06.000000000 +0200 @@ -368,7 +368,7 @@ \anchor OPT_check_derivatives_for_naninf <strong>check_derivatives_for_naninf</strong>: Indicates whether it is desired to check for Nan/Inf in derivative matrices <blockquote> - Activating this option will cause an error if an invalid number is detected in the constraint Jacobians or the Lagrangian Hessian. If this is not activated, the test is skipped, and the algorithm might proceed with invalid numbers and fail. If test is activated and an invalid number is detected, the matrix is written to output with print_level corresponding to J_MORE_DETAILED; so beware of large output! The default value for this string option is "no". + Activating this option will cause an error if an invalid number is detected in the constraint Jacobians or the Lagrangian Hessian. If this is not activated, the test is skipped, and the algorithm might proceed with invalid numbers and fail. If test is activated and an invalid number is detected, the matrix is written to output with print_level corresponding to J_MOREDETAILED (7); so beware of large output! The default value for this string option is "no". Possible values: yes, no </blockquote> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp --- old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -906,7 +906,9 @@ for (Index i=0; i<=N_+1; i++) { for (Index j=0; j<=N_+1; j++) { - fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]); + for (Index k=0; k<=N_+1; k++) { + fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp --- old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -1074,7 +1074,9 @@ for (Index i=0; i<=N_+1; i++) { for (Index j=0; j<=N_+1; j++) { - fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]); + for (Index k=0; k<=N_+1; k++) { + fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp --- old/Ipopt-releases-3.14.10/examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -1001,7 +1001,9 @@ for (Index i=0; i<=N_+1; i++) { for (Index j=0; j<=N_+1; j++) { - fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]); + for (Index k=0; k<=N_+1; k++) { + fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/missing new/Ipopt-releases-3.14.12/missing --- old/Ipopt-releases-3.14.10/missing 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/missing 2023-04-05 11:18:06.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpAlgBuilder.cpp new/Ipopt-releases-3.14.12/src/Algorithm/IpAlgBuilder.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpAlgBuilder.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpAlgBuilder.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -80,9 +80,11 @@ #endif AlgorithmBuilder::AlgorithmBuilder( - SmartPtr<AugSystemSolver> custom_solver /*=NULL*/ + SmartPtr<AugSystemSolver> custom_solver, /*=NULL*/ + const std::string& custom_solver_name /*=std::string()*/ ) - : custom_solver_(custom_solver) + : custom_solver_(custom_solver), + custom_solver_name_(custom_solver_name) { } void AlgorithmBuilder::RegisterOptions( @@ -571,12 +573,15 @@ ) { SmartPtr<AugSystemSolver> AugSolver; - std::string linear_solver; options.GetStringValue("linear_solver", linear_solver, prefix); if( linear_solver == "custom" ) { ASSERT_EXCEPTION(IsValid(custom_solver_), OPTION_INVALID, "Selected linear solver CUSTOM not available."); AugSolver = custom_solver_; + if( !custom_solver_name_.empty() ) + { + linear_solver = custom_solver_name_; + } } else { @@ -1004,7 +1009,7 @@ SmartPtr<IpoptAlgorithm> resto_alg = new IpoptAlgorithm(resto_SearchDirCalc, GetRawPtr(resto_LineSearch), GetRawPtr(resto_MuUpdate), GetRawPtr(resto_convCheck), resto_IterInitializer, resto_IterOutput, - resto_HessUpdater, resto_EqMultCalculator); + resto_HessUpdater, resto_EqMultCalculator, linear_solver); // Set the restoration phase resto_phase = new MinC_1NrmRestorationPhase(*resto_alg, EqMultCalculator_); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpAlgBuilder.hpp new/Ipopt-releases-3.14.12/src/Algorithm/IpAlgBuilder.hpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpAlgBuilder.hpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpAlgBuilder.hpp 2023-04-05 11:18:06.000000000 +0200 @@ -53,7 +53,8 @@ ///@{ /** Constructor */ AlgorithmBuilder( - SmartPtr<AugSystemSolver> custom_solver = NULL + SmartPtr<AugSystemSolver> custom_solver = NULL, + const std::string& custom_solver_name = std::string() /**< @since 3.14.12 */ ); /** Destructor */ @@ -402,6 +403,7 @@ /** Optional pointer to AugSystemSolver. If this is set in the * constructor, we will use this to solve the linear systems. */ SmartPtr<AugSystemSolver> custom_solver_; + std::string custom_solver_name_; /// name of linear solver constructed in SymLinearSolverFactory std::string linear_solver; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptAlg.cpp new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptAlg.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptAlg.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptAlg.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -246,6 +246,8 @@ my_options->GetNumericValue("recalc_y_feas_tol", recalc_y_feas_tol_, prefix); } + my_options->GetNumericValue("constr_viol_tol", constr_viol_tol_, prefix); + if( prefix == "resto." ) { skip_print_problem_stats_ = true; @@ -404,6 +406,11 @@ IpData().Set_iter_count(IpData().iter_count() + 1); + if( IpCq().IsSquareProblem() ) + { + ComputeFeasibilityMultipliers(); + } + IpData().TimingStats().CheckConvergence().Start(); conv_status = conv_check_->CheckConvergence(); IpData().TimingStats().CheckConvergence().End(); @@ -450,15 +457,6 @@ { static_cast<BacktrackingLineSearch*>(GetRawPtr(line_search_))->StopWatchDog(); } - - if( conv_status == ConvergenceCheck::CONVERGED || conv_status == ConvergenceCheck::CONVERGED_TO_ACCEPTABLE_POINT ) - { - if( IpCq().IsSquareProblem() ) - { - // make the sure multipliers are computed properly - ComputeFeasibilityMultipliers(); - } - } } catch( TINY_STEP_DETECTED& exc ) { @@ -470,11 +468,6 @@ { exc.ReportException(Jnlst(), J_MOREDETAILED); IpData().TimingStats().ComputeAcceptableTrialPoint().EndIfStarted(); - if( IpCq().IsSquareProblem() ) - { - // make the sure multipliers are computed properly - ComputeFeasibilityMultipliers(); - } retval = STOP_AT_ACCEPTABLE_POINT; } catch( LOCALLY_INFEASIBLE& exc ) @@ -490,8 +483,8 @@ IpData().TimingStats().ComputeAcceptableTrialPoint().EndIfStarted(); if( IpCq().IsSquareProblem() ) { - // make the sure multipliers are computed properly - ComputeFeasibilityMultipliers(); + // make sure the multipliers are computed properly + ComputeFeasibilityMultipliersPostprocess(); retval = FEASIBLE_POINT_FOUND; } else @@ -549,7 +542,7 @@ if( IpCq().IsSquareProblem() ) { // make the sure multipliers are computed properly - ComputeFeasibilityMultipliers(); + ComputeFeasibilityMultipliersPostprocess(); } retval = FEASIBLE_POINT_FOUND; } @@ -867,12 +860,104 @@ dbg_verbosity); DBG_ASSERT(IpCq().IsSquareProblem()); + // if not primal feasible yet, then do not compute multipliers yet + Number constr_viol = IpCq().unscaled_curr_nlp_constraint_violation(NORM_MAX); + if( constr_viol > constr_viol_tol_ ) + { + return; + } + + // if we don't have an object for computing least square + // multipliers we don't compute them + if( IsNull(eq_multiplier_calculator_) ) + { + Jnlst().Printf(J_DETAILED, J_SOLUTION, + "No eq_mult_calculator object available in IpoptAlgorithm to recompute multipliers at solution for square problem.\n"); + return; + } + + IpData().TimingStats().CheckConvergence().Start(); + ConvergenceCheck::ConvergenceStatus conv_status = conv_check_->CheckConvergence(false); + IpData().TimingStats().CheckConvergence().End(); + + // if converged or reached some limit, then do not update multipliers + // status CONTINUE likely means that we are not dual feasible yet, which we try to fix below + if( conv_status != ConvergenceCheck::CONTINUE ) + { + return; + } + + // backup current iterate for case eq_mult_calculator fails + // TODO we could avoid this backup&restore, if eq_multiplier_calculator_ could be told to calculate the multipliers for the trial instead of the current iterate + SmartPtr<const IteratesVector> curr_backup = IpData().curr(); + + SmartPtr<IteratesVector> iterates = IpData().curr()->MakeNewContainer(); + SmartPtr<Vector> tmp = iterates->z_L()->MakeNew(); + tmp->Set(0.); + iterates->Set_z_L(*tmp); + tmp = iterates->z_U()->MakeNew(); + tmp->Set(0.); + iterates->Set_z_U(*tmp); + tmp = iterates->v_L()->MakeNew(); + tmp->Set(0.); + iterates->Set_v_L(*tmp); + tmp = iterates->v_U()->MakeNew(); + tmp->Set(0.); + iterates->Set_v_U(*tmp); + SmartPtr<Vector> y_c = iterates->y_c()->MakeNew(); + SmartPtr<Vector> y_d = iterates->y_d()->MakeNew(); + IpData().set_trial(iterates); + IpData().AcceptTrialPoint(); + bool retval = eq_multiplier_calculator_->CalculateMultipliers(*y_c, *y_d); + if( retval ) + { + //TODO Check if following line is really necessary + iterates = IpData().curr()->MakeNewContainer(); + iterates->Set_y_c(*y_c); + iterates->Set_y_d(*y_d); + IpData().set_trial(iterates); + IpData().AcceptTrialPoint(); + + // check whether the new iterate satisfies convergence criteria now + // if not, then we better continue with backed up iterate + IpData().TimingStats().CheckConvergence().Start(); + ConvergenceCheck::ConvergenceStatus conv_status = conv_check_->CheckConvergence(false); + IpData().TimingStats().CheckConvergence().End(); + + if( conv_status == ConvergenceCheck::CONVERGED || conv_status == ConvergenceCheck::CONVERGED_TO_ACCEPTABLE_POINT ) + { + return; + } + + Jnlst().Printf(J_DETAILED, J_SOLUTION, + "Multipliers for feasibility problem using eq_mult_calculator does not lead to converged status yet.\n"); + } + else + { + Jnlst().Printf(J_DETAILED, J_SOLUTION, + "Failed to compute multipliers for feasibility problem using eq_mult_calculator.\n"); + } + + // restore original iterate + Jnlst().Printf(J_DETAILED, J_SOLUTION, + "Restoring iterate from before trying eq_mult_calculator.\n"); + SmartPtr<IteratesVector> orig_iterate = curr_backup->MakeNewContainer(); + IpData().set_trial(orig_iterate); + IpData().AcceptTrialPoint(); +} + +void IpoptAlgorithm::ComputeFeasibilityMultipliersPostprocess() +{ + DBG_START_METH("IpoptAlgorithm::ComputeFeasibilityMultipliersPostprocess", + dbg_verbosity); + DBG_ASSERT(IpCq().IsSquareProblem()); + // if we don't have an object for computing least square // multipliers we don't compute them if( IsNull(eq_multiplier_calculator_) ) { Jnlst().Printf(J_WARNING, J_SOLUTION, - "This is a square problem, but multipliers cannot be recomputed at solution, since no eq_mult_calculator object is available in IpoptAlgorithm\n"); + "No eq_mult_calculator object available in IpoptAlgorithm to recompute multipliers at solution for square problem.\n"); return; } @@ -896,7 +981,7 @@ bool retval = eq_multiplier_calculator_->CalculateMultipliers(*y_c, *y_d); if( retval ) { - //Check if following line is really necessary + //TODO Check if following line is really necessary iterates = IpData().curr()->MakeNewContainer(); iterates->Set_y_c(*y_c); iterates->Set_y_d(*y_d); @@ -906,7 +991,7 @@ else { Jnlst().Printf(J_WARNING, J_SOLUTION, - "Cannot recompute multipliers for feasibility problem. Error in eq_mult_calculator\n"); + "Failed to compute multipliers for feasibility problem using eq_mult_calculator.\n"); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptAlg.hpp new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptAlg.hpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptAlg.hpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptAlg.hpp 2023-04-05 11:18:06.000000000 +0200 @@ -131,7 +131,9 @@ SmartPtr<IterationOutput> iter_output_; SmartPtr<HessianUpdater> hessian_updater_; /** The multiplier calculator (for y_c and y_d) has to be set only - * if option recalc_y is set to true + * if option recalc_y is set to true. + * If set, then it is also used to compute the dual multipliers for + * square problems. */ SmartPtr<EqMultiplierCalculator> eq_multiplier_calculator_; ///@} @@ -184,8 +186,18 @@ /** Print the problem size statistics */ void PrintProblemStatistics(); - /** Compute the Lagrangian multipliers for a feasibility problem */ + /** Tries to compute Lagrangian multipliers for a feasibility problem + * + * Only computes multipliers if primal feasible but not converged yet. + * Restores current iterate if multiplier computation fails or new point does not satisfy convergence criteria, too. + */ void ComputeFeasibilityMultipliers(); + + /** Compute the Lagrangian multipliers for a feasibility problem in post processing + * + * Always tries to compute multipliers and does not restore current iterate if failing. + */ + void ComputeFeasibilityMultipliersPostprocess(); ///@} /** @name internal flags */ @@ -218,6 +230,8 @@ bool mehrotra_algorithm_; /** String specifying linear solver */ std::string linear_solver_name_; + /** Constraint violation tolerance on unscaled problem */ + Number constr_viol_tol_; ///@} /** @name auxiliary functions */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptCalculatedQuantities.cpp new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptCalculatedQuantities.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptCalculatedQuantities.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptCalculatedQuantities.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -3075,36 +3075,27 @@ if( !curr_nlp_error_cache_.GetCachedResult(result, tdeps) ) { - if( ip_data_->curr()->x()->Dim() == ip_data_->curr()->y_c()->Dim() ) - { - // This is a square problem, we only need to consider the - // infeasibility - result = curr_nlp_constraint_violation(NORM_MAX); - } - else - { - Number s_d = 0; - Number s_c = 0; - ComputeOptimalityErrorScaling(*ip_data_->curr()->y_c(), *ip_data_->curr()->y_d(), *ip_data_->curr()->z_L(), - *ip_data_->curr()->z_U(), *ip_data_->curr()->v_L(), *ip_data_->curr()->v_U(), s_max_, s_d, s_c); - DBG_PRINT((1, "s_d = %lf, s_c = %lf\n", s_d, s_c)); + Number s_d = 0; + Number s_c = 0; + ComputeOptimalityErrorScaling(*ip_data_->curr()->y_c(), *ip_data_->curr()->y_d(), *ip_data_->curr()->z_L(), + *ip_data_->curr()->z_U(), *ip_data_->curr()->v_L(), *ip_data_->curr()->v_U(), s_max_, s_d, s_c); + DBG_PRINT((1, "s_d = %lf, s_c = %lf\n", s_d, s_c)); - // Dual infeasibility - DBG_PRINT((1, "curr_dual_infeasibility(NORM_MAX) = %8.2e\n", - curr_dual_infeasibility(NORM_MAX))); - result = curr_dual_infeasibility(NORM_MAX) / s_d; - /* - // Primal infeasibility - DBG_PRINT((1, "curr_primal_infeasibility(NORM_MAX) = %8.2e\n", - curr_primal_infeasibility(NORM_MAX))); - result = Max(result, curr_primal_infeasibility(NORM_MAX)); - */ - result = Max(result, curr_nlp_constraint_violation(NORM_MAX)); - // Complementarity - DBG_PRINT((1, "curr_complementarity(mu_target_, NORM_MAX) = %8.2e\n", - curr_complementarity(mu_target_, NORM_MAX))); - result = Max(result, curr_complementarity(mu_target_, NORM_MAX) / s_c); - } + // Dual infeasibility + DBG_PRINT((1, "curr_dual_infeasibility(NORM_MAX) = %8.2e\n", + curr_dual_infeasibility(NORM_MAX))); + result = curr_dual_infeasibility(NORM_MAX) / s_d; + /* + // Primal infeasibility + DBG_PRINT((1, "curr_primal_infeasibility(NORM_MAX) = %8.2e\n", + curr_primal_infeasibility(NORM_MAX))); + result = Max(result, curr_primal_infeasibility(NORM_MAX)); + */ + result = Max(result, curr_nlp_constraint_violation(NORM_MAX)); + // Complementarity + DBG_PRINT((1, "curr_complementarity(mu_target_, NORM_MAX) = %8.2e\n", + curr_complementarity(mu_target_, NORM_MAX))); + result = Max(result, curr_complementarity(mu_target_, NORM_MAX) / s_c); curr_nlp_error_cache_.AddCachedResult(result, tdeps); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptData.hpp new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptData.hpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpIpoptData.hpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpIpoptData.hpp 2023-04-05 11:18:06.000000000 +0200 @@ -588,6 +588,15 @@ return timing_statistics_; } + /** Return Timing Statistics Object + * + * @since 3.14.11 + */ + const TimingStatistics& TimingStats() const + { + return timing_statistics_; + } + /** Check if additional data has been set */ bool HaveAddData() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpOptErrorConvCheck.cpp new/Ipopt-releases-3.14.12/src/Algorithm/IpOptErrorConvCheck.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpOptErrorConvCheck.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpOptErrorConvCheck.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -210,14 +210,6 @@ Number constr_viol = IpCq().unscaled_curr_nlp_constraint_violation(NORM_MAX); Number compl_inf = IpCq().unscaled_curr_complementarity(mu_target_, NORM_MAX); - if( IpData().curr()->x()->Dim() == IpData().curr()->y_c()->Dim() ) - { - // the problem is square, there is no point in looking at dual - // infeasibility and complementarity as termination criterion - dual_inf_tol_ = 1e300; - compl_inf_tol_ = 1e300; - } - if( Jnlst().ProduceOutput(J_MOREDETAILED, J_MAIN) ) { Jnlst().Printf(J_MOREDETAILED, J_MAIN, @@ -312,14 +304,6 @@ DBG_PRINT((1, "acceptable_constr_viol_tol_ = %e\n", acceptable_constr_viol_tol_)); DBG_PRINT((1, "acceptable_compl_inf_tol_ = %e\n", acceptable_compl_inf_tol_)); - if( IpData().curr()->x()->Dim() == IpData().curr()->y_c()->Dim() ) - { - // the problem is square, there is no point in looking at dual - // infeasibility and complementarity as termination criterion - acceptable_dual_inf_tol_ = 1e300; - acceptable_compl_inf_tol_ = 1e300; - } - if( Jnlst().ProduceOutput(J_MOREDETAILED, J_MAIN) ) { Jnlst().Printf(J_MOREDETAILED, J_MAIN, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/IpOrigIpoptNLP.cpp new/Ipopt-releases-3.14.12/src/Algorithm/IpOrigIpoptNLP.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/IpOrigIpoptNLP.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/IpOrigIpoptNLP.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -87,7 +87,7 @@ "in the constraint Jacobians or the Lagrangian Hessian. " "If this is not activated, the test is skipped, and the algorithm might proceed with invalid numbers and fail. " "If test is activated and an invalid number is detected, " - "the matrix is written to output with print_level corresponding to J_MORE_DETAILED; " + "the matrix is written to output with print_level corresponding to J_MOREDETAILED (7); " "so beware of large output!"); roptions->AddBoolOption( "grad_f_constant", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp --- old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp 2023-04-05 11:18:06.000000000 +0200 @@ -19,9 +19,11 @@ * * This defines the general interface to linear solvers for sparse * symmetric indefinite matrices. The matrices can be provided - * either in "triplet format" (like for Harwell's MA27 solver), or - * in compressed sparse row (CSR) format for the lower triangular - * part of the symmetric matrix. + * either in "triplet format" for the lower triangular part + * (like for Harwell's MA27 solver), or in compressed sparse row + * (CSR) format for the upper triangular part of the symmetric matrix. + * The latter may equivalently (or better) be referred as compressed + * sparse column (CSC) format for the lower triangular part. * * The solver should be able to compute the inertia of the matrix, * or more specifically, the number of negative eigenvalues in the @@ -99,15 +101,15 @@ /** Enum to specify sparse matrix format. */ enum EMatrixFormat { - /** Triplet (MA27) format */ + /** Triplet (MA27) format for lower triangular part */ Triplet_Format, - /** Compressed sparse row format for lower triangular part, with 0 offset */ + /** Compressed sparse row format for upper triangular part, with 0 offset */ CSR_Format_0_Offset, - /** Compressed sparse row format for lower triangular part, with 1 offset */ + /** Compressed sparse row format for upper triangular part, with 1 offset */ CSR_Format_1_Offset, - /** Compressed sparse row format for both lwr and upr parts, with 0 offset */ + /** Compressed sparse row format for both lower and upper parts, with 0 offset */ CSR_Full_Format_0_Offset, - /** Compressed sparse row format for both lwr and upr parts, with 1 offset */ + /** Compressed sparse row format for both lower and upper parts, with 1 offset */ CSR_Full_Format_1_Offset }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/IpTripletToCSRConverter.cpp new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/IpTripletToCSRConverter.cpp --- old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/IpTripletToCSRConverter.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/IpTripletToCSRConverter.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -53,8 +53,6 @@ DBG_START_METH("TSymLinearSolver::InitializeStructure", dbg_verbosity); - DBG_ASSERT(dim > 0); - DBG_ASSERT(nonzeros > 0); DBG_ASSERT(hf_ == Triangular_Format || hf_ == Full_Format); delete[] ia_; @@ -66,6 +64,21 @@ dim_ = dim; nonzeros_triplet_ = nonzeros; + if( nonzeros == 0 ) + { + ia_ = NULL; + ja_ = NULL; + ipos_first_ = NULL; + ipos_double_triplet_ = NULL; + ipos_double_compressed_ = NULL; + nonzeros_compressed_ = 0; + num_doubles_ = 0; + initialized_ = true; + return 0; + } + + DBG_ASSERT(dim > 0); + // Create a list with all triplet entries std::vector<TripletEntry> entry_list(nonzeros); std::vector<TripletEntry>::iterator list_iterator = entry_list.begin(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_ma97d.h new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_ma97d.h --- old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_ma97d.h 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_ma97d.h 2023-04-05 11:18:06.000000000 +0200 @@ -5,7 +5,7 @@ * * Written by: Jonathan Hogg * - * Version 2.6.0 + * Version 2.8.0 * * THIS FILE ONLY may be redistributed under the below modified BSD licence. * All other files distributed as part of the HSL_MA97 package @@ -96,7 +96,7 @@ int ispare[5]; ma97realtype_d_ rspare[10]; }; -struct ma97_info { +struct ma97_info_d { int flag; /* <0 on error */ int flag68; int flag77; @@ -105,7 +105,7 @@ int matrix_outrange; /* number of out of range entries in A */ int matrix_missing_diag; /* number of zero diagonal entries in A */ int maxdepth; /* height of assembly tree */ - int maxfront; /* maximum dimension of frontal matrix */ + int maxfront; /* maximum no. rows in a supernode */ int num_delay; /* number of times a pivot was delayed */ long num_factor; /* number of entries in L */ long num_flops; /* number of floating point operations */ @@ -114,9 +114,10 @@ int num_two; /* number of 2x2 pivots */ int ordering; /* ordering used (as per control.ordering) */ int stat; /* error code from failed memory allocation */ + int maxsupernode; /* maximum no. columns in a supernode */ /* Reserve space for future interface changes */ - int ispare[5]; ma97realtype_d_ rspare[10]; + int ispare[4]; ma97realtype_d_ rspare[10]; }; /* Set default values of control */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_ma97s.h new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_ma97s.h --- old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_ma97s.h 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_ma97s.h 2023-04-05 11:18:06.000000000 +0200 @@ -5,7 +5,7 @@ * * Written by: Jonathan Hogg * - * Version 2.6.0 + * Version 2.8.0 * * THIS FILE ONLY may be redistributed under the below modified BSD licence. * All other files distributed as part of the HSL_MA97 package @@ -96,7 +96,7 @@ int ispare[5]; ma97realtype_s_ rspare[10]; }; -struct ma97_info { +struct ma97_info_s { int flag; /* <0 on error */ int flag68; int flag77; @@ -105,7 +105,7 @@ int matrix_outrange; /* number of out of range entries in A */ int matrix_missing_diag; /* number of zero diagonal entries in A */ int maxdepth; /* height of assembly tree */ - int maxfront; /* maximum dimension of frontal matrix */ + int maxfront; /* maximum no. rows in a supernode */ int num_delay; /* number of times a pivot was delayed */ long num_factor; /* number of entries in L */ long num_flops; /* number of floating point operations */ @@ -114,9 +114,10 @@ int num_two; /* number of 2x2 pivots */ int ordering; /* ordering used (as per control.ordering) */ int stat; /* error code from failed memory allocation */ + int maxsupernode; /* maximum no. columns in a supernode */ /* Reserve space for future interface changes */ - int ispare[5]; ma97realtype_s_ rspare[10]; + int ispare[4]; ma97realtype_s_ rspare[10]; }; /* Set default values of control */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_mc68i.h new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_mc68i.h --- old/Ipopt-releases-3.14.10/src/Algorithm/LinearSolvers/hsl_mc68i.h 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Algorithm/LinearSolvers/hsl_mc68i.h 2023-04-05 11:18:06.000000000 +0200 @@ -53,7 +53,7 @@ int f_array_out; /* 0 for C array indexing, 1 for Fortran indexing * NOTE: 2x2 pivot information discarded if C indexing * is used for output! */ - long min_l_workspace; /* Initial size of workspace, as argument in Fortran */ + int min_l_workspace; /* Initial size of workspace, as argument in Fortran */ /* Options from Fortran version */ int lp; /* stream number for error messages */ int wp; /* stream number for warning messages */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Common/IpLibraryLoader.hpp new/Ipopt-releases-3.14.12/src/Common/IpLibraryLoader.hpp --- old/Ipopt-releases-3.14.10/src/Common/IpLibraryLoader.hpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Common/IpLibraryLoader.hpp 2023-04-05 11:18:06.000000000 +0200 @@ -8,7 +8,7 @@ #include "IpReferenced.hpp" #include "IpException.hpp" -#ifdef _MSC_VER +#ifdef _WIN32 # define IPOPT_SHAREDLIBEXT "dll" #elif defined(__APPLE__) # define IPOPT_SHAREDLIBEXT "dylib" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Common/config_ipopt_default.h new/Ipopt-releases-3.14.12/src/Common/config_ipopt_default.h --- old/Ipopt-releases-3.14.10/src/Common/config_ipopt_default.h 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Common/config_ipopt_default.h 2023-04-05 11:18:06.000000000 +0200 @@ -5,7 +5,7 @@ /***************************************************************************/ /* Version number of project */ -#define IPOPT_VERSION "3.14.10" +#define IPOPT_VERSION "3.14.12" /* Major Version number of project */ #define IPOPT_VERSION_MAJOR 3 @@ -14,7 +14,7 @@ #define IPOPT_VERSION_MINOR 14 /* Release Version number of project */ -#define IPOPT_VERSION_RELEASE 10 +#define IPOPT_VERSION_RELEASE 12 /* Define to the C type corresponding to Fortran INTEGER * @deprecated Use ipindex instead. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Interfaces/IpStdCInterface.cpp new/Ipopt-releases-3.14.12/src/Interfaces/IpStdCInterface.cpp --- old/Ipopt-releases-3.14.10/src/Interfaces/IpStdCInterface.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Interfaces/IpStdCInterface.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -9,6 +9,7 @@ #include "IpOptionsList.hpp" #include "IpIpoptApplication.hpp" #include "IpBlas.hpp" +#include "IpSmartPtr.hpp" struct IpoptProblemInfo { @@ -60,6 +61,8 @@ IpoptProblem retval = new IpoptProblemInfo; + retval->tnlp = NULL; + retval->n = n; retval->x_L = new ipnumber[n]; Ipopt::IpBlasCopy(n, x_L, 1, retval->x_L, 1); @@ -299,6 +302,11 @@ ipnumber* lambda ) { + if( IsNull(ipopt_problem->tnlp) ) + { + return false; + } + return ipopt_problem->tnlp->get_curr_iterate(scaled, n, x, z_L, z_U, m, g, lambda); } @@ -316,5 +324,10 @@ ipnumber* compl_g ) { + if( IsNull(ipopt_problem->tnlp) ) + { + return false; + } + return ipopt_problem->tnlp->get_curr_violations(scaled != 0, n, x_L_violation, x_U_violation, compl_x_L, compl_x_U, grad_lag_x, m, nlp_constraint_violation, compl_g); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Interfaces/IpTNLP.cpp new/Ipopt-releases-3.14.12/src/Interfaces/IpTNLP.cpp --- old/Ipopt-releases-3.14.10/src/Interfaces/IpTNLP.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Interfaces/IpTNLP.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -930,10 +930,14 @@ { // orig_d_L is unscaled, but we need the scaled one below (because d is scaled) if( orignlp->NLP_scaling()->have_d_scaling() ) + { d_L = orignlp->NLP_scaling()->apply_vector_scaling_d_NonConst(d_L); + } } else // if no relaxation, then orig_d_L() returns NULL, use d_L instead + { d_L = orignlp->d_L(); + } if( d_L->Dim() > 0 ) { SmartPtr<Vector> tmp = d_L->MakeNewCopy(); @@ -961,10 +965,14 @@ { // orig_d_U is unscaled, but we need the scaled one below (because d is scaled) if( orignlp->NLP_scaling()->have_d_scaling() ) + { d_U = orignlp->NLP_scaling()->apply_vector_scaling_d_NonConst(d_U); + } } else // if no relaxation, then orig_d_U() returns NULL, use d_U instead + { d_U = orignlp->d_U(); + } if( d_U->Dim() > 0 ) { SmartPtr<Vector> tmp = d_U->MakeNewCopy(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/src/Makefile.am new/Ipopt-releases-3.14.12/src/Makefile.am --- old/Ipopt-releases-3.14.10/src/Makefile.am 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/src/Makefile.am 2023-04-05 11:18:06.000000000 +0200 @@ -10,6 +10,7 @@ Common/IpDebug.hpp \ Common/IpException.hpp \ Common/IpJournalist.hpp \ + Common/IpLibraryLoader.hpp \ Common/IpObserver.hpp \ Common/IpOptionsList.hpp \ Common/IpReferenced.hpp \ @@ -58,9 +59,15 @@ Algorithm/IpNLPScaling.hpp \ Algorithm/IpPDSystemSolver.hpp \ Algorithm/IpSearchDirCalculator.hpp \ + Algorithm/IpStdAugSystemSolver.hpp \ Algorithm/IpTimingStatistics.hpp \ - Algorithm/LinearSolvers/IpSymLinearSolver.hpp \ Algorithm/LinearSolvers/IpLinearSolvers.h \ + Algorithm/LinearSolvers/IpSlackBasedTSymScalingMethod.hpp \ + Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp \ + Algorithm/LinearSolvers/IpSymLinearSolver.hpp \ + Algorithm/LinearSolvers/IpTripletToCSRConverter.hpp \ + Algorithm/LinearSolvers/IpTSymLinearSolver.hpp \ + Algorithm/LinearSolvers/IpTSymScalingMethod.hpp \ Interfaces/IpAlgTypes.hpp \ Interfaces/IpIpoptApplication.hpp \ Interfaces/IpNLP.hpp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/test/emptynlp.cpp new/Ipopt-releases-3.14.12/test/emptynlp.cpp --- old/Ipopt-releases-3.14.10/test/emptynlp.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/test/emptynlp.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -22,13 +22,14 @@ * min sum_i x_i * s.t. x = 0 if not infeasbounds * 1 <= x <= 0 if infeasbounds - * sum_i x_i >= 0 if not infeascons + * sum_i x_i >= 0 if not infeascons and cons * sum_i x_i >= 1 if infeascons */ class EmptyNLP: public TNLP { private: int nvars; + bool cons; bool infeascons; bool infeasbounds; @@ -36,14 +37,17 @@ /** constructor */ EmptyNLP( int nvars_ = 0, + bool cons_ = true, bool infeascons_ = false, bool infeasbounds_ = false ) : nvars(nvars_), + cons(cons_), infeascons(infeascons_), infeasbounds(infeasbounds_) { assert(!infeasbounds || nvars > 0); + assert(!infeascons || cons); } /** destructor */ @@ -59,8 +63,8 @@ ) { n = nvars; - m = 1; - nnz_jac_g = n; + m = cons ? 1 : 0; + nnz_jac_g = cons ? n : 0; nnz_h_lag = 0; index_style = C_STYLE; @@ -83,9 +87,12 @@ x_u[i] = 0.0; } - assert(m == 1); - g_l[0] = infeascons ? 1.0 : 0.0; - g_u[0] = 1e300; + assert(m == (cons ? 1 : 0)); + if( cons ) + { + g_l[0] = infeascons ? 1.0 : 0.0; + g_u[0] = 1e300; + } return true; } @@ -157,6 +164,11 @@ Number* g ) { + if( !cons ) + { + return true; + } + assert(m == 1); g[0] = 0.0; @@ -183,9 +195,15 @@ Number* values ) { + assert(nele_jac == (cons ? n : 0)); + + if( !cons ) + { + return true; + } + assert((iRow != NULL) == (jCol != NULL)); assert((iRow != NULL) == (values == NULL)); - assert(nele_jac == n); if( iRow != NULL ) for( Index i = 0; i < n; ++i ) @@ -289,17 +307,19 @@ bool runEmpty( int nvars, + bool cons, bool infeascons, bool infeasbounds ) { std::cout << std::endl << "*** Solve for " << nvars << " variables, " + << (cons ? 1 : 0) << ' ' << (infeascons ? "infeasible" : "feasible") << " constraint, " << (infeasbounds ? "infeasible" : "feasible") << " bounds" << std::endl; // Create an instance of your nlp... - SmartPtr<TNLP> nlp = new EmptyNLP(nvars, infeascons, infeasbounds); + SmartPtr<TNLP> nlp = new EmptyNLP(nvars, cons, infeascons, infeasbounds); // Create an instance of the IpoptApplication SmartPtr<IpoptApplication> app = new IpoptApplication(); @@ -663,27 +683,32 @@ char** ) { - if( !runEmpty(0, false, false) ) + if( !runEmpty(0, false, false, false) ) + { + return EXIT_FAILURE; + } + + if( !runEmpty(0, true, false, false) ) { return EXIT_FAILURE; } - if( !runEmpty(5, false, false) ) + if( !runEmpty(5, true, false, false) ) { return EXIT_FAILURE; } - if( !runEmpty(0, true, false) ) + if( !runEmpty(0, true, true, false) ) { return EXIT_FAILURE; } - if( !runEmpty(5, true, false) ) + if( !runEmpty(5, true, true, false) ) { return EXIT_FAILURE; } - if( !runEmpty(5, false, true) ) + if( !runEmpty(5, true, false, true) ) { return EXIT_FAILURE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/Ipopt-releases-3.14.10/test/getcurr.cpp new/Ipopt-releases-3.14.12/test/getcurr.cpp --- old/Ipopt-releases-3.14.10/test/getcurr.cpp 2022-10-10 18:55:38.000000000 +0200 +++ new/Ipopt-releases-3.14.12/test/getcurr.cpp 2023-04-05 11:18:06.000000000 +0200 @@ -581,7 +581,7 @@ ) { printf("\nRun with fixedvar_makeconstr = %d, start_resto = %d, scale = %d, maximize = %d\n", - fixedvar_makeconstr, start_resto, scale, maximize); + fixedvar_makeconstr, start_resto, scale, maximize); // Create an instance of your nlp... SmartPtr<TNLP> nlp = new TestNLP(fixedvar_makeconstr, scale, maximize);
