/farmR/man/CompositeFarm.Rd

https://code.google.com/p/javawfm/ · Unknown · 60 lines · 55 code · 5 blank · 0 comment · 0 complexity · 07fa75028b4a3e5de75d278b029adc12 MD5 · raw file

  1. \name{CompositeFarm}
  2. \Rdversion{1.1}
  3. \alias{CompositeFarm}
  4. %- Also NEED an '\alias' for EACH other topic documented here.
  5. \title{
  6. CompositeFarm
  7. }
  8. \description{
  9. Creates Composite Farm Objects
  10. }
  11. \usage{
  12. CompositeFarm(farmParams, mou = NULL, mouweights = c(1), soildata, SBFactories = NULL, haulagePerTonnePerKm = 0.12, maxSBHaulageDistance = 200)
  13. }
  14. \arguments{
  15. \item{farmParams}{
  16. A \code{FarmParameters} object to be used for all component farms
  17. }
  18. \item{mou}{
  19. A single \code{ObjectiveParameters} object or a list of such objects specifying the objective parameters used to define the component farms. If a list is supplied the total number of component farms will be the length of this list multiplied by the number of soil classes.
  20. }
  21. \item{mouweights}{
  22. If supplied this specifies the weightings to be used for each of the objective parameters supplied in the \code{mou} argument. The lengths of \code{mouweights} and \code{mou} must be equal.
  23. }
  24. \item{soildata}{
  25. A \code{data.frame} or \code{SpatialDataFrame} with a single row and items named (RF,X0.5,X0.75,X1.0,X1.25,X1.5,X1.75,X2.0,X2.25,X2.5) representing the yearly rainfall in mm and the proportion of land in each of the soiltype classes. All items must be present.
  26. }
  27. \item{SBFactories}{
  28. \code{SpatialDataFrame} object with the Locations of sugarbeet factories to be used to calculate sugarbeet transport costs. \code{data(SBFactories)} provides an appropriate dataframe. Requires the sp package
  29. }
  30. \item{haulagePerTonnePerKm}{
  31. Cost of sugarbeet haulage in pounds
  32. }
  33. \item{maxSBHaulageDistance}{
  34. Maximum allowable haulage distance for sugarbeet in km
  35. }
  36. }
  37. \details{
  38. Constructs itself from component farms, each of which will represent a particular combination of soiltype and objective parameters. The total number of component farms constructed will be \code{length(mou)*length(soildata)}
  39. }
  40. \author{
  41. Ira Cooke
  42. }
  43. \note{
  44. If using spatial data as arguments (eg for soildata or SBFactories) this requires the sp package.
  45. }
  46. \examples{
  47. fp=FarmParameters()
  48. op=ObjectiveParameters()
  49. localConditions=data.frame(RF=600.0,X0.5=0,X0.75=0.1,X1.0=0.1,X1.25=0.5,X1.5=0.1,X1.75=0,X2.0=0,X2.25=0,X2.5=0.2)
  50. cfarm=CompositeFarm(fp,op,1.0,localConditions)
  51. solvelp(cfarm)
  52. show(cfarm)
  53. }
  54. % Add one or more standard keywords, see file 'KEYWORDS' in the
  55. % R documentation directory.