D
Dark Wind
Hi,
I have been using OPT++ to solve a non linear programming problem. I
am totally new to C++, but I looked at an example given on OPT++
website and modified it according to my problem. But I am getting some
error there.
Since I don't have analytical derivatives, I am using FDNLF1 type of
problem and optimization method used is OptFDNIPS. I am getting
problem in the input arguments(function, constraints etc) of FDNLF1
which I constructed the way it is done in the example on opt++ website
(http://csmr.ca.sandia.gov/opt++/opt++2.4_doc/html/example2.html). But
that example uses NLF2 type of problem. Since I am totally new to C++,
I have no idea what is causing these errors. The error that I am
getting is :
--------------------------------------------------------- ERROR
MESSAGE----------------------------------------------------------------
example2.cpp: In function `int main()':
example2.cpp:24: error: no matching function for call to
`OPTPP::FDNLF1::FDNLF1(int&, void (&)(int, const
NEWMAT::ColumnVector&, double&, int&), void (&)(int,
NEWMAT::ColumnVector&), OPTPP::Constraint&)'
.../OPT++/optpp-2.4/include/NLF.h:388: note: candidates are:
OPTPP::FDNLF1::FDNLF1(const OPTPP::FDNLF1&)
.../OPT++/optpp-2.4/include/NLF.h:425: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*(*)(int), void*)
.../OPT++/optpp-2.4/include/NLF.h:422: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
void*)
.../OPT++/optpp-2.4/include/NLF.h:419: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*, void*)
.../OPT++/optpp-2.4/include/NLF.h:415: note:
OPTPP::FDNLF1::FDNLF1(int, int, void (*)(int, const
NEWMAT::ColumnVector&, NEWMAT::ColumnVector&, int&), void (*)(int,
NEWMAT::ColumnVector&))
.../OPT++/optpp-2.4/include/NLF.h:411: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*(*)(int))
.../OPT++/optpp-2.4/include/NLF.h:407: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*)
.../OPT++/optpp-2.4/include/NLF.h:405: note:
OPTPP::FDNLF1::FDNLF1(int)
.../OPT++/optpp-2.4/include/NLF.h:403: note:
OPTPP::FDNLF1::FDNLF1()
tstfcn.cpp: In function `void ineq_hs65(int, const
NEWMAT::ColumnVector&, NEWMAT::ColumnVector&, int&)':
tstfcn.cpp:86: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:90: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:93: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:95: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:96: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:100: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:103: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:105: error: invalid operands of types `double' and `double'
to binary `operator^'
-------------------------------------------- END OF ERROR MESSAGE
-----------------------------------------------------------------
Is there anyone who has used this package(OPT++) and solved a non-
linear problem(non-linear objfun and constraints) without analytical
gradients. I would appreciate any help in this regard. Even an example
code for a general non-linear problem will help.
Thank you
I have been using OPT++ to solve a non linear programming problem. I
am totally new to C++, but I looked at an example given on OPT++
website and modified it according to my problem. But I am getting some
error there.
Since I don't have analytical derivatives, I am using FDNLF1 type of
problem and optimization method used is OptFDNIPS. I am getting
problem in the input arguments(function, constraints etc) of FDNLF1
which I constructed the way it is done in the example on opt++ website
(http://csmr.ca.sandia.gov/opt++/opt++2.4_doc/html/example2.html). But
that example uses NLF2 type of problem. Since I am totally new to C++,
I have no idea what is causing these errors. The error that I am
getting is :
--------------------------------------------------------- ERROR
MESSAGE----------------------------------------------------------------
example2.cpp: In function `int main()':
example2.cpp:24: error: no matching function for call to
`OPTPP::FDNLF1::FDNLF1(int&, void (&)(int, const
NEWMAT::ColumnVector&, double&, int&), void (&)(int,
NEWMAT::ColumnVector&), OPTPP::Constraint&)'
.../OPT++/optpp-2.4/include/NLF.h:388: note: candidates are:
OPTPP::FDNLF1::FDNLF1(const OPTPP::FDNLF1&)
.../OPT++/optpp-2.4/include/NLF.h:425: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*(*)(int), void*)
.../OPT++/optpp-2.4/include/NLF.h:422: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
void*)
.../OPT++/optpp-2.4/include/NLF.h:419: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&, void*), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*, void*)
.../OPT++/optpp-2.4/include/NLF.h:415: note:
OPTPP::FDNLF1::FDNLF1(int, int, void (*)(int, const
NEWMAT::ColumnVector&, NEWMAT::ColumnVector&, int&), void (*)(int,
NEWMAT::ColumnVector&))
.../OPT++/optpp-2.4/include/NLF.h:411: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*(*)(int))
.../OPT++/optpp-2.4/include/NLF.h:407: note:
OPTPP::FDNLF1::FDNLF1(int, void (*)(int, const NEWMAT::ColumnVector&,
OPTPP::real&, int&), void (*)(int, NEWMAT::ColumnVector&),
OPTPP::CompoundConstraint*)
.../OPT++/optpp-2.4/include/NLF.h:405: note:
OPTPP::FDNLF1::FDNLF1(int)
.../OPT++/optpp-2.4/include/NLF.h:403: note:
OPTPP::FDNLF1::FDNLF1()
tstfcn.cpp: In function `void ineq_hs65(int, const
NEWMAT::ColumnVector&, NEWMAT::ColumnVector&, int&)':
tstfcn.cpp:86: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:90: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:93: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:95: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:96: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:100: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:103: error: invalid operands of types `double' and `double'
to binary `operator^'
tstfcn.cpp:105: error: invalid operands of types `double' and `double'
to binary `operator^'
-------------------------------------------- END OF ERROR MESSAGE
-----------------------------------------------------------------
Is there anyone who has used this package(OPT++) and solved a non-
linear problem(non-linear objfun and constraints) without analytical
gradients. I would appreciate any help in this regard. Even an example
code for a general non-linear problem will help.
Thank you