Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package Ipopt for openSUSE:Factory checked 
in at 2022-07-06 15:42:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Ipopt (Old)
 and      /work/SRC/openSUSE:Factory/.Ipopt.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Ipopt"

Wed Jul  6 15:42:00 2022 rev:14 rq:986901 version:3.14.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/Ipopt/Ipopt.changes      2022-05-17 
17:25:17.335217498 +0200
+++ /work/SRC/openSUSE:Factory/.Ipopt.new.1548/Ipopt.changes    2022-07-06 
15:42:11.286533897 +0200
@@ -1,0 +2,12 @@
+Mon Jul  4 00:21:50 UTC 2022 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 3.14.7:
+  * Fixed that ComputeSensitivityMatrix() of sIpopt assumed that
+    there are no more than two parameters [gh#coin-or/Ipopt#578].
+  * For completeness_approximation to enable approximation of
+    gradient of objective function by finite differences. Do not
+    use. [gh#coin-or/Ipopt#573].
+  * Added function IPSETPROBLEMSCALING to Fortran interface to set
+    problem scaling [gh#coin-or/Ipopt#577].
+
+-------------------------------------------------------------------

Old:
----
  Ipopt-3.14.6.tar.gz

New:
----
  Ipopt-3.14.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Ipopt.spec ++++++
--- /var/tmp/diff_new_pack.ny4Zq2/_old  2022-07-06 15:42:11.742534568 +0200
+++ /var/tmp/diff_new_pack.ny4Zq2/_new  2022-07-06 15:42:11.746534574 +0200
@@ -19,7 +19,7 @@
 %define sover 3
 %define shlib libipopt%{sover}
 Name:           Ipopt
-Version:        3.14.6
+Version:        3.14.7
 Release:        0
 Summary:        A software package for large-scale nonlinear optimization 
methods
 License:        EPL-2.0

++++++ Ipopt-3.14.6.tar.gz -> Ipopt-3.14.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Ipopt-releases-3.14.6/ChangeLog.md 
new/Ipopt-releases-3.14.7/ChangeLog.md
--- old/Ipopt-releases-3.14.6/ChangeLog.md      2022-05-02 14:17:22.000000000 
+0200
+++ new/Ipopt-releases-3.14.7/ChangeLog.md      2022-06-24 11:28:47.000000000 
+0200
@@ -7,10 +7,19 @@
 
 ## 3.14
 
+### 3.14.7 (2022-06-24)
+
+- Fixed that ComputeSensitivityMatrix() of sIpopt assumed that there are
+  no more than two parameters [#578, by Andrea Vescovini].
+- For completeness, added option `gradient_approximation` to enable 
approximation
+  of gradient of objective function by finite differences. Do not use. [#573]
+- Added function `IPSETPROBLEMSCALING` to Fortran interface to set problem
+  scaling [#577, by Steven R. Hall]
+
 ### 3.14.6 (2022-05-02)
 
 - Fixed mapping of meta data for inequalities, e.g., constraint names,
-  from TNLP to Ipopts internal NLP [#570, by Daniel Dias].
+  from TNLP to Ipopts internal NLP [#570, by Daniel Oliveira].
 - Fixed that MC68 ordering time was not accounted in symbolic factorization
   time of HSL MA86 [#571].
 - Include more header files in IpIpoptCalculatedQuantities.hpp for setups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Ipopt-releases-3.14.6/configure 
new/Ipopt-releases-3.14.7/configure
--- old/Ipopt-releases-3.14.6/configure 2022-05-02 14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/configure 2022-06-24 11:28:47.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for Ipopt 3.14.6.
+# Generated by GNU Autoconf 2.71 for Ipopt 3.14.7.
 #
 # Report bugs to <https://github.com/coin-or/Ipopt/issues/new>.
 #
@@ -627,8 +627,8 @@
 # Identity of this package.
 PACKAGE_NAME='Ipopt'
 PACKAGE_TARNAME='ipopt'
-PACKAGE_VERSION='3.14.6'
-PACKAGE_STRING='Ipopt 3.14.6'
+PACKAGE_VERSION='3.14.7'
+PACKAGE_STRING='Ipopt 3.14.7'
 PACKAGE_BUGREPORT='https://github.com/coin-or/Ipopt/issues/new'
 PACKAGE_URL='https://github.com/coin-or/Ipopt'
 
@@ -1495,7 +1495,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Ipopt 3.14.6 to adapt to many kinds of systems.
+\`configure' configures Ipopt 3.14.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1566,7 +1566,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Ipopt 3.14.6:";;
+     short | recursive ) echo "Configuration of Ipopt 3.14.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1769,7 +1769,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Ipopt configure 3.14.6
+Ipopt configure 3.14.7
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2654,7 +2654,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Ipopt $as_me 3.14.6, which was
+It was created by Ipopt $as_me 3.14.7, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -4275,7 +4275,7 @@
 
 
 
-printf "%s\n" "#define IPOPT_VERSION \"3.14.6\"" >>confdefs.h
+printf "%s\n" "#define IPOPT_VERSION \"3.14.7\"" >>confdefs.h
 
 
 printf "%s\n" "#define IPOPT_VERSION_MAJOR 3" >>confdefs.h
@@ -4284,7 +4284,7 @@
 printf "%s\n" "#define IPOPT_VERSION_MINOR 14" >>confdefs.h
 
 
-printf "%s\n" "#define IPOPT_VERSION_RELEASE 6" >>confdefs.h
+printf "%s\n" "#define IPOPT_VERSION_RELEASE 7" >>confdefs.h
 
 
 
@@ -4395,7 +4395,7 @@
 
 # Define the identity of the package.
  PACKAGE='ipopt'
- VERSION='3.14.6'
+ VERSION='3.14.7'
 
 
 # Some tools Automake needs.
@@ -22144,9 +22144,9 @@
 
 
 
-  LT_LDFLAGS="$LT_LDFLAGS -version-number 3:14:6"
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libtool version info: 
-version-number 3:14:6" >&5
-printf "%s\n" "$as_me: libtool version info: -version-number 3:14:6" >&6;}
+  LT_LDFLAGS="$LT_LDFLAGS -version-number 3:14:7"
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libtool version info: 
-version-number 3:14:7" >&5
+printf "%s\n" "$as_me: libtool version info: -version-number 3:14:7" >&6;}
 
 
   LT_LDFLAGS="$LT_LDFLAGS -no-undefined"
@@ -27827,7 +27827,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Ipopt $as_me 3.14.6, which was
+This file was extended by Ipopt $as_me 3.14.7, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27900,7 +27900,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-Ipopt config.status 3.14.6
+Ipopt config.status 3.14.7
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Ipopt-releases-3.14.6/configure.ac 
new/Ipopt-releases-3.14.7/configure.ac
--- old/Ipopt-releases-3.14.6/configure.ac      2022-05-02 14:17:22.000000000 
+0200
+++ new/Ipopt-releases-3.14.7/configure.ac      2022-06-24 11:28:47.000000000 
+0200
@@ -8,7 +8,7 @@
 #                       Names and other basic things                        #
 #############################################################################
 
-AC_INIT([Ipopt],[3.14.6],[https://github.com/coin-or/Ipopt/issues/new],[],[https://github.com/coin-or/Ipopt])
+AC_INIT([Ipopt],[3.14.7],[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' 
old/Ipopt-releases-3.14.6/contrib/sIPOPT/examples/parametric_dsdp_cpp/parametricTNLP2.cpp
 
new/Ipopt-releases-3.14.7/contrib/sIPOPT/examples/parametric_dsdp_cpp/parametricTNLP2.cpp
--- 
old/Ipopt-releases-3.14.6/contrib/sIPOPT/examples/parametric_dsdp_cpp/parametricTNLP2.cpp
   2022-05-02 14:17:22.000000000 +0200
+++ 
new/Ipopt-releases-3.14.7/contrib/sIPOPT/examples/parametric_dsdp_cpp/parametricTNLP2.cpp
   1970-01-01 01:00:00.000000000 +0100
@@ -1,397 +0,0 @@
-// Copyright 2010, 2011 Hans Pirnay
-// All Rights Reserved.
-// This code is published under the Eclipse Public License.
-//
-// Date   : 2010-30-04
-
-#include "parametricTNLP.hpp"
-#include "IpDenseVector.hpp"
-#include "IpIpoptData.hpp"
-#include <stdio.h>
-
-using namespace Ipopt;
-
-/* Constructor */
-ParametricTNLP::ParametricTNLP()
-   : nominal_eta1_(5.0),
-     nominal_eta2_(1.0),
-     eta_1_perturbed_value_(4.5),
-     eta_2_perturbed_value_(1.0)
-{ }
-
-ParametricTNLP::~ParametricTNLP()
-{ }
-
-bool ParametricTNLP::get_nlp_info(
-   Index&          n,
-   Index&          m,
-   Index&          nnz_jac_g,
-   Index&          nnz_h_lag,
-   IndexStyleEnum& index_style
-)
-{
-   // x1, x2, x3, eta1, eta2
-   n = 5;
-
-   // 2 constraints + 2 parametric initial value constraints
-   m = 4; //+2;
-
-   nnz_jac_g = 10; //+2;
-
-   nnz_h_lag = 5;
-
-   index_style = FORTRAN_STYLE;
-
-   return true;
-}
-
-bool ParametricTNLP::get_bounds_info(
-   Index   /*n*/,
-   Number* x_l,
-   Number* x_u,
-   Index   /*m*/,
-   Number* g_l,
-   Number* g_u
-)
-{
-   for( Index k = 0; k < 3; ++k )
-   {
-      x_l[k] = 0.0;
-      x_u[k] = 1.0e19;
-   }
-   x_l[3] = -1.0e19;
-   x_u[3] = 1.0e19;
-   x_l[4] = -1.0e19;
-   x_u[4] = 1.0e19;
-
-   g_l[0] = 0.0;
-   g_u[0] = 0.0;
-   g_l[1] = 0.0;
-   g_u[1] = 0.0;
-
-   // initial value constraints
-   g_l[2] = nominal_eta1_;
-   g_u[2] = nominal_eta1_;
-   g_l[3] = nominal_eta2_;
-   g_u[3] = nominal_eta2_;
-
-   /*
-    g_l[4] = 0.0 ;
-    g_u[4] = 100.0 ;
-
-    g_l[5] = -100.0 ;
-    g_u[5] = 0.0 ;
-    */
-
-   return true;
-}
-
-bool ParametricTNLP::get_starting_point(
-   Index   /*n*/,
-   bool    /*init_x*/,
-   Number* x,
-   bool    /*init_z*/,
-   Number* /*z_L*/,
-   Number* /*z_U*/,
-   Index   /*m*/,
-   bool    /*init_lambda*/,
-   Number* /*lambda*/
-)
-{
-   x[0] = 0.15;
-   x[1] = 0.15;
-   x[2] = 0.0;
-   x[3] = 0.0;
-   x[4] = 0.0;
-
-   return true;
-}
-
-bool ParametricTNLP::eval_f(
-   Index         /*n*/,
-   const Number* x,
-   bool          /*new_x*/,
-   Number&       obj_value
-)
-{
-   obj_value = 0;
-   for( Index k = 0; k < 3; ++k )
-   {
-      obj_value += x[k] * x[k];
-   }
-   return true;
-}
-
-bool ParametricTNLP::eval_grad_f(
-   Index         /*n*/,
-   const Number* x,
-   bool          /*new_x*/,
-   Number*       grad_f
-)
-{
-   grad_f[0] = 2 * x[0];
-   grad_f[1] = 2 * x[1];
-   grad_f[2] = 2 * x[2];
-   grad_f[3] = 0.0;
-   grad_f[4] = 0.0;
-   return true;
-}
-
-bool ParametricTNLP::eval_g(
-   Index         /*n*/,
-   const Number* x,
-   bool          /*new_x*/,
-   Index         /*m*/,
-   Number*       g
-)
-{
-   Number x1, x2, x3, eta1, eta2;
-   x1 = x[0];
-   x2 = x[1];
-   x3 = x[2];
-   eta1 = x[3];
-   eta2 = x[4];
-   g[0] = 6 * x1 + 3 * x2 + 2 * x3 - eta1;
-   g[1] = eta2 * x1 + x2 - x3 - 1;
-   g[2] = eta1;
-   g[3] = eta2;
-
-   /*
-    g[4] = x1 + 10 ;
-    g[5] = -100 + x2 ;
-    */
-
-   return true;
-}
-
-bool ParametricTNLP::eval_jac_g(
-   Index         /*n*/,
-   const Number* x,
-   bool          /*new_x*/,
-   Index         /*m*/,
-   Index         /*nele_jac*/,
-   Index*        iRow,
-   Index*        jCol,
-   Number*       values
-)
-{
-   if( values == NULL )
-   {
-      iRow[0] = 1; // dg1/dx1
-      jCol[0] = 1;
-      iRow[1] = 1; // dg1/dx2
-      jCol[1] = 2;
-      iRow[2] = 1; // dg1/dx3
-      jCol[2] = 3;
-      iRow[3] = 1; // dg1/deta1
-      jCol[3] = 4;
-      iRow[4] = 2; // dg2/dx1
-      jCol[4] = 1;
-      iRow[5] = 2; // dg2/dx2
-      jCol[5] = 2;
-      iRow[6] = 2; // dg2/dx3
-      jCol[6] = 3;
-      iRow[7] = 2; // dg2/deta2
-      jCol[7] = 5;
-      iRow[8] = 3;
-      jCol[8] = 4;
-      iRow[9] = 4;
-      jCol[9] = 5;
-      /*
-       iRow[10] = 5;
-       jCol[10] = 1;
-       iRow[11] = 6;
-       jCol[11] = 2;
-       */
-   }
-   else
-   {
-      values[0] = 6.0;
-      values[1] = 3.0;
-      values[2] = 2.0;
-      values[3] = -1.0;
-      values[4] = x[4];
-      values[5] = 1.0;
-      values[6] = -1.0;
-      values[7] = x[0];
-      values[8] = 1.0;
-      values[9] = 1.0;
-      /*
-       values[10] = 1.0 ;
-       values[11] = 1.0 ;
-       */
-   }
-   return true;
-}
-
-bool ParametricTNLP::eval_h(
-   Index         /*n*/,
-   const Number* /*x*/,
-   bool          /*new_x*/,
-   Number        obj_factor,
-   Index         /*m*/,
-   const Number* lambda,
-   bool          /*new_lambda*/,
-   Index         /*nele_hess*/,
-   Index*        iRow,
-   Index*        jCol,
-   Number*       values
-)
-{
-   if( values == NULL )
-   {
-      iRow[0] = 1;
-      jCol[0] = 1;
-
-      iRow[1] = 2;
-      jCol[1] = 2;
-
-      iRow[2] = 3;
-      jCol[2] = 3;
-
-      iRow[3] = 1;
-      jCol[3] = 5;
-
-      iRow[4] = 5;
-      jCol[4] = 1;
-   }
-   else
-   {
-      values[0] = 2.0 * obj_factor;
-      values[1] = 2.0 * obj_factor;
-      values[2] = 2.0 * obj_factor;
-      values[3] = 0.5 * lambda[1];
-      values[4] = 0.5 * lambda[1];
-   }
-   return true;
-}
-
-bool ParametricTNLP::get_var_con_metadata(
-   Index                   n,
-   StringMetaDataMapType&  /*var_string_md*/,
-   IntegerMetaDataMapType& var_integer_md,
-   NumericMetaDataMapType& var_numeric_md,
-   Index                   m,
-   StringMetaDataMapType&  /*con_string_md*/,
-   IntegerMetaDataMapType& con_integer_md,
-   NumericMetaDataMapType& /*con_numeric_md*/
-)
-{
-   /* In this function, the indices for the parametric computations are set.
-    * To keep track of the parameters, each parameter gets an index from 1 to 
n_parameters.
-    * In this case, [1] eta_1, [2] eta_2.
-    * The following metadata vectors are important:
-    */
-
-   /* 1. sens_init_constr: in this list, the constraints that set the initial
-    *    values for the parameters are indicated.
-    *    For parameter 1 (eta_1) this is constraint 3 (e.g. C++ index 2), 
which is
-    *    the constraint   eta_1 = eta_1_nominal;
-    *    For parameter 2 (eta_2) this is constraint 4 (e.g. C++ index 3).
-    */
-   std::vector<Index> sens_init_constr(m, 0);
-   sens_init_constr[2] = 1;
-   sens_init_constr[3] = 2;
-   con_integer_md["sens_init_constr"] = sens_init_constr;
-
-   /* 2. sens_state_1: in this index list, the parameters are indicated:
-    *    Here: [1] eta_1, [2] eta_2
-    */
-   std::vector<Index> sens_state_1(n, 0);
-   sens_state_1[3] = 1;
-   sens_state_1[4] = 2;
-   var_integer_md["sens_state_1"] = sens_state_1;
-
-   /* 3. sens_state_values_1: In this list of Numbers (=doubles), the perturbed
-    *    values for the parameters are set.
-    */
-   std::vector<Number> sens_state_value_1(n, 0);
-   sens_state_value_1[3] = eta_1_perturbed_value_;
-   sens_state_value_1[4] = eta_2_perturbed_value_;
-   var_numeric_md["sens_state_value_1"] = sens_state_value_1;
-
-   return true;
-}
-
-void ParametricTNLP::finalize_solution(
-   SolverReturn               /*status*/,
-   Index                      /*n*/,
-   const Number*              x,
-   const Number*              /*z_L*/,
-   const Number*              /*z_U*/,
-   Index                      m,
-   const Number*              /*g*/,
-   const Number*              lambda,
-   Number                     /*obj_value*/,
-   const IpoptData*           ip_data,
-   IpoptCalculatedQuantities* /*ip_cq*/
-)
-{
-   // Check whether sIPOPT Algorithm aborted internally
-   //  bool sens_internal_abort;
-   //options_->GetBoolValue("sens_internal_abort", sens_internal_abort, "");
-
-   // Get access to the metadata, where the solutions are stored. The metadata 
is part of the DenseVectorSpace.
-   SmartPtr<const DenseVectorSpace> x_owner_space = dynamic_cast<const 
DenseVectorSpace*>(GetRawPtr(
-            ip_data->curr()->x()->OwnerSpace()));
-
-   if( !IsValid(x_owner_space) )
-   {
-      printf("Error IsValid(x_owner_space) failed\n");
-      return;
-   }
-   std::string state;
-   std::vector<Number> sens_sol_vec;
-   state = "sens_sol_state_1";
-   sens_sol_vec = x_owner_space->GetNumericMetaData(state.c_str());
-
-   // Print the solution vector
-   printf("\n"
-          "                Nominal                    Perturbed\n");
-   for( Index k = 0; k < (Index) sens_sol_vec.size(); ++k )
-   {
-      printf("x[%3d]   % .23f   % .23f\n", k, x[k], sens_sol_vec[k]);
-   }
-
-   printf("\n**********\n");
-   for( Index k = 0; k < m; ++k )
-   {
-      printf("lambda[%3d] (nom)  % .23f \n", k, lambda[k]);
-   }
-
-}
-
-void ParametricTNLP::finalize_metadata(
-   Index                         n,
-   const StringMetaDataMapType&  /*var_string_md*/,
-   const IntegerMetaDataMapType& /*var_integer_md*/,
-   const NumericMetaDataMapType& var_numeric_md,
-   Index                         m,
-   const StringMetaDataMapType&  /*con_string_md*/,
-   const IntegerMetaDataMapType& /*con_integer_md*/,
-   const NumericMetaDataMapType& con_numeric_md
-)
-{
-   // bound multipliers for lower and upper bounds
-   printf("\nDual bound multipliers:\n");
-   NumericMetaDataMapType::const_iterator z_L_solution = 
var_numeric_md.find("sens_sol_state_1_z_L");
-   NumericMetaDataMapType::const_iterator z_U_solution = 
var_numeric_md.find("sens_sol_state_1_z_U");
-   if( z_L_solution != var_numeric_md.end() && z_U_solution != 
var_numeric_md.end() )
-   {
-      for( Index k = 0; k < n; ++k )
-      {
-         printf("z_L[%d] = %f      z_U[%d] = %f\n", (int)k, 
z_L_solution->second[k], (int)k, z_U_solution->second[k]);
-      }
-   }
-
-   // constraint mutlipliers
-   printf("\nConstraint multipliers:\n");
-   NumericMetaDataMapType::const_iterator lambda_solution = 
con_numeric_md.find("sens_sol_state_1");
-   if( lambda_solution != con_numeric_md.end() )
-   {
-      for( Index k = 0; k < m; ++k )
-      {
-         printf("lambda[%d] (upd) = %.14g\n", (int)k, 
lambda_solution->second[k]);
-      }
-   }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/contrib/sIPOPT/src/SensAlgorithm.cpp 
new/Ipopt-releases-3.14.7/contrib/sIPOPT/src/SensAlgorithm.cpp
--- old/Ipopt-releases-3.14.6/contrib/sIPOPT/src/SensAlgorithm.cpp      
2022-05-02 14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/contrib/sIPOPT/src/SensAlgorithm.cpp      
2022-06-24 11:28:47.000000000 +0200
@@ -207,7 +207,7 @@
    SmartPtr < IteratesVector > trialcopy;
 
    SmartPtr < DenseVectorSpace > delta_u_space;
-   delta_u_space = new DenseVectorSpace(2);
+   delta_u_space = new DenseVectorSpace(np_);
 
    SmartPtr < DenseVector > delta_u = new 
DenseVector(GetRawPtr(ConstPtr(delta_u_space)));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Ipopt-releases-3.14.6/doc/options.dox 
new/Ipopt-releases-3.14.7/doc/options.dox
--- old/Ipopt-releases-3.14.6/doc/options.dox   2022-05-02 14:17:22.000000000 
+0200
+++ new/Ipopt-releases-3.14.7/doc/options.dox   2022-06-24 11:28:47.000000000 
+0200
@@ -319,6 +319,32 @@
  When the Hessian is approximated, it is assumed that the first 
num_linear_variables variables are linear. The Hessian is then not approximated 
in this space. If the get_number_of_nonlinear_variables method in the TNLP is 
implemented, this option is ignored. The valid range for this integer option is 
0 &le; num_linear_variables and its default value is 0.
 </blockquote>
 
+\anchor OPT_jacobian_approximation
+<strong>jacobian_approximation</strong> (<em>advanced</em>): Specifies 
technique to compute constraint Jacobian
+<blockquote>
+ The default value for this string option is "exact".
+
+Possible values:
+ - exact: user-provided derivatives
+ - finite-difference-values: user-provided structure, values by finite 
differences
+</blockquote>
+
+\anchor OPT_gradient_approximation
+<strong>gradient_approximation</strong> (<em>advanced</em>): Specifies 
technique to compute objective Gradient
+<blockquote>
+ The default value for this string option is "exact".
+
+Possible values:
+ - exact: user-provided gradient
+ - finite-difference-values: values by finite differences
+</blockquote>
+
+\anchor OPT_findiff_perturbation
+<strong>findiff_perturbation</strong> (<em>advanced</em>): Size of the finite 
difference perturbation for derivative approximation.
+<blockquote>
+ This determines the relative perturbation of the variable entries. The valid 
range for this real option is 0 < findiff_perturbation and its default value is 
10<sup>-07</sup>.
+</blockquote>
+
 \anchor OPT_kappa_d
 <strong>kappa_d</strong> (<em>advanced</em>): Weight for linear damping term 
(to handle one-sided bounds).
 <blockquote>
@@ -1483,22 +1509,6 @@
 Possible values: yes, no
 </blockquote>
 
-\anchor OPT_jacobian_approximation
-<strong>jacobian_approximation</strong> (<em>advanced</em>): Specifies 
technique to compute constraint Jacobian
-<blockquote>
- The default value for this string option is "exact".
-
-Possible values:
- - exact: user-provided derivatives
- - finite-difference-values: user-provided structure, values by finite 
differences
-</blockquote>
-
-\anchor OPT_findiff_perturbation
-<strong>findiff_perturbation</strong> (<em>advanced</em>): Size of the finite 
difference perturbation for derivative approximation.
-<blockquote>
- This determines the relative perturbation of the variable entries. The valid 
range for this real option is 0 < findiff_perturbation and its default value is 
10<sup>-07</sup>.
-</blockquote>
-
 \anchor OPT_point_perturbation_radius
 <strong>point_perturbation_radius</strong>: Maximal perturbation of an 
evaluation point.
 <blockquote>
@@ -1511,31 +1521,31 @@
 \anchor OPT_ma27_pivtol
 <strong>ma27_pivtol</strong>: Pivot tolerance for the linear solver MA27.
 <blockquote>
- A smaller number pivots for sparsity, a larger number pivots for stability. 
This option is only available if Ipopt has been compiled with MA27. The valid 
range for this real option is 0 < ma27_pivtol < 1 and its default value is 
10<sup>-08</sup>.
+ A smaller number pivots for sparsity, a larger number pivots for stability. 
The valid range for this real option is 0 < ma27_pivtol < 1 and its default 
value is 10<sup>-08</sup>.
 </blockquote>
 
 \anchor OPT_ma27_pivtolmax
 <strong>ma27_pivtolmax</strong>: Maximum pivot tolerance for the linear solver 
MA27.
 <blockquote>
- Ipopt may increase pivtol as high as pivtolmax to get a more accurate 
solution to the linear system. This option is only available if Ipopt has been 
compiled with MA27. The valid range for this real option is 0 < ma27_pivtolmax 
< 1 and its default value is 0.0001.
+ Ipopt may increase pivtol as high as ma27_pivtolmax to get a more accurate 
solution to the linear system. The valid range for this real option is 0 < 
ma27_pivtolmax < 1 and its default value is 0.0001.
 </blockquote>
 
 \anchor OPT_ma27_liw_init_factor
 <strong>ma27_liw_init_factor</strong>: Integer workspace memory for MA27.
 <blockquote>
- The initial integer workspace memory = liw_init_factor * memory required by 
unfactored system. Ipopt will increase the workspace size by meminc_factor if 
required. This option is only available if Ipopt has been compiled with MA27. 
The valid range for this real option is 1 &le; ma27_liw_init_factor and its 
default value is 5.
+ The initial integer workspace memory = liw_init_factor * memory required by 
unfactored system. Ipopt will increase the workspace size by ma27_meminc_factor 
if required. The valid range for this real option is 1 &le; 
ma27_liw_init_factor and its default value is 5.
 </blockquote>
 
 \anchor OPT_ma27_la_init_factor
 <strong>ma27_la_init_factor</strong>: Real workspace memory for MA27.
 <blockquote>
- The initial real workspace memory = la_init_factor * memory required by 
unfactored system. Ipopt will increase the workspace size by meminc_factor if 
required. This option is only available if Ipopt has been compiled with MA27. 
The valid range for this real option is 1 &le; ma27_la_init_factor and its 
default value is 5.
+ The initial real workspace memory = la_init_factor * memory required by 
unfactored system. Ipopt will increase the workspace size by ma27_meminc_factor 
if required. The valid range for this real option is 1 &le; ma27_la_init_factor 
and its default value is 5.
 </blockquote>
 
 \anchor OPT_ma27_meminc_factor
 <strong>ma27_meminc_factor</strong>: Increment factor for workspace size for 
MA27.
 <blockquote>
- If the integer or real workspace is not large enough, Ipopt will increase its 
size by this factor. This option is only available if Ipopt has been compiled 
with MA27. The valid range for this real option is 1 &le; ma27_meminc_factor 
and its default value is 2.
+ If the integer or real workspace is not large enough, Ipopt will increase its 
size by this factor. The valid range for this real option is 1 &le; 
ma27_meminc_factor and its default value is 2.
 </blockquote>
 
 \anchor OPT_ma27_skip_inertia_check
@@ -1560,19 +1570,19 @@
 \anchor OPT_ma57_pivtol
 <strong>ma57_pivtol</strong>: Pivot tolerance for the linear solver MA57.
 <blockquote>
- A smaller number pivots for sparsity, a larger number pivots for stability. 
This option is only available if Ipopt has been compiled with MA57. The valid 
range for this real option is 0 < ma57_pivtol < 1 and its default value is 
10<sup>-08</sup>.
+ A smaller number pivots for sparsity, a larger number pivots for stability. 
The valid range for this real option is 0 < ma57_pivtol < 1 and its default 
value is 10<sup>-08</sup>.
 </blockquote>
 
 \anchor OPT_ma57_pivtolmax
 <strong>ma57_pivtolmax</strong>: Maximum pivot tolerance for the linear solver 
MA57.
 <blockquote>
- Ipopt may increase pivtol as high as ma57_pivtolmax to get a more accurate 
solution to the linear system. This option is only available if Ipopt has been 
compiled with MA57. The valid range for this real option is 0 < ma57_pivtolmax 
< 1 and its default value is 0.0001.
+ Ipopt may increase pivtol as high as ma57_pivtolmax to get a more accurate 
solution to the linear system. The valid range for this real option is 0 < 
ma57_pivtolmax < 1 and its default value is 0.0001.
 </blockquote>
 
 \anchor OPT_ma57_pre_alloc
 <strong>ma57_pre_alloc</strong>: Safety factor for work space memory 
allocation for the linear solver MA57.
 <blockquote>
- If 1 is chosen, the suggested amount of work space is used. However, choosing 
a larger number might avoid reallocation if the suggest values do not suffice. 
This option is only available if Ipopt has been compiled with MA57. The valid 
range for this real option is 1 &le; ma57_pre_alloc and its default value is 
1.05.
+ If 1 is chosen, the suggested amount of work space is used. However, choosing 
a larger number might avoid reallocation if the suggest values do not suffice. 
The valid range for this real option is 1 &le; ma57_pre_alloc and its default 
value is 1.05.
 </blockquote>
 
 \anchor OPT_ma57_pivot_order
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Ipopt-releases-3.14.6/examples/hs071_f/hs071_f.f.in 
new/Ipopt-releases-3.14.7/examples/hs071_f/hs071_f.f.in
--- old/Ipopt-releases-3.14.6/examples/hs071_f/hs071_f.f.in     2022-05-02 
14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/examples/hs071_f/hs071_f.f.in     2022-06-24 
11:28:47.000000000 +0200
@@ -50,10 +50,19 @@
 C
       double precision X(N)
 C
-C     Vector of lower and upper bounds
+C     Vector of lower and upper bounds, left and right hand sides, and scaling
+C
+      double precision X_L(N), X_U(N), X_SCALING(N), Z_L(N), Z_U(N)
+      double precision G_L(M), G_U(M), G_SCALING(M)
+
+C     To indicate to IPSETPROBLEMSCALING below that scaling for constraints
+C     should be omitted, a NULL pointer can be passed for G_SCALING. With
+C     Fortran > 77, this is done by removing the declaration of G_SCALING
+C     from the line above and the data G_SCALING line below and enabling
+C     the following line instead:
+C
+C     double precision, allocatable, dimension(:) :: G_SCALING
 C
-      double precision X_L(N), X_U(N), Z_L(N), Z_U(N)
-      double precision G_L(M), G_U(M)
 C
 C     Private data for evaluation routines
 C     This could be used to pass double precision and integer arrays untouched
@@ -72,8 +81,8 @@
 @BIT64FCOMMENT@      integer*8 IPCREATE
 C
       integer IERR
-      integer IPSOLVE, IPADDSTROPTION
-      integer IPADDNUMOPTION, IPADDINTOPTION
+      integer IPSOLVE, IPSETPROBLEMSCALING
+      integer IPADDSTROPTION, IPADDNUMOPTION, IPADDINTOPTION
       integer IPOPENOUTPUTFILE
 C
       double precision F
@@ -90,16 +99,18 @@
 CC
       external ITER_CB
 C
-C     Set initial point and bounds:
+C     Set initial point, bounds, and scaling:
 C
-      data X   / 1d0, 5d0, 5d0, 1d0/
+      data X   / 1d0, 5d0, 5d0, 1d0 /
       data X_L / 1d0, 1d0, 1d0, 1d0 /
       data X_U / 5d0, 5d0, 5d0, 5d0 /
+      data X_SCALING / 1d0, 1d0, 1d0, 1d0 /
 C
-C     Set bounds for the constraints
+C     Set bounds and scaling for the constraints
 C
       data G_L / 25d0, 40d0 /
       data G_U / 1d40, 40d0 /
+      data G_SCALING / 1d0, 1d0 /
 C
 C     First create a handle for the Ipopt problem (and read the options
 C     file)
@@ -137,6 +148,12 @@
       IERR = IPADDNUMOPTION(IPROBLEM, 'tol', 1.d-7)
       if (IERR.ne.0 ) goto 9990
 
+C
+C     Set scaling
+C
+      IERR = IPSETPROBLEMSCALING(IPROBLEM, 1d0, X_SCALING, G_SCALING)
+      if (IERR.ne.0 ) goto 9990
+
 CC
 CC     Set a callback function to give you control once per iteration.
 CC     You can use it if you want to generate some output, or to stop
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
 
new/Ipopt-releases-3.14.7/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
--- 
old/Ipopt-releases-3.14.6/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
    2022-05-02 14:17:22.000000000 +0200
+++ 
new/Ipopt-releases-3.14.7/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
    2022-06-24 11:28:47.000000000 +0200
@@ -75,7 +75,9 @@
    int mpi_finalized;
    MPI_Finalized(&mpi_finalized);
    if(!mpi_finalized)
+   {
       MPI_Finalize();
+   }
 }
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/src/Common/config_ipopt_default.h 
new/Ipopt-releases-3.14.7/src/Common/config_ipopt_default.h
--- old/Ipopt-releases-3.14.6/src/Common/config_ipopt_default.h 2022-05-02 
14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/src/Common/config_ipopt_default.h 2022-06-24 
11:28:47.000000000 +0200
@@ -5,7 +5,7 @@
 /***************************************************************************/
 
 /* Version number of project */
-#define IPOPT_VERSION "3.14.6"
+#define IPOPT_VERSION "3.14.7"
 
 /* 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 6
+#define IPOPT_VERSION_RELEASE 7
 
 /* Define to the C type corresponding to Fortran INTEGER
  * @deprecated Use ipindex instead.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/src/Interfaces/IpStdFInterface.c 
new/Ipopt-releases-3.14.7/src/Interfaces/IpStdFInterface.c
--- old/Ipopt-releases-3.14.6/src/Interfaces/IpStdFInterface.c  2022-05-02 
14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/src/Interfaces/IpStdFInterface.c  2022-06-24 
11:28:47.000000000 +0200
@@ -582,3 +582,15 @@
                                     *get_compl ? COMPL_G : NULL)
           ? OKRetVal : NotOKRetVal;
 }
+
+/// @since 3.14.7
+IPOPTLIB_EXPORT ipindex F77_FUNC(ipsetproblemscaling, IPSETPROBLEMSCALING)(
+    fptr*      FProblem,
+    ipnumber*  obj_scaling,
+    ipnumber*  X_SCALING,
+    ipnumber*  G_SCALING
+)
+{
+    FUserData* fuser_data = (FUserData*) *FProblem;
+    return SetIpoptProblemScaling(fuser_data->Problem, *obj_scaling, 
X_SCALING, G_SCALING) ? OKRetVal : NotOKRetVal;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/src/Interfaces/IpTNLPAdapter.cpp 
new/Ipopt-releases-3.14.7/src/Interfaces/IpTNLPAdapter.cpp
--- old/Ipopt-releases-3.14.6/src/Interfaces/IpTNLPAdapter.cpp  2022-05-02 
14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/src/Interfaces/IpTNLPAdapter.cpp  2022-06-24 
11:28:47.000000000 +0200
@@ -150,6 +150,29 @@
       "The Hessian is then not approximated in this space. "
       "If the get_number_of_nonlinear_variables method in the TNLP is 
implemented, this option is ignored.",
       true);
+   roptions->AddStringOption2(
+      "jacobian_approximation",
+      "Specifies technique to compute constraint Jacobian",
+      "exact",
+      "exact", "user-provided derivatives",
+      "finite-difference-values", "user-provided structure, values by finite 
differences",
+      "",
+      true);
+   roptions->AddStringOption2(
+      "gradient_approximation",
+      "Specifies technique to compute objective Gradient",
+      "exact",
+      "exact", "user-provided gradient",
+      "finite-difference-values", "values by finite differences",
+      "",
+      true);
+   roptions->AddLowerBoundedNumberOption(
+      "findiff_perturbation",
+      "Size of the finite difference perturbation for derivative 
approximation.",
+      0., true,
+      1e-7,
+      "This determines the relative perturbation of the variable entries.",
+      true);
 
    roptions->SetRegisteringCategory("Derivative Checker");
    roptions->AddStringOption4(
@@ -189,21 +212,6 @@
       "Indicates whether information for all estimated derivatives should be 
printed.",
       false,
       "Determines verbosity of derivative checker.");
-   roptions->AddStringOption2(
-      "jacobian_approximation",
-      "Specifies technique to compute constraint Jacobian",
-      "exact",
-      "exact", "user-provided derivatives",
-      "finite-difference-values", "user-provided structure, values by finite 
differences",
-      "",
-      true);
-   roptions->AddLowerBoundedNumberOption(
-      "findiff_perturbation",
-      "Size of the finite difference perturbation for derivative 
approximation.",
-      0., true,
-      1e-7,
-      "This determines the relative perturbation of the variable entries.",
-      true);
    roptions->AddLowerBoundedNumberOption(
       "point_perturbation_radius",
       "Maximal perturbation of an evaluation point.",
@@ -247,6 +255,8 @@
 
    options.GetEnumValue("jacobian_approximation", enum_int, prefix);
    jacobian_approximation_ = JacobianApproxEnum(enum_int);
+   options.GetEnumValue("gradient_approximation", enum_int, prefix);
+   gradient_approximation_ = GradientApproxEnum(enum_int);
    options.GetNumericValue("findiff_perturbation", findiff_perturbation_, 
prefix);
 
    options.GetNumericValue("point_perturbation_radius", 
point_perturbation_radius_, prefix);
@@ -1465,7 +1475,7 @@
    }
 
    // In case we are doing finite differences, keep a copy of the bounds
-   if( jacobian_approximation_ != JAC_EXACT )
+   if( jacobian_approximation_ != JAC_EXACT || gradient_approximation_ != 
OBJGRAD_EXACT )
    {
       delete[] findiff_x_l_;
       delete[] findiff_x_u_;
@@ -1670,23 +1680,73 @@
    DenseVector* dg_f = static_cast<DenseVector*>(&g_f);
    DBG_ASSERT(dynamic_cast<DenseVector*>(&g_f));
    Number* values = dg_f->Values();
-   if( IsValid(P_x_full_x_) )
+
+   if( gradient_approximation_ == OBJGRAD_EXACT )
    {
-      Number* full_grad_f = new Number[n_full_x_];
-      if( tnlp_->eval_grad_f(n_full_x_, full_x_, new_x, full_grad_f) )
+      if( IsValid(P_x_full_x_) )
       {
-         const Index* x_pos = P_x_full_x_->ExpandedPosIndices();
-         for( Index i = 0; i < g_f.Dim(); i++ )
+         Number* full_grad_f = new Number[n_full_x_];
+         if( tnlp_->eval_grad_f(n_full_x_, full_x_, new_x, full_grad_f) )
          {
-            values[i] = full_grad_f[x_pos[i]];
+            const Index* x_pos = P_x_full_x_->ExpandedPosIndices();
+            for( Index i = 0; i < g_f.Dim(); i++ )
+            {
+               values[i] = full_grad_f[x_pos[i]];
+            }
+            retvalue = true;
          }
-         retvalue = true;
+         delete[] full_grad_f;
+      }
+      else
+      {
+         retvalue = tnlp_->eval_grad_f(n_full_x_, full_x_, new_x, values);
       }
-      delete[] full_grad_f;
    }
    else
    {
-      retvalue = tnlp_->eval_grad_f(n_full_x_, full_x_, new_x, values);
+      // make sure we have the value of the objective at the point
+      Number f;
+      retvalue = tnlp_->eval_f(n_full_x_, full_x_, new_x, f);
+      if( retvalue )
+      {
+         Number* full_x_pert = new Number[n_full_x_];
+         IpBlasCopy(n_full_x_, full_x_, 1, full_x_pert, 1);
+         const Index* x_pos = NULL;
+         if( IsValid(P_x_full_x_) )
+         {
+            x_pos = P_x_full_x_->ExpandedPosIndices();
+         }
+
+         // Compute the finite difference objective
+         for( Index i = 0; i < g_f.Dim(); i++ )
+         {
+            Index ivar = x_pos != NULL ? x_pos[i] : i;
+            if( findiff_x_l_[ivar] < findiff_x_u_[ivar] )
+            {
+               const Number xorig = full_x_pert[ivar];
+               Number this_perturbation = findiff_perturbation_ * 
Max(Number(1.), std::abs(full_x_[ivar]));
+               full_x_pert[ivar] += this_perturbation;
+               if( full_x_pert[ivar] > findiff_x_u_[ivar] )
+               {
+                  // if at upper bound, then change direction towards lower 
bound
+                  this_perturbation = -this_perturbation;
+                  full_x_pert[ivar] = xorig + this_perturbation;
+               }
+               Number f_pert;
+               retvalue = tnlp_->eval_f(n_full_x_, full_x_pert, true, f_pert);
+               if( !retvalue )
+               {
+                  break;
+               }
+
+               values[i] = (f_pert - f) / this_perturbation;
+
+               full_x_pert[ivar] = xorig;
+            }
+         }
+
+         delete[] full_x_pert;
+      }
    }
 
    return retvalue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Ipopt-releases-3.14.6/src/Interfaces/IpTNLPAdapter.hpp 
new/Ipopt-releases-3.14.7/src/Interfaces/IpTNLPAdapter.hpp
--- old/Ipopt-releases-3.14.6/src/Interfaces/IpTNLPAdapter.hpp  2022-05-02 
14:17:22.000000000 +0200
+++ new/Ipopt-releases-3.14.7/src/Interfaces/IpTNLPAdapter.hpp  2022-06-24 
11:28:47.000000000 +0200
@@ -261,6 +261,13 @@
       JAC_FINDIFF_VALUES
    };
 
+   /** Enum for specifying technique for computing objective Gradient */
+   enum GradientApproxEnum
+   {
+      OBJGRAD_EXACT = 0,
+      OBJGRAD_FINDIFF_VALUES
+   };
+
    /** Method for performing the derivative test */
    bool CheckDerivatives(
       DerivativeTestEnum deriv_test,
@@ -489,6 +496,8 @@
    Index num_linear_variables_;
    /** Flag indicating how Jacobian is computed. */
    JacobianApproxEnum jacobian_approximation_;
+   /** Flag indicating how objective Gradient is computed. */
+   GradientApproxEnum gradient_approximation_;
    /** Size of the perturbation for the derivative approximation */
    Number findiff_perturbation_;
    /** Maximal perturbation of the initial point */

Reply via email to