# org::coinor::examples::HS071 Class Reference

Java example for interfacing with IPOPT. More...

Inheritance diagram for org::coinor::examples::HS071:
[legend]

List of all members.

## Public Member Functions
| HS071 ()
| Creates a new instance of HS071cpp.
boolean | get_scaling_parameters (double[] obj_scaling, int n, double[] x_scaling, int m, double[] g_scaling, boolean[] use_x_g_scaling)
| If you using_scaling_parameters = true, please overload this method,.
void | print (double[] x, String str)
## Static Public Member Functions
static void | main (String[]args)
| Main function for running this example.
## Protected Member Functions
boolean | get_bounds_info (int n, double[] x_L, double[] x_U, int m, double[] g_L, double[] g_U)
| Callback function for variable bounds and constraint sides.
boolean | get_starting_point (int n, boolean init_x, double[] x, boolean init_z, double[] z_L, double[] z_U, int m, boolean init_lambda, double[] lambda)
| Callback function for the starting point.
boolean | eval_f (int n, double[] x, boolean new_x, double[] obj_value)
| Callback function for the objective function.
boolean | eval_grad_f (int n, double[] x, boolean new_x, double[] grad_f)
| Callback function for the objective function gradient.
boolean | eval_g (int n, double[] x, boolean new_x, int m, double[] g)
| Callback function for the constraints.
boolean | eval_jac_g (int n, double[] x, boolean new_x, int m, int nele_jac, int[] iRow, int[] jCol, double[] values)
| Callback function for the constraints Jacobian.
boolean | eval_h (int n, double[] x, boolean new_x, double obj_factor, int m, double[] lambda, boolean new_lambda, int nele_hess, int[] iRow, int[] jCol, double[] values)
| Callback function for the hessian.
## Package Attributes
int | n
int | m
int | nele_jac
int | nele_hess
int | count_bounds = 0
int | dcount_start = 0

## Detailed Description

Java example for interfacing with IPOPT.

HS071 implements a Java example of problem 71 of the Hock-Schittkowsky test suite.

The optimal solution is x = (1.00000000, 4.74299963, 3.82114998, 1.37940829).

This code was based on same problem of the Ipopt distribution.

Author:
  Rafael de Pelegrini Soares, Tong Kewei

Definition at line 24 of file HS071.java.

## Constructor & Destructor Documentation

org::coinor::examples::HS071::HS071 | ( |  | ) | `[inline]`

Creates a new instance of HS071cpp.

Definition at line 36 of file HS071.java.

## Member Function Documentation

boolean org::coinor::examples::HS071::get_bounds_info | ( | int | n,
|  | double[] | x_L,
|  | double[] | x_U,
|  | int | m,
|  | double[] | g_L,
|  | double[] | g_U |
| ) |  |  | `[inline, protected, virtual]`

Callback function for variable bounds and constraint sides.

Implements org::coinor::Ipopt.

Definition at line 59 of file HS071.java.

boolean org::coinor::examples::HS071::get_starting_point | ( | int | n,
|  | boolean | init_x,
|  | double[] | x,
|  | boolean | init_z,
|  | double[] | z_L,
|  | double[] | z_U,
|  | int | m,
|  | boolean | init_lambda,
|  | double[] | lambda |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the starting point.

Implements org::coinor::Ipopt.

Definition at line 80 of file HS071.java.

boolean org::coinor::examples::HS071::eval_f | ( | int | n,
|  | double[] | x,
|  | boolean | new_x,
|  | double[] | obj_value |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the objective function.

Implements org::coinor::Ipopt.

Definition at line 118 of file HS071.java.

boolean org::coinor::examples::HS071::eval_grad_f | ( | int | n,
|  | double[] | x,
|  | boolean | new_x,
|  | double[] | grad_f |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the objective function gradient.

Implements org::coinor::Ipopt.

Definition at line 127 of file HS071.java.

boolean org::coinor::examples::HS071::eval_g | ( | int | n,
|  | double[] | x,
|  | boolean | new_x,
|  | int | m,
|  | double[] | g |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the constraints.

Implements org::coinor::Ipopt.

Definition at line 139 of file HS071.java.

boolean org::coinor::examples::HS071::eval_jac_g | ( | int | n,
|  | double[] | x,
|  | boolean | new_x,
|  | int | m,
|  | int | nele_jac,
|  | int[] | iRow,
|  | int[] | jCol,
|  | double[] | values |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the constraints Jacobian.

Implements org::coinor::Ipopt.

Definition at line 150 of file HS071.java.

boolean org::coinor::examples::HS071::eval_h | ( | int | n,
|  | double[] | x,
|  | boolean | new_x,
|  | double | obj_factor,
|  | int | m,
|  | double[] | lambda,
|  | boolean | new_lambda,
|  | int | nele_hess,
|  | int[] | iRow,
|  | int[] | jCol,
|  | double[] | values |
| ) |  |  | `[inline, protected, virtual]`

Callback function for the hessian.

Implements org::coinor::Ipopt.

Definition at line 188 of file HS071.java.

boolean org::coinor::examples::HS071::get_scaling_parameters | ( | double[] | obj_scaling,
|  | int | n,
|  | double[] | x_scaling,
|  | int | m,
|  | double[] | g_scaling,
|  | boolean[] | use_x_g_scaling |
| ) |  |  | `[inline]`

If you using_scaling_parameters = true, please overload this method,.

To instruct IPOPT to use scaling values for variables, the first element of use_x_g_scaling should be set. To instruct IPOPT to use scaling values for constraints, the second element of use_x_g_scaling should be set.

Parameters:

  | obj_scaling | double[1] to store a scaling factor for the objective (negative value leads to maximizing the objective function)
  | n | the number of variables in the problem
  | x_scaling | array to store the scaling factors for the variables
  | m | the number of constraints in the problem
  | g_scaling | array to store the scaling factors for the constraints
  | use_x_g_scaling | boolean[2] to store whether scaling factors for variables (1st entry) and constraints (2nd entry) should be used

Returns:
  true on success, otherwise false

Reimplemented from org::coinor::Ipopt.

Definition at line 249 of file HS071.java.

void org::coinor::examples::HS071::print | ( | double[] | x,
|  | String | str |
| ) |  |  | `[inline]`

Definition at line 258 of file HS071.java.

static void org::coinor::examples::HS071::main | ( | String[] | args | ) | `[inline, static]`

Main function for running this example.

Definition at line 269 of file HS071.java.

## Member Data Documentation

int org::coinor::examples::HS071::n`[package]`

Definition at line 27 of file HS071.java.

int org::coinor::examples::HS071::m`[package]`

Definition at line 28 of file HS071.java.

int org::coinor::examples::HS071::nele_jac`[package]`

Definition at line 29 of file HS071.java.

int org::coinor::examples::HS071::nele_hess`[package]`

Definition at line 30 of file HS071.java.

int org::coinor::examples::HS071::count_bounds = 0`[package]`

Definition at line 32 of file HS071.java.

int org::coinor::examples::HS071::dcount_start = 0`[package]`

Definition at line 33 of file HS071.java.

The documentation for this class was generated from the following file:

- contrib/JavaInterface/org/coinor/examples/HS071.java

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines