simtub {RGeostats} | R Documentation |

Performs conditional or non-conditional simulations using Turning Bands

simtub(dbin = NA, dbout, model = model.input(), neigh = neigh.input(), uc = c("1"), mean = NA, seed = 232131, domain=0, nbsimu = 1, nbtuba = 100, accept.fun = NA, accept.nloop.max = 10, accept.verbose=TRUE, radix = "Simu",modify.target = db.locmod())

`dbin` |
The |

`dbout` |
The |

`model` |
The |

`neigh` |
The |

`uc` |
The drift description. Use command |

`mean` |
Array containing the mean of each variable. |

`seed` |
Seed used for the generation of random numbers. When 0, the seed is not initialized. |

`domain` |
When (strictly) positive, it corresponds to the reference domain value. If a Db attribute is defined as a Domain variable in a Db file, a sample will be selected only if the corresponding Domain variable is equal to the reference domain value. This Domain selection can serve as a secondary selection for the sample in the Input Db or as a mask in the Output Db. |

`nbsimu` |
Number of simulations |

`nbtuba` |
Number of turning bands |

`accept.fun` |
An acceptation function. See details for more information. |

`accept.nloop.max` |
Maximum number of iterations before 'nbsimu' acceptable simulation outcomes is reached. |

`accept.verbose` |
When TRUE, the activity of the acceptation function is echoed. |

`radix` |
Radix of the name given to the variables storing the results in the target Db. |

`modify.target` |
Decides whether or not the newly created variables will have their
locator defined or not. For more information, see |

The target Db where 'nbsimu' variables have been added. These variables are multiplied for each one of the data variables.

The acceptation function must have the following argument:

db

`db-class`

containing the simulated outcome(s)iatt Rank of the simulated outcome whole validity must be checked/

The function must return TRUE if the outcome is accepted or FALSE otherwise. When an acceptation function is provided, the simulation procedure is iterated until 'nbsimu' accepted simulations are stored. This iterative procedure is iterated until one of the following criteria is fulfilled:

The number of accepted simulations is reached

The maximum number of loops is reached

# Acceptation function # accept <- function(db,iatt) { (mean(db.extract(db,iatt) > -1) > 0.9) } # Perform a conditional simulation of facies # nbsimu = 25 grid = db.create(nx=c(100,100)) model = model.create(vartype="Cubic",range=70) grid = simtub(,grid,model=model, accept.fun=accept,nbsimu=nbsimu,nbtuba=1000) grid = db.compare(grid,names="Simu*",fun="mean") plot(grid,title="Average of Simulations (under constraints)",pos.legend=1) rm(grid,model,nbsimu,accept)

[Package *RGeostats* version 11.0.6 Index]