Mads
Internal
allwellsoff!(madsdata::Associative{K, V})
Turn off all the wells in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:377
allwellson!(madsdata::Associative{K, V})
Turn on all the wells in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:353
asinetransform(params::Array{T, 1}, lowerbounds::Array{T, 1}, upperbounds::Array{T, 1}, indexlogtransformed::Array{T, 1})
Arcsine transformation of model parameters
source: Mads/src/MadsSine.jl:2
bayessampling(madsdata::Associative{K, V})
Bayesian Sampling
Mads.bayessampling(madsdata; nsteps=1000, burnin=100, thinning=1, seed=2016)
Mads.bayessampling(madsdata, numsequences; nsteps=1000, burnin=100, thinning=1, seed=2016)
Arguments:
madsdata
: MADS problem dictionarynumsequences
: number of sequences executed in parallelnsteps
: number of final realizations in the chainburnin
: number of initial realizations before the MCMC are recordedthinning
: removal of anythinning
realizationseed
: initial random number seed
Returns:
mcmcchain
:
source: Mads/src/MadsMC.jl:27
calibrate(madsdata::Associative{K, V})
Calibrate
Mads.calibrate(madsdata; tolX=1e-3, tolG=1e-6, maxEval=1000, maxIter=100, maxJacobians=100, lambda=100.0, lambda_mu=10.0, np_lambda=10, show_trace=false, usenaive=false)
Arguments:
madsdata
: MADS problem dictionarytolX
: parameter space tolerancetolG
: parameter space update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationsmaxJacobians
: maximum number of Jacobian solveslambda
: initial Levenberg-Marquardt lambdalambda_mu
: lambda multiplication factor [10]np_lambda
: number of parallel lambda solvesshow_trace
: shows solution trace [default=false]save_results
: save intermediate results [default=true]usenaive
: use naive Levenberg-Marquardt solver
Returns:
minimumdict
: model parameter dictionary with the optimal values at the minimumresults
: optimization algorithm results (e.g. results.minimum)
source: Mads/src/MadsCalibrate.jl:102
calibratenlopt(madsdata::Associative{K, V})
Do a calibration using NLopt
source: Mads/src/MadsCalibrate.jl:151
calibraterandom(madsdata::Associative{K, V})
Calibrate with random initial guesses
Mads.calibraterandom(madsdata; tolX=1e-3, tolG=1e-6, maxEval=1000, maxIter=100, maxJacobians=100, lambda=100.0, lambda_mu=10.0, np_lambda=10, show_trace=false, usenaive=false)
Mads.calibraterandom(madsdata, numberofsamples; tolX=1e-3, tolG=1e-6, maxEval=1000, maxIter=100, maxJacobians=100, lambda=100.0, lambda_mu=10.0, np_lambda=10, show_trace=false, usenaive=false)
Arguments:
madsdata
: MADS problem dictionarynumberofsamples
: number of random initial samplestolX
: parameter space tolerancetolG
: parameter space update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationsmaxJacobians
: maximum number of Jacobian solveslambda
: initial Levenberg-Marquardt lambdalambda_mu
: lambda multiplication factor [10]np_lambda
: number of parallel lambda solvesshow_trace
: shows solution trace [default=false]save_results
: save intermediate results [default=true]usenaive
: use naive Levenberg-Marquardt solverseed
: initial random seed
Returns:
bestresult
: optimal results tuple: [1] model parameter dictionary with the optimal values at the minimum; [2] optimization algorithm results (e.g. bestresult[2].minimum)
source: Mads/src/MadsCalibrate.jl:34
calibraterandom(madsdata::Associative{K, V}, numberofsamples)
Calibrate with random initial guesses
Mads.calibraterandom(madsdata; tolX=1e-3, tolG=1e-6, maxEval=1000, maxIter=100, maxJacobians=100, lambda=100.0, lambda_mu=10.0, np_lambda=10, show_trace=false, usenaive=false)
Mads.calibraterandom(madsdata, numberofsamples; tolX=1e-3, tolG=1e-6, maxEval=1000, maxIter=100, maxJacobians=100, lambda=100.0, lambda_mu=10.0, np_lambda=10, show_trace=false, usenaive=false)
Arguments:
madsdata
: MADS problem dictionarynumberofsamples
: number of random initial samplestolX
: parameter space tolerancetolG
: parameter space update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationsmaxJacobians
: maximum number of Jacobian solveslambda
: initial Levenberg-Marquardt lambdalambda_mu
: lambda multiplication factor [10]np_lambda
: number of parallel lambda solvesshow_trace
: shows solution trace [default=false]save_results
: save intermediate results [default=true]usenaive
: use naive Levenberg-Marquardt solverseed
: initial random seed
Returns:
bestresult
: optimal results tuple: [1] model parameter dictionary with the optimal values at the minimum; [2] optimization algorithm results (e.g. bestresult[2].minimum)
source: Mads/src/MadsCalibrate.jl:34
checkout()
Checkout the latest version of the Mads modules
source: Mads/src/MadsPublish.jl:2
checkout(git::Bool)
Checkout the latest version of the Mads modules
source: Mads/src/MadsPublish.jl:2
cleancoverage()
Remove Mads coverage files
source: Mads/src/MadsTest.jl:11
cmadsins_obs(obsid::Array{T, 1}, instructionfilename::AbstractString, inputfilename::AbstractString)
Call C MADS ins_obs() function from the MADS dynamic library
source: Mads/src/MadsIO.jl:540
computemass(madsdata::Associative{K, V})
Compute injected/reduced contaminant mass
Mads.computemass(madsdata; time = 0)
Arguments:
madsdata
: MADS problem dictionarytime
: computational time
Returns:
mass_injected
: total injected massmass_reduced
: total reduced mass
source: Mads/src/MadsAnasol.jl:193
computemass(madsfiles)
Compute injected/reduced contaminant mass for a given set of mads input files
Mads.computemass(madsfiles; time = 0, path = ".")
Arguments:
madsfiles
: matching pattern for Mads input files (string or regular expression accepted)time
: computational timepath
: search directory for the mads input files
Returns:
lambda
: array with all the lambda valuesmass_injected
: array with associated total injected massmass_reduced
: array with associated total reduced mass
source: Mads/src/MadsAnasol.jl:252
computeparametersensitities(madsdata::Associative{K, V}, saresults::Associative{K, V})
Compute sensitivities for each model parameter; averaging the sensitivity indices over the entire observation range
Arguments:
madsdata
: MADS problem dictionarysaresults
: sensitivity analysis results
source: Mads/src/MadsSA.jl:568
contamination(wellx, welly, wellz, n, lambda, theta, vx, vy, vz, ax, ay, az, H, x, y, z, dx, dy, dz, f, t0, t1, t)
Compute concentration for a point in space and time (x,y,z,t)
Mads.contamination(wellx, welly, wellz, n, lambda, theta, vx, vy, vz, ax, ay, az, H, x, y, z, dx, dy, dz, f, t0, t1, t; anasolfunction="long_bbb_ddd_iir_c")
Arguments:
wellx
- observation point (well) X coordinatewelly
- observation point (well) Y coordinatewellz
- observation point (well) Z coordinaten
- porositylambda
- first-order reaction ratetheta
- groundwater flow directionvx
- advective transport velocity in X directionvy
- advective transport velocity in Y directionvz
- advective transport velocity in Z directionax
- dispersivity in X direction (longitudinal)ay
- dispersivity in Y direction (transverse horizontal)az
- dispersivity in Y direction (transverse vertical)H
- Hurst coefficient for Fractional Brownian dispersionx
- X coordinate of contaminant source locationy
- Y coordinate of contaminant source locationz
- Z coordinate of contaminant source locationdx
- source size (extent) in X directiondy
- source size (extent) in Y directiondz
- source size (extent) in Z directionf
- source mass fluxt0
- source starting timet1
- source termination timet
- time to compute concentration at the observation pointanasolfunction
: Anasol function to call (check out the Anasol module) [long_bbb_ddd_iir_c]
Returns:
- predicted concentration at (wellx, welly, wellz, t)
source: Mads/src/MadsAnasol.jl:152
copyright()
Produce MADS copyright information
source: Mads/src/MadsHelp.jl:9
create_documentation()
Create web documentation files for Mads functions
source: Mads/src/MadsHelp.jl:62
create_tests_off()
Turn off the generation of MADS tests (default)
source: Mads/src/MadsHelpers.jl:17
create_tests_on()
Turn on the generation of MADS tests (dangerous)
source: Mads/src/MadsHelpers.jl:12
createmadsproblem(infilename::AbstractString, outfilename::AbstractString)
Create a new Mads problem where the observation targets are computed based on the model predictions
Mads.createmadsproblem(infilename, outfilename)
Mads.createmadsproblem(madsdata, outfilename)
- `Mads.createmadsproblem(madsdata, predictions, outfilename)
Arguments:
infilename
: input Mads fileoutfilename
: output Mads filemadsdata
: MADS problem dictionarypredictions
: dictionary of model predictions
source: Mads/src/MadsCreate.jl:16
createobservations!(madsdata::Associative{K, V}, time, observation)
Create observations in the MADS problem dictionary based on time
and observation
arrays
source: Mads/src/MadsObservations.jl:293
deleteNaN!(df::DataFrames.DataFrame)
Delete rows with NaN in a Dataframe df
source: Mads/src/MadsSA.jl:782
dobigdt(madsdata::Associative{K, V}, nummodelruns::Int64)
Perform BIG-DT analysis
Arguments:
madsdata
: MADS problem dictionarynummodelruns
: number of model runsnumhorizons
: number of info-gap horizons of uncertaintymaxHorizon
: maximum info-gap horizons of uncertaintynumlikelihoods
: number of Bayesian likelihoods
Returns:
bigdtresults
: dictionary with BIG-DT results
source: Mads/src/MadsBIG.jl:123
dumpasciifile(filename::AbstractString, data)
Dump ASCII file
source: Mads/src/MadsASCII.jl:8
dumpjsonfile(filename::AbstractString, data)
Dump a JSON file
source: Mads/src/MadsJSON.jl:17
dumpwelldata(filename::AbstractString, madsdata)
Dump well data from MADS problem dictionary into a ASCII file
source: Mads/src/MadsYAML.jl:130
dumpyamlfile(filename::AbstractString, yamldata)
Dump YAML file in JSON format
source: Mads/src/MadsYAML.jl:55
dumpyamlmadsfile(madsdata, filename::AbstractString)
Dump YAML Mads file
Arguments:
madsdata
: MADS problem dictionaryfilename
: file name
source: Mads/src/MadsYAML.jl:72
efast(md::Associative{K, V})
Sensitivity analysis using Saltelli's extended Fourier Amplitude Sensitivity Testing (eFAST) method
Arguments:
madsdata
: MADS problem dictionaryN
: number of samplesM
: maximum number of harmonicsgamma
: multiplication factor (Saltelli 1999 recommends gamma = 2 or 4)seed
: initial random seed
source: Mads/src/MadsSA.jl:818
evaluatemadsexpression(expressionstring, parameters)
Evaluate the expression in terms of the parameters, return a Dict() containing the expression names as keys, and the values of the expression as values
source: Mads/src/MadsMisc.jl:92
evaluatemadsexpressions(madsdata::Associative{K, V}, parameters)
Evaluate the expressions in terms of the parameters, return a Dict() containing the expression names as keys, and the values of the expression as values
source: Mads/src/MadsMisc.jl:101
filterkeys(dict::Associative{K, V}, key::Regex)
Filter dictionary keys based on a string or regular expression
source: Mads/src/MadsIO.jl:349
forward(madsdata::Associative{K, V})
Perform a forward run using the initial or provided values for the model parameters
forward(madsdata)
forward(madsdata, paramdict)
forward(madsdata, paramarray)
Arguments:
madsdata
: MADS problem dictionaryparamdict
: dictionary of model parameter valuesparamarray
: array of model parameter values
Returns:
obsvalues
: dictionary of model predictions
source: Mads/src/MadsForward.jl:21
forwardgrid(madsdata::Associative{K, V})
Perform a forward run over a 3D grid defined in madsdata
using the initial or provided values for the model parameters
forwardgrid(madsdata)
forwardgrid(madsdata, paramvalues))
Arguments:
madsdata
: MADS problem dictionaryparamvalues
: dictionary of model parameter values
Returns:
array3d
: 3D array with model predictions along a 3D grid
source: Mads/src/MadsForward.jl:106
free()
Use the latest tagged versions of the Mads modules
source: Mads/src/MadsPublish.jl:84
functions()
List available functions in the MADS modules:
Examples:
Mads.functions()
Mads.functions(BIGUQ)
Mads.functions("get")
Mads.functions(Mads, "get")
Arguments:
module
: MADS modulestring
: matching string
source: Mads/src/MadsHelp.jl:30
functions(string::AbstractString)
List available functions in the MADS modules:
Examples:
Mads.functions()
Mads.functions(BIGUQ)
Mads.functions("get")
Mads.functions(Mads, "get")
Arguments:
module
: MADS modulestring
: matching string
source: Mads/src/MadsHelp.jl:30
getextension(filename)
Get file name extension
Example:
ext = Mads.getextension("a.mads") # ext = "mads"
source: Mads/src/MadsIO.jl:320
getimportantsamples(samples::Array{T, N}, llhoods::Array{T, 1})
Get important samples
Arguments:
samples
: array of samplesllhoods
: vector of log-likelihoods
Returns:
imp_samples
: array of important samples
source: Mads/src/MadsSA.jl:102
getmadsdir()
Get the directory where currently Mads is running
problemdir = Mads.getmadsdir()
source: Mads/src/MadsIO.jl:276
getmadsinputfile()
Get the default MADS input file set as a MADS global variable using setmadsinputfile(filename)
Mads.getmadsinputfile()
Arguments: none
Returns:
filename
: input file name (e.g.input_file_name.mads
)
source: Mads/src/MadsIO.jl:240
getmadsproblemdir(madsdata::Associative{K, V})
Get the directory where the Mads data file is located
Mads.getmadsproblemdir(madsdata)
Example:
madsdata = Mads.loadmadsproblemdir("../../a.mads")
madsproblemdir = Mads.getmadsproblemdir(madsdata)
where madsproblemdir
= "../../"
source: Mads/src/MadsIO.jl:267
getmadsrootname(madsdata::Associative{K, V})
Get the MADS problem root name
madsrootname = Mads.getmadsrootname(madsdata)
source: Mads/src/MadsIO.jl:249
getobskeys(madsdata::Associative{K, V})
Get keys for all observations in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:22
getparamdict(madsdata::Associative{K, V})
Get dictionary with all parameters and their respective initial values
Mads.getparamdict(madsdata)
Arguments:
madsdata
: MADS problem dictionary
Returns:
paramdict
: dictionary with all parameters and their respective initial values
source: Mads/src/MadsParameters.jl:49
getparamdistributions(madsdata::Associative{K, V})
Get probabilistic distributions of all parameters in the MADS problem dictionary
Mads.getparamdistributions(madsdata; init_dist=false)
Note:
Probabilistic distribution of parameters can be defined only if dist
or min
/max
model parameter fields are specified in the MADS problem dictionary madsdata
.
Arguments:
madsdata
: MADS problem dictionaryinit_dist
: iftrue
use the distribution defined for initialization in the MADS problem dictionary (defined usinginit_dist
parameter field); else use the regular distribution defined in the MADS problem dictionary (defined usingdist
parameter field)
source: Mads/src/MadsParameters.jl:501
getparamkeys(madsdata::Associative{K, V})
Get keys of all parameters in the MADS dictionary
Mads.getparamkeys(madsdata)
Arguments:
madsdata
: MADS problem dictionary
Returns:
paramkeys
: array with the keys of all parameters in the MADS dictionary
source: Mads/src/MadsParameters.jl:30
getparamsinit_max(madsdata)
Get an array with init_max
values for all the MADS model parameters
source: Mads/src/MadsParameters.jl:256
getparamsinit_max(madsdata, paramkeys)
Get an array with init_max
values for parameters defined by paramkeys
source: Mads/src/MadsParameters.jl:222
getparamsinit_min(madsdata)
Get an array with init_min
values for all the MADS model parameters
source: Mads/src/MadsParameters.jl:216
getparamsinit_min(madsdata, paramkeys)
Get an array with init_min
values for parameters defined by paramkeys
source: Mads/src/MadsParameters.jl:182
getparamsmax(madsdata)
Get an array with min
values for all the MADS model parameters
source: Mads/src/MadsParameters.jl:176
getparamsmax(madsdata, paramkeys)
Get an array with max
values for parameters defined by paramkeys
source: Mads/src/MadsParameters.jl:153
getparamsmin(madsdata)
Get an array with min
values for all the MADS model parameters
source: Mads/src/MadsParameters.jl:147
getparamsmin(madsdata, paramkeys)
Get an array with min
values for parameters defined by paramkeys
source: Mads/src/MadsParameters.jl:124
getprocs()
Get the number of processors
source: Mads/src/MadsParallel.jl:2
getrestartdir(madsdata::Associative{K, V})
Get the directory where restarts will be stored.
source: Mads/src/MadsFunc.jl:296
getrestartdir(madsdata::Associative{K, V}, suffix)
Get the directory where restarts will be stored.
source: Mads/src/MadsFunc.jl:296
getrootname(filename::AbstractString)
Get file name root
Example:
r = Mads.getrootname("a.rnd.dat") # r = "a"
r = Mads.getrootname("a.rnd.dat", first=false) # r = "a.rnd"
source: Mads/src/MadsIO.jl:297
getsourcekeys(madsdata::Associative{K, V})
Get keys of all source parameters in the MADS dictionary
Mads.getsourcekeys(madsdata)
Arguments:
madsdata
: MADS problem dictionary
Returns:
sourcekeys
: array with keys of all source parameters in the MADS dictionary
source: Mads/src/MadsParameters.jl:70
gettarget(o::Associative{K, V})
Get observation target
source: Mads/src/MadsObservations.jl:140
gettargetkeys(madsdata::Associative{K, V})
Get keys for all targets (observations with weights greater than zero) in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:27
gettime(o::Associative{K, V})
Get observation time
source: Mads/src/MadsObservations.jl:92
getweight(o::Associative{K, V})
Get observation weight
source: Mads/src/MadsObservations.jl:116
getwellkeys(madsdata::Associative{K, V})
Get keys for all wells in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:35
haskeyword(madsdata::Associative{K, V}, keyword::AbstractString)
Check for a keyword
in a class within the Mads dictionary madsdata
Mads.haskeyword(madsdata, keyword)
Mads.haskeyword(madsdata, class, keyword)
Arguments:
madsdata
: MADS problem dictionaryclass
: dictionary class; if not provided searches forkeyword
inProblem
classkeyword
: dictionary key
Returns: true
or false
Examples:
Mads.haskeyword(madsdata, "disp")
... searches inProblem
class by defaultMads.haskeyword(madsdata, "Wells", "R-28")
... searches inWells
class for a keyword "R-28"
source: Mads/src/MadsHelpers.jl:65
help()
Produce MADS help information
source: Mads/src/MadsHelp.jl:4
importeverywhere(finename)
Import function everywhere from a file. The first function in the file is the one that will be called by Mads to perform the model simulations.
source: Mads/src/MadsFunc.jl:324
indexkeys(dict::Associative{K, V}, key::Regex)
Find indexes for dictionary keys based on a string or regular expression
source: Mads/src/MadsIO.jl:353
ins_obs(instructionfilename::AbstractString, inputfilename::AbstractString)
Apply Mads instruction file instructionfilename
to read model input file inputfilename
source: Mads/src/MadsIO.jl:467
instline2regexs(instline::AbstractString)
Convert an instruction line in the Mads instruction file into regular expressions
source: Mads/src/MadsIO.jl:402
invobsweights!(madsdata::Associative{K, V}, value::Number)
Inversely proportional observation weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:225
invwellweights!(madsdata::Associative{K, V}, value::Number)
Inversely proportional observation weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:258
islog(madsdata::Associative{K, V}, parameterkey::AbstractString)
Is parameter with key parameterkey
log-transformed?
source: Mads/src/MadsParameters.jl:315
isobs(madsdata::Associative{K, V}, dict::Associative{K, V})
Is a dictionary containing all the observations
source: Mads/src/MadsObservations.jl:5
isopt(madsdata::Associative{K, V}, parameterkey::AbstractString)
Is parameter with key parameterkey
optimizable?
source: Mads/src/MadsParameters.jl:305
isparam(madsdata::Associative{K, V}, dict::Associative{K, V})
Is the dictionary containing all the parameters
source: Mads/src/MadsParameters.jl:5
levenberg_marquardt(f::Function, g::Function, x0)
Levenberg-Marquardt optimization
Arguments:
f
: forward model functiong
: gradient function for the forward modelx0
: initial parameter guessroot
: Mads problem root nametolX
: parameter space tolerancetolG
: parameter space update tolerancetolOF
: objective function update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationsmaxJacobians
: maximum number of Jacobian solveslambda
: initial Levenberg-Marquardt lambda [eps(Float32)]lambda_scale
: lambda scaling factorlambda_mu
: lambda multiplication factor μ [10]lambda_nu
: lambda multiplication factor ν [10]np_lambda
: number of parallel lambda solvesshow_trace
: shows solution trace [default=false]alwaysDoJacobian
: computer Jacobian each iteration [false]callback
: call back function for debugging
source: Mads/src/MadsLM.jl:295
levenberg_marquardt(f::Function, g::Function, x0, o::Function)
Levenberg-Marquardt optimization
Arguments:
f
: forward model functiong
: gradient function for the forward modelx0
: initial parameter guessroot
: Mads problem root nametolX
: parameter space tolerancetolG
: parameter space update tolerancetolOF
: objective function update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationsmaxJacobians
: maximum number of Jacobian solveslambda
: initial Levenberg-Marquardt lambda [eps(Float32)]lambda_scale
: lambda scaling factorlambda_mu
: lambda multiplication factor μ [10]lambda_nu
: lambda multiplication factor ν [10]np_lambda
: number of parallel lambda solvesshow_trace
: shows solution trace [default=false]alwaysDoJacobian
: computer Jacobian each iteration [false]callback
: call back function for debugging
source: Mads/src/MadsLM.jl:295
loadasciifile(filename::AbstractString)
Load ASCII file
source: Mads/src/MadsASCII.jl:2
loadjsonfile(filename::AbstractString)
Load a JSON file
source: Mads/src/MadsJSON.jl:5
loadmadsfile(filename::AbstractString)
Load MADS input file defining a MADS problem dictionary
Mads.loadmadsfile(filename)
Mads.loadmadsfile(filename; julia=false)
Mads.loadmadsfile(filename; julia=true)
Arguments:
filename
: input file name (e.g.input_file_name.mads
)julia
: iftrue
, force usingjulia
parsing functions; iffalse
(default), usepython
parsing functions [boolean]
Returns:
madsdata
: Mads problem dictionary
Example: md = loadmadsfile("input_file_name.mads")
source: Mads/src/MadsIO.jl:21
loadyamlfile(filename::AbstractString)
Load YAML file
source: Mads/src/MadsYAML.jl:46
localsa(madsdata::Associative{K, V})
Local sensitivity analysis based on eigen analysis of covariance matrix
Arguments:
madsdata
: MADS problem dictionarymadsdata
: MADS problem dictionaryfilename
: output file nameformat
: output plot format (png
,pdf
, etc.)par
: parameter setobs
: observations for the parameter set
source: Mads/src/MadsSAPlot.jl:15
long_tests_off()
Turn off execution of long MADS tests (default)
source: Mads/src/MadsHelpers.jl:27
long_tests_on()
Turn on execution of long MADS tests (dangerous)
source: Mads/src/MadsHelpers.jl:22
madscritical(message::AbstractString)
MADS critical error messages
source: Mads/src/MadsLog.jl:40
madsdebug(message::AbstractString)
MADS debug messages (controlled by quiet
and debuglevel
)
source: Mads/src/MadsLog.jl:10
madsdebug(message::AbstractString, level::Int64)
MADS debug messages (controlled by quiet
and debuglevel
)
source: Mads/src/MadsLog.jl:10
madserror(message::AbstractString)
MADS error messages
source: Mads/src/MadsLog.jl:33
madsinfo(message::AbstractString)
MADS information/status messages (controlled by quietand
verbositylevel`)
source: Mads/src/MadsLog.jl:18
madsinfo(message::AbstractString, level::Int64)
MADS information/status messages (controlled by quietand
verbositylevel`)
source: Mads/src/MadsLog.jl:18
madsoutput(message::AbstractString)
MADS output (controlled by quietand
verbositylevel`)
source: Mads/src/MadsLog.jl:2
madsoutput(message::AbstractString, level::Int64)
MADS output (controlled by quietand
verbositylevel`)
source: Mads/src/MadsLog.jl:2
madswarn(message::AbstractString)
MADS warning messages
source: Mads/src/MadsLog.jl:26
makearrayconditionalloglikelihood(madsdata::Associative{K, V}, conditionalloglikelihood)
Make a conditional log likelihood function that accepts an array containing the opt parameters' values
source: Mads/src/MadsMisc.jl:57
makearrayfunction(madsdata::Associative{K, V})
Model section information criteria
source: Mads/src/MadsModelSelection.jl:2
makearrayfunction(madsdata::Associative{K, V}, f)
Make a version of the function f
that accepts an array containing the optimal parameters' values
Mads.makearrayfunction(madsdata, f)
Arguments:
madsdata
: MADS problem dictionaryf
: ...
Returns:
arrayfunction
: function accepting an array containing the optimal parameters' values
source: Mads/src/MadsMisc.jl:17
makearrayfunction(madsdata::Associative{K, V}, par::Array{T, N})
Model section information criteria
source: Mads/src/MadsModelSelection.jl:2
makearrayloglikelihood(madsdata::Associative{K, V}, loglikelihood)
Make a log likelihood function that accepts an array containing the opt parameters' values
source: Mads/src/MadsMisc.jl:70
makebigdt!(madsdata::Associative{K, V}, choice::Associative{K, V})
Setup BIG-DT problem
Arguments:
madsdata
: MADS problem dictionarychoice
: dictionary of BIG-DT choices (scenarios)
Returns:
bigdtproblem
: BIG-DT problem type
source: Mads/src/MadsBIG.jl:34
makebigdt(madsdata::Associative{K, V}, choice::Associative{K, V})
Setup BIG-DT problem
Arguments:
madsdata
: MADS problem dictionarychoice
: dictionary of BIG-DT choices (scenarios)
Returns:
bigdtproblem
: BIG-DT problem type
source: Mads/src/MadsBIG.jl:18
makecomputeconcentrations(madsdata::Associative{K, V})
Create a function to compute concentrations for all the observation points using Anasol
Mads.makecomputeconcentrations(madsdata)
Arguments:
madsdata
: MADS problem dictionary
Returns:
computeconcentrations
: function to compute concentrations;computeconcentrations
returns a dictionary of observations and model predicted concentrations
Examples:
computeconcentrations()
or
computeconcentrations = Mads.makecomputeconcentrations(madsdata)
paramkeys = Mads.getparamkeys(madsdata)
paramdict = OrderedDict(zip(paramkeys, map(key->madsdata["Parameters"][key]["init"], paramkeys)))
forward_preds = computeconcentrations(paramdict)
source: Mads/src/MadsAnasol.jl:31
makedoublearrayfunction(madsdata::Associative{K, V})
Make a version of the function f
that accepts an array containing the optimal parameters' values, and returns an array of observations
Mads.makedoublearrayfunction(madsdata, f)
Arguments:
madsdata
: MADS problem dictionaryf
: ...
Returns:
doublearrayfunction
: function accepting an array containing the optimal parameters' values, and returning an array of observations
source: Mads/src/MadsMisc.jl:40
makedoublearrayfunction(madsdata::Associative{K, V}, f)
Make a version of the function f
that accepts an array containing the optimal parameters' values, and returns an array of observations
Mads.makedoublearrayfunction(madsdata, f)
Arguments:
madsdata
: MADS problem dictionaryf
: ...
Returns:
doublearrayfunction
: function accepting an array containing the optimal parameters' values, and returning an array of observations
source: Mads/src/MadsMisc.jl:40
makelmfunctions(madsdata::Associative{K, V})
Make forward model, gradient, objective functions needed for Levenberg-Marquardt optimization
source: Mads/src/MadsLM.jl:67
makelocalsafunction(madsdata::Associative{K, V})
Make gradient function needed for local sensitivity analysis
source: Mads/src/MadsLM.jl:156
makelogprior(madsdata::Associative{K, V})
Make a function to compute the prior log-likelihood of the model parameters listed in the MADS problem dictionary madsdata
source: Mads/src/MadsFunc.jl:417
makemadscommandfunction(madsdatawithobs::Associative{K, V})
Make MADS function to execute the model defined in the MADS problem dictionary madsdata
Usage:
Mads.makemadscommandfunction(madsdata)
MADS can be coupled with any internal or external model. The model coupling is defined in the MADS problem dictionary. The expectations is that for a given set of model inputs, the model will produce a model output that will be provided to MADS. The fields in the MADS problem dictionary that can be used to define the model coupling are:
-
Model
: execute a Julia function defined in an input Julia file. The function that should accept aparameter
dictionary with all the model parameters as an input argument and should return anobservation
dictionary with all the model predicted observations. MADS will execute the first function defined in the file. -
MADS model
: create a Julia function based on an input Julia file. The input file should contain a function that accepts as an argument the MADS problem dictionary. MADS will execute the first function defined in the file. This function should a create a Julia function that will accept aparameter
dictionary with all the model parameters as an input argument and will return anobservation
dictionary with all the model predicted observations. -
Julia model
: execute an internal Julia function that accepts aparameter
dictionary with all the model parameters as an input argument and will return anobservation
dictionary with all the model predicted observations. -
Command
: execute an external UNIX command or script that will execute an external model. -
Julia command
: execute a Julia script that will execute an external model. The Julia script is defined in an input Julia file. The input file should contain a function that accepts as an argument the MADS problem dictionary; MADS will execute the first function defined in the file. The Julia script should be capable to (1) execute the model (making a system call of an external model), (2) parse the model outputs, (3) return anobservation
dictionary with model predictions.
Both Command
and Julia command
can use different approaches to pass model parameters to the external model.
Only Command
uses different approaches to get back the model outputs. The script defined under Julia command
parses the model outputs using Julia.
The available options for writing model inputs and reading model outputs are as follows.
Options for writing model inputs:
Templates
: template files for writing model input files as defined at http://mads.lanl.govASCIIParameters
: model parameters written in a ASCII fileJLDParameters
: model parameters written in a JLD fileYAMLParameters
: model parameters written in a YAML fileJSONParameters
: model parameters written in a JSON file
Options for reading model outputs:
Instructions
: instruction files for reading model output files as defined at http://mads.lanl.govASCIIPredictions
: model predictions read from a ASCII fileJLDPredictions
: model predictions read from a JLD fileYAMLPredictions
: model predictions read from a YAML fileJSONPredictions
: model predictions read from a JSON file
source: Mads/src/MadsFunc.jl:49
makemadscommandfunctionandgradient(madsdata::Associative{K, V})
Make MADS forward & gradient functions for the model defined in the MADS problem dictionary madsdata
source: Mads/src/MadsFunc.jl:352
makemadscommandgradient(madsdata::Associative{K, V})
Make MADS gradient function to compute the parameter-space gradient for the model defined in the MADS problem dictionary madsdata
source: Mads/src/MadsFunc.jl:337
makemadsconditionalloglikelihood(madsdata::Associative{K, V})
Make a function to compute the conditional log-likelihood of the model parameters conditioned on the model predictions/observations.
Model parameters and observations are defined in the MADS problem dictionary madsdata
.
source: Mads/src/MadsFunc.jl:432
makemadsloglikelihood(madsdata::Associative{K, V})
Make a function to compute the log-likelihood for a given set of model parameters, associated model predictions and existing observations.
The function can be provided as an external function in the MADS problem dictionary under LogLikelihood
or computed internally.
source: Mads/src/MadsFunc.jl:457
maxtorealmaxFloat32!(df::DataFrames.DataFrame)
Scale down values larger than max(Float32) in a Dataframe df
so that Gadfly can plot the data
source: Mads/src/MadsSA.jl:794
modobsweights!(madsdata::Associative{K, V}, value::Number)
Modify (multiply) observation weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:217
modwellweights!(madsdata::Associative{K, V}, value::Number)
Modify (multiply) well weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:247
montecarlo(madsdata::Associative{K, V})
Monte Carlo analysis
Mads.montecarlo(madsdata; N=100)
Arguments:
madsdata
: MADS problem dictionary sampling uniformly between mins/maxsN
: number of samples (default = 100)
Returns:
outputdicts
: parameter dictionary containing the data arrays
Dumps:
- YAML output file with the parameter dictionary containing the data arrays (
<mads_root_name>.mcresults.yaml
)
source: Mads/src/MadsMC.jl:104
naive_get_deltax(JpJ::Array{T, 2}, Jp::Array{T, 2}, f0::Array{T, 1}, lambda::Real)
Naive Levenberg-Marquardt optimization: get the LM parameter space step
source: Mads/src/MadsLM.jl:219
naive_levenberg_marquardt(f::Function, g::Function, x0::Array{T, 1})
Naive Levenberg-Marquardt optimization
Arguments:
f
: forward model functiong
: gradient function for the forward modelx0
: initial parameter guesso
: objective functiontolX
: parameter space tolerancetolG
: parameter space update tolerancetolOF
: objective function update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationslambda
: initial Levenberg-Marquardt lambda [100]lambda_mu
: lambda multiplication factor μ [10]np_lambda
: number of parallel lambda solves
source: Mads/src/MadsLM.jl:255
naive_levenberg_marquardt(f::Function, g::Function, x0::Array{T, 1}, o::Function)
Naive Levenberg-Marquardt optimization
Arguments:
f
: forward model functiong
: gradient function for the forward modelx0
: initial parameter guesso
: objective functiontolX
: parameter space tolerancetolG
: parameter space update tolerancetolOF
: objective function update tolerancemaxEval
: maximum number of model evaluationsmaxIter
: maximum number of optimization iterationslambda
: initial Levenberg-Marquardt lambda [100]lambda_mu
: lambda multiplication factor μ [10]np_lambda
: number of parallel lambda solves
source: Mads/src/MadsLM.jl:255
naive_lm_iteration(f::Function, g::Function, o::Function, x0::Array{T, 1}, f0::Array{T, 1}, lambdas::Array{T, 1})
Naive Levenberg-Marquardt optimization: perform LM iteration
source: Mads/src/MadsLM.jl:226
noplot()
Disable MADS plotting
source: Mads/src/MadsParallel.jl:173
obslineismatch(obsline::AbstractString, regexs::Array{Regex, 1})
Match an instruction line in the Mads instruction file with model input file
source: Mads/src/MadsIO.jl:441
of(madsdata::Associative{K, V}, results::Array{T, 1})
Compute objective function
source: Mads/src/MadsLM.jl:37
paramarray2dict(madsdata::Associative{K, V}, array::Array{T, N})
Convert parameter array to a parameter dictionary of arrays
source: Mads/src/MadsMC.jl:154
parametersample(madsdata::Associative{K, V}, numsamples::Integer)
Independent sampling of model parameters defined in the MADS problem dictionary
Arguments:
madsdata
: MADS problem dictionarynumsamples
: number of samplesparameterkey
: model parameter keyinit_dist
: iftrue
use the distribution defined for initialization in the MADS problem dictionary (defined usinginit_dist
parameter field); else use the regular distribution defined in the MADS problem dictionary (defined usingdist
parameter field)
source: Mads/src/MadsSA.jl:151
parametersample(madsdata::Associative{K, V}, numsamples::Integer, parameterkey::AbstractString)
Independent sampling of model parameters defined in the MADS problem dictionary
Arguments:
madsdata
: MADS problem dictionarynumsamples
: number of samplesparameterkey
: model parameter keyinit_dist
: iftrue
use the distribution defined for initialization in the MADS problem dictionary (defined usinginit_dist
parameter field); else use the regular distribution defined in the MADS problem dictionary (defined usingdist
parameter field)
source: Mads/src/MadsSA.jl:151
paramrand(madsdata::Associative{K, V}, parameterkey::AbstractString)
Random numbers for a MADS model parameter defined by parameterkey
Arguments:
madsdata
: MADS problem dictionaryparameterkey
: model parameter keynumsamples
: number of samplesparamdist
: dictionary with parameter distributions
source: Mads/src/MadsSA.jl:174
parsemadsdata(madsdata::Associative{K, V})
Parse loaded Mads problem dictionary
Arguments:
madsdata
: Mads problem dictionary
source: Mads/src/MadsIO.jl:39
parser_amanzi()
Parse Amanzi output provided in an external file (filename
)
Mads.parser_amanzi()
Mads.parser_amanzi("observations.out")
Arguments:
filename
: external file name (optional)
Returns:
dict
: a dictionary with model observations following MADS requirements
source: Mads/src/MadsParsers.jl:19
parser_amanzi(filename::AbstractString)
Parse Amanzi output provided in an external file (filename
)
Mads.parser_amanzi()
Mads.parser_amanzi("observations.out")
Arguments:
filename
: external file name (optional)
Returns:
dict
: a dictionary with model observations following MADS requirements
source: Mads/src/MadsParsers.jl:19
partialof(madsdata::Associative{K, V}, resultdict::Associative{K, V}, regex::Regex)
Compute the sum of squared residuals for observations that match a regular expression
source: Mads/src/MadsLM.jl:50
plotSAresults_monty(wellname, madsdata, result)
Plot the sensitivity analysis results for each well (Specific plot requested by Monty)
source: Mads/src/MadsSAPlot.jl:108
plotgrid(madsdata::Associative{K, V}, s::Array{Float64, N})
Plot a 3D grid solution based on model predictions in array s
, initial parameters, or user provided parameter values
plotgrid(madsdata, s; addtitle=true, title="", filename="", format="")
plotgrid(madsdata; addtitle=true, title="", filename="", format="")
plotgrid(madsdata, parameters; addtitle=true, title="", filename="", format="")
Arguments:
madsdata
: MADS problem dictionaryparameters
: dictionary with model parameterss
: model predictions arrayaddtitle
: add plot title [true]title
: plot titlefilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlotPy.jl:22
plotmadsproblem(madsdata::Associative{K, V})
Plot contaminant sources and wells defined in MADS problem dictionary
Arguments:
madsdata
: MADS problem dictionaryfilename
: output file nameformat
: output plot format (png
,pdf
, etc.)keyword
: to be added in the filename
source: Mads/src/MadsPlot.jl:58
plotmass(lambda, mass_injected, mass_reduced, filename::AbstractString)
Plot injected/reduced contaminant mass
Mads.plotmass(lambda, mass_injected, mass_reduced, filename="file_name")
Arguments:
lambda
: array with all the lambda valuesmass_injected
: array with associated total injected massmass_reduced
: array with associated total reduced massfilename
: output filename for the generated plotformat
: output plot format (png
,pdf
, etc.)
Dumps: image file with name filename
and in specified format
source: Mads/src/MadsAnasolPlot.jl:18
plotmatches(madsdata_in::Associative{K, V})
Plot the matches between model predictions and observations
plotmatches(madsdata; filename="", format="")
plotmatches(madsdata, param; filename="", format="")
plotmatches(madsdata, result; filename="", format="")
plotmatches(madsdata, result, r"NO3"; filename="", format="")
Arguments:
madsdata
: MADS problem dictionaryparam
: dictionary with model parametersresult
: dictionary with model predictionsrx
: regular expression to filter the outputsfilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:143
plotobsSAresults(madsdata, result)
Plot the sensitivity analysis results for the observations
Arguments:
madsdata
: MADS problem dictionaryresult
: sensitivity analysis resultsfilter
: string or regex to plot only observations containingfilter
keyword
: to be added in the auto-generated filenamefilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:462
plotrobustnesscurves(madsdata::Associative{K, V}, bigdtresults::Dict{K, V})
Plot BIG-DT robustness curves
Arguments:
madsdata
: MADS problem dictionarybigdtresults
: BIG-DT resultsfilename
: output file name used to dump plotsformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsBIGPlot.jl:13
plotseries(X::Array{T, 2}, filename::AbstractString)
Create plots of data series
Arguments:
X
: matrix with the series datafilename
: output file nameformat
: output plot format (png
,pdf
, etc.)xtitle
: x-axis titleytitle
: y-axis titletitle
: plot titlename
: series namecombined
:true
by default
source: Mads/src/MadsPlot.jl:946
plotwellSAresults(madsdata, result)
Plot the sensitivity analysis results for all the wells in the MADS problem dictionary (wells class expected)
Arguments:
madsdata
: MADS problem dictionaryresult
: sensitivity analysis resultsxtitle
: x-axis titleytitle
: y-axis titlefilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:343
plotwellSAresults(madsdata, result, wellname)
Plot the sensitivity analysis results for a given well in the MADS problem dictionary (wells class expected)
Arguments:
madsdata
: MADS problem dictionaryresult
: sensitivity analysis resultswellname
: well namextitle
: x-axis titleytitle
: y-axis titlefilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:368
printSAresults(madsdata::Associative{K, V}, results::Associative{K, V})
Print sensitivity analysis results
source: Mads/src/MadsSA.jl:651
quietoff()
Make MADS not quiet
source: Mads/src/MadsHelpers.jl:7
quieton()
Make MADS quiet
source: Mads/src/MadsHelpers.jl:2
readasciipredictions(filename::AbstractString)
Read MADS predictions from an ASCII file
source: Mads/src/MadsASCII.jl:13
readjsonpredictions(filename::AbstractString)
Read MADS model predictions from a JSON file
source: Mads/src/MadsJSON.jl:24
readobservations(madsdata::Associative{K, V})
Read observations
source: Mads/src/MadsIO.jl:493
readobservations(madsdata::Associative{K, V}, obsids)
Read observations
source: Mads/src/MadsIO.jl:493
readobservations_cmads(madsdata::Associative{K, V})
Read observations using C Mads library
source: Mads/src/MadsIO.jl:526
readyamlpredictions(filename::AbstractString)
Read MADS model predictions from a YAML file filename
source: Mads/src/MadsYAML.jl:125
regexs2obs(obsline, regexs, obsnames, getparamhere)
Get observations for a set of regular expressions
source: Mads/src/MadsIO.jl:447
resetmodelruns()
Reset the model runs count to be equal to zero
source: Mads/src/MadsHelpers.jl:42
residuals(madsdata::Associative{K, V}, results::Array{T, 1})
Compute residuals
source: Mads/src/MadsLM.jl:5
reweighsamples(madsdata::Associative{K, V}, predictions::Array{T, N}, oldllhoods::Array{T, 1})
Reweigh samples using importance sampling -- returns a vector of log-likelihoods after reweighing
Arguments:
madsdata
: MADS problem dictionarypredictions
: the model predictions for each of the samplesoldllhoods
: the log likelihoods of the parameters in the old distribution
Returns:
newllhoods
: vector of log-likelihoods after reweighing
source: Mads/src/MadsSA.jl:75
rosenbrock(x::Array{T, 1})
Rosenbrock test function
source: Mads/src/MadsTestFunctions.jl:17
rosenbrock2_gradient_lm(x)
Parameter gradients of the Rosenbrock test function
source: Mads/src/MadsTestFunctions.jl:7
rosenbrock2_lm(x)
Rosenbrock test function (more difficult to solve)
source: Mads/src/MadsTestFunctions.jl:2
rosenbrock_gradient!(x::Array{T, 1}, storage::Array{T, 1})
Parameter gradients of the Rosenbrock test function
source: Mads/src/MadsTestFunctions.jl:27
rosenbrock_gradient_lm(x::Array{T, 1})
Parameter gradients of the Rosenbrock test function for LM optimization (returns the gradients for the 2 components separetely)
source: Mads/src/MadsTestFunctions.jl:33
rosenbrock_hessian!(x::Array{T, 1}, storage::Array{T, 2})
Parameter Hessian of the Rosenbrock test function
source: Mads/src/MadsTestFunctions.jl:43
rosenbrock_lm(x::Array{T, 1})
Rosenbrock test function for LM optimization (returns the 2 components separetely)
source: Mads/src/MadsTestFunctions.jl:22
saltelli(madsdata::Associative{K, V})
Saltelli sensitivity analysis
Arguments:
madsdata
: MADS problem dictionaryN
: number of samplesseed
: initial random seedrestartdir
: directory where files will be stored containing model results for fast simulation restartsparallel
: set to true if the model runs should be performed in parallel
source: Mads/src/MadsSA.jl:376
saltellibrute(madsdata::Associative{K, V})
Saltelli sensitivity analysis (brute force)
Arguments:
madsdata
: MADS problem dictionaryN
: number of samplesseed
: initial random seed
source: Mads/src/MadsSA.jl:206
saltelliprintresults2(madsdata::Associative{K, V}, results::Associative{K, V})
Print sensitivity analysis results (method 2)
source: Mads/src/MadsSA.jl:727
savemadsfile(madsdata::Associative{K, V})
Save MADS problem dictionary madsdata
in MADS input file filename
Mads.savemadsfile(madsdata)
Mads.savemadsfile(madsdata, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads", explicit=true)
Arguments:
madsdata
: Mads problem dictionaryparameters
: Dictinary with parameters (optional)filename
: input file name (e.g.input_file_name.mads
)julia
: iftrue
use Julia JSON module to saveexplicit
: iftrue
ignores MADS YAML file modifications and rereads the original input file
source: Mads/src/MadsIO.jl:158
savemadsfile(madsdata::Associative{K, V}, filename::AbstractString)
Save MADS problem dictionary madsdata
in MADS input file filename
Mads.savemadsfile(madsdata)
Mads.savemadsfile(madsdata, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads", explicit=true)
Arguments:
madsdata
: Mads problem dictionaryparameters
: Dictinary with parameters (optional)filename
: input file name (e.g.input_file_name.mads
)julia
: iftrue
use Julia JSON module to saveexplicit
: iftrue
ignores MADS YAML file modifications and rereads the original input file
source: Mads/src/MadsIO.jl:158
savemcmcresults(chain::Array{T, N}, filename::AbstractString)
Save MCMC chain in a file
source: Mads/src/MadsMC.jl:63
scatterplotsamples(madsdata, samples::Array{T, 2}, filename::AbstractString)
Create histogram/scatter plots of model parameter samples
Arguments:
madsdata
: MADS problem dictionarysamples
: matrix with model parametersfilename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:299
searchdir(key::Regex)
Get files in the current directory or in a directory defined by path
matching pattern key
which can be a string or regular expression
Mads.searchdir(key)
Mads.searchdir(key; path = ".")
Arguments:
key
: matching pattern for Mads input files (string or regular expression accepted)path
: search directory for the mads input files
Returns:
filename
: an array with file names matching the pattern in the specified directory
source: Mads/src/MadsIO.jl:345
setallparamsoff!(madsdata::Associative{K, V})
Set all parameters OFF
source: Mads/src/MadsParameters.jl:332
setallparamson!(madsdata::Associative{K, V})
Set all parameters ON
source: Mads/src/MadsParameters.jl:324
setdebuglevel(level::Int64)
Set MADS debug level
source: Mads/src/MadsHelpers.jl:32
setdir(dir::ASCIIString)
Set the working directory (for parallel environments)
@everywhere Mads.setdir()
@everywhere Mads.setdir("/home/monty")
source: Mads/src/MadsParallel.jl:191
setdynamicmodel(madsdata::Associative{K, V}, f::Function)
Set Dynamic Model for MADS model calls using internal Julia functions
source: Mads/src/MadsMisc.jl:87
setplotfileformat(filename, format)
Set image file format
based on the filename
extension, or sets the filename
extension based on the requested format
. The default format
is SVG
. PNG
, PDF
, ESP
, and PS
are also supported.
setplotfileformat(filename, format)
Arguments:
filename
: output file nameformat
: output plot format (png
,pdf
, etc.)
Returns:
filename
: output file nameformat
: output plot format (png
,pdf
, etc.)
source: Mads/src/MadsPlot.jl:23
setmadsinputfile(filename::AbstractString)
Set a default MADS input file
Mads.setmadsinputfile(filename)
Arguments:
filename
: input file name (e.g.input_file_name.mads
)
source: Mads/src/MadsIO.jl:225
setobservationtargets!(madsdata::Associative{K, V}, predictions::Associative{K, V})
Set observations (calibration targets) in the MADS problem dictionary based on a predictions
dictionary
source: Mads/src/MadsObservations.jl:337
setobstime!(madsdata::Associative{K, V}, separator::AbstractString)
Set observation time based on the observation name in the MADS problem dictionary
Usage:
Mads.setobstime!(madsdata, separator)
Mads.setobstime!(madsdata, regex)
Arguments:
madsdata
: MADS problem dictionaryseparator
: string to separatorregex
: regular expression to match
Examples:
Mads.setobstime!(madsdata, "_t")
Mads.setobstime!(madsdata, r"[A-x]*_t([0-9,.]+)")
source: Mads/src/MadsObservations.jl:185
setobsweights!(madsdata::Associative{K, V}, value::Number)
Set observation weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:209
setparamoff!(madsdata::Associative{K, V}, parameterkey)
Set a specific parameter with a key parameterkey
OFF
source: Mads/src/MadsParameters.jl:345
setparamon!(madsdata::Associative{K, V}, parameterkey::AbstractString)
Set a specific parameter with a key parameterkey
ON
source: Mads/src/MadsParameters.jl:340
setparamsdistnormal!(madsdata::Associative{K, V}, mean, stddev)
Set normal parameter distributions for all the model parameters in the MADS problem dictionary
Mads.setparamsdistnormal!(madsdata, mean, stddev)
Arguments:
madsdata
: MADS problem dictionarymean
: array with the mean valuesstddev
: array with the standard deviation values
source: Mads/src/MadsParameters.jl:360
setparamsdistuniform!(madsdata::Associative{K, V}, min, max)
Set uniform parameter distributions for all the model parameters in the MADS problem dictionary
Mads.setparamsdistuniform!(madsdata, min, max)
Arguments:
madsdata
: MADS problem dictionarymin
: array with the minimum valuesmax
: array with the maximum values
source: Mads/src/MadsParameters.jl:378
setparamsinit!(madsdata::Associative{K, V}, paramdict::Associative{K, V})
Set initial parameter guesses in the MADS dictionary
Mads.setparamsinit!(madsdata, paramdict)
Arguments:
madsdata
: MADS problem dictionaryparamdict
: dictionary with initial model parameter values
source: Mads/src/MadsParameters.jl:271
setprocs()
Set the available processors based on environmental variables. Supports SLURM only at the moment.
Usage:
Mads.setprocs()
Mads.setprocs(ntasks_per_node=4)
Mads.setprocs(ntasks_per_node=32, mads_servers=true)
Mads.setprocs(ntasks_per_node=64, machinenames=["madsmax", "madszem"])
Mads.setprocs(ntasks_per_node=64, mads_servers=true, exename="/home/monty/bin/julia", dir="/home/monty")
Optional arguments:
ntasks_per_node
: number of parallel tasks per nodemachinenames
: array with machines names to invokeddir
: common directory shared by all the jobsexename
: location of the julia executable (the same version of julia is needed on all the workers)mads_servers
: iftrue
use MADS servers (LANL only)quiet
: suppress output [defaulttrue
]test
: test the servers and connect to each one ones at a time [defaultfalse
]
source: Mads/src/MadsParallel.jl:64
setprocs(np::Int64, nt::Int64)
Set the number of processors to np
and the number of threads to nt
Usage:
Mads.setprocs(4)
Mads.setprocs(4, 8)
Arguments:
np
: number of processorsnt
: number of threads
source: Mads/src/MadsParallel.jl:20
setseed(seed::Number)
Set current seed
source: Mads/src/MadsSA.jl:11
settarget!(o::Associative{K, V}, target)
Set observation target
source: Mads/src/MadsObservations.jl:153
settime!(o::Associative{K, V}, time)
Set observation time
source: Mads/src/MadsObservations.jl:105
setverbositylevel(level::Int64)
Set MADS verbosity level
source: Mads/src/MadsHelpers.jl:37
setweight!(o::Associative{K, V}, weight)
Set observation weight
source: Mads/src/MadsObservations.jl:129
setwellweights!(madsdata::Associative{K, V}, value::Number)
Set well weights in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:236
showallparameters(madsdata::Associative{K, V})
Show all parameters in the MADS problem dictionary
source: Mads/src/MadsParameters.jl:448
showobservations(madsdata::Associative{K, V})
Show observations in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:272
showparameters(madsdata::Associative{K, V})
Show optimizable parameters in the MADS problem dictionary
source: Mads/src/MadsParameters.jl:417
sinetransform(sineparams::Array{T, 1}, lowerbounds::Array{T, 1}, upperbounds::Array{T, 1}, indexlogtransformed::Array{T, 1})
Sine transformation of model parameters
source: Mads/src/MadsSine.jl:10
sinetransformfunction(f::Function, lowerbounds::Array{T, 1}, upperbounds::Array{T, 1}, indexlogtransformed::Array{T, 1})
Sine transformation of a function
source: Mads/src/MadsSine.jl:17
sinetransformgradient(g::Function, lowerbounds::Array{T, 1}, upperbounds::Array{T, 1}, indexlogtransformed::Array{T, 1})
Sine transformation of a gradient function
source: Mads/src/MadsSine.jl:25
spaghettiplot(madsdata::Associative{K, V}, number_of_samples::Int64)
Generate a combined spaghetti plot for the selected
(type != null
) model parameter
Mads.spaghettiplot(madsdata, paramdictarray; filename="", keyword = "", format="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Mads.spaghettiplot(madsdata, obsmdictarray; filename="", keyword = "", format="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Mads.spaghettiplot(madsdata, number_of_samples; filename="", keyword = "", format="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Arguments:
madsdata
: MADS problem dictionaryparamdictarray
: parameter dictionary array containing the data arrays to be plottedobsdictarray
: observation dictionary array containing the data arrays to be plottednumber_of_samples
: number of samplesfilename
: output file name used to output the produced plotskeyword
: keyword to be added in the file name used to output the produced plots (iffilename
is not defined)format
: output plot format (png
,pdf
, etc.)xtitle
:x
axis titleytitle
:y
axis titleobs_plot_dots
: plot observation as dots (true
[default] orfalse
)seed
: initial random seed
Returns: none
Dumps:
- Image file with a spaghetti plot (
<mads_rootname>-<keyword>-<number_of_samples>-spaghetti.<default_image_extension>
)
source: Mads/src/MadsPlot.jl:788
spaghettiplots(madsdata::Associative{K, V}, number_of_samples::Int64)
Generate separate spaghetti plots for each selected
(type != null
) model parameter
Mads.spaghettiplots(madsdata, paramdictarray; format="", keyword="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Mads.spaghettiplots(madsdata, number_of_samples; format="", keyword="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Arguments:
madsdata
: MADS problem dictionaryparamdictarray
: parameter dictionary containing the data arrays to be plottednumber_of_samples
: number of sampleskeyword
: keyword to be added in the file name used to output the produced plotsformat
: output plot format (png
,pdf
, etc.)xtitle
:x
axis titleytitle
:y
axis titleobs_plot_dots
: plot observation as dots (true
[default] orfalse
)seed
: initial random seed
Dumps:
- A series of image files with spaghetti plots for each
selected
(type != null
) model parameter (<mads_rootname>-<keyword>-<param_key>-<number_of_samples>-spaghetti.<default_image_extension>
)
source: Mads/src/MadsPlot.jl:643
sprintf(args...)
Convert @sprintf
macro into sprintf
function
source: Mads/src/MadsParallel.jl:39
status()
Status of the Mads modules
source: Mads/src/MadsPublish.jl:17
tag()
Tag the Mads modules with a default argument :patch
source: Mads/src/MadsPublish.jl:67
tag(sym::Symbol)
Tag the Mads modules with a default argument :patch
source: Mads/src/MadsPublish.jl:67
test()
Execute Mads tests (the tests will be in parallel if processors are defined)
source: Mads/src/MadsTest.jl:21
test(testmod)
Execute Mads tests (the tests will be in parallel if processors are defined)
source: Mads/src/MadsTest.jl:21
testj()
Execute Mads tests using Julia Pkg.test (the default Pkg.test in Julia is executed in serial)
source: Mads/src/MadsTest.jl:2
testj(coverage::Bool)
Execute Mads tests using Julia Pkg.test (the default Pkg.test in Julia is executed in serial)
source: Mads/src/MadsTest.jl:2
void2nan!(dict::Associative{K, V})
Convert Void's into NaN's in a dictionary
source: Mads/src/MadsSA.jl:762
weightedstats(samples::Array{T, N}, llhoods::Array{T, 1})
Get weighted mean and variance samples
Arguments:
samples
: array of samplesllhoods
: vector of log-likelihoods
Returns:
mean
: vector of sample meansvar
: vector of sample variances
source: Mads/src/MadsSA.jl:134
welloff!(madsdata, wellname::AbstractString)
Turn off a specific well in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:385
wellon!(madsdata::Associative{K, V}, wellname::AbstractString)
Turn on a specific well in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:361
wells2observations!(madsdata::Associative{K, V})
Convert Wells
class to Observations
class in the MADS problem dictionary
source: Mads/src/MadsObservations.jl:401
writeparameters(madsdata::Associative{K, V})
Write initial parameters
source: Mads/src/MadsIO.jl:386
writeparameters(madsdata::Associative{K, V}, parameters)
Write parameters
source: Mads/src/MadsIO.jl:393
writeparametersviatemplate(parameters, templatefilename, outputfilename)
Write parameters
via MADS template (templatefilename
) to an output file (outputfilename
)
source: Mads/src/MadsIO.jl:357