[R] newbie needs help using R as solver

Arne Henningsen ahenningsen at email.uni-kiel.de
Thu Sep 16 17:27:14 CEST 2004


On Thursday 16 September 2004 11:44, Wayne Jones wrote:
> This is a linear programming problem. Although I am not sure what your
> objective function is!!
>
> Check out the R package linprog

Please use the package lpSolve, it's much better and _faster_ than linprog. I 
started writing linprog before lpSolve was published. After lpSolve was on 
cran, I mainly used this package and worked only very little on linprog. 
Thus, linprog is still an alpha version. There are only few cases when 
linprog might be prefered (e.g. dual values). I hope that the next version of 
lpSolve will include these cases (then I will ask to remove linprog from 
cran).

Best wishes,
Arne

> -----Original Message-----
> From: Andrej Uduc [mailto:odyn at email.si]
> Sent: 16 September 2004 10:29
> To: r-help at stat.math.ethz.ch
> Subject: [R] newbie needs help using R as solver
>
> Greetings
> I'm a total newbie in R and I'm trying to make a comparisson of Excel
> and R in the fields of:
> - optimisation modeling (using solver)
> -  decision trees
> -  simulation modeling
> as described in Winston, Wayne L.:  Practical Management Science.
> for optimisation modeling in Excel I would normaly use solver. In R
> however I can't seem to be able to find the solution. I've narrowed it
> down to optim, optimize functions (I might be totaly wrong), but I can't
> figure out how to set the conditions. I've read something about nlm
> model but I can't find the anwser (examples are not easy enough for me).
> what I wanna do is solve this simple task:
> a+b =< 500000
> c+d  =< 500000
> g  >= 0,25*c+d
> a+b+c+d+g =< 1000000
> a, b, c, d, g => 0
>
> I would very much appreciate any help in this matter. I need to locate
> the appropriate function for the task and figure out how to write this
> formulas. I'd also be very thankfull for any help (links) to simple
> examples of decision trees and/or simulation.
>
>     Andrej UduÚ
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
> KSS Ltd
> Seventh Floor  St James's Buildings  79 Oxford Street  Manchester  M1 6SS 
> England Company Registration Number 2800886
> Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
> mailto:kssg at kssg.com  http://www.kssg.com
>
>
> The information in this Internet email is confidential and m...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
ahenningsen at agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/




More information about the R-help mailing list