On Thu, Mar 7, 2013 at 5:13 PM, Alexander Sehlström
<[email protected]>wrote:

> Hi,
>
> I wish to solve the following problem:
>
> /* Problem --------------------------------------------------------
>  * Starting from double[] s0, determine double[] s, the solution of:
>  *
>  *     | min   f' * s
>  *     |
>  *     | s.t.  s_l <= s <= s_u
>  *
>  * where double[] f has the same length as the double [] s.
>  *
>  * The double[] s_l and double[] s_u are lower and upper bounds of s,
>  * respectively.
>  * ----------------------------------------------------------------
>  */
>
> I have tried to understand what solution algorithm in Apache Commons Math
> to use. I have tried the SimplexSolver, but it seams unable to handle
> SimpleBounds and demands LinearConstraint which I do not have any.
>
> Any suggestions of how to use the library for this problem?


Hi Alexander,

you can also see your bounds as linear constraints:

s_l <= s <= s_u is equivalent to

linear constraint s_i >= s_l
linear constraint s_i <= s_u

where s_i is your respective entry in the s array.

Hope this helps,

Thomas

Reply via email to