Description Usage Arguments Value Author(s) Examples
View source: R/addObjectToArea.R
Adds an object to the an object inherited from class createArea
1 | addObjectToArea(area, object, type)
|
area |
an object inherited from creatArea class |
object |
an object to be added to area |
type |
type of the object to added to area: "reservoir", "demand", "hydrometeorology" |
an object inherited from class of creatArea
Rezgar Arabzadeh, Parisa Aberi, Kaveh Panaghi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # Create an area
object<-createArea(name ="Zarineh" ,
location="kurdistan",
start =c(1900,1) ,
end =c(1962,1))
# Create an Agricultural demand site
var<-sin(seq(0.2,pi-0.2,length.out=12))*100/sum(sin(seq(0.2,pi-0.2,length.out=12)))
dem<-createDemandSite(type="agricultural" ,
demandName="Agri" ,
demandCode=1 ,
annualUseRate=1.3084 ,
annualVariation=var ,
area=1000 ,
cycle=TRUE ,
numberOfCycles=62 ,
supplierCode=1 ,
downstreamCode=0 ,
priority=1)
# Create a Reservoir
AV<-data.frame(A=seq(2 ,30 ,length.out=10),
V=seq(100,700,length.out=10))
res<-createReservoir(type ="storage",
name ="Bukan" ,
reservoirCode =1 ,
downstreamReservoirCode=0 ,
geometry =list(sMin =100 ,
sMax =700 ,
volumeArea=AV))
# Creat a meteorological object
met<-hydrometeorology(Inflow =rlnorm(744,2,0.2),
netEvaporation=runif(744,0,0.2) ,
reservoirCode =1)
# add object to The area
object<-addObjectToArea(area =object,
object=met ,
type ="hydrometeorology")
object<-addObjectToArea(area =object,
object=dem ,
type ="demand")
object<-addObjectToArea(area =object,
object=res ,
type ="reservoir")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.