Mads.jl
MADS (Model Analysis & Decision Support)
Mads.jl is MADS main module.
Mads.jl module functions:
<a id='Mads.MFlm-Union{Tuple{T}, Tuple{AbstractMatrix{T}, Integer}} where T<:Number' href='#Mads.MFlm-Union{Tuple{T}, Tuple{AbstractMatrix{T}, Integer}} where T<:Number'>#
Mads.MFlm
— Method.
Matrix Factorization using Levenberg Marquardt
Methods:
Mads.MFlm(X::AbstractMatrix{T}, nk::Integer; method, log_W, log_H, retries, initW, initH, tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_mu, np_lambda, show_trace, quiet) where T<:Number in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:133Mads.MFlm(X::AbstractMatrix{T}, range::AbstractRange{Int64}; kw...) where T<:Number in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:103
Arguments:
X::AbstractMatrix{T}
: matrix to factorizenk::Integer
: number of features to extractrange::AbstractRange{Int64}
Keywords:
initH
: initial H (feature) matrixinitW
: initial W (weight) matrixlambda
lambda_mu
log_H
: log-transform H (feature) matrix[default=false
]log_W
: log-transform W (weight) matrix [default=false
]maxEval
maxIter
maxJacobians
method
np_lambda
quiet
retries
: number of solution retries [default=1
]show_trace
tolG
tolOF
tolX
Returns:
- NMF results
#
Mads.NMFipopt
— Function.
Non-negative Matrix Factorization using JuMP/Ipopt
Methods:
Mads.NMFipopt(X::AbstractMatrix{T} where T, nk::Integer, retries::Integer; random, maxiter, maxguess, initW, initH, verbosity, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:60Mads.NMFipopt(X::AbstractMatrix{T} where T, nk::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:60
Arguments:
X::AbstractMatrix{T} where T
: matrix to factorizenk::Integer
: number of features to extractretries::Integer
: number of solution retries [default=1
]
Keywords:
initH
: initial H (feature) matrixinitW
: initial W (weight) matrixmaxguess
: guess about the maximum for the H (feature) matrix [default=1
]maxiter
: maximum number of iterations [default=100000
]quiet
: quiet [default=false
]random
: random initial guesses [default=false
]verbosity
: verbosity output level [default=0
]
Returns:
- NMF results
#
Mads.NMFm
— Function.
Non-negative Matrix Factorization using NMF
Methods:
Mads.NMFm(X::Array, nk::Integer, retries::Integer; tol, maxiter) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:21Mads.NMFm(X::Array, nk::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBlindSourceSeparation.jl:21
Arguments:
X::Array
: matrix to factorizenk::Integer
: number of features to extractretries::Integer
: number of solution retries [default=1
]
Keywords:
maxiter
: maximum number of iterations [default=10000
]tol
: solution tolerance [default=1.0e-9
]
Returns:
- NMF results
#
Mads.addkeyword!
— Function.
Add a keyword
in a class
within the Mads dictionary madsdata
Methods:
Mads.addkeyword!(madsdata::AbstractDict, class::AbstractString, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:288Mads.addkeyword!(madsdata::AbstractDict, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:284
Arguments:
class::AbstractString
: dictionary class; if not provided searches forkeyword
inProblem
classkeyword::AbstractString
: dictionary keymadsdata::AbstractDict
: MADS problem dictionary
#
Mads.addsource!
— Function.
Add an additional contamination source
Methods:
Mads.addsource!(madsdata::AbstractDict, sourceid::Int64; dict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:18Mads.addsource!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:18
Arguments:
madsdata::AbstractDict
: MADS problem dictionarysourceid::Int64
: source id [default=0
]
Keywords:
dict
#
Mads.addsourceparameters!
— Method.
Add contaminant source parameters
Methods:
Mads.addsourceparameters!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:75
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.allwellsoff!
— Method.
Turn off all the wells in the MADS problem dictionary
Methods:
Mads.allwellsoff!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:602
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.allwellson!
— Method.
Turn on all the wells in the MADS problem dictionary
Methods:
Mads.allwellson!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:544
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.amanzi
— Function.
Execute Amanzi external groundwater flow and transport simulator
Methods:
Mads.amanzi(filename::AbstractString, nproc::Int64, quiet::Bool, observation_filename::AbstractString, setup::AbstractString; amanzi_exe) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSimulators.jl:14Mads.amanzi(filename::AbstractString, nproc::Int64, quiet::Bool, observation_filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSimulators.jl:14Mads.amanzi(filename::AbstractString, nproc::Int64, quiet::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSimulators.jl:14Mads.amanzi(filename::AbstractString, nproc::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSimulators.jl:14Mads.amanzi(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSimulators.jl:14
Arguments:
filename::AbstractString
: amanzi input file namenproc::Int64
: number of processor to be used by Amanzi [default=Mads.nprocs_per_task_default
]observation_filename::AbstractString
: Amanzi observation file name [default="observations.out"
]quiet::Bool
: suppress output [default=Mads.quiet
]setup::AbstractString
: bash script to setup Amanzi environmental variables [default="source-amanzi-setup"
]
Keywords:
amanzi_exe
: full path to the Amanzi executable
#
Mads.amanzi_output_parser
— Function.
Parse Amanzi output provided in an external file (filename
)
Methods:
Mads.amanzi_output_parser(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParsers.jl:21Mads.amanzi_output_parser() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParsers.jl:21
Arguments:
filename::AbstractString
: external file name [default="observations.out"
]
Returns:
- dictionary with model observations following MADS requirements
Example:
Mads.amanzi_output_parser()
Mads.amanzi_output_parser("observations.out")
#
Mads.asinetransform
— Function.
Arcsine transformation of model parameters
Methods:
Mads.asinetransform(params::AbstractVector{T} where T, lowerbounds::AbstractVector{T} where T, upperbounds::AbstractVector{T} where T, indexlogtransformed::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:13Mads.asinetransform(madsdata::AbstractDict, params::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:3
Arguments:
indexlogtransformed::AbstractVector{T} where T
: index vector of log-transformed parameterslowerbounds::AbstractVector{T} where T
: lower boundsmadsdata::AbstractDict
: MADS problem dictionaryparams::AbstractVector{T} where T
: model parametersupperbounds::AbstractVector{T} where T
: upper bounds
Returns:
- Arcsine transformation of model parameters
#
Mads.bigdt
— Method.
Perform Bayesian Information Gap Decision Theory (BIG-DT) analysis
Methods:
Mads.bigdt(madsdata::AbstractDict, nummodelruns::Int64; numhorizons, maxHorizon, numlikelihoods) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBayesInfoGap.jl:122
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynummodelruns::Int64
: number of model runs
Keywords:
maxHorizon
: maximum info-gap horizons of uncertainty [default=3
]numhorizons
: number of info-gap horizons of uncertainty [default=100
]numlikelihoods
: number of Bayesian likelihoods [default=25
]
Returns:
- dictionary with BIG-DT results
#
Mads.boundparameters!
— Function.
Bound model parameters based on their ranges
Methods:
Mads.boundparameters!(madsdata::AbstractDict, pardict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:778Mads.boundparameters!(madsdata::AbstractDict, parvec::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:766
Arguments:
madsdata::AbstractDict
: MADS problem dictionarypardict::AbstractDict
: Parameter dictionaryparvec::AbstractVector{T} where T
: Parameter vector
#
Mads.calibrate
— Method.
Calibrate Mads model using a constrained Levenberg-Marquardt technique
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)
Methods:
Mads.calibrate(madsdata::AbstractDict; tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_mu, np_lambda, show_trace, usenaive, save_results, localsa) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:168
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
lambda
: initial Levenberg-Marquardt lambda [default=100.0
]lambda_mu
: lambda multiplication factor [default=10.0
]localsa
: perform local sensitivity analysis [default=false
]maxEval
: maximum number of model evaluations [default=1000
]maxIter
: maximum number of optimization iterations [default=100
]maxJacobians
: maximum number of Jacobian solves [default=100
]np_lambda
: number of parallel lambda solves [default=10
]save_results
: save intermediate results [default=true
]show_trace
: shows solution trace [default=false
]tolG
: parameter space update tolerance [default=1e-6
]tolOF
: objective function tolerance [default=1e-3
]tolX
: parameter space tolerance [default=1e-4
]usenaive
: use naive Levenberg-Marquardt solver [default=false
]
Returns:
- model parameter dictionary with the optimal values at the minimum
- optimization algorithm results (e.g. results.minimizer)
#
Mads.calibraterandom
— Function.
Calibrate with random initial guesses
Methods:
Mads.calibraterandom(madsdata::AbstractDict, numberofsamples::Integer; tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_mu, np_lambda, show_trace, usenaive, seed, quiet, all, save_results, first_init) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:41Mads.calibraterandom(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:41
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumberofsamples::Integer
: number of random initial samples [default=1
]
Keywords:
all
: all model results are returned [default=false
]first_init
lambda
: initial Levenberg-Marquardt lambda [default=100.0
]lambda_mu
: lambda multiplication factor [default=10.0
]maxEval
: maximum number of model evaluations [default=1000
]maxIter
: maximum number of optimization iterations [default=100
]maxJacobians
: maximum number of Jacobian solves [default=100
]np_lambda
: number of parallel lambda solves [default=10
]quiet
: [default=true
]save_results
: save intermediate results [default=true
]seed
: random seed [default=0
]show_trace
: shows solution trace [default=false
]tolG
: parameter space update tolerance [default=1e-6
]tolOF
: objective function tolerance [default=1e-3
]tolX
: parameter space tolerance [default=1e-4
]usenaive
: use naive Levenberg-Marquardt solver [default=false
]
Returns:
- model parameter dictionary with the optimal values at the minimum
- optimization algorithm results (e.g. bestresult[2].minimizer)
Example:
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)
#
Mads.calibraterandom_parallel
— Function.
Calibrate with random initial guesses in parallel
Methods:
Mads.calibraterandom_parallel(madsdata::AbstractDict, numberofsamples::Integer; tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_mu, np_lambda, show_trace, usenaive, seed, quiet, save_results, localsa) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:112Mads.calibraterandom_parallel(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:112
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumberofsamples::Integer
: number of random initial samples [default=1
]
Keywords:
lambda
: initial Levenberg-Marquardt lambda [default=100.0
]lambda_mu
: lambda multiplication factor [default=10.0
]localsa
: perform local sensitivity analysis [default=false
]maxEval
: maximum number of model evaluations [default=1000
]maxIter
: maximum number of optimization iterations [default=100
]maxJacobians
: maximum number of Jacobian solves [default=100
]np_lambda
: number of parallel lambda solves [default=10
]quiet
: suppress output [default=true
]save_results
: save intermediate results [default=true
]seed
: random seed [default=0
]show_trace
: shows solution trace [default=false
]tolG
: parameter space update tolerance [default=1e-6
]tolOF
: objective function tolerance [default=1e-3
]tolX
: parameter space tolerance [default=1e-4
]usenaive
: use naive Levenberg-Marquardt solver [default=false
]
Returns:
- vector with all objective function values
- boolean vector (converged/not converged)
- array with estimate model parameters
#
Mads.captureoff
— Method.
Make MADS not capture
Methods:
Mads.captureoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:140
#
Mads.captureon
— Method.
Make MADS capture
Methods:
Mads.captureon() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:131
#
Mads.check_notebook
— Method.
Check is Jupyter notebook exists
Methods:
Mads.check_notebook(rootname::AbstractString; dir, ndir) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsNotebooks.jl:97
Arguments:
rootname::AbstractString
: notebook root name
Keywords:
dir
: notebook directoryndir
#
Mads.checkmodeloutputdirs
— Method.
Check the directories where model outputs should be saved for MADS
Methods:
Mads.checkmodeloutputdirs(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:666
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- true or false
#
Mads.checknodedir
— Function.
Check if a directory is readable
Methods:
Mads.checknodedir(dir::AbstractString, waittime::Float64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:12Mads.checknodedir(dir::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:12Mads.checknodedir(node::AbstractString, dir::AbstractString, waittime::Float64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:3Mads.checknodedir(node::AbstractString, dir::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:3
Arguments:
dir::AbstractString
: directorynode::AbstractString
: computational node name (e.g.madsmax.lanl.gov
,wf03
, or127.0.0.1
)waittime::Float64
: wait time in seconds [default=10
]
Returns:
true
if the directory is readable,false
otherwise
#
Mads.checkout
— Function.
Checkout (pull) the latest version of Mads modules
Methods:
Mads.checkout(modulename::AbstractString; git, master, force, pull, required, all) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:78Mads.checkout() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:78
Arguments:
modulename::AbstractString
: module name
Keywords:
all
: whether to checkout all the modules [default=false
]force
: whether to overwrite local changes when checkout [default=false
]git
: whether to use "git checkout" [default=true
]master
: whether on master branch [default=false
]pull
: whether to run "git pull" [default=true
]required
: whether only checkout Mads.required modules [default=false
]
#
Mads.checkparameterranges
— Method.
Check parameter ranges for model parameters
Methods:
Mads.checkparameterranges(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:704
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.cleancoverage
— Method.
Remove Mads coverage files
Methods:
Mads.cleancoverage() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTest.jl:22
#
Mads.cmadsins_obs
— Method.
Call C MADS ins_obs() function from MADS dynamic library
Methods:
Mads.cmadsins_obs(obsid::AbstractVector{T} where T, instructionfilename::AbstractString, inputfilename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCMads.jl:39
Arguments:
inputfilename::AbstractString
: input file nameinstructionfilename::AbstractString
: instruction file nameobsid::AbstractVector{T} where T
: observation id
Return:
- observations
#
Mads.commit
— Function.
Commit the latest version of Mads modules in the repository
Methods:
Mads.commit(commitmsg::AbstractString, modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:226Mads.commit(commitmsg::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:226
Arguments:
commitmsg::AbstractString
: commit messagemodulename::AbstractString
: module name
#
Mads.computemass
— Function.
Compute injected/reduced contaminant mass (for a given set of mads input files when "path" is provided)
Methods:
Mads.computemass(madsfiles::Union{Regex, String}; time, path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:485Mads.computemass(madsdata::AbstractDict; time) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:458
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymadsfiles::Union{Regex, String}
: matching pattern for Mads input files (string or regular expression accepted)
Keywords:
path
: search directory for the mads input files [default="."
]time
: computational time [default=0
]
Returns:
- array with all the lambda values
- array with associated total injected mass
- array with associated total reduced mass
Example:
Mads.computemass(madsfiles; time=0, path=".")
#
Mads.computeparametersensitities
— Method.
Compute sensitivities for each model parameter; averaging the sensitivity indices over the entire observation range
Methods:
Mads.computeparametersensitities(madsdata::AbstractDict, saresults::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:839
Arguments:
madsdata::AbstractDict
: MADS problem dictionarysaresults::AbstractDict
: dictionary with sensitivity analysis results
#
Mads.contamination
— Method.
Compute concentration for a point in space and time (x,y,z,t)
Methods:
Mads.contamination(wellx::Number, welly::Number, wellz::Number, n::Number, lambda::Number, theta::Number, vx::Number, vy::Number, vz::Number, ax::Number, ay::Number, az::Number, H::Number, x::Number, y::Number, z::Number, dx::Number, dy::Number, dz::Number, f::Number, t0::Number, t1::Number, t::AbstractVector{T} where T, anasolfunction::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:428
Arguments:
H::Number
: Hurst coefficient for Fractional Brownian dispersionanasolfunction::Function
ax::Number
: dispersivity in X direction (longitudinal)ay::Number
: dispersivity in Y direction (transverse horizontal)az::Number
: dispersivity in Y direction (transverse vertical)dx::Number
: source size (extent) in X directiondy::Number
: source size (extent) in Y directiondz::Number
: source size (extent) in Z directionf::Number
: source mass fluxlambda::Number
: first-order reaction raten::Number
: porosityt0::Number
: source starting timet1::Number
: source termination timet::AbstractVector{T} where T
: vector of times to compute concentration at the observation pointtheta::Number
: groundwater flow directionvx::Number
: advective transport velocity in X directionvy::Number
: advective transport velocity in Y directionvz::Number
: advective transport velocity in Z directionwellx::Number
: observation point (well) X coordinatewelly::Number
: observation point (well) Y coordinatewellz::Number
: observation point (well) Z coordinatex::Number
: X coordinate of contaminant source locationy::Number
: Y coordinate of contaminant source locationz::Number
: Z coordinate of contaminant source location
Returns:
- a vector of predicted concentration at (wellx, welly, wellz, t)
#
Mads.copyaquifer2sourceparameters!
— Method.
Copy aquifer parameters to become contaminant source parameters
Methods:
Mads.copyaquifer2sourceparameters!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:114
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.copyright
— Method.
Produce MADS copyright information
Methods:
Mads.copyright() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:44
#
Mads.create_documentation
— Method.
Create web documentation files for Mads functions
Methods:
Mads.create_documentation() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:386
#
Mads.create_tests_off
— Method.
Turn off the generation of MADS tests (default)
Methods:
Mads.create_tests_off() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:185
#
Mads.create_tests_on
— Method.
Turn on the generation of MADS tests (dangerous)
Methods:
Mads.create_tests_on() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:176
#
Mads.createobservations
— Function.
Create Mads dictionary of observations and instruction file
Methods:
Mads.createobservations(obs::AbstractMatrix{T} where T; key, weight, time) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:56Mads.createobservations(obs::AbstractVector{T} where T; key, weight, time, min, max, dist) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:43Mads.createobservations(nrow::Int64, ncol::Int64; obstring, pretext, prestring, poststring, filename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:25Mads.createobservations(nrow::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:25
Arguments:
ncol::Int64
: number of columns [default 1]nrow::Int64
: number of rowsobs::AbstractMatrix{T} where T
obs::AbstractVector{T} where T
Keywords:
dist
filename
: file namekey
max
min
obstring
: observation stringpoststring
: post instruction file stringprestring
: pre instruction file stringpretext
: preamble instructionstime
weight
)
Returns:
- observation dictionary
#
Mads.createobservations!
— Function.
Create observations in the MADS problem dictionary based on time
and observation
vectors
Methods:
Mads.createobservations!(madsdata::AbstractDict, observation::AbstractDict; logtransform, weight_type, weight) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:483Mads.createobservations!(madsdata::AbstractDict, time::AbstractVector{T} where T, observation::AbstractVector{T} where T; logtransform, weight_type, weight) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:439Mads.createobservations!(md::AbstractDict, obs::AbstractVecOrMat{T} where T; kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:91
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymd::AbstractDict
obs::AbstractVecOrMat{T} where T
observation::AbstractDict
: dictionary of observationsobservation::AbstractVector{T} where T
: dictionary of observationstime::AbstractVector{T} where T
: vector of observation times
Keywords:
logtransform
: log transform observations [default=false
]weight
: weight value [default=1
]weight_type
: weight type [default=constant
]
#
Mads.createproblem
— Function.
Create a new Mads problem where the observation targets are computed based on the model predictions
Methods:
Mads.createproblem(madsdata::AbstractDict, predictions::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:197Mads.createproblem(madsdata::AbstractDict, predictions::AbstractDict, outfilename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:193Mads.createproblem(madsdata::AbstractDict, outfilename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:188Mads.createproblem(infilename::AbstractString, outfilename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:163Mads.createproblem(param::AbstractVector{T} where T, obs::AbstractVecOrMat{T} where T, f::Union{AbstractString, Function}; problemname, paramkey, paramname, paramplotname, paramtype, parammin, parammax, paramdist, paramlog, obskey, obsweight, obstime, obsmin, obsmax, obsdist) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:153Mads.createproblem(in::Integer, out::Integer, f::Union{AbstractString, Function}; kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:150
Arguments:
f::Union{AbstractString, Function}
in::Integer
infilename::AbstractString
: input Mads filemadsdata::AbstractDict
: MADS problem dictionaryobs::AbstractVecOrMat{T} where T
out::Integer
outfilename::AbstractString
: output Mads fileparam::AbstractVector{T} where T
predictions::AbstractDict
: dictionary of model predictions
Keywords:
obsdist
obskey
obsmax
obsmin
obstime
obsweight
paramdist
paramkey
paramlog
parammax
parammin
paramname
paramplotname
paramtype
problemname
Returns:
- new MADS problem dictionary
#
Mads.createtempdir
— Method.
Create temporary directory
Methods:
Mads.createtempdir(tempdirname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1306
Arguments:
tempdirname::AbstractString
: temporary directory name
#
Mads.deleteNaN!
— Method.
Delete rows with NaN in a dataframe df
Methods:
Mads.deleteNaN!(df::DataFrames.DataFrame) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:1065
Arguments:
df::DataFrames.DataFrame
: dataframe
#
Mads.deletekeyword!
— Function.
Delete a keyword
in a class
within the Mads dictionary madsdata
Methods:
Mads.deletekeyword!(madsdata::AbstractDict, class::AbstractString, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:317Mads.deletekeyword!(madsdata::AbstractDict, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:311
Arguments:
class::AbstractString
: dictionary class; if not provided searches forkeyword
inProblem
classkeyword::AbstractString
: dictionary keymadsdata::AbstractDict
: MADS problem dictionary
#
Mads.deleteoffwells!
— Method.
Delete all wells marked as being off in the MADS problem dictionary
Methods:
Mads.welloff!(madsdata::AbstractDict, wellname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:616
Arguments:
madsdata::AbstractDict
: MADS problem dictionarywellname::AbstractString
: name of the well to be turned off
#
Mads.deletetimes!
— Method.
Delete all times in the MADS problem dictionary in a given list.
Methods:
Mads.welloff!(madsdata::AbstractDict, wellname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:616
Arguments:
madsdata::AbstractDict
: MADS problem dictionarywellname::AbstractString
: name of the well to be turned off
#
Mads.dependents
— Function.
Lists module dependents on a module (Mads by default)
Methods:
Mads.dependents(modulename::AbstractString, filter::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:42Mads.dependents(modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:42Mads.dependents() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:42
Arguments:
filter::Bool
: whether to filter modules [default=false
]modulename::AbstractString
: module name [default="Mads"
]
Returns:
- modules that are dependents of the input module
#
Mads.diff
— Function.
Diff the latest version of Mads modules in the repository
Methods:
Mads.diff(modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:169Mads.diff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:169
Arguments:
modulename::AbstractString
: module name
#
Mads.display
— Function.
Display image file
Methods:
Mads.display(o; gwo, gho, gw, gh) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsDisplay.jl:134Mads.display(p::Compose.Context; gwo, gho, gw, gh) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsDisplay.jl:101Mads.display(p::Gadfly.Plot; gwo, gho, gw, gh) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsDisplay.jl:68Mads.display(filename::AbstractString, open::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsDisplay.jl:7Mads.display(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsDisplay.jl:7
Arguments:
filename::AbstractString
: image file nameo
open::Bool
p::Compose.Context
: plotting objectp::Gadfly.Plot
: plotting object
Keywords:
gh
gho
gw
gwo
#
Mads.dumpasciifile
— Method.
Dump ASCII file
Methods:
Mads.dumpasciifile(filename::AbstractString, data) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsASCII.jl:30
Arguments:
data
: data to dumpfilename::AbstractString
: ASCII file name
Dumps:
- ASCII file with the name in "filename"
#
Mads.dumpjsonfile
— Method.
Dump a JSON file
Methods:
Mads.dumpjsonfile(filename::AbstractString, data) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsJSON.jl:38
Arguments:
data
: data to dumpfilename::AbstractString
: JSON file name
Dumps:
- JSON file with the name in "filename"
#
Mads.dumpwelldata
— Method.
Dump well data from MADS problem dictionary into a ASCII file
Methods:
Mads.dumpwelldata(madsdata::AbstractDict, filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1172
Arguments:
filename::AbstractString
: output file namemadsdata::AbstractDict
: MADS problem dictionary
Dumps:
filename
: a ASCII file
#
Mads.dumpyamlfile
— Method.
Dump YAML file
Methods:
Mads.dumpyamlfile(filename::AbstractString, data) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsYAML.jl:33
Arguments:
data
: YAML datafilename::AbstractString
: output file name
#
Mads.dumpyamlmadsfile
— Method.
Dump YAML Mads file
Methods:
Mads.dumpyamlmadsfile(madsdata::AbstractDict, filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsYAML.jl:45
Arguments:
filename::AbstractString
: output file namemadsdata::AbstractDict
: MADS problem dictionary
#
Mads.efast
— Method.
Sensitivity analysis using Saltelli's extended Fourier Amplitude Sensitivity Testing (eFAST) method
Methods:
Mads.efast(md::AbstractDict; N, M, gamma, seed, checkpointfrequency, restartdir, restart) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:1108
Arguments:
md::AbstractDict
: MADS problem dictionary
Keywords:
M
: maximum number of harmonics [default=6
]N
: number of samples [default=100
]checkpointfrequency
: check point frequency [default=N
]gamma
: multiplication factor (Saltelli 1999 recommends gamma = 2 or 4) [default=4
]restart
: save restart information [default=false
]restartdir
: directory where files will be stored containing model results for the efast simulation restarts [default="efastcheckpoints"
]seed
: random seed [default=0
]
#
Mads.emceesampling
— Function.
Bayesian sampling with Goodman & Weare's Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler (aka Emcee)
Methods:
Mads.emceesampling(madsdata::AbstractDict, p0::Array; numwalkers, nsteps, burnin, thinning, seed, weightfactor) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:31Mads.emceesampling(madsdata::AbstractDict; numwalkers, nsteps, burnin, thinning, sigma, seed, weightfactor) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:8
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryp0::Array
: initial parameters (matrix of size (number of parameters, number of walkers) or (length(Mads.getoptparamkeys(madsdata)), numwalkers))
Keywords:
burnin
: number of initial realizations before the MCMC are recorded [default=10
]nsteps
: number of final realizations in the chain [default=100
]numwalkers
: number of walkers (if in parallel this can be the number of available processors; in general, the higher the number of walkers, the better the results and computational time [default=10
]seed
: random seed [default=0
]sigma
: a standard deviation parameter used to initialize the walkers [default=0.01
]thinning
: removal of anythinning
realization [default=1
]weightfactor
: weight factor [default=1.0
]
Returns:
- MCMC chain
- log likelihoods of the final samples in the chain
Examples:
Mads.emceesampling(madsdata; numwalkers=10, nsteps=100, burnin=100, thinning=1, seed=2016, sigma=0.01)
Mads.emceesampling(madsdata, p0; numwalkers=10, nsteps=100, burnin=10, thinning=1, seed=2016)
#
Mads.estimationerror
— Function.
Estimate kriging error
Methods:
Mads.estimationerror(w::AbstractVector{T} where T, covmat::AbstractMatrix{T} where T, covvec::AbstractVector{T} where T, cov0::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:205Mads.estimationerror(w::AbstractVector{T} where T, x0::AbstractVector{T} where T, X::AbstractMatrix{T} where T, covfn::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:198
Arguments:
X::AbstractMatrix{T} where T
: observation matrixcov0::Number
: zero-separation covariancecovfn::Function
covmat::AbstractMatrix{T} where T
: covariance matrixcovvec::AbstractVector{T} where T
: covariance vectorw::AbstractVector{T} where T
: kriging weightsx0::AbstractVector{T} where T
: estimated locations
Returns:
- estimation kriging error
#
Mads.evaluatemadsexpression
— Method.
Evaluate an expression string based on a parameter dictionary
Methods:
Mads.evaluatemadsexpression(expressionstring::AbstractString, parameters::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:154
Arguments:
expressionstring::AbstractString
: expression stringparameters::AbstractDict
: parameter dictionary applied to evaluate the expression string
Returns:
- dictionary containing the expression names as keys, and the values of the expression as values
#
Mads.evaluatemadsexpressions
— Method.
Evaluate all the expressions in the Mads problem dictiorany based on a parameter dictionary
Methods:
Mads.evaluatemadsexpressions(madsdata::AbstractDict, parameters::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:173
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameters::AbstractDict
: parameter dictionary applied to evaluate the expression strings
Returns:
- dictionary containing the parameter and expression names as keys, and the values of the expression as values
#
Mads.expcov
— Method.
Exponential spatial covariance function
Methods:
Mads.expcov(h::Number, maxcov::Number, scale::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:31
Arguments:
h::Number
: separation distancemaxcov::Number
: maximum covariancescale::Number
: scale
Returns:
- covariance
#
Mads.exponentialvariogram
— Method.
Exponential variogram
Methods:
Mads.exponentialvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:83
Arguments:
h::Number
: separation distancenugget::Number
: nuggetrange::Number
: rangesill::Number
: sill
Returns:
- Exponential variogram
#
Mads.filterkeys
— Function.
Filter dictionary keys based on a string or regular expression
Methods:
Mads.filterkeys(dict::AbstractDict, key::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:854Mads.filterkeys(dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:854Mads.filterkeys(dict::AbstractDict, key::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:853
Arguments:
dict::AbstractDict
: dictionarykey::AbstractString
: the regular expression or string used to filter dictionary keyskey::Regex
: the regular expression or string used to filter dictionary keys
#
Mads.forward
— Function.
Perform a forward run using the initial or provided values for the model parameters
Methods:
Mads.forward(madsdata::AbstractDict, paramarray::AbstractArray; all, checkpointfrequency, checkpointfilename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsForward.jl:45Mads.forward(madsdata::AbstractDict, paramdict::AbstractDict; all, checkpointfrequency, checkpointfilename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsForward.jl:11Mads.forward(madsdata::AbstractDict; all) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsForward.jl:7
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparamarray::AbstractArray
: array of model parameter valuesparamdict::AbstractDict
: dictionary of model parameter values
Keywords:
all
: all model results are returned [default=false
]checkpointfilename
: check point file name [default="checkpoint_forward"]checkpointfrequency
: check point frequency for storing restart information [default=0
]
Returns:
- dictionary of model predictions
#
Mads.forwardgrid
— Function.
Perform a forward run over a 3D grid defined in madsdata
using the initial or provided values for the model parameters
Methods:
Mads.forwardgrid(madsdatain::AbstractDict, paramvalues::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsForward.jl:138Mads.forwardgrid(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsForward.jl:133
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymadsdatain::AbstractDict
: MADS problem dictionaryparamvalues::AbstractDict
: dictionary of model parameter values
Returns:
- 3D array with model predictions along a 3D grid
#
Mads.free
— Function.
Free Mads modules
Methods:
Mads.free(modulename::AbstractString; required, all) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:202Mads.free() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:202
Arguments:
modulename::AbstractString
: module name
Keywords:
all
: free all the modules [default=false
]required
: only free Mads.required modules [default=false
]
#
Mads.functions
— Function.
List available functions in the MADS modules:
Methods:
Mads.functions(m::Union{Module, Symbol}, string::AbstractString; shortoutput, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:96Mads.functions(m::Union{Module, Symbol}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:96Mads.functions(m::Union{Module, Symbol}, re::Regex; shortoutput, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:66Mads.functions(string::AbstractString; shortoutput, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:57Mads.functions() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:57Mads.functions(re::Regex; shortoutput, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:48
Arguments:
m::Union{Module, Symbol}
: MADS modulere::Regex
string::AbstractString
: string to display functions with matching names
Keywords:
quiet
shortoutput
Examples:
Mads.functions()
Mads.functions(BIGUQ)
Mads.functions("get")
Mads.functions(Mads, "get")
#
Mads.gaussiancov
— Method.
Gaussian spatial covariance function
Methods:
Mads.gaussiancov(h::Number, maxcov::Number, scale::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:17
Arguments:
h::Number
: separation distancemaxcov::Number
: maximum covariancescale::Number
: scale
Returns:
- covariance
#
Mads.gaussianvariogram
— Method.
Gaussian variogram
Methods:
Mads.gaussianvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:104
Arguments:
h::Number
: separation distancenugget::Number
: nuggetrange::Number
: rangesill::Number
: sill
Returns:
- Gaussian variogram
#
Mads.getcovmat
— Method.
Get spatial covariance matrix
Methods:
Mads.getcovmat(X::AbstractMatrix{T} where T, covfunction::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:160
Arguments:
X::AbstractMatrix{T} where T
: matrix with coordinates of the data points (x or y)covfunction::Function
Returns:
- spatial covariance matrix
#
Mads.getcovvec!
— Method.
Get spatial covariance vector
Methods:
Mads.getcovvec!(covvec::AbstractVector{T} where T, x0::AbstractVector{T} where T, X::AbstractMatrix{T} where T, covfn::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:186
Arguments:
X::AbstractMatrix{T} where T
: matrix with coordinates of the data pointscovfn::Function
: spatial covariance functioncovvec::AbstractVector{T} where T
: spatial covariance vectorx0::AbstractVector{T} where T
: vector with coordinates of the estimation points (x or y)
Returns:
- spatial covariance vector
#
Mads.getdefaultplotformat
— Method.
Set the default plot format (SVG
is the default format)
Methods:
Mads.getdefaultplotformat() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:32
#
Mads.getdictvalues
— Function.
Get dictionary values for keys based on a string or regular expression
Methods:
Mads.getdictvalues(dict::AbstractDict, key::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:876Mads.getdictvalues(dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:876Mads.getdictvalues(dict::AbstractDict, key::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:875
Arguments:
dict::AbstractDict
: dictionarykey::AbstractString
: the key to find value forkey::Regex
: the key to find value for
#
Mads.getdir
— Method.
Get directory
Methods:
Mads.getdir(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:470
Arguments:
filename::AbstractString
: file name
Returns:
- directory in file name
Example:
d = Mads.getdir("a.mads") # d = "."
d = Mads.getdir("test/a.mads") # d = "test"
#
Mads.getdistribution
— Method.
Parse parameter distribution from a string
Methods:
Mads.getdistribution(dist::AbstractString, i::AbstractString, inputtype::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:202
Arguments:
dist::AbstractString
: parameter distributioni::AbstractString
inputtype::AbstractString
: input type (parameter or observation)
Returns:
- distribution
#
Mads.getextension
— Method.
Get file name extension
Methods:
Mads.getextension(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:646
Arguments:
filename::AbstractString
: file name
Returns:
- file name extension
Example:
ext = Mads.getextension("a.mads") # ext = "mads"
#
Mads.getfilenames
— Method.
Get file names by expanding wildcards
Methods:
Mads.getfilenames(cmdstring::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:10
Arguments:
cmdstring::AbstractString
#
Mads.getimportantsamples
— Method.
Get important samples
Methods:
Mads.getimportantsamples(samples::Array, llhoods::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:348
Arguments:
llhoods::AbstractVector{T} where T
: vector of log-likelihoodssamples::Array
: array of samples
Returns:
- array of important samples
#
Mads.getlogparamkeys
— Method.
Get the keys in the MADS problem dictionary for parameters that are log-transformed (log
)
#
Mads.getmadsinputfile
— Method.
Get the default MADS input file set as a MADS global variable using setmadsinputfile(filename)
Methods:
Mads.getmadsinputfile() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:422
Returns:
- input file name (e.g.
input_file_name.mads
)
#
Mads.getmadsproblemdir
— Method.
Get the directory where the Mads data file is located
Methods:
Mads.getmadsproblemdir(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:493
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Example:
madsdata = Mads.loadmadsfile("../../a.mads")
madsproblemdir = Mads.getmadsproblemdir(madsdata)
where madsproblemdir
= "../../"
#
Mads.getmadsrootname
— Method.
Get the MADS problem root name
Methods:
Mads.getmadsrootname(madsdata::AbstractDict; first, version) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:444
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
first
: use the first . in filename as the seperator between root name and extention [default=true
]version
: delete version information from filename for the returned rootname [default=false
]
Example:
madsrootname = Mads.getmadsrootname(madsdata)
Returns:
- root of file name
#
Mads.getnextmadsfilename
— Method.
Get next mads file name
Methods:
Mads.getnextmadsfilename(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:609
Arguments:
filename::AbstractString
: file name
Returns:
- next mads file name
#
Mads.getnonlogparamkeys
— Method.
Get the keys in the MADS problem dictionary for parameters that are NOT log-transformed (log
)
#
Mads.getnonoptparamkeys
— Method.
Get the keys in the MADS problem dictionary for parameters that are NOT optimized (opt
)
#
Mads.getobsdist
— Method.
Get an array with dist
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobsdist
— Method.
Get an array with dist
values for all observations in the MADS problem dictionary
#
Mads.getobskeys
— Method.
Get keys for all observations in the MADS problem dictionary
Methods:
Mads.getobskeys(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:43
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- keys for all observations in the MADS problem dictionary
#
Mads.getobslog
— Method.
Get an array with log
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobslog
— Method.
Get an array with log
values for all observations in the MADS problem dictionary
#
Mads.getobsmax
— Method.
Get an array with max
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobsmax
— Method.
Get an array with max
values for all observations in the MADS problem dictionary
#
Mads.getobsmin
— Method.
Get an array with min
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobsmin
— Method.
Get an array with min
values for all observations in the MADS problem dictionary
#
Mads.getobstarget
— Method.
Get an array with target
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobstarget
— Method.
Get an array with target
values for all observations in the MADS problem dictionary
#
Mads.getobstime
— Method.
Get an array with time
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobstime
— Method.
Get an array with time
values for all observations in the MADS problem dictionary
#
Mads.getobsweight
— Method.
Get an array with weight
values for observations in the MADS problem dictionary defined by obskeys
#
Mads.getobsweight
— Method.
Get an array with weight
values for all observations in the MADS problem dictionary
#
Mads.getoptparamkeys
— Method.
Get the keys in the MADS problem dictionary for parameters that are optimized (opt
)
#
Mads.getoptparams
— Function.
Get optimizable parameters
Methods:
Mads.getoptparams(madsdata::AbstractDict, parameterarray::Array, optparameterkey::Array) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:362Mads.getoptparams(madsdata::AbstractDict, parameterarray::Array) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:362Mads.getoptparams(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:362
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryoptparameterkey::Array
: optimizable parameter keysparameterarray::Array
: parameter array
Returns:
- parameter array
#
Mads.getparamdict
— Method.
Get dictionary with all parameters and their respective initial values
Methods:
Mads.getparamdict(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:59
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- dictionary with all parameters and their respective initial values
#
Mads.getparamdistributions
— Method.
Get probabilistic distributions of all parameters in the MADS problem dictionary
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
.
Methods:
Mads.getparamdistributions(madsdata::AbstractDict; init_dist) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:659
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
init_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 [default=false
]
Returns:
- probabilistic distributions
#
Mads.getparamkeys
— Method.
Get keys of all parameters in the MADS problem dictionary
Methods:
Mads.getparamkeys(madsdata::AbstractDict; filter) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:43
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
filter
: parameter filter
Returns:
- array with the keys of all parameters in the MADS problem dictionary
#
Mads.getparamrandom
— Function.
Get independent sampling of model parameters defined in the MADS problem dictionary
Methods:
Mads.getparamrandom(madsdata::AbstractDict, parameterkey::AbstractString; numsamples, paramdist, init_dist) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:401Mads.getparamrandom(madsdata::AbstractDict, numsamples::Integer, parameterkey::AbstractString; init_dist) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:384Mads.getparamrandom(madsdata::AbstractDict, numsamples::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:384Mads.getparamrandom(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:384
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumsamples::Integer
: number of samples, [default=1
]parameterkey::AbstractString
: model parameter key
Keywords:
init_dist
: iftrue
use the distribution set for initialization in the MADS problem dictionary (defined usinginit_dist
parameter field); iffalse
(default) use the regular distribution set in the MADS problem dictionary (defined usingdist
parameter field)numsamples
: number of samplesparamdist
: dictionary of parameter distributions
Returns:
- generated sample
#
Mads.getparamsinit
— Method.
Get an array with init values for parameters defined by paramkeys
#
Mads.getparamsinit
— Method.
Get an array with init values for all the MADS model parameters
#
Mads.getparamsinit_max
— Function.
Get an array with init_max
values for parameters defined by paramkeys
Methods:
Mads.getparamsinit_max(madsdata::AbstractDict, paramkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:273Mads.getparamsinit_max(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:273
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparamkeys::AbstractVector{T} where T
: parameter keys
Returns:
- the parameter values
#
Mads.getparamsinit_min
— Function.
Get an array with init_min
values for parameters
Methods:
Mads.getparamsinit_min(madsdata::AbstractDict, paramkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:227Mads.getparamsinit_min(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:227
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparamkeys::AbstractVector{T} where T
: parameter keys
Returns:
- the parameter values
#
Mads.getparamslog
— Method.
Get an array with log values for parameters defined by paramkeys
#
Mads.getparamslog
— Method.
Get an array with log values for all the MADS model parameters
#
Mads.getparamslongname
— Method.
Get an array with longname values for parameters defined by paramkeys
#
Mads.getparamslongname
— Method.
Get an array with longname values for all the MADS model parameters
#
Mads.getparamsmax
— Function.
Get an array with max
values for parameters defined by paramkeys
Methods:
Mads.getparamsmax(madsdata::AbstractDict, paramkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:193Mads.getparamsmax(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:193
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparamkeys::AbstractVector{T} where T
: parameter keys
Returns:
- returns the parameter values
#
Mads.getparamsmin
— Function.
Get an array with min
values for parameters defined by paramkeys
Methods:
Mads.getparamsmin(madsdata::AbstractDict, paramkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:159Mads.getparamsmin(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:159
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparamkeys::AbstractVector{T} where T
: parameter keys
Returns:
- the parameter values
#
Mads.getparamsplotname
— Method.
Get an array with plotname values for parameters defined by paramkeys
#
Mads.getparamsplotname
— Method.
Get an array with plotname values for all the MADS model parameters
#
Mads.getparamsstep
— Method.
Get an array with step values for parameters defined by paramkeys
#
Mads.getparamsstep
— Method.
Get an array with step values for all the MADS model parameters
#
Mads.getparamstype
— Method.
Get an array with type values for parameters defined by paramkeys
#
Mads.getparamstype
— Method.
Get an array with type values for all the MADS model parameters
#
Mads.getproblemdir
— Method.
Get the directory where currently Mads is running
Methods:
Mads.getproblemdir() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:516
Example:
problemdir = Mads.getproblemdir()
Returns:
- Mads problem directory
#
Mads.getprocs
— Method.
Get the number of processors
Methods:
Mads.getprocs() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:28
#
Mads.getrestart
— Method.
Get MADS restart status
Methods:
Mads.getrestart(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:86
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.getrestartdir
— Function.
Get the directory where Mads restarts will be stored
Methods:
Mads.getrestartdir(madsdata::AbstractDict, suffix::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:341Mads.getrestartdir(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:341
Arguments:
madsdata::AbstractDict
: MADS problem dictionarysuffix::AbstractString
: Suffix to be added to the name of restart directory
Returns:
- restart directory where reusable model results will be stored
#
Mads.getrootname
— Method.
Get file name root
Methods:
Mads.getrootname(filename::AbstractString; first, version) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:546
Arguments:
filename::AbstractString
: file name
Keywords:
first
: use the first . in filename as the seperator between root name and extention [default=true
]version
: delete version information from filename for the returned rootname [default=false
]
Returns:
- root of file name
Example:
r = Mads.getrootname("a.rnd.dat") # r = "a"
r = Mads.getrootname("a.rnd.dat", first=false) # r = "a.rnd"
#
Mads.getseed
— Method.
Get and return current random seed.
Methods:
Mads.getseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:475Mads.getseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:475Mads.getseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:475Mads.getseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:475Mads.getseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:475
#
Mads.getsindx
— Method.
Get sin-space dx
Methods:
Mads.getsindx(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:349
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- sin-space dx value
#
Mads.getsourcekeys
— Method.
Get keys of all source parameters in the MADS problem dictionary
Methods:
Mads.getsourcekeys(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:77
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- array with keys of all source parameters in the MADS problem dictionary
#
Mads.gettarget
— Method.
Get observation target
Methods:
Mads.gettarget(o::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:222
Arguments:
o::AbstractDict
: observation data
Returns:
- observation target
#
Mads.gettargetkeys
— Method.
Get keys for all targets (observations with weights greater than zero) in the MADS problem dictionary
Methods:
Mads.gettargetkeys(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:57
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- keys for all targets in the MADS problem dictionary
#
Mads.gettime
— Method.
Get observation time
Methods:
Mads.gettime(o::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:144
Arguments:
o::AbstractDict
: observation data
Returns:
- observation time ("NaN" it time is missing)
#
Mads.getweight
— Method.
Get observation weight
Methods:
Mads.getweight(o::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:183
Arguments:
o::AbstractDict
: observation data
Returns:
- observation weight ("NaN" when weight is missing)
#
Mads.getwelldata
— Method.
Get spatial and temporal data in the Wells
class
Methods:
Mads.getwelldata(madsdata::AbstractDict; time) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:711
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Keywords:
time
: get observation times [default=false
]
Returns:
- array with spatial and temporal data in the
Wells
class
#
Mads.getwellkeys
— Method.
Get keys for all wells in the MADS problem dictionary
Methods:
Mads.getwellkeys(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:74
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- keys for all wells in the MADS problem dictionary
#
Mads.getwelltargets
— Method.
Methods:
Mads.getwelltargets(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:745
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Returns:
- array with targets in the
Wells
class
#
Mads.graphoff
— Method.
MADS graph output off
Methods:
Mads.graphoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:158
#
Mads.graphon
— Method.
MADS graph output on
Methods:
Mads.graphon() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:149
#
Mads.haskeyword
— Function.
Check for a keyword
in a class
within the Mads dictionary madsdata
Methods:
Mads.haskeyword(madsdata::AbstractDict, class::AbstractString, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:249Mads.haskeyword(madsdata::AbstractDict, keyword::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:246
Arguments:
class::AbstractString
: dictionary class; if not provided searches forkeyword
inProblem
classkeyword::AbstractString
: dictionary keymadsdata::AbstractDict
: MADS problem dictionary
Returns: true
or false
Examples:
- `Mads.haskeyword(madsdata, "disp")` ... searches in `Problem` class by default
- `Mads.haskeyword(madsdata, "Wells", "R-28")` ... searches in `Wells` class for a keyword "R-28"
#
Mads.help
— Method.
Produce MADS help information
Methods:
Mads.help() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelp.jl:35
#
Mads.importeverywhere
— Method.
Import Julia function everywhere from a file. The first function in the Julia input file is the one that will be targeted by Mads for execution.
Methods:
Mads.importeverywhere(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:393
Arguments:
filename::AbstractString
: file name
Returns:
- Julia function to execute the model
#
Mads.indexkeys
— Function.
Find indexes for dictionary keys based on a string or regular expression
Methods:
Mads.indexkeys(dict::AbstractDict, key::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:865Mads.indexkeys(dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:865Mads.indexkeys(dict::AbstractDict, key::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:864
Arguments:
dict::AbstractDict
: dictionarykey::AbstractString
: the key to find index forkey::Regex
: the key to find index for
#
Mads.infogap_jump
— Function.
Information Gap Decision Analysis using JuMP
Methods:
Mads.infogap_jump(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:23Mads.infogap_jump() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:23
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Keywords:
horizons
: info-gap horizons of uncertainty [default=[0.05, 0.1, 0.2, 0.5]
]maxiter
: maximum number of iterations [default=3000
]random
: random initial guesses [default=false
]retries
: number of solution retries [default=1
]seed
: random seed [default=0
]verbosity
: verbosity output level [default=0
]
#
Mads.infogap_jump_polynomial
— Function.
Information Gap Decision Analysis using JuMP
Methods:
Mads.infogap_jump_polynomial(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, quiet, plot, model, seed) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:128Mads.infogap_jump_polynomial() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:128
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Keywords:
horizons
: info-gap horizons of uncertainty [default=[0.05, 0.1, 0.2, 0.5]
]maxiter
: maximum number of iterations [default=3000
]model
: model id [default=1
]plot
: activate plotting [default=false
]quiet
: quiet [default=false
]random
: random initial guesses [default=false
]retries
: number of solution retries [default=1
]seed
: random seed [default=0
]verbosity
: verbosity output level [default=0
]
Returns:
- hmin, hmax
#
Mads.infogap_mpb_lin
— Function.
Information Gap Decision Analysis using MathProgBase
Methods:
Mads.infogap_mpb_lin(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed, pinit) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:442Mads.infogap_mpb_lin() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:442
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Keywords:
horizons
: info-gap horizons of uncertainty [default=[0.05, 0.1, 0.2, 0.5]
]maxiter
: maximum number of iterations [default=3000
]pinit
: vector with initial parametersrandom
: random initial guesses [default=false
]retries
: number of solution retries [default=1
]seed
: random seed [default=0
]verbosity
: verbosity output level [default=0
]
#
Mads.infogap_mpb_polynomial
— Function.
Information Gap Decision Analysis using MathProgBase
Methods:
Mads.infogap_mpb_polynomial(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed, pinit) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:301Mads.infogap_mpb_polynomial() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsInfoGap.jl:301
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Keywords:
horizons
: info-gap horizons of uncertainty [default=[0.05, 0.1, 0.2, 0.5]
]maxiter
: maximum number of iterations [default=3000
]pinit
: vector with initial parametersrandom
: random initial guesses [default=false
]retries
: number of solution retries [default=1
]seed
: random seed [default=0
]verbosity
: verbosity output level [default=0
]
#
Mads.ins_obs
— Method.
Apply Mads instruction file instructionfilename
to read model output file modeloutputfilename
Methods:
Mads.ins_obs(instructionfilename::AbstractString, modeloutputfilename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1073
Arguments:
instructionfilename::AbstractString
: instruction file namemodeloutputfilename::AbstractString
: model output file name
Returns:
obsdict
: observation dictionary with the model outputs
#
Mads.instline2regexs
— Method.
Convert an instruction line in the Mads instruction file into regular expressions
Methods:
Mads.instline2regexs(instline::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:973
Arguments:
instline::AbstractString
: instruction line
Returns:
regexs
: regular expressionsobsnames
: observation namesgetparamhere
: parameters
#
Mads.invobsweights!
— Function.
Set inversely proportional observation weights in the MADS problem dictionary
Methods:
Mads.invobsweights!(madsdata::AbstractDict, multiplier::Number, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:328Mads.invobsweights!(madsdata::AbstractDict, multiplier::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:328Mads.invobsweights!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:328
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymultiplier::Number
: weight multiplierobskeys::AbstractVector{T} where T
#
Mads.invwellweights!
— Function.
Set inversely proportional well weights in the MADS problem dictionary
Methods:
Mads.invwellweights!(madsdata::AbstractDict, multiplier::Number, wellkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:380Mads.invwellweights!(madsdata::AbstractDict, multiplier::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:380
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymultiplier::Number
: weight multiplierwellkeys::AbstractVector{T} where T
#
Mads.islog
— Method.
Is parameter with key parameterkey
log-transformed?
Methods:
Mads.islog(madsdata::AbstractDict, parameterkey::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:435
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameterkey::AbstractString
: parameter key
Returns:
true
if log-transformed,false
otherwise
#
Mads.isobs
— Method.
Is a dictionary containing all the observations
Methods:
Mads.isobs(madsdata::AbstractDict, dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:17
Arguments:
dict::AbstractDict
: dictionarymadsdata::AbstractDict
: MADS problem dictionary
Returns:
true
if the dictionary contain all the observations,false
otherwise
#
Mads.isopt
— Method.
Is parameter with key parameterkey
optimizable?
Methods:
Mads.isopt(madsdata::AbstractDict, parameterkey::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:415
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameterkey::AbstractString
: parameter key
Returns:
true
if optimizable,false
if not
#
Mads.isparam
— Method.
Check if a dictionary containing all the Mads model parameters
Methods:
Mads.isparam(madsdata::AbstractDict, dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:16
Arguments:
dict::AbstractDict
: dictionarymadsdata::AbstractDict
: MADS problem dictionary
Returns:
true
if the dictionary containing all the parameters,false
otherwise
#
Mads.ispkgavailable
— Method.
Checks if package is available
Methods:
Mads.ispkgavailable(modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:533
Arguments:
modulename::AbstractString
: module name
Returns:
true
orfalse
#
Mads.ispkgavailable_old
— Method.
Checks if package is available
Methods:
Mads.ispkgavailable_old(modulename::AbstractString; quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:511
Arguments:
modulename::AbstractString
: module name
Keywords:
quiet
Returns:
true
orfalse
#
Mads.krige
— Method.
Kriging
Methods:
Mads.krige(x0mat::AbstractMatrix{T} where T, X::AbstractMatrix{T} where T, Z::AbstractVector{T} where T, covfn::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:125
Arguments:
X::AbstractMatrix{T} where T
: coordinates of the observation (conditioning) dataZ::AbstractVector{T} where T
: values for the observation (conditioning) datacovfn::Function
: spatial covariance functionx0mat::AbstractMatrix{T} where T
: point coordinates at which to obtain kriging estimates
Returns:
- kriging estimates at
x0mat
#
Mads.levenberg_marquardt
— Function.
Levenberg-Marquardt optimization
Methods:
Mads.levenberg_marquardt(f::Function, g::Function, x0, o::Function; root, tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_scale, lambda_mu, lambda_nu, np_lambda, show_trace, alwaysDoJacobian, callbackiteration, callbackjacobian) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:337Mads.levenberg_marquardt(f::Function, g::Function, x0) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:337
Arguments:
f::Function
: forward model functiong::Function
: gradient function for the forward modelo::Function
: objective function [default=x->(x'*x)[1]
]x0
: initial parameter guess
Keywords:
alwaysDoJacobian
: computer Jacobian each iteration [default=false
]callbackiteration
: call back function for each iteration [default=(best_x::AbstractVector, of::Number, lambda::Number)->nothing
]callbackjacobian
: call back function for each Jacobian [default=(x::AbstractVector, J::AbstractMatrix)->nothing
]lambda
: initial Levenberg-Marquardt lambda [default=eps(Float32)
]lambda_mu
: lambda multiplication factor μ [default=10
]lambda_nu
: lambda multiplication factor ν [default=2
]lambda_scale
: lambda scaling factor [default=1e-3,
]maxEval
: maximum number of model evaluations [default=1001
]maxIter
: maximum number of optimization iterations [default=100
]maxJacobians
: maximum number of Jacobian solves [default=100
]np_lambda
: number of parallel lambda solves [default=10
]root
: Mads problem root nameshow_trace
: shows solution trace [default=false
]tolG
: parameter space update tolerance [default=1e-6
]tolOF
: objective function update tolerance [default=1e-3
]tolX
: parameter space tolerance [default=1e-4
]
#
Mads.linktempdir
— Method.
Link files in a temporary directory
Methods:
Mads.linktempdir(madsproblemdir::AbstractString, tempdirname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1332
Arguments:
madsproblemdir::AbstractString
: Mads problem directorytempdirname::AbstractString
: temporary directory name
#
Mads.loadasciifile
— Method.
Load ASCII file
Methods:
Mads.loadasciifile(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsASCII.jl:15
Arguments:
filename::AbstractString
: ASCII file name
Returns:
- data from the file
#
Mads.loadbigyamlfile
— Method.
Load BIG YAML input file
Methods:
Mads.loadmadsfile(filename::AbstractString; bigfile, format, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:48
Arguments:
filename::AbstractString
: input file name (e.g.input_file_name.mads
)
Keywords:
bigfile
format
quiet
Returns:
- MADS problem dictionary
#
Mads.loadjsonfile
— Method.
Load a JSON file
Methods:
Mads.loadjsonfile(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsJSON.jl:16
Arguments:
filename::AbstractString
: JSON file name
Returns:
- data from the JSON file
#
Mads.loadmadsfile
— Method.
Load MADS input file defining a MADS problem dictionary
Methods:
Mads.loadmadsfile(filename::AbstractString; bigfile, format, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:48
Arguments:
filename::AbstractString
: input file name (e.g.input_file_name.mads
)
Keywords:
bigfile
format
: acceptable formats areyaml
andjson
[default=yaml
]quiet
Returns:
- MADS problem dictionary
Example:
md = Mads.loadmadsfile("input_file_name.mads")
#
Mads.loadmadsproblem
— Method.
Load a predefined Mads problem
Methods:
Mads.loadmadsproblem(name::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCreate.jl:14
Arguments:
name::AbstractString
: predefined MADS problem name
Returns:
- MADS problem dictionary
#
Mads.loadsaltellirestart!
— Method.
Load Saltelli sensitivity analysis results for fast simulation restarts
Methods:
Mads.loadsaltellirestart!(evalmat::Array, matname::AbstractString, restartdir::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:595
Arguments:
evalmat::Array
: loaded arraymatname::AbstractString
: matrix (array) name (defines the name of the loaded file)restartdir::AbstractString
: directory where files will be stored containing model results for fast simulation restarts
Returns:
true
when successfully loaded,false
when it is not
#
Mads.loadyamlfile
— Method.
Load YAML file
Methods:
Mads.loadyamlfile(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsYAML.jl:17
Arguments:
filename::AbstractString
: file name
Returns:
- data in the yaml input file
#
Mads.localsa
— Method.
Local sensitivity analysis based on eigen analysis of the parameter covariance matrix
Methods:
Mads.localsa(madsdata::AbstractDict; sinspace, keyword, filename, format, datafiles, imagefiles, par, obs, J) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:124
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
J
: Jacobian matrixdatafiles
: flag to write data files [default=true
]filename
: output file nameformat
: output plot format (png
,pdf
, etc.)imagefiles
: flag to create image files [default=Mads.graphoutput
]keyword
: keyword to be added in the filename rootobs
: observations for the parameter setpar
: parameter setsinspace
: apply sin transformation [default=true
]
Dumps:
filename
: output plot file
#
Mads.long_tests_off
— Method.
Turn off execution of long MADS tests (default)
Methods:
Mads.long_tests_off() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:203
#
Mads.long_tests_on
— Method.
Turn on execution of long MADS tests
Methods:
Mads.long_tests_on() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:194
#
Mads.madscores
— Function.
Check the number of processors on a series of servers
Methods:
Mads.madscores(nodenames::Vector{String}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:307Mads.madscores() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:307
Arguments:
nodenames::Vector{String}
: array with names of machines/nodes [default=madsservers
]
#
Mads.madscritical
— Method.
MADS critical error messages
Methods:
Mads.madscritical(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:72
Arguments:
message::AbstractString
: critical error message
#
Mads.madsdebug
— Function.
MADS debug messages (controlled by quiet
and debuglevel
)
Methods:
Mads.madsdebug(message::AbstractString, level::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:25Mads.madsdebug(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:25
Arguments:
level::Int64
: output verbosity level [default=0
]message::AbstractString
: debug message
#
Mads.madsdir
— Method.
Change the current directory to the Mads source dictionary
Methods:
Mads.madsdir() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:19
#
Mads.madserror
— Method.
MADS error messages
Methods:
Mads.madserror(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:62
Arguments:
message::AbstractString
: error message
#
Mads.madsinfo
— Function.
MADS information/status messages (controlled by quietand
verbositylevel`)
Methods:
Mads.madsinfo(message::AbstractString, level::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:40Mads.madsinfo(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:40
Arguments:
level::Int64
: output verbosity level [default=0
]message::AbstractString
: information/status message
#
Mads.madsload
— Function.
Check the load of a series of servers
Methods:
Mads.madsload(nodenames::Vector{String}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:327Mads.madsload() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:327
Arguments:
nodenames::Vector{String}
: array with names of machines/nodes [default=madsservers
]
#
Mads.madsmathprogbase
— Function.
Define MadsModel
type applied for Mads execution using MathProgBase
Methods:
Mads.madsmathprogbase(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMathProgBase.jl:16Mads.madsmathprogbase() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMathProgBase.jl:16
Arguments:
madsdata::AbstractDict
: MADS problem dictionary [default=Dict()
]
#
Mads.madsoutput
— Function.
MADS output (controlled by quiet
and verbositylevel
)
Methods:
Mads.madsoutput(message::AbstractString, level::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:10Mads.madsoutput(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:10
Arguments:
level::Int64
: output verbosity level [default=0
]message::AbstractString
: output message
#
Mads.madsup
— Function.
Check the uptime of a series of servers
Methods:
Mads.madsup(nodenames::Vector{String}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:317Mads.madsup() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:317
Arguments:
nodenames::Vector{String}
: array with names of machines/nodes [default=madsservers
]
#
Mads.madswarn
— Method.
MADS warning messages
Methods:
Mads.madswarn(message::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLog.jl:52
Arguments:
message::AbstractString
: warning message
#
Mads.makearrayconditionalloglikelihood
— Method.
Make a conditional log likelihood function that accepts an array containing the optimal parameter values
Methods:
Mads.makearrayconditionalloglikelihood(madsdata::AbstractDict, conditionalloglikelihood) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:104
Arguments:
conditionalloglikelihood
: conditional log likelihoodmadsdata::AbstractDict
: MADS problem dictionary
Returns:
- a conditional log likelihood function that accepts an array
#
Mads.makearrayconditionalloglikelihood
— Method.
Make array of conditional log-likelihoods
Methods:
Mads.makearrayconditionalloglikelihood(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBayesInfoGap.jl:159Mads.makearrayconditionalloglikelihood(madsdata::AbstractDict, conditionalloglikelihood) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:104
Arguments:
conditionalloglikelihood
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- array of conditional log-likelihoods
#
Mads.makearrayfunction
— Function.
Make a version of the function f
that accepts an array containing the optimal parameter values
Methods:
Mads.makearrayfunction(madsdata::AbstractDict, f::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:31Mads.makearrayfunction(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:31
Arguments:
f::Function
: function [default=makemadscommandfunction(madsdata)
]madsdata::AbstractDict
: MADS problem dictionary
Returns:
- function accepting an array containing the optimal parameter values
#
Mads.makearrayloglikelihood
— Method.
Make a log likelihood function that accepts an array containing the optimal parameter values
Methods:
Mads.makearrayloglikelihood(madsdata::AbstractDict, loglikelihood) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:127
Arguments:
loglikelihood
: log likelihoodmadsdata::AbstractDict
: MADS problem dictionary
Returns:
- a log likelihood function that accepts an array
#
Mads.makebigdt!
— Method.
Setup Bayesian Information Gap Decision Theory (BIG-DT) problem
Methods:
Mads.makebigdt!(madsdata::AbstractDict, choice::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBayesInfoGap.jl:34
Arguments:
choice::AbstractDict
: dictionary of BIG-DT choices (scenarios)madsdata::AbstractDict
: MADS problem dictionary
Returns:
- BIG-DT problem type
#
Mads.makebigdt
— Method.
Setup Bayesian Information Gap Decision Theory (BIG-DT) problem
Methods:
Mads.makebigdt(madsdata::AbstractDict, choice::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBayesInfoGap.jl:19
Arguments:
choice::AbstractDict
: dictionary of BIG-DT choices (scenarios)madsdata::AbstractDict
: MADS problem dictionary
Returns:
- BIG-DT problem type
#
Mads.makecomputeconcentrations
— Method.
Create a function to compute concentrations for all the observation points using Anasol
Methods:
Mads.makecomputeconcentrations(madsdata::AbstractDict; calczeroweightobs, calcpredictions) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:178
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
calcpredictions
: calculate zero weight predictions [default=true
]calczeroweightobs
: calculate zero weight observations[default=false
]
Returns:
- function to compute concentrations; the new function returns a dictionary of observations and model predicted concentrations
Examples:
computeconcentrations = Mads.makecomputeconcentrations(madsdata)
paramkeys = Mads.getparamkeys(madsdata)
paramdict = OrderedDict(zip(paramkeys, map(key->madsdata["Parameters"][key]["init"], paramkeys)))
forward_preds = computeconcentrations(paramdict)
#
Mads.makedixonprice
— Method.
Make dixon price
Methods:
Mads.makedixonprice(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:259
Arguments:
n::Integer
: number of observations
Returns:
- dixon price
#
Mads.makedixonprice_gradient
— Method.
Methods:
Mads.makedixonprice(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:259
Arguments:
n::Integer
: number of observations
Returns:
- dixon price gradient
#
Mads.makedoublearrayfunction
— Function.
Make a version of the function f
that accepts an array containing the optimal parameter values, and returns an array of observations
Methods:
Mads.makedoublearrayfunction(madsdata::AbstractDict, f::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:77Mads.makedoublearrayfunction(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMisc.jl:77
Arguments:
f::Function
: function [default=makemadscommandfunction(madsdata)
]madsdata::AbstractDict
: MADS problem dictionary
Returns:
- function accepting an array containing the optimal parameter values, and returning an array of observations
#
Mads.makelmfunctions
— Function.
Make forward model, gradient, objective functions needed for Levenberg-Marquardt optimization
Methods:
Mads.makelmfunctions(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:121Mads.makelmfunctions(f::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:100
Arguments:
f::Function
: Functionmadsdata::AbstractDict
: MADS problem dictionary
Returns:
- forward model, gradient, objective functions
#
Mads.makelocalsafunction
— Method.
Make gradient function needed for local sensitivity analysis
Methods:
Mads.makelocalsafunction(madsdata::AbstractDict; multiplycenterbyweights) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:25
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
multiplycenterbyweights
: multiply center by observation weights [default=true
]
Returns:
- gradient function
#
Mads.makelogprior
— Method.
Make a function to compute the prior log-likelihood of the model parameters listed in the MADS problem dictionary madsdata
Methods:
Mads.makelogprior(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:416
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Return:
- the prior log-likelihood of the model parameters listed in the MADS problem dictionary
madsdata
#
Mads.makemadscommandfunction
— Method.
Make MADS function to execute the model defined in the input MADS problem dictionary
Methods:
Mads.makemadscommandfunction(madsdata_in::AbstractDict; obskeys, calczeroweightobs, calcpredictions) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:66
Arguments:
madsdata_in::AbstractDict
: MADS problem dictionary
Keywords:
calcpredictions
: Calculate predictions [default=true
]calczeroweightobs
: Calculate zero weight observations [default=false
]obskeys
Example:
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 external 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 external 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.Julia function
: execute an internal Julia function that accepts aparameter
vector with all the model parameters as an input argument and will return anobservation
vector 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 external Julia file. The input file should contain a function that accepts aparameter
dictionary with all the model parameters as an input argument; 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
Returns:
- Mads function to execute a forward model simulation
#
Mads.makemadsconditionalloglikelihood
— Method.
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
.
Methods:
Mads.makemadsconditionalloglikelihood(madsdata::AbstractDict; weightfactor) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:439
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
weightfactor
: Weight factor [default=1
]
Return:
- the conditional log-likelihood
#
Mads.makemadsloglikelihood
— Method.
Make a function to compute the log-likelihood for a given set of model parameters, associated model predictions and existing observations. By default, the Log-likelihood function computed internally. The Log-likelihood can be constructed from an external Julia function defined the MADS problem dictionary under LogLikelihood
or ConditionalLogLikelihood
.
In the case of a LogLikelihood
external Julia function, the first function in the file provided should be a function that takes as arguments:
- dictionary of model parameters
- dictionary of model predictions
- dictionary of respective observations
In the case of a ConditionalLogLikelihood
external Julia function, the first function in the file provided should be a function that takes as arguments:
- dictionary of model predictions
- dictionary of respective observations
Methods:
Mads.makemadsloglikelihood(madsdata::AbstractDict; weightfactor) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:484
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
weightfactor
: Weight factor [default=1
]
Returns:
- the log-likelihood for a given set of model parameters
#
Mads.makemadsreusablefunction
— Function.
Make Reusable Mads function to execute a forward model simulation (automatically restarts if restart data exists)
Methods:
Mads.makemadsreusablefunction(paramkeys::AbstractVector{T} where T, obskeys::AbstractVector{T} where T, madsdatarestart::Union{Bool, String}, madscommandfunction::Function, restartdir::AbstractString; usedict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:296Mads.makemadsreusablefunction(madsdata::AbstractDict, madscommandfunction::Function, suffix::AbstractString; usedict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:293Mads.makemadsreusablefunction(madsdata::AbstractDict, madscommandfunction::Function) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsFunc.jl:293
Arguments:
madscommandfunction::Function
: Mads function to execute a forward model simulationmadsdata::AbstractDict
: MADS problem dictionarymadsdatarestart::Union{Bool, String}
: Restart type (memory/disk) or on/off statusobskeys::AbstractVector{T} where T
: Dictionary of observation keysparamkeys::AbstractVector{T} where T
: Dictionary of parameter keysrestartdir::AbstractString
: Restart directory where the reusable model results are storedsuffix::AbstractString
: Suffix to be added to the name of restart directory
Keywords:
usedict
: Use dictionary [default=true
]
Returns:
- Reusable Mads function to execute a forward model simulation (automatically restarts if restart data exists)
#
Mads.makempbfunctions
— Method.
Make forward model, gradient, objective functions needed for MathProgBase optimization
Methods:
Mads.makempbfunctions(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMathProgBase.jl:90
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Returns:
- forward model, gradient, objective functions
#
Mads.makepowell
— Method.
Make Powell test function for LM optimization
Methods:
Mads.makepowell(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:162
Arguments:
n::Integer
: number of observations
Returns:
- Powell test function for LM optimization
#
Mads.makepowell_gradient
— Method.
ake parameter gradients of the Powell test function for LM optimization
Methods:
Mads.makepowell_gradient(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:186
Arguments:
n::Integer
: number of observations
Returns:
- arameter gradients of the Powell test function for LM optimization
#
Mads.makerosenbrock
— Method.
Make Rosenbrock test function for LM optimization
Methods:
Mads.makerosenbrock(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:117
Arguments:
n::Integer
: number of observations
Returns:
- Rosenbrock test function for LM optimization
#
Mads.makerosenbrock_gradient
— Method.
Make parameter gradients of the Rosenbrock test function for LM optimization
Methods:
Mads.makerosenbrock_gradient(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:139
Arguments:
n::Integer
: number of observations
Returns:
- parameter gradients of the Rosenbrock test function for LM optimization
#
Mads.makerotatedhyperellipsoid
— Method.
Methods:
Mads.makerotatedhyperellipsoid(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:338
Arguments:
n::Integer
: number of observations
Returns:
- rotated hyperellipsoid
#
Mads.makerotatedhyperellipsoid_gradient
— Method.
Methods:
Mads.makerotatedhyperellipsoid_gradient(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:362
Arguments:
n::Integer
: number of observations
Returns:
- rotated hyperellipsoid gradient
#
Mads.makesphere
— Method.
Make sphere
Methods:
Mads.makesphere(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:217
Arguments:
n::Integer
: number of observations
Returns:
- sphere
#
Mads.makesphere_gradient
— Method.
Make sphere gradient
Methods:
Mads.makesphere_gradient(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:238
Arguments:
n::Integer
: number of observations
Returns:
- sphere gradient
#
Mads.makesumsquares
— Method.
Methods:
Mads.makesumsquares(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:300
Arguments:
n::Integer
: number of observations
Returns:
- sumsquares
#
Mads.makesumsquares_gradient
— Method.
Methods:
Mads.makesumsquares_gradient(n::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:319
Arguments:
n::Integer
: number of observations
Returns:
- sumsquares gradient
#
Mads.makesvrmodel
— Function.
Make SVR model functions (executor and cleaner)
Methods:
Mads.makesvrmodel(madsdata::AbstractDict, numberofsamples::Integer; check, addminmax, loadsvr, savesvr, svm_type, kernel_type, degree, gamma, coef0, C, nu, epsilon, cache_size, tol, shrinking, probability, verbose, seed) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:209Mads.makesvrmodel(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:209
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumberofsamples::Integer
: number of samples [default=100
]
Keywords:
C
: cost; penalty parameter of the error term [default=1000.0
]addminmax
: add parameter minimum / maximum range values in the training set [default=true
]cache_size
: size of the kernel cache [default=100.0
]check
: check SVR performance [default=false
]coef0
: independent term in kernel function; important only in POLY and SIGMOND kernel types
[default=0
]
degree
: degree of the polynomial kernel [default=3
]epsilon
: epsilon in the EPSILON_SVR model; defines an epsilon-tube within which no penalty is associated in the training loss function with points predicted within a distance epsilon from the actual value [default=0.001
]gamma
: coefficient for RBF, POLY and SIGMOND kernel types [default=1/numberofsamples
]kernel_type
: kernel type[default=SVR.RBF
]loadsvr
: load SVR models [default=false
]nu
: upper bound on the fraction of training errors / lower bound of the fraction of support vectors; acceptable range (0, 1]; applied if NU_SVR model [default=0.5
]probability
: train to estimate probabilities [default=false
]savesvr
: save SVR models [default=false
]seed
: random seed [default=0
]shrinking
: apply shrinking heuristic [default=true
]svm_type
: SVM type [default=SVR.EPSILON_SVR
]tol
: tolerance of termination criterion [default=0.001
]verbose
: verbose output [default=false
]
Returns:
- function performing SVR predictions
- function loading existing SVR models
- function saving SVR models
- function removing SVR models from the memory
#
Mads.maxtofloatmax!
— Method.
Scale down values larger than max(Float32) in a dataframe df
so that Gadfly can plot the data
Methods:
Mads.maxtofloatmax!(df::DataFrames.DataFrame) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:1082
Arguments:
df::DataFrames.DataFrame
: dataframe
#
Mads.meshgrid
— Function.
Create mesh grid
Methods:
Mads.meshgrid(nx::Number, ny::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:433Mads.meshgrid(x::AbstractVector{T} where T, y::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:426
Arguments:
nx::Number
ny::Number
x::AbstractVector{T} where T
: vector of grid x coordinatesy::AbstractVector{T} where T
: vector of grid y coordinates
Returns:
- 2D grid coordinates based on the coordinates contained in vectors
x
andy
#
Mads.minimize
— Method.
Minimize Julia function using a constrained Levenberg-Marquardt technique
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)
Methods:
Mads.calibrate(madsdata::AbstractDict; tolX, tolG, tolOF, maxEval, maxIter, maxJacobians, lambda, lambda_mu, np_lambda, show_trace, usenaive, save_results, localsa) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCalibrate.jl:168
Arguments:
madsdata::AbstractDict
Keywords:
lambda
: initial Levenberg-Marquardt lambda [default=100.0
]lambda_mu
: lambda multiplication factor [default=10.0
]localsa
maxEval
: maximum number of model evaluations [default=1000
]maxIter
: maximum number of optimization iterations [default=100
]maxJacobians
: maximum number of Jacobian solves [default=100
]np_lambda
: number of parallel lambda solves [default=10
]save_results
show_trace
: shows solution trace [default=false
]tolG
: parameter space update tolerance [default=1e-6
]tolOF
: objective function tolerance [default=1e-3
]tolX
: parameter space tolerance [default=1e-4
]usenaive
Returns:
- vector with the optimal parameter values at the minimum
- optimization algorithm results (e.g. results.minimizer)
#
Mads.mkdir
— Method.
Create a directory (if does not already exist)
Methods:
Mads.mkdir(dirname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1359
Arguments:
dirname::AbstractString
: directory
#
Mads.modelinformationcriteria
— Function.
Model section information criteria
Methods:
Mads.modelinformationcriteria(madsdata::AbstractDict, par::Array{Float64, N} where N) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsModelSelection.jl:11Mads.modelinformationcriteria(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsModelSelection.jl:11
Arguments:
madsdata::AbstractDict
: MADS problem dictionarypar::Array{Float64, N} where N
: parameter array
#
Mads.modobsweights!
— Function.
Modify (multiply) observation weights in the MADS problem dictionary
Methods:
Mads.modobsweights!(madsdata::AbstractDict, value::Number, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:315Mads.modobsweights!(madsdata::AbstractDict, value::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:315
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
value::Number
: value for modifing observation weights
#
Mads.modwellweights!
— Function.
Modify (multiply) well weights in the MADS problem dictionary
Methods:
Mads.modwellweights!(madsdata::AbstractDict, value::Number, wellkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:362Mads.modwellweights!(madsdata::AbstractDict, value::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:362
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryvalue::Number
: value for well weightswellkeys::AbstractVector{T} where T
#
Mads.montecarlo
— Method.
Monte Carlo analysis
Methods:
Mads.montecarlo(madsdata::AbstractDict; N, filename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:188
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
N
: number of samples [default=100
]filename
: file name to save Monte-Carlo results
Returns:
- parameter dictionary containing the data arrays
Dumps:
- YAML output file with the parameter dictionary containing the data arrays
Example:
Mads.montecarlo(madsdata; N=100)
#
Mads.naive_get_deltax
— Method.
Naive Levenberg-Marquardt optimization: get the LM parameter space step
Methods:
Mads.naive_get_deltax(JpJ::AbstractMatrix{Float64}, Jp::AbstractMatrix{Float64}, f0::AbstractVector{Float64}, lambda::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:246
Arguments:
Jp::AbstractMatrix{Float64}
: Jacobian matrix times model parametersJpJ::AbstractMatrix{Float64}
: Jacobian matrix times model parameters times transposed Jacobian matrixf0::AbstractVector{Float64}
: initial model observationslambda::Number
: Levenberg-Marquardt lambda
Returns:
- the LM parameter space step
#
Mads.naive_levenberg_marquardt
— Function.
Naive Levenberg-Marquardt optimization
Methods:
Mads.naive_levenberg_marquardt(f::Function, g::Function, x0::AbstractVector{Float64}, o::Function; maxIter, maxEval, lambda, lambda_mu, np_lambda) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:296Mads.naive_levenberg_marquardt(f::Function, g::Function, x0::AbstractVector{Float64}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:296
Arguments:
f::Function
: forward model functiong::Function
: gradient function for the forward modelo::Function
: objective function [default=x->(x'*x)[1]]x0::AbstractVector{Float64}
: initial parameter guess
Keywords:
lambda
: initial Levenberg-Marquardt lambda [default=100
]lambda_mu
: lambda multiplication factor μ [default=10
]maxEval
: maximum number of model evaluations [default=101
]maxIter
: maximum number of optimization iterations [default=10
]np_lambda
: number of parallel lambda solves [default=10
]
Returns:
#
Mads.naive_lm_iteration
— Method.
Naive Levenberg-Marquardt optimization: perform LM iteration
Methods:
Mads.naive_lm_iteration(f::Function, g::Function, o::Function, x0::AbstractVector{Float64}, f0::AbstractVector{Float64}, lambdas::AbstractVector{Float64}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:267
Arguments:
f0::AbstractVector{Float64}
: initial model observationsf::Function
: forward model functiong::Function
: gradient function for the forward modellambdas::AbstractVector{Float64}
: Levenberg-Marquardt lambdaso::Function
: objective functionx0::AbstractVector{Float64}
: initial parameter guess
Returns:
#
Mads.noplot
— Method.
Disable MADS plotting
Methods:
Mads.noplot() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:240
#
Mads.notebook
— Method.
Execute Jupyter notebook in IJulia or as a script
Methods:
Mads.notebook(rootname::AbstractString; script, dir, ndir, check) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsNotebooks.jl:21
Arguments:
rootname::AbstractString
: notebook root name
Keywords:
check
: check of notebook existsdir
: notebook directoryndir
script
: execute as a script
#
Mads.notebooks
— Method.
Execute Jupyter notebook in IJulia or as a script
Methods:
Mads.notebooks(; dir, ndir) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsNotebooks.jl:53
Keywords:
dir
: notebook directoryndir
#
Mads.notebookscript
— Method.
Execute Jupyter notebook as a script
Methods:
Mads.notebookscript(a...; script, dir, ndir, k...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsNotebooks.jl:10
Keywords:
dir
: notebook directoryndir
script
: execute as a script
#
Mads.obslineoccursin
— Method.
Match an instruction line in the Mads instruction file with model input file
Methods:
Mads.obslineoccursin(obsline::AbstractString, regexs::Vector{Regex}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1022
Arguments:
obsline::AbstractString
: instruction lineregexs::Vector{Regex}
: regular expressions
Returns:
- true or false
#
Mads.of
— Function.
Compute objective function
Methods:
Mads.of(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:58Mads.of(madsdata::AbstractDict, resultdict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:55Mads.of(madsdata::AbstractDict, resultvec::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:51
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresultdict::AbstractDict
: result dictionaryresultvec::AbstractVector{T} where T
: result vector
#
Mads.paramarray2dict
— Method.
Convert a parameter array to a parameter dictionary of arrays
Methods:
Mads.paramarray2dict(madsdata::AbstractDict, array::Array) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:242
Arguments:
array::Array
: parameter arraymadsdata::AbstractDict
: MADS problem dictionary
Returns:
- a parameter dictionary of arrays
#
Mads.paramdict2array
— Method.
Convert a parameter dictionary of arrays to a parameter array
Methods:
Mads.paramdict2array(dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:261
Arguments:
dict::AbstractDict
: parameter dictionary of arrays
Returns:
- a parameter array
#
Mads.parsemadsdata!
— Method.
Parse loaded MADS problem dictionary
Methods:
Mads.parsemadsdata!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:193Mads.parsemadsdata!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:193Mads.parsemadsdata!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:193Mads.parsemadsdata!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:193
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.parsenodenames
— Function.
Parse string with node names defined in SLURM
Methods:
Mads.parsenodenames(nodenames::AbstractString, ntasks_per_node::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:209Mads.parsenodenames(nodenames::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:209
Arguments:
nodenames::AbstractString
: string with node names defined in SLURMntasks_per_node::Integer
: number of parallel tasks per node [default=1
]
Returns:
- vector with names of compute nodes (hosts)
#
Mads.partialof
— Method.
Compute the sum of squared residuals for observations that match a regular expression
Methods:
Mads.partialof(madsdata::AbstractDict, resultdict::AbstractDict, regex::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:84
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryregex::Regex
: regular expressionresultdict::AbstractDict
: result dictionary
Returns:
- the sum of squared residuals for observations that match the regular expression
#
Mads.pkgversion_old
— Method.
Get package version
Methods:
Mads.pkgversion_old(modulestr::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:487
Arguments:
modulestr::AbstractString
Returns:
- package version
#
Mads.plotgrid
— Function.
Plot a 3D grid solution based on model predictions in array s
, initial parameters, or user provided parameter values
Methods:
Mads.plotgrid(madsdata::AbstractDict, parameters::AbstractDict; addtitle, title, filename, format) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlotPy.jl:60Mads.plotgrid(madsdata::AbstractDict; addtitle, title, filename, format) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlotPy.jl:55Mads.plotgrid(madsdata::AbstractDict, s::Array{Float64, N} where N; addtitle, title, filename, format) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlotPy.jl:4
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameters::AbstractDict
: dictionary with model parameterss::Array{Float64, N} where N
: model predictions array
Keywords:
addtitle
: add plot title [default=true
]filename
: output file nameformat
: output plot format (png
,pdf
, etc.)title
: plot title
Examples:
Mads.plotgrid(madsdata, s; addtitle=true, title="", filename="", format="")
Mads.plotgrid(madsdata; addtitle=true, title="", filename="", format="")
Mads.plotgrid(madsdata, parameters; addtitle=true, title="", filename="", format="")
#
Mads.plotlocalsa
— Method.
Plot local sensitivity analysis results
Methods:
Mads.plotlocalsa(filenameroot::AbstractString; keyword, filename, format) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:1251
Arguments:
filenameroot::AbstractString
: problem file name root
Keywords:
filename
: output file nameformat
: output plot format (png
,pdf
, etc.)keyword
: keyword to be added in the filename root
Dumps:
filename
: output plot file
#
Mads.plotmadsproblem
— Method.
Plot contaminant sources and wells defined in MADS problem dictionary
Methods:
Mads.plotmadsproblem(madsdata::AbstractDict; format, filename, keyword, hsize, vsize, quiet, gm) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:99
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
filename
: output file nameformat
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]gm
hsize
keyword
: to be added in the filenamequiet
vsize
Dumps:
- plot of contaminant sources and wells
#
Mads.plotmass
— Method.
Plot injected/reduced contaminant mass
Methods:
Mads.plotmass(lambda::AbstractVector{Float64}, mass_injected::AbstractVector{Float64}, mass_reduced::AbstractVector{Float64}, filename::AbstractString; format) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasolPlot.jl:15
Arguments:
filename::AbstractString
: output filename for the generated plotlambda::AbstractVector{Float64}
: array with all the lambda valuesmass_injected::AbstractVector{Float64}
: array with associated total injected massmass_reduced::AbstractVector{Float64}
: array with associated total reduced mass
Keywords:
format
: output plot format (png
,pdf
, etc.)
Dumps:
- image file with name
filename
and in specifiedformat
#
Mads.plotmatches
— Function.
Plot the matches between model predictions and observations
Methods:
Mads.plotmatches(madsdata::AbstractDict, dict_in::AbstractDict; plotdata, filename, format, title, xtitle, ytitle, ymin, ymax, xmin, xmax, separate_files, hsize, vsize, linewidth, pointsize, obs_plot_dots, noise, dpi, colors, display, notitle) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:209Mads.plotmatches(madsdata::AbstractDict, result::AbstractDict, rx::Union{Regex, AbstractString}; title, notitle, kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:185Mads.plotmatches(madsdata::AbstractDict, rx::Union{Regex, AbstractString}; kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:177Mads.plotmatches(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:177
Arguments:
dict_in::AbstractDict
: dictionary with model parametersmadsdata::AbstractDict
: MADS problem dictionaryresult::AbstractDict
: dictionary with model predictionsrx::Union{Regex, AbstractString}
: regular expression to filter the outputs
Keywords:
colors
: array with plot colorsdisplay
: display plots [default=false
]dpi
: graph resolution [default=Mads.imagedpi
]filename
: output file nameformat
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]hsize
: graph horizontal size [default=8Gadfly.inch
]linewidth
: line width [default=2Gadfly.pt
]noise
: random noise magnitude [default=0
; no noise]notitle
obs_plot_dots
: plot data as dots or line [default=true
]plotdata
: plot data (iffalse
model predictions are ploted only) [default=true
]pointsize
: data dot size [default=2Gadfly.pt
]separate_files
: plot data for multiple wells separately [default=false
]title
: graph titlevsize
: graph vertical size [default=4Gadfly.inch
]xmax
xmin
xtitle
: x-axis title [default="Time"
]ymax
ymin
ytitle
: y-axis title [default="y"
]
Dumps:
- plot of the matches between model predictions and observations
Examples:
Mads.plotmatches(madsdata; filename="", format="")
Mads.plotmatches(madsdata, dict_in; filename="", format="")
Mads.plotmatches(madsdata, result; filename="", format="")
Mads.plotmatches(madsdata, result, r"NO3"; filename="", format="")
#
Mads.plotobsSAresults
— Method.
Plot the sensitivity analysis results for the observations
Methods:
Mads.plotobsSAresults(madsdata::AbstractDict, result::AbstractDict; filter, keyword, filename, format, separate_files, xtitle, ytitle, plotlabels, quiet, kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:594
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresult::AbstractDict
: sensitivity analysis results
Keywords:
filename
: output file namefilter
: string or regex to plot only observations containingfilter
format
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]keyword
: to be added in the auto-generated filenameplotlabels
quiet
separate_files
: plot data for multiple wells separately [default=false
]xtitle
: x-axis titleytitle
: y-axis title
Dumps:
- plot of the sensitivity analysis results for the observations
#
Mads.plotrobustnesscurves
— Method.
Plot BIG-DT robustness curves
Methods:
Mads.plotrobustnesscurves(madsdata::AbstractDict, bigdtresults::Dict; filename, format, maxprob, maxhoriz) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsBayesInfoGapPlot.jl:19
Arguments:
bigdtresults::Dict
: BIG-DT resultsmadsdata::AbstractDict
: MADS problem dictionary
Keywords:
filename
: output file name used to dump plotsformat
: output plot format (png
,pdf
, etc.)maxhoriz
: maximum horizon [default=Inf
]maxprob
: maximum probability [default=1.0
]
Dumps:
- image file with name
filename
and in specifiedformat
#
Mads.plotseries
— Function.
Create plots of data series
Methods:
Mads.plotseries(X::AbstractArray, filename::AbstractString; nT, nS, format, xtitle, ytitle, title, logx, logy, keytitle, name, names, combined, hsize, vsize, linewidth, linestyle, pointsize, key_position, major_label_font_size, minor_label_font_size, dpi, colors, opacity, xmin, xmax, ymin, ymax, xaxis, plotline, plotdots, firstred, lastred, nextgray, code, returnplot, colorkey, background_color, gm, gl, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:1062Mads.plotseries(X::AbstractArray) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:1062
Arguments:
X::AbstractArray
: matrix with the series datafilename::AbstractString
: output file name
Keywords:
background_color
code
colorkey
colors
: colors to use in plotscombined
: combine plots [default=true
]dpi
: graph resolution [default=Mads.imagedpi
]firstred
format
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]gl
gm
hsize
: horizontal size [default=8Gadfly.inch
]key_position
keytitle
lastred
linestyle
linewidth
: width of the lines in plot [default=2Gadfly.pt
]logx
logy
major_label_font_size
minor_label_font_size
nS
nT
name
: series name [default=Sources
]names
nextgray
opacity
plotdots
plotline
pointsize
quiet
returnplot
title
: plot title [default=Sources
]vsize
: vertical size [default=4Gadfly.inch
]xaxis
xmax
xmin
xtitle
: x-axis title [default=X
]ymax
ymin
ytitle
: y-axis title [default=Y
]
Dumps:
- Plots of data series
#
Mads.plotwellSAresults
— Function.
Plot the sensitivity analysis results for all the wells in the MADS problem dictionary (wells class expected)
Methods:
Mads.plotwellSAresults(madsdata::AbstractDict, result::AbstractDict, wellname::AbstractString; xtitle, ytitle, filename, format, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:472Mads.plotwellSAresults(madsdata::AbstractDict, result::AbstractDict; xtitle, ytitle, filename, format, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:461
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresult::AbstractDict
: sensitivity analysis resultswellname::AbstractString
: well name
Keywords:
filename
: output file nameformat
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]quiet
xtitle
: x-axis titleytitle
: y-axis title
Dumps:
- Plot of the sensitivity analysis results for all the wells in the MADS problem dictionary
#
Mads.printSAresults
— Method.
Print sensitivity analysis results
Methods:
Mads.printSAresults(madsdata::AbstractDict, results::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:918
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresults::AbstractDict
: dictionary with sensitivity analysis results
#
Mads.printSAresults2
— Method.
Print sensitivity analysis results (method 2)
Methods:
Mads.printSAresults2(madsdata::AbstractDict, results::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:1000
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresults::AbstractDict
: dictionary with sensitivity analysis results
#
Mads.printerrormsg
— Method.
Print error message
Methods:
Mads.printerrormsg(errmsg) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:417
Arguments:
errmsg
: error message
#
Mads.printobservations
— Function.
Print (emit) observations in the MADS problem dictionary
Methods:
Mads.printobservations(madsdata::AbstractDict, filename::AbstractString; json) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:427Mads.printobservations(madsdata::AbstractDict, io::IO, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:419Mads.printobservations(madsdata::AbstractDict, io::IO) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:419Mads.printobservations(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:419
Arguments:
filename::AbstractString
: output file nameio::IO
: output streammadsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
Keywords:
json
#
Mads.process_notebook
— Method.
Process Jupyter notebook to generate html, markdown, latex, and script versions
Methods:
Mads.process_notebook(rootname::AbstractString; dir, ndir) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsNotebooks.jl:69
Arguments:
rootname::AbstractString
: notebook root name
Keywords:
dir
: notebook directoryndir
#
Mads.pull
— Function.
Pull (checkout) the latest version of Mads modules
Methods:
Mads.pull(modulename::AbstractString; kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:62Mads.pull() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:62
Arguments:
modulename::AbstractString
: module name
#
Mads.push
— Function.
Push the latest version of Mads modules in the default remote repository
Methods:
Mads.push(modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:137Mads.push() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:137
Arguments:
modulename::AbstractString
: module name
#
Mads.quietoff
— Method.
Make MADS not quiet
Methods:
Mads.quietoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:104
#
Mads.quieton
— Method.
Make MADS quiet
Methods:
Mads.quieton() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:95
#
Mads.readasciipredictions
— Method.
Read MADS predictions from an ASCII file
Methods:
Mads.readasciipredictions(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsASCII.jl:44
Arguments:
filename::AbstractString
: ASCII file name
Returns:
- MADS predictions
#
Mads.readmodeloutput
— Method.
Read model outputs saved for MADS
Methods:
Mads.readmodeloutput(madsdata::AbstractDict; obskeys) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:790
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
obskeys
: observation keys [default=getobskeys(madsdata)]
#
Mads.readobservations
— Function.
Read observations
Methods:
Mads.readobservations(madsdata::AbstractDict, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1134Mads.readobservations(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1134
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
: observation keys [default=getobskeys(madsdata)
]
Returns:
- dictionary with Mads observations
#
Mads.readobservations_cmads
— Method.
Read observations using C MADS dynamic library
Methods:
Mads.readobservations_cmads(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCMads.jl:14
Arguments:
madsdata::AbstractDict
: Mads problem dictionary
Returns:
- observations
#
Mads.readyamlpredictions
— Method.
Read MADS model predictions from a YAML file filename
Methods:
Mads.readyamlpredictions(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsYAML.jl:108
Arguments:
filename::AbstractString
: file name
Returns:
- data in yaml input file
#
Mads.recursivemkdir
— Method.
Create directories recursively (if does not already exist)
Methods:
Mads.recursivemkdir(s::AbstractString; filename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1371
Arguments:
s::AbstractString
Keywords:
filename
#
Mads.recursivermdir
— Method.
Remove directories recursively
Methods:
Mads.recursivermdir(s::AbstractString; filename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1416
Arguments:
s::AbstractString
Keywords:
filename
#
Mads.regexs2obs
— Method.
Get observations for a set of regular expressions
Methods:
Mads.regexs2obs(obsline::AbstractString, regexs::Vector{Regex}, obsnames::Vector{String}, getparamhere::Vector{Bool}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1043
Arguments:
getparamhere::Vector{Bool}
: parametersobsline::AbstractString
: observation lineobsnames::Vector{String}
: observation namesregexs::Vector{Regex}
: regular expressions
Returns:
obsdict
: observations
#
Mads.removesource!
— Function.
Remove a contamination source
Methods:
Mads.removesource!(madsdata::AbstractDict, sourceid::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:50Mads.removesource!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:50
Arguments:
madsdata::AbstractDict
: MADS problem dictionarysourceid::Int64
: source id [default=0
]
#
Mads.removesourceparameters!
— Method.
Remove contaminant source parameters
Methods:
Mads.removesourceparameters!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsAnasol.jl:135
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.required
— Function.
Lists modules required by a module (Mads by default)
Methods:
Mads.required(modulename::AbstractString, filtermodule::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:16Mads.required(modulename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:16Mads.required() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:16
Arguments:
filtermodule::AbstractString
: filter module namemodulename::AbstractString
: module name [default="Mads"
]
Returns:
- filtered modules
#
Mads.resetmodelruns
— Method.
Reset the model runs count to be equal to zero
Methods:
Mads.resetmodelruns() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:242
#
Mads.residuals
— Function.
Compute residuals
Methods:
Mads.residuals(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:32Mads.residuals(madsdata::AbstractDict, resultdict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:29Mads.residuals(madsdata::AbstractDict, resultvec::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsLevenbergMarquardt.jl:6
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryresultdict::AbstractDict
: result dictionaryresultvec::AbstractVector{T} where T
: result vector
Returns:
#
Mads.restartoff
— Method.
MADS restart off
Methods:
Mads.restartoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:76
#
Mads.restarton
— Method.
MADS restart on
Methods:
Mads.restarton() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:67
#
Mads.reweighsamples
— Method.
Reweigh samples using importance sampling – returns a vector of log-likelihoods after reweighing
Methods:
Mads.reweighsamples(madsdata::AbstractDict, predictions::Array, oldllhoods::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:322
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryoldllhoods::AbstractVector{T} where T
: the log likelihoods of the parameters in the old distributionpredictions::Array
: the model predictions for each of the samples
Returns:
- vector of log-likelihoods after reweighing
#
Mads.rmdir
— Method.
Remove directory
Methods:
Mads.rmdir(dir::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1231
Arguments:
dir::AbstractString
: directory to be removed
Keywords:
path
: path of the directory [default=current path
]
#
Mads.rmfile
— Method.
Remove file
Methods:
Mads.rmfile(filename::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1247
Arguments:
filename::AbstractString
: file to be removed
Keywords:
path
: path of the file [default=current path
]
#
Mads.rmfiles
— Method.
Remove files
Methods:
Mads.rmfile(filename::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1247
Arguments:
filename::AbstractString
Keywords:
path
: path of the file [default=current path
]
#
Mads.rmfiles_ext
— Method.
Remove files with extension ext
Methods:
Mads.rmfiles_ext(ext::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1276
Arguments:
ext::AbstractString
: extension
Keywords:
path
: path of the files to be removed [default=.
]
#
Mads.rmfiles_root
— Method.
Remove files with root root
Methods:
Mads.rmfiles_root(root::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1289
Arguments:
root::AbstractString
: root
Keywords:
path
: path of the files to be removed [default=.
]
#
Mads.rosenbrock
— Method.
Rosenbrock test function
Methods:
Mads.rosenbrock(x::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:42
Arguments:
x::AbstractVector{T} where T
: parameter vector
Returns:
- test result
#
Mads.rosenbrock2_gradient_lm
— Method.
Parameter gradients of the Rosenbrock test function
Methods:
Mads.rosenbrock2_gradient_lm(x::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:23
Arguments:
x::AbstractVector{T} where T
: parameter vector
Returns:
- parameter gradients
#
Mads.rosenbrock2_lm
— Method.
Rosenbrock test function (more difficult to solve)
Methods:
Mads.rosenbrock2_lm(x::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:9
Arguments:
x::AbstractVector{T} where T
: parameter vector
#
Mads.rosenbrock_gradient!
— Method.
Parameter gradients of the Rosenbrock test function
Methods:
Mads.rosenbrock_gradient!(x::AbstractVector{T} where T, grad::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:67
Arguments:
grad::AbstractVector{T} where T
: gradient vectorx::AbstractVector{T} where T
: parameter vector
#
Mads.rosenbrock_gradient_lm
— Method.
Parameter gradients of the Rosenbrock test function for LM optimization (returns the gradients for the 2 components separately)
Methods:
Mads.rosenbrock_gradient_lm(x::AbstractVector{T} where T; dx, center) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:84
Arguments:
x::AbstractVector{T} where T
: parameter vector
Keywords:
center
: array with parameter observations at the center applied to compute numerical derivatives [default=Array{Float64}(undef, 0)
]dx
: apply parameter step to compute numerical derivatives [default=false
]
Returns:
- parameter gradients
#
Mads.rosenbrock_hessian!
— Method.
Parameter Hessian of the Rosenbrock test function
Methods:
Mads.rosenbrock_hessian!(x::AbstractVector{T} where T, hess::AbstractMatrix{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:100
Arguments:
hess::AbstractMatrix{T} where T
: Hessian matrixx::AbstractVector{T} where T
: parameter vector
#
Mads.rosenbrock_lm
— Method.
Rosenbrock test function for LM optimization (returns the 2 components separately)
Methods:
Mads.rosenbrock_lm(x::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTestFunctions.jl:56
Arguments:
x::AbstractVector{T} where T
: parameter vector
Returns:
- test result
#
Mads.runcmd
— Function.
Run external command and pipe stdout and stderr
Methods:
Mads.runcmd(cmdstring::AbstractString; quiet, pipe, waittime) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:100Mads.runcmd(cmd::Cmd; quiet, pipe, waittime) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsExecute.jl:41
Arguments:
cmd::Cmd
: command (as a julia command; e.g.ls
)cmdstring::AbstractString
: command (as a string; e.g. "ls")
Keywords:
pipe
: [default=false
]quiet
: [default=Mads.quiet
]waittime
: wait time is second [default=Mads.executionwaittime
]
Returns:
- command output
- command error message
#
Mads.runremote
— Function.
Run remote command on a series of servers
Methods:
Mads.runremote(cmd::AbstractString, nodenames::Vector{String}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:285Mads.runremote(cmd::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:285
Arguments:
cmd::AbstractString
: remote commandnodenames::Vector{String}
: names of machines/nodes [default=madsservers
]
Returns:
- output of running remote command
#
Mads.saltelli
— Method.
Saltelli sensitivity analysis
Methods:
Mads.saltelli(madsdata::AbstractDict; N, seed, restartdir, parallel, checkpointfrequency) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:635
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
N
: number of samples [default=100
]checkpointfrequency
: check point frequency [default=N
]parallel
: set to true if the model runs should be performed in parallel [default=false
]restartdir
: directory where files will be stored containing model results for fast simulation restartsseed
: random seed [default=0
]
#
Mads.saltellibrute
— Method.
Saltelli sensitivity analysis (brute force)
Methods:
Mads.saltellibrute(madsdata::AbstractDict; N, seed, restartdir) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:447
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
N
: number of samples [default=1000
]restartdir
: directory where files will be stored containing model results for fast simulation restartsseed
: random seed [default=0
]
#
Mads.saltellibruteparallel
— Method.
Parallel version of saltellibrute
#
Mads.saltelliparallel
— Method.
Parallel version of saltelli
#
Mads.sampling
— Method.
Methods:
Mads.sampling(param::AbstractVector{T} where T, J::Array, numsamples::Number; seed, scale) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:271
Arguments:
J::Array
: Jacobian matrixnumsamples::Number
: Number of samplesparam::AbstractVector{T} where T
: Parameter vector
Keywords:
scale
: data scaling [default=1
]seed
: random esee [default=0
]
Returns:
- generated samples (vector or array)
- vector of log-likelihoods
#
Mads.savemadsfile
— Function.
Save MADS problem dictionary madsdata
in MADS input file filename
Methods:
Mads.savemadsfile(madsdata::AbstractDict, parameters::AbstractDict, filename::AbstractString; explicit, observations_separate) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:349Mads.savemadsfile(madsdata::AbstractDict, parameters::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:349Mads.savemadsfile(madsdata::AbstractDict, filename::AbstractString; observations_separate, filenameobs) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:332Mads.savemadsfile(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:332
Arguments:
filename::AbstractString
: input file name (e.g.input_file_name.mads
)madsdata::AbstractDict
: MADS problem dictionaryparameters::AbstractDict
: Dictionary with parameters (optional)
Keywords:
explicit
: iftrue
ignores MADS YAML file modifications and rereads the original input file [default=false
]filenameobs
observations_separate
Example:
Mads.savemadsfile(madsdata)
Mads.savemadsfile(madsdata, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads")
Mads.savemadsfile(madsdata, parameters, "test.mads", explicit=true)
#
Mads.savemcmcresults
— Method.
Save MCMC chain in a file
Methods:
Mads.savemcmcresults(chain::Array, filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsMonteCarlo.jl:143
Arguments:
chain::Array
: MCMC chainfilename::AbstractString
: file name
Dumps:
- the file containing MCMC chain
#
Mads.savesaltellirestart
— Method.
Save Saltelli sensitivity analysis results for fast simulation restarts
Methods:
Mads.savesaltellirestart(evalmat::Array, matname::AbstractString, restartdir::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:616
Arguments:
evalmat::Array
: saved arraymatname::AbstractString
: matrix (array) name (defines the name of the loaded file)restartdir::AbstractString
: directory where files will be stored containing model results for fast simulation restarts
#
Mads.scatterplotsamples
— Method.
Create histogram/scatter plots of model parameter samples
Methods:
Mads.scatterplotsamples(madsdata::AbstractDict, samples::AbstractMatrix{T} where T, filename::AbstractString; format, pointsize) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:428
Arguments:
filename::AbstractString
: output file namemadsdata::AbstractDict
: MADS problem dictionarysamples::AbstractMatrix{T} where T
: matrix with model parameters
Keywords:
format
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]pointsize
: point size [default=0.9Gadfly.mm
]
Dumps:
- histogram/scatter plots of model parameter samples
#
Mads.searchdir
— Function.
Get files in the current directory or in a directory defined by path
matching pattern key
which can be a string or regular expression
Methods:
Mads.searchdir(key::AbstractString; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:831Mads.searchdir(key::Regex; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:830
Arguments:
key::AbstractString
: matching pattern for Mads input files (string or regular expression accepted)key::Regex
: matching pattern for Mads input files (string or regular expression accepted)
Keywords:
path
: search directory for the mads input files [default=.
]
Returns:
filename
: an array with file names matching the pattern in the specified directory
Examples:
- `Mads.searchdir("a")`
- `Mads.searchdir(r"[A-B]"; path = ".")`
- `Mads.searchdir(r".*.cov"; path = ".")`
#
Mads.set_nprocs_per_task
— Function.
Set number of processors needed for each parallel task at each node
Methods:
Mads.set_nprocs_per_task(local_nprocs_per_task::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:58Mads.set_nprocs_per_task() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:58
Arguments:
local_nprocs_per_task::Integer
#
Mads.setallparamsoff!
— Method.
Set all parameters OFF
Methods:
Mads.setallparamsoff!(madsdata::AbstractDict; filter) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:464
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
filter
: parameter filter
#
Mads.setallparamson!
— Method.
Set all parameters ON
Methods:
Mads.setallparamson!(madsdata::AbstractDict; filter) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:450
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
Keywords:
filter
: parameter filter
#
Mads.setdebuglevel
— Method.
Set MADS debug level
Methods:
Mads.setdebuglevel(level::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:213
Arguments:
level::Int64
: debug level
#
Mads.setdefaultplotformat
— Method.
Set the default plot format (SVG
is the default format)
Methods:
Mads.setdefaultplotformat(format::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:19
Arguments:
format::AbstractString
: plot format
#
Mads.setdir
— Function.
Set the working directory (for parallel environments)
Methods:
Mads.setdir() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:255Mads.setdir(dir) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:250
Arguments:
dir
: directory
Example:
@Distributed.everywhere Mads.setdir()
@Distributed.everywhere Mads.setdir("/home/monty")
#
Mads.setdpi
— Method.
Set image dpi
Methods:
Mads.setdpi(dpi::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:167
Arguments:
dpi::Integer
#
Mads.setexecutionwaittime
— Method.
Set maximum execution wait time for forward model runs in seconds
Methods:
Mads.setexecutionwaittime(waitime::Float64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:233
Arguments:
waitime::Float64
: maximum execution wait time for forward model runs in seconds
#
Mads.setmadsinputfile
— Method.
Set a default MADS input file
Methods:
Mads.setmadsinputfile(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:409
Arguments:
filename::AbstractString
: input file name (e.g.input_file_name.mads
)
#
Mads.setmadsservers
— Function.
Generate a list of Mads servers
Methods:
Mads.setmadsservers(first::Int64, last::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:340Mads.setmadsservers(first::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:340Mads.setmadsservers() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:340
Arguments:
first::Int64
: first [default=0
]last::Int64
: last [default=18
]
Returns
- array string of mads servers
#
Mads.setmodelinputs
— Function.
Set model input files; delete files where model output should be saved for MADS
Methods:
Mads.setmodelinputs(madsdata::AbstractDict, parameters::AbstractDict; path) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:713Mads.setmodelinputs(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:713
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameters::AbstractDict
: parameters
Keywords:
path
: path for the files [default=.
]
#
Mads.setnewmadsfilename
— Function.
Set new mads file name
Methods:
Mads.setnewmadsfilename(filename::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:572Mads.setnewmadsfilename(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:569
Arguments:
filename::AbstractString
: file namemadsdata::AbstractDict
: MADS problem dictionary
Returns:
- new file name
#
Mads.setobservationtargets!
— Method.
Set observations (calibration targets) in the MADS problem dictionary based on a predictions
dictionary
Methods:
Mads.setobservationtargets!(madsdata::AbstractDict, predictions::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:523
Arguments:
madsdata::AbstractDict
: Mads problem dictionarypredictions::AbstractDict
: dictionary with model predictions
#
Mads.setobstime!
— Function.
Set observation time based on the observation name in the MADS problem dictionary
Methods:
Mads.setobstime!(madsdata::AbstractDict, rx::Regex, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:261Mads.setobstime!(madsdata::AbstractDict, rx::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:261Mads.setobstime!(madsdata::AbstractDict, separator::AbstractString, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:251Mads.setobstime!(madsdata::AbstractDict, separator::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:251Mads.setobstime!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:251
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
rx::Regex
: regular expression to matchseparator::AbstractString
: separator [default=_
]
Examples:
Mads.setobstime!(madsdata, "_t")
Mads.setobstime!(madsdata, r"[A-x]*_t([0-9,.]+)")
#
Mads.setobsweights!
— Function.
Set observation weights in the MADS problem dictionary
Methods:
Mads.setobsweights!(madsdata::AbstractDict, v::AbstractVector{T} where T, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:293Mads.setobsweights!(madsdata::AbstractDict, v::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:293Mads.setobsweights!(madsdata::AbstractDict, value::Number, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:288Mads.setobsweights!(madsdata::AbstractDict, value::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:288
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
v::AbstractVector{T} where T
: vector of observation weightsvalue::Number
: value for observation weights
#
Mads.setparamoff!
— Method.
Set a specific parameter with a key parameterkey
OFF
Methods:
Mads.setparamoff!(madsdata::AbstractDict, parameterkey::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:489
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameterkey::AbstractString
: parameter key
#
Mads.setparamon!
— Method.
Set a specific parameter with a key parameterkey
ON
Methods:
Mads.setparamon!(madsdata::AbstractDict, parameterkey::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:478
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameterkey::AbstractString
: parameter key
#
Mads.setparamsdistnormal!
— Method.
Set normal parameter distributions for all the model parameters in the MADS problem dictionary
Methods:
Mads.setparamsdistnormal!(madsdata::AbstractDict, mean::AbstractVector{T} where T, stddev::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:501
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymean::AbstractVector{T} where T
: array with the mean valuesstddev::AbstractVector{T} where T
: array with the standard deviation values
#
Mads.setparamsdistuniform!
— Method.
Set uniform parameter distributions for all the model parameters in the MADS problem dictionary
Methods:
Mads.setparamsdistuniform!(madsdata::AbstractDict, min::AbstractVector{T} where T, max::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:516
Arguments:
madsdata::AbstractDict
: MADS problem dictionarymax::AbstractVector{T} where T
: array with the maximum valuesmin::AbstractVector{T} where T
: array with the minimum values
#
Mads.setparamsinit!
— Function.
Set initial optimized parameter guesses in the MADS problem dictionary
Methods:
Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict, idx::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:317Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:317
Arguments:
idx::Int64
: index of the dictionary of arrays with initial model parameter valuesmadsdata::AbstractDict
: MADS problem dictionaryparamdict::AbstractDict
: dictionary with initial model parameter values
#
Mads.setplotfileformat
— Method.
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.
Methods:
Mads.setplotfileformat(filename::AbstractString, format::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:48
Arguments:
filename::AbstractString
: output file nameformat::AbstractString
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]
Returns:
- output file name
- output plot format (
png
,pdf
, etc.)
#
Mads.setprocs
— Function.
Set the available processors based on environmental variables (supports SLURM only at the moment)
Methods:
Mads.setprocs(; ntasks_per_node, nprocs_per_task, nodenames, mads_servers, test, quiet, veryquiet, dir, exename) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:48Mads.setprocs(np::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:45Mads.setprocs(np::Integer, nt::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParallel.jl:32
Arguments:
np::Integer
: number of processors [default=1
]nt::Integer
: number of threads[default=1
]
Keywords:
dir
: 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) [default=false
]nodenames
: array with names of machines/nodes to be invokednprocs_per_task
: number of processors needed for each parallel task at each node [default=Mads.nprocs_per_task
]ntasks_per_node
: number of parallel tasks per node [default=0
]quiet
: suppress output [default=Mads.quiet
]test
: test the servers and connect to each one ones at a time [default=false
]veryquiet
Returns:
- vector with names of compute nodes (hosts)
Example:
Mads.setprocs()
Mads.setprocs(4)
Mads.setprocs(4, 8)
Mads.setprocs(ntasks_per_node=4)
Mads.setprocs(ntasks_per_node=32, mads_servers=true)
Mads.setprocs(ntasks_per_node=64, nodenames=madsservers)
Mads.setprocs(ntasks_per_node=64, nodenames=["madsmax", "madszem"])
Mads.setprocs(ntasks_per_node=64, nodenames="wc[096-157,160,175]")
Mads.setprocs(ntasks_per_node=64, mads_servers=true, exename="/home/monty/bin/julia", dir="/home/monty")
#
Mads.setseed
— Function.
Set / get current random seed. seed < 0 gets seed, anything else sets it.
Methods:
Mads.setseed(seed::Integer, quiet::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed(seed::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed(seed::Integer, quiet::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed(seed::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed(seed::Integer, quiet::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed(seed::Integer) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459Mads.setseed() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:459
Arguments:
quiet::Bool
: [default=true
]seed::Integer
: random seed
#
Mads.setsindx!
— Method.
Set sin-space dx
Methods:
Mads.setsindx!(madsdata::AbstractDict, sindx::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:370
Arguments:
madsdata::AbstractDict
: MADS problem dictionarysindx::Number
: sin-space dx value
Returns:
- nothing
#
Mads.setsindx
— Method.
Set sin-space dx
Methods:
Mads.setsindx(sindx::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:387
Arguments:
sindx::Number
Returns:
- nothing
#
Mads.setsourceinit!
— Function.
Set initial optimized parameter guesses in the MADS problem dictionary for the Source class
Methods:
Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict, idx::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:317Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:317
Arguments:
idx::Int64
: index of the dictionary of arrays with initial model parameter valuesmadsdata::AbstractDict
: MADS problem dictionaryparamdict::AbstractDict
: dictionary with initial model parameter values
#
Mads.settarget!
— Method.
Set observation target
Methods:
Mads.settarget!(o::AbstractDict, target::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:241
Arguments:
o::AbstractDict
: observation datatarget::Number
: observation target
#
Mads.settime!
— Method.
Set observation time
Methods:
Mads.settime!(o::AbstractDict, time::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:163
Arguments:
o::AbstractDict
: observation datatime::Number
: observation time
#
Mads.setverbositylevel
— Method.
Set MADS verbosity level
Methods:
Mads.setverbositylevel(level::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:223
Arguments:
level::Int64
: debug level
#
Mads.setweight!
— Method.
Set observation weight
Methods:
Mads.setweight!(o::AbstractDict, weight::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:202
Arguments:
o::AbstractDict
: observation dataweight::Number
: observation weight
#
Mads.setwellweights!
— Function.
Set well weights in the MADS problem dictionary
Methods:
Mads.setwellweights!(madsdata::AbstractDict, value::Number, wellkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:344Mads.setwellweights!(madsdata::AbstractDict, value::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:344
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryvalue::Number
: value for well weightswellkeys::AbstractVector{T} where T
#
Mads.showallparameters
— Function.
Show all parameters in the MADS problem dictionary
Methods:
Mads.showallparameters(madsdata::AbstractDict, result::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:581Mads.showallparameters(madsdata::AbstractDict, parkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:577Mads.showallparameters(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:577
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparkeys::AbstractVector{T} where T
result::AbstractDict
#
Mads.showobservations
— Function.
Show observations in the MADS problem dictionary
Methods:
Mads.showobservations(madsdata::AbstractDict, obskeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:400Mads.showobservations(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:400
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryobskeys::AbstractVector{T} where T
#
Mads.showparameters
— Function.
Show parameters in the MADS problem dictionary
Methods:
Mads.showparameters(madsdata::AbstractDict, parkeys::AbstractVector{T} where T, all::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:563Mads.showparameters(madsdata::AbstractDict, parkeys::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:563Mads.showparameters(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:563Mads.showparameters(madsdata::AbstractDict, result::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsParameters.jl:558
Arguments:
all::Bool
madsdata::AbstractDict
: MADS problem dictionaryparkeys::AbstractVector{T} where T
result::AbstractDict
#
Mads.sinetransform
— Function.
Sine transformation of model parameters
Methods:
Mads.sinetransform(sineparams::AbstractVector{T} where T, lowerbounds::AbstractVector{T} where T, upperbounds::AbstractVector{T} where T, indexlogtransformed::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:45Mads.sinetransform(madsdata::AbstractDict, params::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:35
Arguments:
indexlogtransformed::AbstractVector{T} where T
: index vector of log-transformed parameterslowerbounds::AbstractVector{T} where T
: lower boundsmadsdata::AbstractDict
: MADS problem dictionaryparams::AbstractVector{T} where T
sineparams::AbstractVector{T} where T
: model parametersupperbounds::AbstractVector{T} where T
: upper bounds
Returns:
- Sine transformation of model parameters
#
Mads.sinetransformfunction
— Method.
Sine transformation of a function
Methods:
Mads.sinetransformfunction(f::Function, lowerbounds::AbstractVector{T} where T, upperbounds::AbstractVector{T} where T, indexlogtransformed::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:79
Arguments:
f::Function
: functionindexlogtransformed::AbstractVector{T} where T
: index vector of log-transformed parameterslowerbounds::AbstractVector{T} where T
: lower boundsupperbounds::AbstractVector{T} where T
: upper bounds
Returns:
- Sine transformation
#
Mads.sinetransformgradient
— Method.
Sine transformation of a gradient function
Methods:
Mads.sinetransformgradient(g::Function, lowerbounds::AbstractVector{T} where T, upperbounds::AbstractVector{T} where T, indexlogtransformed::AbstractVector{T} where T; sindx) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSineTransformations.jl:100
Arguments:
g::Function
: gradient functionindexlogtransformed::AbstractVector{T} where T
: index vector of log-transformed parameterslowerbounds::AbstractVector{T} where T
: vector with parameter lower boundsupperbounds::AbstractVector{T} where T
: vector with parameter upper bounds
Keywords:
sindx
: sin-space parameter step applied to compute numerical derivatives [default=0.1
]
Returns:
- Sine transformation of a gradient function
#
Mads.spaghettiplot
— Function.
Generate a combined spaghetti plot for the selected
(type != null
) model parameter
Methods:
Mads.spaghettiplot(madsdata::AbstractDict, matrix::AbstractMatrix{T} where T; plotdata, filename, keyword, format, title, xtitle, ytitle, yfit, obs_plot_dots, linewidth, pointsize, grayscale, xmin, xmax, ymin, ymax, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:876Mads.spaghettiplot(madsdata::AbstractDict, dictarray::AbstractDict; seed, kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:839Mads.spaghettiplot(madsdata::AbstractDict, number_of_samples::Integer; kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:835
Arguments:
dictarray::AbstractDict
: dictionary array containing the data arrays to be plottedmadsdata::AbstractDict
: MADS problem dictionarymatrix::AbstractMatrix{T} where T
number_of_samples::Integer
: number of samples
Keywords:
filename
: output file name used to output the produced plotsformat
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]grayscale
keyword
: keyword to be added in the file name used to output the produced plots (iffilename
is not defined)linewidth
: width of the lines in plot [default=2Gadfly.pt
]obs_plot_dots
: plot observation as dots (true
[default] orfalse
)plotdata
: plot data (iffalse
model predictions are plotted only) [default=true
]pointsize
: size of the markers in plot [default=4Gadfly.pt
]quiet
seed
: random seed [default=0
]title
xmax
xmin
xtitle
:x
axis title [default=X
]yfit
: fit vertical axis range [default=false
]ymax
ymin
ytitle
:y
axis title [default=Y
]
Dumps:
- Image file with a spaghetti plot (
<mads_rootname>-<keyword>-<number_of_samples>-spaghetti.<default_image_extension>
)
Example:
Mads.spaghettiplot(madsdata, dictarray; filename="", keyword = "", format="", xtitle="X", ytitle="Y", obs_plot_dots=true)
Mads.spaghettiplot(madsdata, array; 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)
#
Mads.spaghettiplots
— Function.
Generate separate spaghetti plots for each selected
(type != null
) model parameter
Methods:
Mads.spaghettiplots(madsdata::AbstractDict, paramdictarray::OrderedCollections.OrderedDict; format, keyword, xtitle, ytitle, obs_plot_dots, seed, linewidth, pointsize, grayscale, quiet) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:683Mads.spaghettiplots(madsdata::AbstractDict, number_of_samples::Integer; seed, kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPlot.jl:678
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumber_of_samples::Integer
: number of samplesparamdictarray::OrderedCollections.OrderedDict
: parameter dictionary containing the data arrays to be plotted
Keywords:
format
: output plot format (png
,pdf
, etc.) [default=Mads.graphbackend
]grayscale
keyword
: keyword to be added in the file name used to output the produced plotslinewidth
: width of the lines on the plot [default=2Gadfly.pt
]obs_plot_dots
: plot observation as dots (true
(default) orfalse
)pointsize
: size of the markers on the plot [default=4Gadfly.pt
]quiet
seed
: random seed [default=0
]xtitle
:x
axis title [default=X
]ytitle
:y
axis title [default=Y
]
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>
)
Example:
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)
#
Mads.sphericalcov
— Method.
Spherical spatial covariance function
Methods:
Mads.sphericalcov(h::Number, maxcov::Number, scale::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:45
Arguments:
h::Number
: separation distancemaxcov::Number
: max covariancescale::Number
: scale
Returns:
- covariance
#
Mads.sphericalvariogram
— Method.
Spherical variogram
Methods:
Mads.sphericalvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsKriging.jl:60
Arguments:
h::Number
: separation distancenugget::Number
: nuggetrange::Number
: rangesill::Number
: sill
Returns:
- Spherical variogram
#
Mads.sprintf
— Method.
Convert @Printf.sprintf
macro into sprintf
function
#
Mads.status
— Function.
Status of Mads modules
Methods:
Mads.status(madsmodule::AbstractString; git, gitmore) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:256Mads.status(; git, gitmore) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:251
Arguments:
madsmodule::AbstractString
: mads module
Keywords:
git
: use git [default=true
orMads.madsgit
]gitmore
: use even more git [default=false
]
Returns:
true
orfalse
#
Mads.stderrcaptureoff
— Method.
Restore stderr
Methods:
Mads.stderrcaptureoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:139
Returns:
- standered error
#
Mads.stderrcaptureon
— Method.
Redirect stderr to a reader
Methods:
Mads.stderrcaptureon() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:120
#
Mads.stdoutcaptureoff
— Method.
Restore stdout
Methods:
Mads.stdoutcaptureoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:105
Returns:
- standered output
#
Mads.stdoutcaptureon
— Method.
Redirect stdout to a reader
Methods:
Mads.stdoutcaptureon() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:86
#
Mads.stdouterrcaptureoff
— Method.
Restore stdout & stderr
Methods:
Mads.stdouterrcaptureoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:170
Returns:
- standered output amd standered error
#
Mads.stdouterrcaptureon
— Method.
Redirect stdout & stderr to readers
Methods:
Mads.stdouterrcaptureon() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsCapture.jl:154
#
Mads.svrdump
— Method.
Dump SVR models in files
Methods:
Mads.svrdump(svrmodel::Vector{SVR.svmmodel}, rootname::AbstractString, numberofsamples::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:140
Arguments:
numberofsamples::Int64
: number of samplesrootname::AbstractString
: root namesvrmodel::Vector{SVR.svmmodel}
: array of SVR models
#
Mads.svrfree
— Method.
Free SVR
Methods:
Mads.svrfree(svrmodel::Vector{SVR.svmmodel}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:122
Arguments:
svrmodel::Vector{SVR.svmmodel}
: array of SVR models
#
Mads.svrload
— Method.
Load SVR models from files
Methods:
Mads.svrload(npred::Int64, rootname::AbstractString, numberofsamples::Int64) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:163
Arguments:
npred::Int64
: number of model predictionsnumberofsamples::Int64
: number of samplesrootname::AbstractString
: root name
Returns:
- Array of SVR models for each model prediction
#
Mads.svrpredict
— Function.
Predict SVR
Methods:
Mads.svrpredict(svrmodel::Vector{SVR.svmmodel}, paramarray::Matrix{Float64}) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:95
Arguments:
paramarray::Matrix{Float64}
: parameter arraysvrmodel::Vector{SVR.svmmodel}
: array of SVR models
Returns:
- SVR predicted observations (dependent variables) for a given set of parameters (independent variables)
#
Mads.svrtrain
— Function.
Train SVR
Methods:
Mads.svrtrain(madsdata::AbstractDict, numberofsamples::Integer; addminmax, kw...) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:38Mads.svrtrain(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:38Mads.svrtrain(madsdata::AbstractDict, paramarray::Matrix{Float64}; check, savesvr, addminmax, svm_type, kernel_type, degree, gamma, coef0, C, nu, cache_size, epsilon, shrinking, probability, verbose, tol) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSVR.jl:5
Arguments:
madsdata::AbstractDict
: MADS problem dictionarynumberofsamples::Integer
: number of random samples in the training set [default=100
]paramarray::Matrix{Float64}
Keywords:
C
: cost; penalty parameter of the error term [default=1000.0
]addminmax
: add parameter minimum / maximum range values in the training set [default=true
]cache_size
: size of the kernel cache [default=100.0
]check
: check SVR performance [default=false
]coef0
: independent term in kernel function; important only in POLY and SIGMOND kernel types
[default=0
]
degree
: degree of the polynomial kernel [default=3
]epsilon
: epsilon in the EPSILON_SVR model; defines an epsilon-tube within which no penalty is associated in the training loss function with points predicted within a distance epsilon from the actual value [default=0.001
]gamma
: coefficient for RBF, POLY and SIGMOND kernel types [default=1/numberofsamples
]kernel_type
: kernel type[default=SVR.RBF
]nu
: upper bound on the fraction of training errors / lower bound of the fraction of support vectors; acceptable range (0, 1]; applied if NU_SVR model [default=0.5
]probability
: train to estimate probabilities [default=false
]savesvr
: save SVR models [default=false
]shrinking
: apply shrinking heuristic [default=true
]svm_type
: SVM type [default=SVR.EPSILON_SVR
]tol
: tolerance of termination criterion [default=0.001
]verbose
: verbose output [default=false
]
Returns:
- Array of SVR models
#
Mads.symlinkdir
— Method.
Create a symbolic link of a file filename
in a directory dirtarget
Methods:
Mads.symlinkdir(filename::AbstractString, dirtarget::AbstractString, dirsource::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1217
Arguments:
dirsource::AbstractString
dirtarget::AbstractString
: target directoryfilename::AbstractString
: file name
#
Mads.symlinkdirfiles
— Method.
Create a symbolic link of all the files in a directory dirsource
in a directory dirtarget
Methods:
Mads.symlinkdirfiles(dirsource::AbstractString, dirtarget::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:1199
Arguments:
dirsource::AbstractString
: source directorydirtarget::AbstractString
: target directory
#
Mads.tag
— Function.
Tag Mads modules with a default argument :patch
Methods:
Mads.tag(madsmodule::AbstractString, versionsym::Symbol) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:326Mads.tag(madsmodule::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:326Mads.tag(versionsym::Symbol) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:321Mads.tag() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:321
Arguments:
madsmodule::AbstractString
: mads module nameversionsym::Symbol
: version symbol [default=:patch
]
#
Mads.test
— Function.
Perform Mads tests (the tests will be in parallel if processors are defined; tests use the current Mads version in the workspace; reload("Mads.jl")
if needed)
Methods:
Mads.test(testname::AbstractString; madstest, plotting) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTest.jl:38Mads.test() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTest.jl:38
Arguments:
testname::AbstractString
: name of the test to execute; module or example
Keywords:
madstest
: test Mads [default=true
]plotting
#
Mads.testj
— Function.
Execute Mads tests using Julia Pkg.test (the default Pkg.test in Julia is executed in serial)
Methods:
Mads.testj(coverage::Bool) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTest.jl:9Mads.testj() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsTest.jl:9
Arguments:
coverage::Bool
: [default=false
]
#
Mads.transposematrix
— Method.
Transpose non-numeric matrix
Methods:
Mads.transposematrix(a::AbstractMatrix{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:407
Arguments:
a::AbstractMatrix{T} where T
: matrix
#
Mads.transposevector
— Method.
Transpose non-numeric vector
Methods:
Mads.transposevector(a::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:397
Arguments:
a::AbstractVector{T} where T
: vector
#
Mads.untag
— Method.
Untag specific version
Methods:
Mads.untag(madsmodule::AbstractString, version::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsPublish.jl:361
Arguments:
madsmodule::AbstractString
: mads module nameversion::AbstractString
: version
#
Mads.vectoroff
— Method.
MADS vector calls off
Methods:
Mads.vectoroff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:49
#
Mads.vectoron
— Method.
MADS vector calls on
Methods:
Mads.vectoron() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:40
#
Mads.veryquietoff
— Method.
Make MADS not very quiet
Methods:
Mads.veryquietoff() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:122
#
Mads.veryquieton
— Method.
Make MADS very quiet
Methods:
Mads.veryquieton() in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsHelpers.jl:113
#
Mads.void2nan!
— Method.
Convert Nothing's into NaN's in a dictionary
Methods:
Mads.void2nan!(dict::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:1040
Arguments:
dict::AbstractDict
: dictionary
#
Mads.weightedstats
— Method.
Get weighted mean and variance samples
Methods:
Mads.weightedstats(samples::Array, llhoods::AbstractVector{T} where T) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsSensitivityAnalysis.jl:379
Arguments:
llhoods::AbstractVector{T} where T
: vector of log-likelihoodssamples::Array
: array of samples
Returns:
- vector of sample means
- vector of sample variances
#
Mads.welloff!
— Method.
Turn off a specific well in the MADS problem dictionary
Methods:
Mads.welloff!(madsdata::AbstractDict, wellname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:616
Arguments:
madsdata::AbstractDict
: MADS problem dictionarywellname::AbstractString
: name of the well to be turned off
#
Mads.wellon!
— Method.
Turn on a specific well in the MADS problem dictionary
Methods:
Mads.wellon!(madsdata::AbstractDict, wellname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:558
Arguments:
madsdata::AbstractDict
: MADS problem dictionarywellname::AbstractString
: name of the well to be turned on
#
Mads.wellon!
— Method.
Turn on a specific well in the MADS problem dictionary
Methods:
Mads.wellon!(madsdata::AbstractDict, rx::Regex) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:580Mads.wellon!(madsdata::AbstractDict, wellname::AbstractString) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:558
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryrx::Regex
wellname::AbstractString
: name of the well to be turned on
#
Mads.wells2observations!
— Method.
Convert Wells
class to Observations
class in the MADS problem dictionary
Methods:
Mads.wells2observations!(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsObservations.jl:671
Arguments:
madsdata::AbstractDict
: MADS problem dictionary
#
Mads.writeparameters
— Function.
Write model parameters
Methods:
Mads.writeparameters(madsdata::AbstractDict, parameters::AbstractDict; respect_space) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:941Mads.writeparameters(madsdata::AbstractDict) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:941
Arguments:
madsdata::AbstractDict
: MADS problem dictionaryparameters::AbstractDict
: parameters
Keywords:
respect_space
: respect provided space in the template file to fit model parameters [default=false
]
#
Mads.writeparametersviatemplate
— Method.
Write parameters
via MADS template (templatefilename
) to an output file (outputfilename
)
Methods:
Mads.writeparametersviatemplate(parameters, templatefilename, outputfilename; respect_space) in Mads
: /Users/vvv/.julia/dev/Mads/src/MadsIO.jl:895
Arguments:
outputfilename
: output file nameparameters
: parameterstemplatefilename
: tmplate file name
Keywords:
respect_space
: respect provided space in the template file to fit model parameters [default=false
]
#
Mads.@stderrcapture
— Macro.
Capture stderr of a block
#
Mads.@stdoutcapture
— Macro.
Capture stdout of a block
#
Mads.@stdouterrcapture
— Macro.
Capture stderr & stderr of a block
#
Mads.@tryimport
— Macro.
Try to import a module in Mads
#
Mads.@tryimportmain
— Macro.
Try to import a module in Main
#
Mads.MadsModel
— Type.
MadsModel type applied for MathProgBase analyses