Neither of your sample objectives are linear (Price*volume) or price^2.
With some cleverness and thought about calculus, you might manage a
piecewise
Linear approximation. That is: you know the slopes between the breakpoints
See SOS2 examples in the docs.
http://lpsolve.sourceforge.net/5.5/SOS.htmhttp://yetanothermathprogrammingconsultant.blogspot.com/2009/06/gams-piecewise-linear-functions-with.html
http://www.pitt.edu/~jvielma/presentations/LOG_ISMP_09.pdf
William
_____
From:
lp_solve@... [mailto:
lp_solve@...] On Behalf
Of jeromecjl
Sent: Friday, November 06, 2009 12:11 AM
To:
lp_solve@...
Subject: [lp_solve] Passing set of variable data and optimise based on
fitted curve
Hello,
How do I pass a set of variable data into lpSolve for the following
optimization?
Obj function: (max) revenue = price * volume
Constraints: price and volume pair must be from the following variable data
set:
Variable data set:
# price volume
1 10 500
2 20 450
3 30 330
4 40 250
5 50 190
Result: 10,000 (variable row#4)
Could it be possible for lpSolve to generate a profit curve and find the
optimum point (max revenue) in which the result of price could be based on
the max point in the curve-fitted profit function (say price between 30 and
40)?
Example:
Fitted to: revenue = -700price^2 + 5200price + 780
Subject to: price range between 10 to 50
Thanks,
Jerome