[Ipopt] How to change adouble variable to double and round function

Andrea Walther awalther at math.uni-paderborn.de
Mon Sep 23 02:01:14 EDT 2013


Hi,

> 1.234567 as 1.234567(a). Do you have any idea how to convert this to a
> double number?

you could extract the double-value of an adouble variable using the
.value() member function, that is

double var1;
adouble var2;

...

var1 = var2.value()

However, in doing so, the derivative computation may contain errors
is the variable var1 influences the value of the target function
or the constraints.

Having the double value one can then use the usual rounding facilities.

Hope this help

Andrea

-- 
Prof. Dr. Andrea Walther
Lehrstuhl fuer Mathematik und ihre Anwendungen
Institut fuer Mathematik
Universitaet Paderborn
Warburger Str. 100
33098 Paderborn

Email: andrea.walther at uni-paderborn.de
Phone: ++49 5251 602721
        ++49 5251 602724 (sekr.)
Fax:   ++49 5251 603728

**********





More information about the Ipopt mailing list