Mathematical programming

Sep 6, 2015 at 5:26pm
Dear C++ users.. I am new using C++ and would like to know:
How could I solve the following (simplified version of my) problem

Max X*Y-X-Y
subject to the restriction
X+ Y = 10
?

Which "packages" or commands should I use?

Thank you for your attention.

JeanJacques

Sep 6, 2015 at 5:35pm
if (x+y=10)
{
max=X*Y-X-Y;
}
Sep 6, 2015 at 5:51pm
In more general terms, I have a problem of numerical optimization: a non-linear function (to be maximized) subject to several linear or non-linear restrictions.
Sep 7, 2015 at 12:06am
C++ is an imperative language, not a declarative one. You have to learn how to restate your declarative requirements into sequences of instructions.

Generally speaking, you have to learn programming.

Or, try to find some application (or perhaps a programming language) that can process declarative requirements.
Topic archived. No new replies allowed.