gams:obtain_the_analytical_derivatives_of_the_objective_function_and_the_constraints

- Distribution 21.4 introduced suffixes for functions:
- New suffixes Grad and Hess have been introduced to get exact point derivatives from any function. These function suffixes are mainly intended for future testing of functions and cannot be used in equations.
- The first argument gives the position of the element of the Hessian or gradient element desired in the form
`i`

or`i:j`

, where`i`

is the row element and`j`

the column element. - The symbol ':' is used to separate the element position specification from the function argument list.
- For example, the following will return the second derivative for the second and fourth argument, where 1,2,3,4,5 are the normal function arguments:
`h = EDist.hess(2:4:1,2,3,4,5);`

If the needed element position index is one, we can drop the argument:`g = exp.grad(1:5);`

or`g = exp.grad(5);`

,`h = log.hess(1:1:3)`

or`h = log.hess(3);`

, and`hess(i,j) = betareg.hess(ord(i):ord(j):expr1,expr2,expr3);`

- Distribution 22.9 introduced the CONVERT option
`Hessian`

to write the Hessian to a GDX file.

IMPRESSUM / LEGAL NOTICE
PRIVACY POLICY
gams/obtain_the_analytical_derivatives_of_the_objective_function_and_the_constraints.txt · Last modified: 2017/09/02 17:04 by support