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??
This is a linear programming problem. Although I am not sure what your
objective function is!!
Check out the R package linprog
-----Original Message-----
From: Andrej Uduc [mailto:odyn@email.si]
Sent: 16 September 2004 10:29
To: r-help@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@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@kssg.com http://www.kssg.com
The information in this Internet email is confidential and m...{{dropped}}
The problem you describe is usually called `linear programming'. On my system I get> help.search("linear programming")Help files with alias or concept or title matching 'linear programming' using fuzzy matching: solveLP(linprog) solve Linear Programming / Optimization problems lp.object(lpSolve) LP (linear programming) object print.simplex(boot) Print Solution to Linear Programming Problem simplex(boot) Simplex Method for Linear Programming Problems simplex.object(boot) Linear Programming Solution Objects so that's three packages to look into. On Thu, 16 Sep 2004, [ISO-8859-2] Andrej Udu?? wrote:> Greetings > I'm a total newbie in R and I'm trying to make a comparisson of Excel > and R in the fields of:Unless you are a `total newbie' in Excel, is that not inevitably an unfair comparison? I suspect almost all readers of this list would never have guessed to use `solver' for linear programming.> - 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.Simple examples of decision trees: many of the R/S books listed in the FAQ. `Simulation' has several different meanings, so you need to be more explicit. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Hi,
it a LP problem. It's not just a function to optimize
(in this way optim() and optimize() are not usefull),
but a linear system grouping sever
equations/dis-equations.
See package linprog and boot.
See these link about LP:
http://www.ece.northwestern.edu/OTC/
http://www.isye.gatech.edu/~spyros/LP/LP.html
http://www.faqs.org/faqs/linear-programming-faq/
best
Vito
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č
====Diventare costruttori di soluzioni
Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese
http://www.modugno.it/archivio/cat_palese.shtml
___________________________________
http://it.seriea.fantasysports.yahoo.com/