Re: [R] R & gams

From: Jason Barnhart <jasoncbarnhart_at_msn.com>
Date: Fri 27 Oct 2006 - 22:40:45 GMT

Any answer to this question will be insufficient without more detail regarding the nature of the models you are investigating.

As mentioned in prior posts GAMS does solve large-scale and computationally intensive optimization and math programming problems.

    One strength is its ability to interface with different     mathematical solvers. The choice of solver depends on the nature     of the desired optimization. For example, (by the way, these     statements are broad generalizations to (help) illuminate the path     of discovery; they are not meant to be exhaustive; additionally     I've not used GAMS in many years so things have changed) at one     time, CONOPT was a great choice for sparse, large-scale nonlinear      (NLP) problems while CPLEX was better suited for linear     programming (LP). In this role GAMS facilitates interfacing with     either solver.

    A second strength of GAMS is that users can focus on structuring     problems unique to their domain rather than developing solver     programs. Which means it is a power tool and users need some     fundamental knowledge of optimization.

One's *initial* take regarding GAMS as a solution implies applied optimization/operations research types of problems such as: how many trucks do I need to deliver X gallons of milk to Y cities? ... and so on.

However, models and their solutions take many forms so GAMS is not constrained to these types of problems only. In particular, I've seen solutions to maximum entropy regression performed in GAMS where the data are not large-scale, but the computational requirements may have dictated using an industrial-strength solver.

R has embedded solvers (see ?optim), can interface with external solvers(through compilation and linking) and can probably structure problems sufficiently to send data to a solver. As Sarah Goslee mentioned in a prior post R *might* not do *all* of those things as efficiently as in GAMS.

To get a better answer you'll have to do something like the following:

  1. Conduct some research on the exact nature of your model(s).
  2. Determine what functionality GAMS is providing and ascertain why GAMS is crucial to their solution.
  3. Understand R a little better to see if it can provide the corresponding functionality.
  4. Determine if time or money is your primary constraint. If it is time, then purchasing a GAMS solution to get to market faster is probably better. If it is money then an investment in time (with
  5. may be the better option, but you'll have evaluate these options.
  6. Investigate other commercial packages like AMPL, etc.

If you're doing research either solution may suffice. Additionally, you may solve the model in either GAMS or R, but choose to deploy in an altogether different language like C++.

Hope that helps, sorry for the novel.
-jason

The people presenting the models cited as a reference the site www.gams.com which, as you said, is about high-level modeling system for mathematical programming and optimization.

Vittorio

Alle 17:52, venerd́ 27 ottobre 2006, Ravi Varadhan ha scritto:
> Can you be more specific about what you mean by "gams"? Do you mean
> generalized additive models (GAM)? If so, R is a good environment for
> forecasting models and GAM. However, the link that you provided is NOT
> for
> generalized additive modeling, but it is for General Algebraic Modeling
> System (GAMS), which is a high-level modeling system for mathematical
> programming and optimization.
>
> Ravi.
>
> ---------------------------------------------------------------------------
>- -------
>
> Ravi Varadhan, Ph.D.
>
> Assistant Professor, The Center on Aging and Health
>
> Division of Geriatric Medicine and Gerontology
>
> Johns Hopkins University
>
> Ph: (410) 502-2619
>
> Fax: (410) 614-9625
>
> Email: rvaradhan@jhmi.edu
>
> Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html
>
>
>
> ---------------------------------------------------------------------------
>- --------
>
>
> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of vittorio
> Sent: Friday, October 27, 2006 3:14 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] R & gams
>
> At office I have been introduced by another company to new, complex
> energy
> forecasting models using gams as the basic software.
> I have been told by the company offering the models that gams is
> specialised
>
> in dealing with huge, hevy-weight linear and non-linear modelling (see an
> example in http://www.gams.com/modtype/index.htm) and they say it is
> almost
> the only option for doing it.
>
> I would like to know your opinion on the subject and, above all, if R can
> be
>
> an effective alternative and to what extent, if any.
>
> Thanks
> Vittorio
>
> ______________________________________________
> 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 and provide commented,
> minimal,
> self-contained, reproducible code.



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 and provide commented, minimal, self-contained, reproducible code.

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 and provide commented, minimal, self-contained, reproducible code. Received on Sat Oct 28 08:48:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 27 Oct 2006 - 23:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.