Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
MINOTAUR_AMPL::AMPLHessian Class Reference

AMPLHessian class has methods to call Hessian of Lagrangian evaluation routines of AMPL. This class is not meant to calculate Hessian of native Minotaur functions. More...

#include <AMPLHessian.h>

Inheritance diagram for MINOTAUR_AMPL::AMPLHessian:
Inheritance graph
[legend]
Collaboration diagram for MINOTAUR_AMPL::AMPLHessian:
Collaboration graph
[legend]

Public Member Functions

 AMPLHessian (AMPLInterfacePtr iface)
 Construct AMPLHessian using an AMPL(ASL) interface. More...
 
 ~AMPLHessian ()
 Destroy.
 
Minotaur::UInt getNumNz () const
 Return the number of non-zeros in the Hessian of Lagrangian. More...
 
void fillRowColIndices (Minotaur::UInt *iRow, Minotaur::UInt *jCol)
 Fill in row and column indices of nonzeros in Hessian of Lagrangian. More...
 
void fillRowColValues (const double *x, double obj_mult, const double *con_mult, double *values, int *error)
 Evaluate Hessian of Lagrangian at a given point x, row-wise. More...
 
void negateObj ()
 Ugly hack for maximization problems. More...
 
- Public Member Functions inherited from Minotaur::HessianOfLag
 HessianOfLag ()
 Default constructor.
 
 HessianOfLag (Problem *p)
 
virtual ~HessianOfLag ()
 Destroy. More...
 
virtual UInt getNumNz () const
 
virtual void fillRowColIndices (UInt *irow, UInt *jcol)
 
virtual void fillRowColValues (const double *x, double obj_mult, const double *con_mult, double *values, int *error)
 
virtual void negateObj ()
 Ugly hack to solve maximization problem. TODO: delete it. More...
 
virtual void setupRowCol ()
 
virtual void write (std::ostream &out) const
 

Detailed Description

AMPLHessian class has methods to call Hessian of Lagrangian evaluation routines of AMPL. This class is not meant to calculate Hessian of native Minotaur functions.

Constructor & Destructor Documentation

◆ AMPLHessian()

AMPLHessian::AMPLHessian ( AMPLInterfacePtr  iface)

Construct AMPLHessian using an AMPL(ASL) interface.

Parameters
[in]ifacePointer to AMPLInterface class from which we read the instance.

Member Function Documentation

◆ fillRowColIndices()

void AMPLHessian::fillRowColIndices ( Minotaur::UInt iRow,
Minotaur::UInt jCol 
)
virtual

Fill in row and column indices of nonzeros in Hessian of Lagrangian.

Given arrays irow and jcol, fill in the row and column index of each non-zero in the Hessian of Lagrangian. The entries are ordered by rows.

Parameters
[out]jcolArray of size returned by getNumNz().
[out]irowArray of size returned by getNumNz().

Reimplemented from Minotaur::HessianOfLag.

◆ fillRowColValues()

void AMPLHessian::fillRowColValues ( const double *  x,
double  obj_mult,
const double *  con_mult,
double *  values,
int *  error 
)
virtual

Evaluate Hessian of Lagrangian at a given point x, row-wise.

Parameters
[in]xThe point at which Hessian of Lagrangian is to be evaluated.
[in]obj_multThe multiplier for the objective.
[in]con_multArray of multipliers for constraints.
[out]valuesThe array of size returned by getNumNz() into which values are saved.
[out]erroris set to a nonzero value if a problem is encountered, otherwise it is left undisturbed.

Reimplemented from Minotaur::HessianOfLag.

◆ getNumNz()

Minotaur::UInt AMPLHessian::getNumNz ( ) const
virtual

Return the number of non-zeros in the Hessian of Lagrangian.

Reimplemented from Minotaur::HessianOfLag.

◆ negateObj()

void AMPLHessian::negateObj ( )
virtual

Ugly hack for maximization problems.

Reimplemented from Minotaur::HessianOfLag.


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

Minotaur source code documented by Doxygen 1.9.4 on Sun Apr 27 2025