Skip to content

Mads.jl

MADS (Model Analysis & Decision Support)

Mads.jl is MADS main module.

Mads.jl module functions:

# Mads.MFlmMethod.

Matrix Factorization using Levenberg Marquardt

Methods

  • Mads.MFlm(X::Array{T,2}, range::AbstractRange{Int64}; kw...) where T in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsBSS.jl#L103
  • Mads.MFlm(X::Array{T,2}, 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 in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsBSS.jl#L133

Arguments

  • X::Array{T,2} : matrix to factorize
  • nk::Integer : number of features to extract
  • range::AbstractRange{Int64}

Keywords

  • initH : initial H (feature) matrix
  • initW : initial W (weight) matrix
  • lambda
  • 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

source

# Mads.NMFipoptFunction.

Non-negative Matrix Factorization using JuMP/Ipopt

Methods

  • Mads.NMFipopt(X::Array{T,2} where T, nk::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsBSS.jl#L61
  • Mads.NMFipopt(X::Array{T,2} where T, nk::Integer, retries::Integer; random, maxiter, maxguess, initW, initH, verbosity, quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsBSS.jl#L61

Arguments

  • X::Array{T,2} where T : matrix to factorize
  • nk::Integer : number of features to extract
  • retries::Integer : number of solution retries [default=1]

Keywords

  • initH : initial H (feature) matrix
  • initW : initial W (weight) matrix
  • maxguess : 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

source

# Mads.NMFmMethod.

Non-negative Matrix Factorization using NMF

Methods

  • Mads.NMFm(X::Array, nk::Integer; retries, tol, maxiter) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsBSS.jl#L22

Arguments

  • X::Array : matrix to factorize
  • nk::Integer : number of features to extract

Keywords

  • maxiter : maximum number of iterations [default=10000]
  • retries : number of solution retries [default=1]
  • tol : solution tolerance [default=1.0e-9]

Returns:

  • NMF results

source

# Mads.addkeyword!Function.

Add a keyword in a class within the Mads dictionary madsdata

Methods

  • Mads.addkeyword!(madsdata::AbstractDict, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L277
  • Mads.addkeyword!(madsdata::AbstractDict, class::String, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L281

Arguments

  • class::String : dictionary class; if not provided searches for keyword in Problem class
  • keyword::String : dictionary key
  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.addsource!Function.

Add an additional contamination source

Methods

  • Mads.addsource!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L19
  • Mads.addsource!(madsdata::AbstractDict, sourceid::Int64; dict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L19

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • sourceid::Int64 : source id [default=0]

Keywords

  • dict

source

# Mads.addsourceparameters!Method.

Add contaminant source parameters

Methods

  • Mads.addsourceparameters!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L76

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.allwellsoff!Method.

Turn off all the wells in the MADS problem dictionary

Methods

  • Mads.allwellsoff!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L607

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.allwellson!Method.

Turn on all the wells in the MADS problem dictionary

Methods

  • Mads.allwellson!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L549

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.amanziFunction.

Execute Amanzi external groundwater flow and transport simulator

Methods

  • Mads.amanzi(filename::String, nproc::Int64, quiet::Bool, observation_filename::String, setup::String; amanzi_exe) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsSimulators.jl#L15
  • Mads.amanzi(filename::String, nproc::Int64, quiet::Bool, observation_filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsSimulators.jl#L15
  • Mads.amanzi(filename::String, nproc::Int64, quiet::Bool) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsSimulators.jl#L15
  • Mads.amanzi(filename::String, nproc::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsSimulators.jl#L15
  • Mads.amanzi(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsSimulators.jl#L15

Arguments

  • filename::String : amanzi input file name
  • nproc::Int64 : number of processor to be used by Amanzi [default=Mads.nprocs_per_task_default]
  • observation_filename::String : Amanzi observation file name [default="observations.out"]
  • quiet::Bool : suppress output [default=Mads.quiet]
  • setup::String : bash script to setup Amanzi environmental variables [default="source-amanzi-setup"]

Keywords

  • amanzi_exe : full path to the Amanzi executable

source

# Mads.amanzi_output_parserFunction.

Parse Amanzi output provided in an external file (filename)

Methods

  • Mads.amanzi_output_parser(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsParsers.jl#L22
  • Mads.amanzi_output_parser() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-external/MadsParsers.jl#L22

Arguments

  • filename::String : 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")

source

# Mads.asinetransformFunction.

Arcsine transformation of model parameters

Methods

  • Mads.asinetransform(madsdata::AbstractDict, params::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L4
  • Mads.asinetransform(params::Array{T,1} where T, lowerbounds::Array{T,1} where T, upperbounds::Array{T,1} where T, indexlogtransformed::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L14

Arguments

  • indexlogtransformed::Array{T,1} where T : index vector of log-transformed parameters
  • lowerbounds::Array{T,1} where T : lower bounds
  • madsdata::AbstractDict : MADS problem dictionary
  • params::Array{T,1} where T : model parameters
  • upperbounds::Array{T,1} where T : upper bounds

Returns:

  • Arcsine transformation of model parameters

source

# Mads.boundparameters!Function.

Bound model parameters based on their ranges

Methods

  • Mads.boundparameters!(madsdata::AbstractDict, parvec::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L771
  • Mads.boundparameters!(madsdata::AbstractDict, pardict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L783

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • pardict::AbstractDict : Parameter dictionary
  • parvec::Array{T,1} where T : Parameter vector

source

# Mads.calibrateMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L164

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)

source

# Mads.calibraterandomFunction.

Calibrate with random initial guesses

Methods

  • Mads.calibraterandom(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L41
  • 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) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L41

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • numberofsamples::Integer : number of random initial samples [default=1]

Keywords

  • all : all model results are returned [default=false]
  • 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)

source

# Mads.calibraterandom_parallelFunction.

Calibrate with random initial guesses in parallel

Methods

  • Mads.calibraterandom_parallel(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L108
  • 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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L108

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • numberofsamples::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

source

# Mads.captureoffMethod.

Make MADS not capture

Methods

  • Mads.captureoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L133

source

# Mads.captureonMethod.

Make MADS capture

Methods

  • Mads.captureon() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L124

source

# Mads.checkmodeloutputdirsMethod.

Check the directories where model outputs should be saved for MADS

Methods

  • Mads.checkmodeloutputdirs(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L615

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • true or false

source

# Mads.checknodedirFunction.

Check if a directory is readable

Methods

  • Mads.checknodedir(dir::String, waittime::Float64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L13
  • Mads.checknodedir(dir::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L13
  • Mads.checknodedir(node::String, dir::String, waittime::Float64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L4
  • Mads.checknodedir(node::String, dir::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L4

Arguments

  • dir::String : directory
  • node::String : computational node name (e.g. madsmax.lanl.gov, wf03, or 127.0.0.1)
  • waittime::Float64 : wait time in seconds [default=10]

Returns:

  • true if the directory is readable, false otherwise

source

# Mads.checkoutFunction.

Checkout (pull) the latest version of Mads modules

Methods

  • Mads.checkout(modulename::String; git, master, force, pull, required, all) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L79
  • Mads.checkout() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L79

Arguments

  • modulename::String : 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]

source

# Mads.checkparameterrangesMethod.

Check parameter ranges for model parameters

Methods

  • Mads.checkparameterranges(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L709

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.cleancoverageMethod.

Remove Mads coverage files

Methods

  • Mads.cleancoverage() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsTest.jl#L24

source

# Mads.cmadsins_obsMethod.

Call C MADS ins_obs() function from MADS dynamic library

Methods

  • Mads.cmadsins_obs(obsid::Array{T,1} where T, instructionfilename::String, inputfilename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-old/MadsCMads.jl#L40

Arguments

  • inputfilename::String : input file name
  • instructionfilename::String : instruction file name
  • obsid::Array{T,1} where T : observation id

Return:

  • observations

source

# Mads.commitFunction.

Commit the latest version of Mads modules in the repository

Methods

  • Mads.commit(commitmsg::String, modulename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L227
  • Mads.commit(commitmsg::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L227

Arguments

  • commitmsg::String : commit message
  • modulename::String : module name

source

# Mads.computemassFunction.

Compute injected/reduced contaminant mass (for a given set of mads input files when "path" is provided)

Methods

  • Mads.computemass(madsdata::AbstractDict; time) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L459
  • Mads.computemass(madsfiles::Union{Regex, String}; time, path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L486

Arguments

  • String}
  • madsdata::AbstractDict : MADS problem dictionary
  • madsfiles::Union{Regex : 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=".")

source

# Mads.computeparametersensititiesMethod.

Compute sensitivities for each model parameter; averaging the sensitivity indices over the entire observation range

Methods

  • Mads.computeparametersensitities(madsdata::AbstractDict, saresults::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L846

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • saresults::AbstractDict : dictionary with sensitivity analysis results

source

# Mads.contaminationMethod.

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::Array{T,1} where T, anasolfunction::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L429

Arguments

  • H::Number : Hurst coefficient for Fractional Brownian dispersion
  • anasolfunction::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 direction
  • dy::Number : source size (extent) in Y direction
  • dz::Number : source size (extent) in Z direction
  • f::Number : source mass flux
  • lambda::Number : first-order reaction rate
  • n::Number : porosity
  • t0::Number : source starting time
  • t1::Number : source termination time
  • t::Array{T,1} where T : vector of times to compute concentration at the observation point
  • theta::Number : groundwater flow direction
  • vx::Number : advective transport velocity in X direction
  • vy::Number : advective transport velocity in Y direction
  • vz::Number : advective transport velocity in Z direction
  • wellx::Number : observation point (well) X coordinate
  • welly::Number : observation point (well) Y coordinate
  • wellz::Number : observation point (well) Z coordinate
  • x::Number : X coordinate of contaminant source location
  • y::Number : Y coordinate of contaminant source location
  • z::Number : Z coordinate of contaminant source location

Returns:

  • a vector of predicted concentration at (wellx, welly, wellz, t)

source

# Mads.copyaquifer2sourceparameters!Method.

Copy aquifer parameters to become contaminant source parameters

Methods

  • Mads.copyaquifer2sourceparameters!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L115

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.copyrightMethod.

Produce MADS copyright information

Methods

  • Mads.copyright() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L19

source

# Mads.create_documentationMethod.

Create web documentation files for Mads functions

Methods

  • Mads.create_documentation() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L386

source

# Mads.create_tests_offMethod.

Turn off the generation of MADS tests (default)

Methods

  • Mads.create_tests_off() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L178

source

# Mads.create_tests_onMethod.

Turn on the generation of MADS tests (dangerous)

Methods

  • Mads.create_tests_on() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L169

source

# Mads.createmadsobservationsFunction.

Create Mads dictionary of observations and instruction file

Methods

  • Mads.createmadsobservations(nrow::Int64, ncol::Int64; obstring, pretext, prestring, poststring, filename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L108
  • Mads.createmadsobservations(nrow::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L108

Arguments

  • ncol::Int64 : number of columns [default 1]
  • nrow::Int64 : number of rows

Keywords

  • filename : file name
  • obstring : observation string
  • poststring : post instruction file string
  • prestring : pre instruction file string
  • pretext : preamble instructions

)

Returns:

  • observation dictionary

source

# Mads.createmadsproblemFunction.

Create a new Mads problem where the observation targets are computed based on the model predictions

Methods

  • Mads.createmadsproblem(infilename::String, outfilename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L26
  • Mads.createmadsproblem(madsdata::AbstractDict, outfilename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L51
  • Mads.createmadsproblem(madsdata::AbstractDict, predictions::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L60
  • Mads.createmadsproblem(madsdata::AbstractDict, predictions::AbstractDict, outfilename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L56

Arguments

  • infilename::String : input Mads file
  • madsdata::AbstractDict : MADS problem dictionary
  • outfilename::String : output Mads file
  • predictions::AbstractDict : dictionary of model predictions

Returns:

  • new MADS problem dictionary

source

# Mads.createobservations!Function.

Create observations in the MADS problem dictionary based on time and observation vectors

Methods

  • Mads.createobservations!(madsdata::AbstractDict, time::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L444
  • Mads.createobservations!(madsdata::AbstractDict, time::Array{T,1} where T, observation::Array{T,1} where T; logtransform, weight_type, weight) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L444
  • Mads.createobservations!(madsdata::AbstractDict, observation::AbstractDict; logtransform, weight_type, weight) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L488

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • observation::AbstractDict : dictionary of observations
  • observation::Array{T,1} where T : dictionary of observations
  • time::Array{T,1} where T : vector of observation times

Keywords

  • logtransform : log transform observations [default=false]
  • weight : weight value [default=1]
  • weight_type : weight type [default=constant]

source

# Mads.createtempdirMethod.

Create temporary directory

Methods

  • Mads.createtempdir(tempdirname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1255

Arguments

  • tempdirname::String : temporary directory name

source

# Mads.deleteNaN!Method.

Delete rows with NaN in a dataframe df

Methods

  • Mads.deleteNaN!(df::DataFrames.DataFrame) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L1072

Arguments

  • df::DataFrames.DataFrame : dataframe

source

# Mads.deletekeyword!Function.

Delete a keyword in a class within the Mads dictionary madsdata

Methods

  • Mads.deletekeyword!(madsdata::AbstractDict, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L304
  • Mads.deletekeyword!(madsdata::AbstractDict, class::String, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L310

Arguments

  • class::String : dictionary class; if not provided searches for keyword in Problem class
  • keyword::String : dictionary key
  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.deleteoffwells!Method.

Delete all wells marked as being off in the MADS problem dictionary

Methods

  • Mads.welloff!(madsdata::AbstractDict, wellname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L621

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • wellname::String : name of the well to be turned off

source

# Mads.deletetimes!Method.

Delete all times in the MADS problem dictionary in a given list.

Methods

  • Mads.welloff!(madsdata::AbstractDict, wellname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L621

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • wellname::String : name of the well to be turned off

source

# Mads.dependentsFunction.

Lists module dependents on a module (Mads by default)

Methods

  • Mads.dependents(modulename::String, filter::Bool) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L43
  • Mads.dependents(modulename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L43
  • Mads.dependents() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L43

Arguments

  • filter::Bool : whether to filter modules [default=false]
  • modulename::String : module name [default="Mads"]

Returns:

  • modules that are dependents of the input module

source

# Mads.diffFunction.

Diff the latest version of Mads modules in the repository

Methods

  • Mads.diff(modulename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L170
  • Mads.diff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L170

Arguments

  • modulename::String : module name

source

# Mads.displayFunction.

Display image file

Methods

  • Mads.display(p::Compose.Context) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsDisplay.jl#L71
  • Mads.display(p::Gadfly.Plot) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsDisplay.jl#L65
  • Mads.display(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsDisplay.jl#L8

Arguments

  • filename::String : image file name
  • p::Compose.Context : plotting object
  • p::Gadfly.Plot : plotting object

source

# Mads.dumpasciifileMethod.

Dump ASCII file

Methods

  • Mads.dumpasciifile(filename::String, data) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsASCII.jl#L31

Arguments

  • data : data to dump
  • filename::String : ASCII file name

Dumps:

  • ASCII file with the name in "filename"

source

# Mads.dumpjsonfileMethod.

Dump a JSON file

Methods

  • Mads.dumpjsonfile(filename::String, data) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsJSON.jl#L39

Arguments

  • data : data to dump
  • filename::String : JSON file name

Dumps:

  • JSON file with the name in "filename"

source

# Mads.dumpwelldataMethod.

Dump well data from MADS problem dictionary into a ASCII file

Methods

  • Mads.dumpwelldata(madsdata::AbstractDict, filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1121

Arguments

  • filename::String : output file name
  • madsdata::AbstractDict : MADS problem dictionary

Dumps:

  • filename : a ASCII file

source

# Mads.dumpyamlfileMethod.

Dump YAML file

Methods

  • Mads.dumpyamlfile(filename::String, data; julia) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsYAML.jl#L55

Arguments

  • data : YAML data
  • filename::String : output file name

Keywords

  • julia : if true, use julia YAML library (if available); if false (default), use python YAML library (if available)

source

# Mads.dumpyamlmadsfileMethod.

Dump YAML Mads file

Methods

  • Mads.dumpyamlmadsfile(madsdata::AbstractDict, filename::String; julia) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsYAML.jl#L74

Arguments

  • filename::String : output file name
  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • julia : use julia YAML [default=false]

source

# Mads.efastMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L1115

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]

source

# Mads.emceesamplingFunction.

Bayesian sampling with Goodman & Weare's Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler (aka Emcee)

Methods

  • Mads.emceesampling(madsdata::AbstractDict; numwalkers, nsteps, burnin, thinning, sigma, seed, weightfactor) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L9
  • Mads.emceesampling(madsdata::AbstractDict, p0::Array; numwalkers, nsteps, burnin, thinning, seed, weightfactor) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L32

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • p0::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 any thinning 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)

source

# Mads.estimationerrorFunction.

Estimate kriging error

Methods

  • Mads.estimationerror(w::Array{T,1} where T, x0::Array{T,1} where T, X::AbstractArray{T,2} where T, cov::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L199
  • Mads.estimationerror(w::Array{T,1} where T, covmat::AbstractArray{T,2} where T, covvec::Array{T,1} where T, cov0::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L206

Arguments

  • X::AbstractArray{T,2} where T : observation matrix
  • cov0::Number : zero-separation covariance
  • cov::Function : spatial covariance function
  • covmat::AbstractArray{T,2} where T : covariance matrix
  • covvec::Array{T,1} where T : covariance vector
  • w::Array{T,1} where T : kriging weights
  • x0::Array{T,1} where T : estimated locations

Returns:

  • estimation kriging error

source

# Mads.evaluatemadsexpressionMethod.

Evaluate an expression string based on a parameter dictionary

Methods

  • Mads.evaluatemadsexpression(expressionstring::String, parameters::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L155

Arguments

  • expressionstring::String : expression string
  • parameters::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

source

# Mads.evaluatemadsexpressionsMethod.

Evaluate all the expressions in the Mads problem dictiorany based on a parameter dictionary

Methods

  • Mads.evaluatemadsexpressions(madsdata::AbstractDict, parameters::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L174

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameters::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

source

# Mads.expcovMethod.

Exponential spatial covariance function

Methods

  • Mads.expcov(h::Number, maxcov::Number, scale::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L31

Arguments

  • h::Number : separation distance
  • maxcov::Number : maximum covariance
  • scale::Number : scale

Returns:

  • covariance

source

# Mads.exponentialvariogramMethod.

Exponential variogram

Methods

  • Mads.exponentialvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L84

Arguments

  • h::Number : separation distance
  • nugget::Number : nugget
  • range::Number : range
  • sill::Number : sill

Returns:

  • Exponential variogram

source

# Mads.filterkeysFunction.

Filter dictionary keys based on a string or regular expression

Methods

  • Mads.filterkeys(dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L804
  • Mads.filterkeys(dict::AbstractDict, key::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L803
  • Mads.filterkeys(dict::AbstractDict, key::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L804

Arguments

  • dict::AbstractDict : dictionary
  • key::Regex : the regular expression or string used to filter dictionary keys
  • key::String : the regular expression or string used to filter dictionary keys

source

# Mads.forwardFunction.

Perform a forward run using the initial or provided values for the model parameters

Methods

  • Mads.forward(madsdata::AbstractDict; all) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsForward.jl#L8
  • Mads.forward(madsdata::AbstractDict, paramdict::AbstractDict; all, checkpointfrequency, checkpointfilename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsForward.jl#L12
  • Mads.forward(madsdata::AbstractDict, paramarray::Array; all, checkpointfrequency, checkpointfilename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsForward.jl#L46

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • paramarray::Array : array of model parameter values
  • paramdict::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

source

# Mads.forwardgridFunction.

Perform a forward run over a 3D grid defined in madsdata using the initial or provided values for the model parameters

Methods

  • Mads.forwardgrid(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsForward.jl#L134
  • Mads.forwardgrid(madsdatain::AbstractDict, paramvalues::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsForward.jl#L139

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • madsdatain::AbstractDict : MADS problem dictionary
  • paramvalues::AbstractDict : dictionary of model parameter values

Returns:

  • 3D array with model predictions along a 3D grid

source

# Mads.freeFunction.

Free Mads modules

Methods

  • Mads.free(modulename::String; required, all) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L203
  • Mads.free() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L203

Arguments

  • modulename::String : module name

Keywords

  • all : free all the modules [default=false]
  • required : only free Mads.required modules [default=false]

source

# Mads.functionsFunction.

List available functions in the MADS modules:

Methods

  • Mads.functions(string::String; shortoutput, quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L32
  • Mads.functions() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L32
  • Mads.functions(re::Regex; shortoutput, quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L23
  • Mads.functions(m::Union{Module, Symbol}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L71
  • Mads.functions(m::Union{Module, Symbol}, re::Regex; shortoutput, quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L41
  • Mads.functions(m::Union{Module, Symbol}, string::String; shortoutput, quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L71

Arguments

  • Symbol}
  • m::Union{Module : MADS module
  • re::Regex
  • string::String : string to display functions with matching names

Keywords

  • quiet
  • shortoutput

Examples:

Mads.functions()
Mads.functions(BIGUQ)
Mads.functions("get")
Mads.functions(Mads, "get")

source

# Mads.gaussiancovMethod.

Gaussian spatial covariance function

Methods

  • Mads.gaussiancov(h::Number, maxcov::Number, scale::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L17

Arguments

  • h::Number : separation distance
  • maxcov::Number : maximum covariance
  • scale::Number : scale

Returns:

  • covariance

source

# Mads.gaussianvariogramMethod.

Gaussian variogram

Methods

  • Mads.gaussianvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L105

Arguments

  • h::Number : separation distance
  • nugget::Number : nugget
  • range::Number : range
  • sill::Number : sill

Returns:

  • Gaussian variogram

source

# Mads.getcovmatMethod.

Get spatial covariance matrix

Methods

  • Mads.getcovmat(X::AbstractArray{T,2} where T, covfunction::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L161

Arguments

  • X::AbstractArray{T,2} where T : matrix with coordinates of the data points (x or y)
  • covfunction::Function

Returns:

  • spatial covariance matrix

source

# Mads.getcovvec!Method.

Get spatial covariance vector

Methods

  • Mads.getcovvec!(covvec::Array{T,1} where T, x0::Array{T,1} where T, X::AbstractArray{T,2} where T, cov::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L187

Arguments

  • X::AbstractArray{T,2} where T : matrix with coordinates of the data points
  • cov::Function : spatial covariance function
  • covvec::Array{T,1} where T : spatial covariance vector
  • x0::Array{T,1} where T : vector with coordinates of the estimation points (x or y)

Returns:

  • spatial covariance vector

source

# Mads.getdefaultplotformatMethod.

Set the default plot format (SVG is the default format)

Methods

  • Mads.getdefaultplotformat() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L34

source

# Mads.getdictvaluesFunction.

Get dictionary values for keys based on a string or regular expression

Methods

  • Mads.getdictvalues(dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L826
  • Mads.getdictvalues(dict::AbstractDict, key::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L825
  • Mads.getdictvalues(dict::AbstractDict, key::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L826

Arguments

  • dict::AbstractDict : dictionary
  • key::Regex : the key to find value for
  • key::String : the key to find value for

source

# Mads.getdirMethod.

Get directory

Methods

  • Mads.getdir(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L423

Arguments

  • filename::String : file name

Returns:

  • directory in file name

Example:

d = Mads.getdir("a.mads") # d = "."
d = Mads.getdir("test/a.mads") # d = "test"

source

# Mads.getdistributionMethod.

Parse parameter distribution from a string

Methods

  • Mads.getdistribution(dist::String, i::String, inputtype::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L203

Arguments

  • dist::String : parameter distribution
  • i::String
  • inputtype::String : input type (parameter or observation)

Returns:

  • distribution

source

# Mads.getextensionMethod.

Get file name extension

Methods

  • Mads.getextension(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L595

Arguments

  • filename::String : file name

Returns:

  • file name extension

Example:

ext = Mads.getextension("a.mads") # ext = "mads"

source

# Mads.getimportantsamplesMethod.

Get important samples

Methods

  • Mads.getimportantsamples(samples::Array, llhoods::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L355

Arguments

  • llhoods::Array{T,1} where T : vector of log-likelihoods
  • samples::Array : array of samples

Returns:

  • array of important samples

source

# Mads.getlogparamkeysMethod.

Get the keys in the MADS problem dictionary for parameters that are log-transformed (log)

source

# Mads.getmadsdirMethod.

Get the directory where currently Mads is running

Methods

  • Mads.getmadsdir() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L465

Example:

problemdir = Mads.getmadsdir()

Returns:

  • Mads problem directory

source

# Mads.getmadsinputfileMethod.

Get the default MADS input file set as a MADS global variable using setmadsinputfile(filename)

Methods

  • Mads.getmadsinputfile() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L380

Returns:

  • input file name (e.g. input_file_name.mads)

source

# Mads.getmadsproblemdirMethod.

Get the directory where the Mads data file is located

Methods

  • Mads.getmadsproblemdir(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L446

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Example:

madsdata = Mads.loadmadsfile("../../a.mads")
madsproblemdir = Mads.getmadsproblemdir(madsdata)

where madsproblemdir = "../../"

source

# Mads.getmadsrootnameMethod.

Get the MADS problem root name

Methods

  • Mads.getmadsrootname(madsdata::AbstractDict; first, version) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L402

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

source

# Mads.getnextmadsfilenameMethod.

Get next mads file name

Methods

  • Mads.getnextmadsfilename(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L558

Arguments

  • filename::String : file name

Returns:

  • next mads file name

source

# Mads.getnonlogparamkeysMethod.

Get the keys in the MADS problem dictionary for parameters that are NOT log-transformed (log)

source

# Mads.getnonoptparamkeysMethod.

Get the keys in the MADS problem dictionary for parameters that are NOT optimized (opt)

source

# Mads.getobsdistMethod.

Get an array with dist values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobsdistMethod.

Get an array with dist values for all observations in the MADS problem dictionary

source

# Mads.getobskeysMethod.

Get keys for all observations in the MADS problem dictionary

Methods

  • Mads.getobskeys(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L45

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • keys for all observations in the MADS problem dictionary

source

# Mads.getobslogMethod.

Get an array with log values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobslogMethod.

Get an array with log values for all observations in the MADS problem dictionary

source

# Mads.getobsmaxMethod.

Get an array with max values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobsmaxMethod.

Get an array with max values for all observations in the MADS problem dictionary

source

# Mads.getobsminMethod.

Get an array with min values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobsminMethod.

Get an array with min values for all observations in the MADS problem dictionary

source

# Mads.getobstargetMethod.

Get an array with target values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobstargetMethod.

Get an array with target values for all observations in the MADS problem dictionary

source

# Mads.getobstimeMethod.

Get an array with time values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobstimeMethod.

Get an array with time values for all observations in the MADS problem dictionary

source

# Mads.getobsweightMethod.

Get an array with weight values for observations in the MADS problem dictionary defined by obskeys

source

# Mads.getobsweightMethod.

Get an array with weight values for all observations in the MADS problem dictionary

source

# Mads.getoptparamkeysMethod.

Get the keys in the MADS problem dictionary for parameters that are optimized (opt)

source

# Mads.getoptparamsFunction.

Get optimizable parameters

Methods

  • Mads.getoptparams(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L369
  • Mads.getoptparams(madsdata::AbstractDict, parameterarray::Array) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L372
  • Mads.getoptparams(madsdata::AbstractDict, parameterarray::Array, optparameterkey::Array) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L372

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • optparameterkey::Array : optimizable parameter keys
  • parameterarray::Array : parameter array

Returns:

  • parameter array

source

# Mads.getparamdictMethod.

Get dictionary with all parameters and their respective initial values

Methods

  • Mads.getparamdict(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L60

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • dictionary with all parameters and their respective initial values

source

# Mads.getparamdistributionsMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L664

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • init_dist : if true use the distribution defined for initialization in the MADS problem dictionary (defined using init_dist parameter field); else use the regular distribution defined in the MADS problem dictionary (defined using dist parameter field [default=false]

Returns:

  • probabilistic distributions

source

# Mads.getparamkeysMethod.

Get keys of all parameters in the MADS problem dictionary

Methods

  • Mads.getparamkeys(madsdata::AbstractDict; filter) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L44

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • filter : parameter filter

Returns:

  • array with the keys of all parameters in the MADS problem dictionary

source

# Mads.getparamrandomFunction.

Get independent sampling of model parameters defined in the MADS problem dictionary

Methods

  • Mads.getparamrandom(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L391
  • Mads.getparamrandom(madsdata::AbstractDict, numsamples::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L391
  • Mads.getparamrandom(madsdata::AbstractDict, numsamples::Integer, parameterkey::String; init_dist) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L391
  • Mads.getparamrandom(madsdata::AbstractDict, parameterkey::String; numsamples, paramdist, init_dist) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L408

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • numsamples::Integer : number of samples, [default=1]
  • parameterkey::String : model parameter key

Keywords

  • init_dist : if true use the distribution set for initialization in the MADS problem dictionary (defined using init_dist parameter field); if false (default) use the regular distribution set in the MADS problem dictionary (defined using dist parameter field)
  • numsamples : number of samples
  • paramdist : dictionary of parameter distributions

Returns:

  • generated sample

source

# Mads.getparamsinitMethod.

Get an array with init values for parameters defined by paramkeys

source

# Mads.getparamsinitMethod.

Get an array with init values for all the MADS model parameters

source

# Mads.getparamsinit_maxFunction.

Get an array with init_max values for parameters defined by paramkeys

Methods

  • Mads.getparamsinit_max(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L298
  • Mads.getparamsinit_max(madsdata::AbstractDict, paramkeys::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L264

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • paramkeys::Array{T,1} where T : parameter keys

Returns:

  • the parameter values

source

# Mads.getparamsinit_minFunction.

Get an array with init_min values for parameters

Methods

  • Mads.getparamsinit_min(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L247
  • Mads.getparamsinit_min(madsdata::AbstractDict, paramkeys::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L213

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • paramkeys::Array{T,1} where T : parameter keys

Returns:

  • the parameter values

source

# Mads.getparamslogMethod.

Get an array with log values for parameters defined by paramkeys

source

# Mads.getparamslogMethod.

Get an array with log values for all the MADS model parameters

source

# Mads.getparamslongnameMethod.

Get an array with longname values for parameters defined by paramkeys

source

# Mads.getparamslongnameMethod.

Get an array with longname values for all the MADS model parameters

source

# Mads.getparamsmaxFunction.

Get an array with max values for parameters defined by paramkeys

Methods

  • Mads.getparamsmax(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L196
  • Mads.getparamsmax(madsdata::AbstractDict, paramkeys::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L174

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • paramkeys::Array{T,1} where T : parameter keys

Returns:

  • returns the parameter values

source

# Mads.getparamsminFunction.

Get an array with min values for parameters defined by paramkeys

Methods

  • Mads.getparamsmin(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L157
  • Mads.getparamsmin(madsdata::AbstractDict, paramkeys::AbstractArray{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L135

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • paramkeys::AbstractArray{T,1} where T : parameter keys

Returns:

  • the parameter values

source

# Mads.getparamsplotnameMethod.

Get an array with plotname values for parameters defined by paramkeys

source

# Mads.getparamsplotnameMethod.

Get an array with plotname values for all the MADS model parameters

source

# Mads.getparamsstepMethod.

Get an array with step values for parameters defined by paramkeys

source

# Mads.getparamsstepMethod.

Get an array with step values for all the MADS model parameters

source

# Mads.getparamstypeMethod.

Get an array with type values for parameters defined by paramkeys

source

# Mads.getparamstypeMethod.

Get an array with type values for all the MADS model parameters

source

# Mads.getprocsMethod.

Get the number of processors

Methods

  • Mads.getprocs() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L30

source

# Mads.getrestartMethod.

Get MADS restart status

Methods

  • Mads.getrestart(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L79

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.getrestartdirFunction.

Get the directory where Mads restarts will be stored

Methods

  • Mads.getrestartdir(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L327
  • Mads.getrestartdir(madsdata::AbstractDict, suffix::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L327

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • suffix::String : Suffix to be added to the name of restart directory

Returns:

  • restart directory where reusable model results will be stored

source

# Mads.getrootnameMethod.

Get file name root

Methods

  • Mads.getrootname(filename::String; first, version) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L495

Arguments

  • filename::String : 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"

source

# Mads.getseedMethod.

Get and return current random seed.

Methods

  • Mads.getseed() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L460

source

# Mads.getsindxMethod.

Get sin-space dx

Methods

  • Mads.getsindx(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L342

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • sin-space dx value

source

# Mads.getsourcekeysMethod.

Get keys of all source parameters in the MADS problem dictionary

Methods

  • Mads.getsourcekeys(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L78

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • array with keys of all source parameters in the MADS problem dictionary

source

# Mads.gettargetMethod.

Get observation target

Methods

  • Mads.gettarget(o::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L224

Arguments

  • o::AbstractDict : observation data

Returns:

  • observation target

source

# Mads.gettargetkeysMethod.

Get keys for all targets (observations with weights greater than zero) in the MADS problem dictionary

Methods

  • Mads.gettargetkeys(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L59

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • keys for all targets in the MADS problem dictionary

source

# Mads.gettimeMethod.

Get observation time

Methods

  • Mads.gettime(o::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L146

Arguments

  • o::AbstractDict : observation data

Returns:

  • observation time ("NaN" it time is missing)

source

# Mads.getweightMethod.

Get observation weight

Methods

  • Mads.getweight(o::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L185

Arguments

  • o::AbstractDict : observation data

Returns:

  • observation weight ("NaN" when weight is missing)

source

# Mads.getwelldataMethod.

Get spatial and temporal data in the Wells class

Methods

  • Mads.getwelldata(madsdata::AbstractDict; time) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L716

Arguments

  • madsdata::AbstractDict : Mads problem dictionary

Keywords

  • time : get observation times [default=false]

Returns:

  • array with spatial and temporal data in the Wells class

source

# Mads.getwellkeysMethod.

Get keys for all wells in the MADS problem dictionary

Methods

  • Mads.getwellkeys(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L76

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • keys for all wells in the MADS problem dictionary

source

# Mads.getwelltargetsMethod.

Methods

  • Mads.getwelltargets(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L750

Arguments

  • madsdata::AbstractDict : Mads problem dictionary

Returns:

  • array with targets in the Wells class

source

# Mads.graphoffMethod.

MADS graph output off

Methods

  • Mads.graphoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L151

source

# Mads.graphonMethod.

MADS graph output on

Methods

  • Mads.graphon() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L142

source

# Mads.haskeywordFunction.

Check for a keyword in a class within the Mads dictionary madsdata

Methods

  • Mads.haskeyword(madsdata::AbstractDict, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L239
  • Mads.haskeyword(madsdata::AbstractDict, class::String, keyword::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L242

Arguments

  • class::String : dictionary class; if not provided searches for keyword in Problem class
  • keyword::String : dictionary key
  • madsdata::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"

source

# Mads.helpMethod.

Produce MADS help information

Methods

  • Mads.help() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelp.jl#L10

source

# Mads.importeverywhereMethod.

Import Julia function everywhere from a file. The first function in the Julia input file is the one that will be called by Mads to perform the model simulations.

Methods

  • Mads.importeverywhere(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L379

Arguments

  • filename::String : file name

Returns:

  • Julia function to execute the model

source

# Mads.indexkeysFunction.

Find indexes for dictionary keys based on a string or regular expression

Methods

  • Mads.indexkeys(dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L815
  • Mads.indexkeys(dict::AbstractDict, key::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L814
  • Mads.indexkeys(dict::AbstractDict, key::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L815

Arguments

  • dict::AbstractDict : dictionary
  • key::Regex : the key to find index for
  • key::String : the key to find index for

source

# Mads.infogap_jumpFunction.

Information Gap Decision Analysis using JuMP

Methods

  • Mads.infogap_jump() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L22
  • Mads.infogap_jump(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L22

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]

source

# Mads.infogap_jump_polinomialFunction.

Information Gap Decision Analysis using JuMP

Methods

  • Mads.infogap_jump_polinomial() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L126
  • Mads.infogap_jump_polinomial(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, quiet, plot, model, seed) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L126

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

source

# Mads.infogap_mpb_linFunction.

Information Gap Decision Analysis using MathProgBase

Methods

  • Mads.infogap_mpb_lin() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L423
  • Mads.infogap_mpb_lin(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed, pinit) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L423

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 parameters
  • random : random initial guesses [default=false]
  • retries : number of solution retries [default=1]
  • seed : random seed [default=0]
  • verbosity : verbosity output level [default=0]

source

# Mads.infogap_mpb_polinomialFunction.

Information Gap Decision Analysis using MathProgBase

Methods

  • Mads.infogap_mpb_polinomial() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L282
  • Mads.infogap_mpb_polinomial(madsdata::AbstractDict; horizons, retries, random, maxiter, verbosity, seed, pinit) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsInfoGap.jl#L282

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 parameters
  • random : random initial guesses [default=false]
  • retries : number of solution retries [default=1]
  • seed : random seed [default=0]
  • verbosity : verbosity output level [default=0]

source

# Mads.ins_obsMethod.

Apply Mads instruction file instructionfilename to read model output file modeloutputfilename

Methods

  • Mads.ins_obs(instructionfilename::String, modeloutputfilename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1022

Arguments

  • instructionfilename::String : instruction file name
  • modeloutputfilename::String : model output file name

Returns:

  • obsdict : observation dictionary with the model outputs

source

# Mads.instline2regexsMethod.

Convert an instruction line in the Mads instruction file into regular expressions

Methods

  • Mads.instline2regexs(instline::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L922

Arguments

  • instline::String : instruction line

Returns:

  • regexs : regular expressions
  • obsnames : observation names
  • getparamhere : parameters

source

# Mads.invobsweights!Method.

Set inversely proportional observation weights in the MADS problem dictionary

Methods

  • Mads.invobsweights!(madsdata::AbstractDict, multiplier::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L327

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • multiplier::Number : weight multiplier

source

# Mads.invwellweights!Method.

Set inversely proportional well weights in the MADS problem dictionary

Methods

  • Mads.invwellweights!(madsdata::AbstractDict, multiplier::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L382

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • multiplier::Number : weight multiplier

source

# Mads.islogMethod.

Is parameter with key parameterkey log-transformed?

Methods

  • Mads.islog(madsdata::AbstractDict, parameterkey::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L445

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameterkey::String : parameter key

Returns:

  • true if log-transformed, false otherwise

source

# Mads.isobsMethod.

Is a dictionary containing all the observations

Methods

  • Mads.isobs(madsdata::AbstractDict, dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L19

Arguments

  • dict::AbstractDict : dictionary
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • true if the dictionary contain all the observations, false otherwise

source

# Mads.isoptMethod.

Is parameter with key parameterkey optimizable?

Methods

  • Mads.isopt(madsdata::AbstractDict, parameterkey::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L425

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameterkey::String : parameter key

Returns:

  • true if optimizable, false if not

source

# Mads.isparamMethod.

Check if a dictionary containing all the Mads model parameters

Methods

  • Mads.isparam(madsdata::AbstractDict, dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L17

Arguments

  • dict::AbstractDict : dictionary
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • true if the dictionary containing all the parameters, false otherwise

source

# Mads.ispkgavailableMethod.

Checks if package is available

Methods

  • Mads.ispkgavailable(modulename::String; quiet) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L497

Arguments

  • modulename::String : module name

Keywords

  • quiet

Returns:

  • true or false

source

# Mads.krigeMethod.

Kriging

Methods

  • Mads.krige(x0mat::AbstractArray{T,2} where T, X::AbstractArray{T,2} where T, Z::Array{T,1} where T, cov::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L126

Arguments

  • X::AbstractArray{T,2} where T : coordinates of the observation (conditioning) data
  • Z::Array{T,1} where T : values for the observation (conditioning) data
  • cov::Function : spatial covariance function
  • x0mat::AbstractArray{T,2} where T : point coordinates at which to obtain kriging estimates

Returns:

  • kriging estimates at x0mat

source

# Mads.levenberg_marquardtFunction.

Levenberg-Marquardt optimization

Methods

  • Mads.levenberg_marquardt(f::Function, g::Function, x0) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L359
  • 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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L359

Arguments

  • f::Function : forward model function
  • g::Function : gradient function for the forward model
  • o::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::Vector, of::Number, lambda::Number)->nothing]
  • callbackjacobian : call back function for each Jacobian [default=(x::Vector, J::Matrix)->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 name
  • show_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]

source

# Mads.linktempdirMethod.

Link files in a temporary directory

Methods

  • Mads.linktempdir(madsproblemdir::String, tempdirname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1281

Arguments

  • madsproblemdir::String : Mads problem directory
  • tempdirname::String : temporary directory name

source

# Mads.loadasciifileMethod.

Load ASCII file

Methods

  • Mads.loadasciifile(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsASCII.jl#L15

Arguments

  • filename::String : ASCII file name

Returns:

  • data from the file

source

# Mads.loadbigyamlfileMethod.

Load BIG YAML input file

Methods

  • Mads.loadmadsfile(filename::String; bigfile, julia, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L34

Arguments

  • filename::String : input file name (e.g. input_file_name.mads)

Keywords

  • bigfile
  • format
  • julia

Returns:

  • MADS problem dictionary

source

# Mads.loadjsonfileMethod.

Load a JSON file

Methods

  • Mads.loadjsonfile(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsJSON.jl#L17

Arguments

  • filename::String : JSON file name

Returns:

  • data from the JSON file

source

# Mads.loadmadsfileMethod.

Load MADS input file defining a MADS problem dictionary

Methods

  • Mads.loadmadsfile(filename::String; bigfile, julia, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L34

Arguments

  • filename::String : input file name (e.g. input_file_name.mads)

Keywords

  • bigfile
  • format : acceptable formats are yaml and json [default=yaml]
  • julia : if true, force using julia parsing functions; if false (default), use python parsing functions

Returns:

  • MADS problem dictionary

Example:

md = Mads.loadmadsfile("input_file_name.mads")

source

# Mads.loadmadsproblemMethod.

Load a predefined Mads problem

Methods

  • Mads.loadmadsproblem(name::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCreate.jl#L15

Arguments

  • name::String : predefined MADS problem name

Returns:

  • MADS problem dictionary

source

# Mads.loadsaltellirestart!Method.

Load Saltelli sensitivity analysis results for fast simulation restarts

Methods

  • Mads.loadsaltellirestart!(evalmat::Array, matname::String, restartdir::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L602

Arguments

  • evalmat::Array : loaded array
  • matname::String : matrix (array) name (defines the name of the loaded file)
  • restartdir::String : directory where files will be stored containing model results for fast simulation restarts

Returns:

  • true when successfully loaded, false when it is not

source

# Mads.loadyamlfileMethod.

Load YAML file

Methods

  • Mads.loadyamlfile(filename::String; julia) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsYAML.jl#L18

Arguments

  • filename::String : file name

Keywords

  • julia : if true, use julia YAML library (if available); if false (default), use python YAML library (if available)

Returns:

  • data in the yaml input file

source

# Mads.localsaMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L128

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • J : Jacobian matrix
  • datafiles : flag to write data files [default=true]
  • filename : output file name
  • format : output plot format (png, pdf, etc.)
  • imagefiles : flag to create image files [default=Mads.graphoutput]
  • keyword : keyword to be added in the filename root
  • obs : observations for the parameter set
  • par : parameter set
  • sinspace : apply sin transformation [default=true]

Dumps:

  • filename : output plot file

source

# Mads.long_tests_offMethod.

Turn off execution of long MADS tests (default)

Methods

  • Mads.long_tests_off() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L196

source

# Mads.long_tests_onMethod.

Turn on execution of long MADS tests

Methods

  • Mads.long_tests_on() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L187

source

# Mads.madscoresFunction.

Check the number of processors on a series of servers

Methods

  • Mads.madscores(nodenames::Array{String,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L306
  • Mads.madscores() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L306

Arguments

  • nodenames::Array{String,1} : array with names of machines/nodes [default=madsservers]

source

# Mads.madscriticalMethod.

MADS critical error messages

Methods

  • Mads.madscritical(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L73

Arguments

  • message::AbstractString : critical error message

source

# Mads.madsdebugFunction.

MADS debug messages (controlled by quiet and debuglevel)

Methods

  • Mads.madsdebug(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L26
  • Mads.madsdebug(message::AbstractString, level::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L26

Arguments

  • level::Int64 : output verbosity level [default=0]
  • message::AbstractString : debug message

source

# Mads.madserrorMethod.

MADS error messages

Methods

  • Mads.madserror(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L63

Arguments

  • message::AbstractString : error message

source

# Mads.madsinfoFunction.

MADS information/status messages (controlled by quietandverbositylevel`)

Methods

  • Mads.madsinfo(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L41
  • Mads.madsinfo(message::AbstractString, level::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L41

Arguments

  • level::Int64 : output verbosity level [default=0]
  • message::AbstractString : information/status message

source

# Mads.madsloadFunction.

Check the load of a series of servers

Methods

  • Mads.madsload(nodenames::Array{String,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L326
  • Mads.madsload() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L326

Arguments

  • nodenames::Array{String,1} : array with names of machines/nodes [default=madsservers]

source

# Mads.madsmathprogbaseFunction.

Define MadsModel type applied for Mads execution using MathProgBase

Methods

  • Mads.madsmathprogbase() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsMathProgBase.jl#L17
  • Mads.madsmathprogbase(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsMathProgBase.jl#L17

Arguments

  • madsdata::AbstractDict : MADS problem dictionary [default=Dict()]

source

# Mads.madsoutputFunction.

MADS output (controlled by quiet and verbositylevel)

Methods

  • Mads.madsoutput(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L11
  • Mads.madsoutput(message::AbstractString, level::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L11

Arguments

  • level::Int64 : output verbosity level [default=0]
  • message::AbstractString : output message

source

# Mads.madsupFunction.

Check the uptime of a series of servers

Methods

  • Mads.madsup(nodenames::Array{String,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L316
  • Mads.madsup() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L316

Arguments

  • nodenames::Array{String,1} : array with names of machines/nodes [default=madsservers]

source

# Mads.madswarnMethod.

MADS warning messages

Methods

  • Mads.madswarn(message::AbstractString) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLog.jl#L53

Arguments

  • message::AbstractString : warning message

source

# Mads.makearrayconditionalloglikelihoodMethod.

Make a conditional log likelihood function that accepts an array containing the optimal parameter values

Methods

  • Mads.makearrayconditionalloglikelihood(madsdata::AbstractDict, conditionalloglikelihood) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L105

Arguments

  • conditionalloglikelihood : conditional log likelihood
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • a conditional log likelihood function that accepts an array

source

# Mads.makearrayfunctionFunction.

Make a version of the function f that accepts an array containing the optimal parameter values

Methods

  • Mads.makearrayfunction(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L33
  • Mads.makearrayfunction(madsdata::AbstractDict, f::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L33

Arguments

  • f::Function : function [default=makemadscommandfunction(madsdata)]
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • function accepting an array containing the optimal parameter values

source

# Mads.makearrayloglikelihoodMethod.

Make a log likelihood function that accepts an array containing the optimal parameter values

Methods

  • Mads.makearrayloglikelihood(madsdata::AbstractDict, loglikelihood) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L128

Arguments

  • loglikelihood : log likelihood
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • a log likelihood function that accepts an array

source

# Mads.makecomputeconcentrationsMethod.

Create a function to compute concentrations for all the observation points using Anasol

Methods

  • Mads.makecomputeconcentrations(madsdata::AbstractDict; calczeroweightobs, calcpredictions) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L179

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)

source

# Mads.makedixonpriceMethod.

Make dixon price

Methods

  • Mads.makedixonprice(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L260

Arguments

  • n::Integer : number of observations

Returns:

  • dixon price

source

# Mads.makedixonprice_gradientMethod.

Methods

  • Mads.makedixonprice(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L260

Arguments

  • n::Integer : number of observations

Returns:

  • dixon price gradient

source

# Mads.makedoublearrayfunctionFunction.

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) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L78
  • Mads.makedoublearrayfunction(madsdata::AbstractDict, f::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMisc.jl#L78

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

source

# Mads.makelmfunctionsFunction.

Make forward model, gradient, objective functions needed for Levenberg-Marquardt optimization

Methods

  • Mads.makelmfunctions(f::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L101
  • Mads.makelmfunctions(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L122

Arguments

  • f::Function : Function
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • forward model, gradient, objective functions

source

# Mads.makelocalsafunctionMethod.

Make gradient function needed for local sensitivity analysis

Methods

  • Mads.makelocalsafunction(madsdata::AbstractDict; multiplycenterbyweights) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L29

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • multiplycenterbyweights : multiply center by observation weights [default=true]

Returns:

  • gradient function

source

# Mads.makelogpriorMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L402

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Return:

  • the prior log-likelihood of the model parameters listed in the MADS problem dictionary madsdata

source

# Mads.makemadscommandfunctionMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L62

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 input Julia file. The function that should accept a parameter dictionary with all the model parameters as an input argument and should return an observation dictionary with all the model predicted observations. MADS will execute the first function defined in the file.
  • MADS model : create a Julia function based on an input Julia file. The input file should contain a function that accepts as an argument the MADS problem dictionary. MADS will execute the first function defined in the file. This function should a create a Julia function that will accept a parameter dictionary with all the model parameters as an input argument and will return an observation dictionary with all the model predicted observations.
  • Julia model : execute an internal Julia function that accepts a parameter dictionary with all the model parameters as an input argument and will return an observation dictionary with all the model predicted observations.
  • Command : execute an external UNIX command or script that will execute an external model.
  • Julia command : execute a Julia script that will execute an external model. The Julia script is defined in an input Julia file. The input file should contain a function that accepts a parameter 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 an observation 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.gov
  • ASCIIParameters : model parameters written in a ASCII file
  • JLDParameters : model parameters written in a JLD file
  • YAMLParameters : model parameters written in a YAML file
  • JSONParameters : 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.gov
  • ASCIIPredictions : model predictions read from a ASCII file
  • JLDPredictions : model predictions read from a JLD file
  • YAMLPredictions : model predictions read from a YAML file
  • JSONPredictions : model predictions read from a JSON file

Returns:

  • Mads function to execute a forward model simulation

source

# Mads.makemadsconditionalloglikelihoodMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L425

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • weightfactor : Weight factor [default=1]

Return:

  • the conditional log-likelihood

source

# Mads.makemadsloglikelihoodMethod.

Make a function to compute the log-likelihood for a given set of model parameters, associated model predictions and existing observations. The function can be provided as an external function in the MADS problem dictionary under LogLikelihood or computed internally.

Methods

  • Mads.makemadsloglikelihood(madsdata::AbstractDict; weightfactor) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L460

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • weightfactor : Weight factor [default=1]

Returns:

  • the log-likelihood for a given set of model parameters

source

# Mads.makemadsreusablefunctionFunction.

Make Reusable Mads function to execute a forward model simulation (automatically restarts if restart data exists)

Methods

  • Mads.makemadsreusablefunction(madsdata::AbstractDict, madscommandfunction::Function) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L279
  • Mads.makemadsreusablefunction(madsdata::AbstractDict, madscommandfunction::Function, suffix::String; usedict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L279
  • Mads.makemadsreusablefunction(paramkeys::Array{T,1} where T, obskeys::Array{T,1} where T, madsdatarestart::Union{Bool, String}, madscommandfunction::Function, restartdir::String; usedict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsFunc.jl#L282

Arguments

  • String}
  • madscommandfunction::Function : Mads function to execute a forward model simulation
  • madsdata::AbstractDict : MADS problem dictionary
  • madsdatarestart::Union{Bool : Restart type (memory/disk) or on/off status
  • obskeys::Array{T,1} where T : Dictionary of observation keys
  • paramkeys::Array{T,1} where T : Dictionary of parameter keys
  • restartdir::String : Restart directory where the reusable model results are stored
  • suffix::String : 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)

source

# Mads.makempbfunctionsMethod.

Make forward model, gradient, objective functions needed for MathProgBase optimization

Methods

  • Mads.makempbfunctions(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-new/MadsMathProgBase.jl#L91

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • forward model, gradient, objective functions

source

# Mads.makepowellMethod.

Make Powell test function for LM optimization

Methods

  • Mads.makepowell(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L163

Arguments

  • n::Integer : number of observations

Returns:

  • Powell test function for LM optimization

source

# Mads.makepowell_gradientMethod.

ake parameter gradients of the Powell test function for LM optimization

Methods

  • Mads.makepowell_gradient(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L187

Arguments

  • n::Integer : number of observations

Returns:

  • arameter gradients of the Powell test function for LM optimization

source

# Mads.makerosenbrockMethod.

Make Rosenbrock test function for LM optimization

Methods

  • Mads.makerosenbrock(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L118

Arguments

  • n::Integer : number of observations

Returns:

  • Rosenbrock test function for LM optimization

source

# Mads.makerosenbrock_gradientMethod.

Make parameter gradients of the Rosenbrock test function for LM optimization

Methods

  • Mads.makerosenbrock_gradient(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L140

Arguments

  • n::Integer : number of observations

Returns:

  • parameter gradients of the Rosenbrock test function for LM optimization

source

# Mads.makerotatedhyperellipsoidMethod.

Methods

  • Mads.makerotatedhyperellipsoid(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L339

Arguments

  • n::Integer : number of observations

Returns:

  • rotated hyperellipsoid

source

# Mads.makerotatedhyperellipsoid_gradientMethod.

Methods

  • Mads.makerotatedhyperellipsoid_gradient(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L363

Arguments

  • n::Integer : number of observations

Returns:

  • rotated hyperellipsoid gradient

source

# Mads.makesphereMethod.

Make sphere

Methods

  • Mads.makesphere(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L218

Arguments

  • n::Integer : number of observations

Returns:

  • sphere

source

# Mads.makesphere_gradientMethod.

Make sphere gradient

Methods

  • Mads.makesphere_gradient(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L239

Arguments

  • n::Integer : number of observations

Returns:

  • sphere gradient

source

# Mads.makesumsquaresMethod.

Methods

  • Mads.makesumsquares(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L301

Arguments

  • n::Integer : number of observations

Returns:

  • sumsquares

source

# Mads.makesumsquares_gradientMethod.

Methods

  • Mads.makesumsquares_gradient(n::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L320

Arguments

  • n::Integer : number of observations

Returns:

  • sumsquares gradient

source

# Mads.makesvrmodelFunction.

Make SVR model functions (executor and cleaner)

Methods

  • Mads.makesvrmodel(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L210
  • Mads.makesvrmodel(madsdata::AbstractDict, numberofsamples::Integer; check, addminmax, loadsvr, savesvr, svm_type, kernel_type, degree, gamma, coef0, C, nu, eps, cache_size, tol, shrinking, probability, verbose, seed) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L210

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • numberofsamples::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]
  • eps : 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

source

# 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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L1089

Arguments

  • df::DataFrames.DataFrame : dataframe

source

# Mads.mdirMethod.

Change the current directory to the Mads source dictionary

Methods

  • Mads.mdir() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L11

source

# Mads.meshgridMethod.

Create mesh grid

Methods

  • Mads.meshgrid(x::Array{T,1} where T, y::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L430

Arguments

  • x::Array{T,1} where T : vector of grid x coordinates
  • y::Array{T,1} where T : vector of grid y coordinates

Returns:

  • 2D grid coordinates based on the coordinates contained in vectors x and y

source

# Mads.minimizeMethod.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCalibrate.jl#L164

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)

source

# Mads.mkdirMethod.

Create a directory (if does not already exist)

Methods

  • Mads.mkdir(dirname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1308

Arguments

  • dirname::String : directory

source

# Mads.modelinformationcriteriaFunction.

Model section information criteria

Methods

  • Mads.modelinformationcriteria(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsModelSelection.jl#L11
  • Mads.modelinformationcriteria(madsdata::AbstractDict, par::Array{Float64,N} where N) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsModelSelection.jl#L11

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • par::Array{Float64,N} where N : parameter array

source

# Mads.modobsweights!Method.

Modify (multiply) observation weights in the MADS problem dictionary

Methods

  • Mads.modobsweights!(madsdata::AbstractDict, value::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L313

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • value::Number : value for modifing observation weights

source

# Mads.modwellweights!Method.

Modify (multiply) well weights in the MADS problem dictionary

Methods

  • Mads.modwellweights!(madsdata::AbstractDict, value::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L363

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • value::Number : value for well weights

source

# Mads.montecarloMethod.

Monte Carlo analysis

Methods

  • Mads.montecarlo(madsdata::AbstractDict; N, filename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L188

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)

source

# Mads.naive_get_deltaxMethod.

Naive Levenberg-Marquardt optimization: get the LM parameter space step

Methods

  • Mads.naive_get_deltax(JpJ::AbstractArray{Float64,2}, Jp::AbstractArray{Float64,2}, f0::Array{Float64,1}, lambda::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L247

Arguments

  • Jp::AbstractArray{Float64,2} : Jacobian matrix times model parameters
  • JpJ::AbstractArray{Float64,2} : Jacobian matrix times model parameters times transposed Jacobian matrix
  • f0::Array{Float64,1} : initial model observations
  • lambda::Number : Levenberg-Marquardt lambda

Returns:

  • the LM parameter space step

source

# Mads.naive_levenberg_marquardtFunction.

Naive Levenberg-Marquardt optimization

Methods

  • Mads.naive_levenberg_marquardt(f::Function, g::Function, x0::Array{Float64,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L297
  • Mads.naive_levenberg_marquardt(f::Function, g::Function, x0::Array{Float64,1}, o::Function; maxIter, maxEval, lambda, lambda_mu, np_lambda) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L297

Arguments

  • f::Function : forward model function
  • g::Function : gradient function for the forward model
  • o::Function : objective function [default=x->(x'*x)[1]]
  • x0::Array{Float64,1} : 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:

source

# Mads.naive_lm_iterationMethod.

Naive Levenberg-Marquardt optimization: perform LM iteration

Methods

  • Mads.naive_lm_iteration(f::Function, g::Function, o::Function, x0::Array{Float64,1}, f0::Array{Float64,1}, lambdas::Array{Float64,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L268

Arguments

  • f0::Array{Float64,1} : initial model observations
  • f::Function : forward model function
  • g::Function : gradient function for the forward model
  • lambdas::Array{Float64,1} : Levenberg-Marquardt lambdas
  • o::Function : objective function
  • x0::Array{Float64,1} : initial parameter guess

Returns:

source

# Mads.noplotMethod.

Disable MADS plotting

Methods

  • Mads.noplot() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L239

source

# Mads.obslineoccursinMethod.

Match an instruction line in the Mads instruction file with model input file

Methods

  • Mads.obslineoccursin(obsline::String, regexs::Array{Regex,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L971

Arguments

  • obsline::String : instruction line
  • regexs::Array{Regex,1} : regular expressions

Returns:

  • true or false

source

# Mads.ofFunction.

Compute objective function

Methods

  • Mads.of(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L59
  • Mads.of(madsdata::AbstractDict, resultvec::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L52
  • Mads.of(madsdata::AbstractDict, resultdict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L56

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • resultdict::AbstractDict : result dictionary
  • resultvec::Array{T,1} where T : result vector

source

# Mads.paramarray2dictMethod.

Convert a parameter array to a parameter dictionary of arrays

Methods

  • Mads.paramarray2dict(madsdata::AbstractDict, array::Array) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L242

Arguments

  • array::Array : parameter array
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • a parameter dictionary of arrays

source

# Mads.paramdict2arrayMethod.

Convert a parameter dictionary of arrays to a parameter array

Methods

  • Mads.paramdict2array(dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L261

Arguments

  • dict::AbstractDict : parameter dictionary of arrays

Returns:

  • a parameter array

source

# Mads.parsemadsdata!Method.

Parse loaded MADS problem dictionary

Methods

  • Mads.parsemadsdata!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L161

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.parsenodenamesFunction.

Parse string with node names defined in SLURM

Methods

  • Mads.parsenodenames(nodenames::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L208
  • Mads.parsenodenames(nodenames::String, ntasks_per_node::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L208

Arguments

  • nodenames::String : string with node names defined in SLURM
  • ntasks_per_node::Integer : number of parallel tasks per node [default=1]

Returns:

  • vector with names of compute nodes (hosts)

source

# Mads.partialofMethod.

Compute the sum of squared residuals for observations that match a regular expression

Methods

  • Mads.partialof(madsdata::AbstractDict, resultdict::AbstractDict, regex::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L85

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • regex::Regex : regular expression
  • resultdict::AbstractDict : result dictionary

Returns:

  • the sum of squared residuals for observations that match the regular expression

source

# Mads.pkgversionMethod.

Get package version

Methods

  • Mads.pkgversion(modulestr::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L473

Arguments

  • modulestr::String

Returns:

  • package version

source

# Mads.plotgridFunction.

Plot a 3D grid solution based on model predictions in array s, initial parameters, or user provided parameter values

Methods

  • Mads.plotgrid(madsdata::AbstractDict; addtitle, title, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlotPy.jl#L56
  • Mads.plotgrid(madsdata::AbstractDict, s::Array{Float64,N} where N; addtitle, title, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlotPy.jl#L5
  • Mads.plotgrid(madsdata::AbstractDict, parameters::AbstractDict; addtitle, title, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlotPy.jl#L61

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameters::AbstractDict : dictionary with model parameters
  • s::Array{Float64,N} where N : model predictions array

Keywords

  • addtitle : add plot title [default=true]
  • filename : output file name
  • format : 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="")

source

# Mads.plotlocalsaMethod.

Plot local sensitivity analysis results

Methods

  • Mads.plotlocalsa(filenameroot::String; keyword, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L1246

Arguments

  • filenameroot::String : problem file name root

Keywords

  • filename : output file name
  • format : output plot format (png, pdf, etc.)
  • keyword : keyword to be added in the filename root

Dumps:

  • filename : output plot file

source

# Mads.plotmadsproblemMethod.

Plot contaminant sources and wells defined in MADS problem dictionary

Methods

  • Mads.plotmadsproblem(madsdata::AbstractDict; format, filename, keyword, hsize, vsize, gm) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L88

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • filename : output file name
  • format : output plot format (png, pdf, etc.) [default=Mads.graphbackend]
  • gm
  • hsize
  • keyword : to be added in the filename
  • vsize

Dumps:

  • plot of contaminant sources and wells

source

# Mads.plotmassMethod.

Plot injected/reduced contaminant mass

Methods

  • Mads.plotmass(lambda::Array{Float64,1}, mass_injected::Array{Float64,1}, mass_reduced::Array{Float64,1}, filename::String; format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasolPlot.jl#L19

Arguments

  • filename::String : output filename for the generated plot
  • lambda::Array{Float64,1} : array with all the lambda values
  • mass_injected::Array{Float64,1} : array with associated total injected mass
  • mass_reduced::Array{Float64,1} : array with associated total reduced mass

Keywords

  • format : output plot format (png, pdf, etc.)

Dumps:

  • image file with name filename and in specified format

source

# Mads.plotmatchesFunction.

Plot the matches between model predictions and observations

Methods

  • Mads.plotmatches(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L168
  • Mads.plotmatches(madsdata::AbstractDict, rx::Regex; kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L168
  • Mads.plotmatches(madsdata::AbstractDict, dict_in::AbstractDict; plotdata, filename, format, title, xtitle, ytitle, ymin, ymax, separate_files, hsize, vsize, linewidth, pointsize, obs_plot_dots, noise, dpi, colors, display, notitle) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L200
  • Mads.plotmatches(madsdata::AbstractDict, result::AbstractDict, rx::Regex; plotdata, filename, format, key2time, title, xtitle, ytitle, ymin, ymax, separate_files, hsize, vsize, linewidth, pointsize, obs_plot_dots, noise, dpi, colors, display, notitle) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L176

Arguments

  • dict_in::AbstractDict : dictionary with model parameters
  • madsdata::AbstractDict : MADS problem dictionary
  • result::AbstractDict : dictionary with model predictions
  • rx::Regex : regular expression to filter the outputs

Keywords

  • colors : array with plot colors
  • display : display plots [default=false]
  • dpi : graph resolution [default=Mads.imagedpi]
  • filename : output file name
  • format : output plot format (png, pdf, etc.) [default=Mads.graphbackend]
  • hsize : graph horizontal size [default=8Gadfly.inch]
  • key2time : user provided function to convert observation keys to observation times
  • 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 (if false model predictions are ploted only) [default=true]
  • pointsize : data dot size [default=4Gadfly.pt]
  • separate_files : plot data for multiple wells separately [default=false]
  • title : graph title
  • vsize : graph vertical size [default=4Gadfly.inch]
  • 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="")

source

# Mads.plotobsSAresultsMethod.

Plot the sensitivity analysis results for the observations

Methods

  • Mads.plotobsSAresults(madsdata::AbstractDict, result::AbstractDict; filter, keyword, filename, format, debug, separate_files, xtitle, ytitle, linewidth, pointsize) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L582

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • result::AbstractDict : sensitivity analysis results

Keywords

  • debug : [default=false]
  • filename : output file name
  • filter : string or regex to plot only observations containing filter
  • format : output plot format (png, pdf, etc.) [default=Mads.graphbackend]
  • keyword : to be added in the auto-generated filename
  • linewidth : line width [default=2Gadfly.pt]
  • pointsize : point size [default=2Gadfly.pt]
  • separate_files : plot data for multiple wells separately [default=false]
  • xtitle : x-axis title
  • ytitle : y-axis title

Dumps:

  • plot of the sensitivity analysis results for the observations

source

# Mads.plotrobustnesscurvesMethod.

Plot BIG-DT robustness curves

Methods

  • Mads.plotrobustnesscurves(madsdata::AbstractDict, bigdtresults::Dict; filename, format, maxprob, maxhoriz) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsBayesInfoGapPlot.jl#L20

Arguments

  • bigdtresults::Dict : BIG-DT results
  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • filename : output file name used to dump plots
  • format : 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 specified format

source

# Mads.plotseriesFunction.

Create plots of data series

Methods

  • Mads.plotseries(X::AbstractArray) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L1127
  • Mads.plotseries(X::AbstractArray, filename::String; format, xtitle, ytitle, title, logx, logy, keytitle, name, names, combined, hsize, vsize, linewidth, pointsize, dpi, colors, opacity, xmin, xmax, ymin, ymax, xaxis, plotline, code, colorkey) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L1127

Arguments

  • X::AbstractArray : matrix with the series data
  • filename::String : output file name

Keywords

  • code
  • colorkey
  • colors : colors to use in plots
  • combined : combine plots [default=true]
  • dpi : graph resolution [default=Mads.imagedpi]
  • format : output plot format (png, pdf, etc.) [default=Mads.graphbackend]
  • hsize : horizontal size [default=8Gadfly.inch]
  • keytitle
  • linewidth : width of the lines in plot [default=2Gadfly.pt]
  • logx
  • logy
  • name : series name [default=Sources]
  • names
  • opacity
  • plotline
  • pointsize
  • 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

source

# Mads.plotwellSAresultsFunction.

Plot the sensitivity analysis results for all the wells in the MADS problem dictionary (wells class expected)

Methods

  • Mads.plotwellSAresults(madsdata::AbstractDict, result::AbstractDict; xtitle, ytitle, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L447
  • Mads.plotwellSAresults(madsdata::AbstractDict, result::AbstractDict, wellname::String; xtitle, ytitle, filename, format) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L458

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • result::AbstractDict : sensitivity analysis results
  • wellname::String : well name

Keywords

  • filename : output file name
  • format : output plot format (png, pdf, etc.) [default=Mads.graphbackend]
  • xtitle : x-axis title
  • ytitle : y-axis title

Dumps:

  • Plot of the sensitivity analysis results for all the wells in the MADS problem dictionary

source

# Mads.printSAresultsMethod.

Print sensitivity analysis results

Methods

  • Mads.printSAresults(madsdata::AbstractDict, results::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L925

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • results::AbstractDict : dictionary with sensitivity analysis results

source

# Mads.printSAresults2Method.

Print sensitivity analysis results (method 2)

Methods

  • Mads.printSAresults2(madsdata::AbstractDict, results::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L1007

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • results::AbstractDict : dictionary with sensitivity analysis results

source

# Mads.printerrormsgMethod.

Print error message

Methods

  • Mads.printerrormsg(errmsg) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L410

Arguments

  • errmsg : error message

source

# Mads.printobservationsFunction.

Print (emit) observations in the MADS problem dictionary

Methods

  • Mads.printobservations(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L423
  • Mads.printobservations(madsdata::AbstractDict, io::IO) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L423
  • Mads.printobservations(madsdata::AbstractDict, filename::String; json) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L432

Arguments

  • filename::String : output file name
  • io::IO : output stream
  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • json

source

# Mads.pullFunction.

Pull (checkout) the latest version of Mads modules

Methods

  • Mads.pull(modulename::String; kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L63
  • Mads.pull() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L63

Arguments

  • modulename::String : module name

source

# Mads.pushFunction.

Push the latest version of Mads modules in the default remote repository

Methods

  • Mads.push(modulename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L138
  • Mads.push() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L138

Arguments

  • modulename::String : module name

source

# Mads.quietoffMethod.

Make MADS not quiet

Methods

  • Mads.quietoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L97

source

# Mads.quietonMethod.

Make MADS quiet

Methods

  • Mads.quieton() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L88

source

# Mads.readasciipredictionsMethod.

Read MADS predictions from an ASCII file

Methods

  • Mads.readasciipredictions(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsASCII.jl#L45

Arguments

  • filename::String : ASCII file name

Returns:

  • MADS predictions

source

# Mads.readmodeloutputMethod.

Read model outputs saved for MADS

Methods

  • Mads.readmodeloutput(madsdata::AbstractDict; obskeys) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L741

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • obskeys : observation keys [default=getobskeys(madsdata)]

source

# Mads.readobservationsFunction.

Read observations

Methods

  • Mads.readobservations(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1083
  • Mads.readobservations(madsdata::AbstractDict, obskeys::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1083

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • obskeys::Array{T,1} where T : observation keys [default=getobskeys(madsdata)]

Returns:

  • dictionary with Mads observations

source

# Mads.readobservations_cmadsMethod.

Read observations using C MADS dynamic library

Methods

  • Mads.readobservations_cmads(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-old/MadsCMads.jl#L15

Arguments

  • madsdata::AbstractDict : Mads problem dictionary

Returns:

  • observations

source

# Mads.readyamlpredictionsMethod.

Read MADS model predictions from a YAML file filename

Methods

  • Mads.readyamlpredictions(filename::String; julia) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsYAML.jl#L137

Arguments

  • filename::String : file name

Keywords

  • julia : if true, use julia YAML library (if available); if false (default), use python YAML library (if available)

Returns:

  • data in yaml input file

source

# Mads.recursivemkdirMethod.

Create directories recursively (if does not already exist)

Methods

  • Mads.recursivemkdir(s::String; filename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1320

Arguments

  • s::String

Keywords

  • filename

source

# Mads.recursivermdirMethod.

Remove directories recursively

Methods

  • Mads.recursivermdir(s::String; filename) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1354

Arguments

  • s::String

Keywords

  • filename

source

# Mads.regexs2obsMethod.

Get observations for a set of regular expressions

Methods

  • Mads.regexs2obs(obsline::String, regexs::Array{Regex,1}, obsnames::Array{String,1}, getparamhere::Array{Bool,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L992

Arguments

  • getparamhere::Array{Bool,1} : parameters
  • obsline::String : observation line
  • obsnames::Array{String,1} : observation names
  • regexs::Array{Regex,1} : regular expressions

Returns:

  • obsdict : observations

source

# Mads.removesource!Function.

Remove a contamination source

Methods

  • Mads.removesource!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L51
  • Mads.removesource!(madsdata::AbstractDict, sourceid::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L51

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • sourceid::Int64 : source id [default=0]

source

# Mads.removesourceparameters!Method.

Remove contaminant source parameters

Methods

  • Mads.removesourceparameters!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsAnasol.jl#L136

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.requiredFunction.

Lists modules required by a module (Mads by default)

Methods

  • Mads.required(modulename::String, filtermodule::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L17
  • Mads.required(modulename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L17
  • Mads.required() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L17

Arguments

  • filtermodule::String : filter module name
  • modulename::String : module name [default="Mads"]

Returns:

  • filtered modules

source

# Mads.resetmodelrunsMethod.

Reset the model runs count to be equal to zero

Methods

  • Mads.resetmodelruns() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L235

source

# Mads.residualsFunction.

Compute residuals

Methods

  • Mads.residuals(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L33
  • Mads.residuals(madsdata::AbstractDict, resultvec::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L7
  • Mads.residuals(madsdata::AbstractDict, resultdict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsLevenbergMarquardt.jl#L30

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • resultdict::AbstractDict : result dictionary
  • resultvec::Array{T,1} where T : result vector

Returns:

source

# Mads.restartoffMethod.

MADS restart off

Methods

  • Mads.restartoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L69

source

# Mads.restartonMethod.

MADS restart on

Methods

  • Mads.restarton() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L60

source

# Mads.reweighsamplesMethod.

Reweigh samples using importance sampling – returns a vector of log-likelihoods after reweighing

Methods

  • Mads.reweighsamples(madsdata::AbstractDict, predictions::Array, oldllhoods::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L329

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • oldllhoods::Array{T,1} where T : the log likelihoods of the parameters in the old distribution
  • predictions::Array : the model predictions for each of the samples

Returns:

  • vector of log-likelihoods after reweighing

source

# Mads.rmdirMethod.

Remove directory

Methods

  • Mads.rmdir(dir::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1180

Arguments

  • dir::String : directory to be removed

Keywords

  • path : path of the directory [default=current path]

source

# Mads.rmfileMethod.

Remove file

Methods

  • Mads.rmfile(filename::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1196

Arguments

  • filename::String : file to be removed

Keywords

  • path : path of the file [default=current path]

source

# Mads.rmfilesMethod.

Remove files

Methods

  • Mads.rmfile(filename::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1196

Arguments

  • filename::String

Keywords

  • path : path of the file [default=current path]

source

# Mads.rmfiles_extMethod.

Remove files with extension ext

Methods

  • Mads.rmfiles_ext(ext::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1225

Arguments

  • ext::String : extension

Keywords

  • path : path of the files to be removed [default=.]

source

# Mads.rmfiles_rootMethod.

Remove files with root root

Methods

  • Mads.rmfiles_root(root::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1238

Arguments

  • root::String : root

Keywords

  • path : path of the files to be removed [default=.]

source

# Mads.rosenbrockMethod.

Rosenbrock test function

Methods

  • Mads.rosenbrock(x::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L43

Arguments

  • x::Array{T,1} where T : parameter vector

Returns:

  • test result

source

# Mads.rosenbrock2_gradient_lmMethod.

Parameter gradients of the Rosenbrock test function

Methods

  • Mads.rosenbrock2_gradient_lm(x::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L24

Arguments

  • x::Array{T,1} where T : parameter vector

Returns:

  • parameter gradients

source

# Mads.rosenbrock2_lmMethod.

Rosenbrock test function (more difficult to solve)

Methods

  • Mads.rosenbrock2_lm(x::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L10

Arguments

  • x::Array{T,1} where T : parameter vector

source

# Mads.rosenbrock_gradient!Method.

Parameter gradients of the Rosenbrock test function

Methods

  • Mads.rosenbrock_gradient!(x::Array{T,1} where T, grad::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L68

Arguments

  • grad::Array{T,1} where T : gradient vector
  • x::Array{T,1} where T : parameter vector

source

# Mads.rosenbrock_gradient_lmMethod.

Parameter gradients of the Rosenbrock test function for LM optimization (returns the gradients for the 2 components separately)

Methods

  • Mads.rosenbrock_gradient_lm(x::Array{T,1} where T; dx, center) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L85

Arguments

  • x::Array{T,1} 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

source

# Mads.rosenbrock_hessian!Method.

Parameter Hessian of the Rosenbrock test function

Methods

  • Mads.rosenbrock_hessian!(x::Array{T,1} where T, hess::Array{T,2} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L101

Arguments

  • hess::Array{T,2} where T : Hessian matrix
  • x::Array{T,1} where T : parameter vector

source

# Mads.rosenbrock_lmMethod.

Rosenbrock test function for LM optimization (returns the 2 components separately)

Methods

  • Mads.rosenbrock_lm(x::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsTestFunctions.jl#L57

Arguments

  • x::Array{T,1} where T : parameter vector

Returns:

  • test result

source

# Mads.runcmdFunction.

Run external command and pipe stdout and stderr

Methods

  • Mads.runcmd(cmdstring::String; quiet, pipe, waittime) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L101
  • Mads.runcmd(cmd::Cmd; quiet, pipe, waittime) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsExecute.jl#L42

Arguments

  • cmd::Cmd : command (as a julia command; e.g. ls)
  • cmdstring::String : 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

source

# Mads.runremoteFunction.

Run remote command on a series of servers

Methods

  • Mads.runremote(cmd::String, nodenames::Array{String,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L284
  • Mads.runremote(cmd::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L284

Arguments

  • cmd::String : remote command
  • nodenames::Array{String,1} : names of machines/nodes [default=madsservers]

Returns:

  • output of running remote command

source

# Mads.saltelliMethod.

Saltelli sensitivity analysis

Methods

  • Mads.saltelli(madsdata::AbstractDict; N, seed, restartdir, parallel, checkpointfrequency) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L642

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 restarts
  • seed : random seed [default=0]

source

# Mads.saltellibruteMethod.

Saltelli sensitivity analysis (brute force)

Methods

  • Mads.saltellibrute(madsdata::AbstractDict; N, seed, restartdir) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L454

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 restarts
  • seed : random seed [default=0]

source

# Mads.saltellibruteparallelMethod.

Parallel version of saltellibrute

source

# Mads.saltelliparallelMethod.

Parallel version of saltelli

source

# Mads.samplingMethod.

Methods

  • Mads.sampling(param::Array{T,1} where T, J::Array, numsamples::Number; seed, scale) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L278

Arguments

  • J::Array : Jacobian matrix
  • numsamples::Number : Number of samples
  • param::Array{T,1} 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

source

# Mads.savemadsfileFunction.

Save MADS problem dictionary madsdata in MADS input file filename

Methods

  • Mads.savemadsfile(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L290
  • Mads.savemadsfile(madsdata::AbstractDict, filename::String; julia, observations_separate, filenameobs) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L290
  • Mads.savemadsfile(madsdata::AbstractDict, parameters::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L307
  • Mads.savemadsfile(madsdata::AbstractDict, parameters::AbstractDict, filename::String; julia, explicit, observations_separate) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L307

Arguments

  • filename::String : input file name (e.g. input_file_name.mads)
  • madsdata::AbstractDict : MADS problem dictionary
  • parameters::AbstractDict : Dictionary with parameters (optional)

Keywords

  • explicit : if true ignores MADS YAML file modifications and rereads the original input file [default=false]
  • filenameobs
  • julia : if true use Julia JSON module to save [default=false]
  • 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)

source

# Mads.savemcmcresultsMethod.

Save MCMC chain in a file

Methods

  • Mads.savemcmcresults(chain::Array, filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsMonteCarlo.jl#L143

Arguments

  • chain::Array : MCMC chain
  • filename::String : file name

Dumps:

  • the file containing MCMC chain

source

# Mads.savesaltellirestartMethod.

Save Saltelli sensitivity analysis results for fast simulation restarts

Methods

  • Mads.savesaltellirestart(evalmat::Array, matname::String, restartdir::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L623

Arguments

  • evalmat::Array : saved array
  • matname::String : matrix (array) name (defines the name of the loaded file)
  • restartdir::String : directory where files will be stored containing model results for fast simulation restarts

source

# Mads.scatterplotsamplesMethod.

Create histogram/scatter plots of model parameter samples

Methods

  • Mads.scatterplotsamples(madsdata::AbstractDict, samples::Array{T,2} where T, filename::String; format, pointsize) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L412

Arguments

  • filename::String : output file name
  • madsdata::AbstractDict : MADS problem dictionary
  • samples::Array{T,2} 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

source

# Mads.searchdirFunction.

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::String; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L781
  • Mads.searchdir(key::Regex; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L780

Arguments

  • key::Regex : matching pattern for Mads input files (string or regular expression accepted)
  • key::String : 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 = ".")`

source

# Mads.set_nprocs_per_taskFunction.

Set number of processors needed for each parallel task at each node

Methods

  • Mads.set_nprocs_per_task() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L51
  • Mads.set_nprocs_per_task(local_nprocs_per_task::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L51

Arguments

  • local_nprocs_per_task::Integer

source

# Mads.setallparamsoff!Method.

Set all parameters OFF

Methods

  • Mads.setallparamsoff!(madsdata::AbstractDict; filter) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L474

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • filter : parameter filter

source

# Mads.setallparamson!Method.

Set all parameters ON

Methods

  • Mads.setallparamson!(madsdata::AbstractDict; filter) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L460

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

Keywords

  • filter : parameter filter

source

# Mads.setdebuglevelMethod.

Set MADS debug level

Methods

  • Mads.setdebuglevel(level::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L206

Arguments

  • level::Int64 : debug level

source

# Mads.setdefaultplotformatMethod.

Set the default plot format (SVG is the default format)

Methods

  • Mads.setdefaultplotformat(format::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L21

Arguments

  • format::String : plot format

source

# Mads.setdirFunction.

Set the working directory (for parallel environments)

Methods

  • Mads.setdir() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L254
  • Mads.setdir(dir) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L249

Arguments

  • dir : directory

Example:

@everywhere Mads.setdir()
@everywhere Mads.setdir("/home/monty")

source

# Mads.setdpiMethod.

Set image dpi

Methods

  • Mads.setdpi(dpi::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L160

Arguments

  • dpi::Integer

source

# Mads.setexecutionwaittimeMethod.

Set maximum execution wait time for forward model runs in seconds

Methods

  • Mads.setexecutionwaittime(waitime::Float64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L226

Arguments

  • waitime::Float64 : maximum execution wait time for forward model runs in seconds

source

# Mads.setmadsinputfileMethod.

Set a default MADS input file

Methods

  • Mads.setmadsinputfile(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L367

Arguments

  • filename::String : input file name (e.g. input_file_name.mads)

source

# Mads.setmadsserversFunction.

Generate a list of Mads servers

Methods

  • Mads.setmadsservers(first::Int64, last::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L339
  • Mads.setmadsservers(first::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L339
  • Mads.setmadsservers() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L339

Arguments

  • first::Int64 : first [default=0]
  • last::Int64 : last [default=18]

Returns

  • array string of mads servers

source

# Mads.setmodelinputsFunction.

Set model input files; delete files where model output should be saved for MADS

Methods

  • Mads.setmodelinputs(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L662
  • Mads.setmodelinputs(madsdata::AbstractDict, parameters::AbstractDict; path) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L662

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameters::AbstractDict : parameters

Keywords

  • path : path for the files [default=.]

source

# Mads.setnewmadsfilenameFunction.

Set new mads file name

Methods

  • Mads.setnewmadsfilename(filename::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L521
  • Mads.setnewmadsfilename(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L518

Arguments

  • filename::String : file name
  • madsdata::AbstractDict : MADS problem dictionary

Returns:

  • new file name

source

# 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 : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L528

Arguments

  • madsdata::AbstractDict : Mads problem dictionary
  • predictions::AbstractDict : dictionary with model predictions

source

# Mads.setobstime!Function.

Set observation time based on the observation name in the MADS problem dictionary

Methods

  • Mads.setobstime!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L253
  • Mads.setobstime!(madsdata::AbstractDict, separator::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L253
  • Mads.setobstime!(madsdata::AbstractDict, rx::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L264

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • rx::Regex : regular expression to match
  • separator::String : separator [default=_]

Examples:

Mads.setobstime!(madsdata, "_t")
Mads.setobstime!(madsdata, r"[A-x]*_t([0-9,.]+)")

source

# Mads.setobsweights!Method.

Set observation weights in the MADS problem dictionary

Methods

  • Mads.setobsweights!(madsdata::AbstractDict, value::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L299

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • value::Number : value for observation weights

source

# Mads.setparamoff!Method.

Set a specific parameter with a key parameterkey OFF

Methods

  • Mads.setparamoff!(madsdata::AbstractDict, parameterkey::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L499

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameterkey::String : parameter key

source

# Mads.setparamon!Method.

Set a specific parameter with a key parameterkey ON

Methods

  • Mads.setparamon!(madsdata::AbstractDict, parameterkey::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L488

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameterkey::String : parameter key

source

# Mads.setparamsdistnormal!Method.

Set normal parameter distributions for all the model parameters in the MADS problem dictionary

Methods

  • Mads.setparamsdistnormal!(madsdata::AbstractDict, mean::Array{T,1} where T, stddev::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L511

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • mean::Array{T,1} where T : array with the mean values
  • stddev::Array{T,1} where T : array with the standard deviation values

source

# Mads.setparamsdistuniform!Method.

Set uniform parameter distributions for all the model parameters in the MADS problem dictionary

Methods

  • Mads.setparamsdistuniform!(madsdata::AbstractDict, min::Array{T,1} where T, max::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L526

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • max::Array{T,1} where T : array with the maximum values
  • min::Array{T,1} where T : array with the minimum values

source

# Mads.setparamsinit!Function.

Set initial optimized parameter guesses in the MADS problem dictionary

Methods

  • Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L324
  • Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict, idx::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L324

Arguments

  • idx::Int64 : index of the dictionary of arrays with initial model parameter values
  • madsdata::AbstractDict : MADS problem dictionary
  • paramdict::AbstractDict : dictionary with initial model parameter values

source

# Mads.setplotfileformatMethod.

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::String, format::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L50

Arguments

  • filename::String : output file name
  • format::String : output plot format (png, pdf, etc.) [default=Mads.graphbackend]

Returns:

  • output file name
  • output plot format (png, pdf, etc.)

source

# Mads.setprocsFunction.

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 : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L50
  • Mads.setprocs(np::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L47
  • Mads.setprocs(np::Integer, nt::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsParallel.jl#L34

Arguments

  • np::Integer : number of processors [default=1]
  • nt::Integer : number of threads[default=1]

Keywords

  • dir : common directory shared by all the jobs
  • exename : location of the julia executable (the same version of julia is needed on all the workers)
  • mads_servers : if true use MADS servers (LANL only) [default=false]
  • nodenames : array with names of machines/nodes to be invoked
  • nprocs_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")

source

# Mads.setseedFunction.

Set / get current random seed. seed < 0 gets seed, anything else sets it.

Methods

  • Mads.setseed() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L445
  • Mads.setseed(seed::Integer) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L445
  • Mads.setseed(seed::Integer, quiet::Bool) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L445

Arguments

  • quiet::Bool : [default=true]
  • seed::Integer : random seed

source

# Mads.setsindx!Method.

Set sin-space dx

Methods

  • Mads.setsindx!(madsdata::AbstractDict, sindx::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L363

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • sindx::Number : sin-space dx value

Returns:

  • nothing

source

# Mads.setsindxMethod.

Set sin-space dx

Methods

  • Mads.setsindx(sindx::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L380

Arguments

  • sindx::Number

Returns:

  • nothing

source

# Mads.setsourceinit!Function.

Set initial optimized parameter guesses in the MADS problem dictionary for the Source class

Methods

  • Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L324
  • Mads.setparamsinit!(madsdata::AbstractDict, paramdict::AbstractDict, idx::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L324

Arguments

  • idx::Int64 : index of the dictionary of arrays with initial model parameter values
  • madsdata::AbstractDict : MADS problem dictionary
  • paramdict::AbstractDict : dictionary with initial model parameter values

source

# Mads.settarget!Method.

Set observation target

Methods

  • Mads.settarget!(o::AbstractDict, target::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L243

Arguments

  • o::AbstractDict : observation data
  • target::Number : observation target

source

# Mads.settime!Method.

Set observation time

Methods

  • Mads.settime!(o::AbstractDict, time::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L165

Arguments

  • o::AbstractDict : observation data
  • time::Number : observation time

source

# Mads.setverbositylevelMethod.

Set MADS verbosity level

Methods

  • Mads.setverbositylevel(level::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L216

Arguments

  • level::Int64 : debug level

source

# Mads.setweight!Method.

Set observation weight

Methods

  • Mads.setweight!(o::AbstractDict, weight::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L204

Arguments

  • o::AbstractDict : observation data
  • weight::Number : observation weight

source

# Mads.setwellweights!Method.

Set well weights in the MADS problem dictionary

Methods

  • Mads.setwellweights!(madsdata::AbstractDict, value::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L344

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • value::Number : value for well weights

source

# Mads.showallparametersMethod.

Show all parameters in the MADS problem dictionary

Methods

  • Mads.showallparameters(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L610

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.showobservationsMethod.

Show observations in the MADS problem dictionary

Methods

  • Mads.showobservations(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L403

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.showparametersMethod.

Show parameters in the MADS problem dictionary

Methods

  • Mads.showparameters(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsParameters.jl#L574

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.sinetransformFunction.

Sine transformation of model parameters

Methods

  • Mads.sinetransform(madsdata::AbstractDict, params::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L36
  • Mads.sinetransform(sineparams::Array{T,1} where T, lowerbounds::Array{T,1} where T, upperbounds::Array{T,1} where T, indexlogtransformed::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L46

Arguments

  • indexlogtransformed::Array{T,1} where T : index vector of log-transformed parameters
  • lowerbounds::Array{T,1} where T : lower bounds
  • madsdata::AbstractDict : MADS problem dictionary
  • params::Array{T,1} where T
  • sineparams::Array{T,1} where T : model parameters
  • upperbounds::Array{T,1} where T : upper bounds

Returns:

  • Sine transformation of model parameters

source

# Mads.sinetransformfunctionMethod.

Sine transformation of a function

Methods

  • Mads.sinetransformfunction(f::Function, lowerbounds::Array{T,1} where T, upperbounds::Array{T,1} where T, indexlogtransformed::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L80

Arguments

  • f::Function : function
  • indexlogtransformed::Array{T,1} where T : index vector of log-transformed parameters
  • lowerbounds::Array{T,1} where T : lower bounds
  • upperbounds::Array{T,1} where T : upper bounds

Returns:

  • Sine transformation

source

# Mads.sinetransformgradientMethod.

Sine transformation of a gradient function

Methods

  • Mads.sinetransformgradient(g::Function, lowerbounds::Array{T,1} where T, upperbounds::Array{T,1} where T, indexlogtransformed::Array{T,1} where T; sindx) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSineTransformations.jl#L101

Arguments

  • g::Function : gradient function
  • indexlogtransformed::Array{T,1} where T : index vector of log-transformed parameters
  • lowerbounds::Array{T,1} where T : vector with parameter lower bounds
  • upperbounds::Array{T,1} 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

source

# Mads.spaghettiplotFunction.

Generate a combined spaghetti plot for the selected (type != null) model parameter

Methods

  • Mads.spaghettiplot(madsdata::AbstractDict, number_of_samples::Integer; kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L896
  • Mads.spaghettiplot(madsdata::AbstractDict, dictarray::AbstractDict; seed, kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L900
  • Mads.spaghettiplot(madsdata::AbstractDict, array::Array; plotdata, filename, keyword, format, xtitle, ytitle, yfit, obs_plot_dots, linewidth, pointsize, grayscale) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L937

Arguments

  • array::Array : data arrays to be plotted
  • dictarray::AbstractDict : dictionary array containing the data arrays to be plotted
  • madsdata::AbstractDict : MADS problem dictionary
  • number_of_samples::Integer : number of samples

Keywords

  • filename : output file name used to output the produced plots
  • 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 plots (if filename is not defined)
  • linewidth : width of the lines in plot [default=2Gadfly.pt]
  • obs_plot_dots : plot observation as dots (true [default] or false)
  • plotdata : plot data (if false model predictions are plotted only) [default=true]
  • pointsize : size of the markers in plot [default=4Gadfly.pt]
  • seed : random seed [default=0]
  • xtitle : x axis title [default=X]
  • yfit : fit vertical axis range [default=false]
  • 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)

source

# Mads.spaghettiplotsFunction.

Generate separate spaghetti plots for each selected (type != null) model parameter

Methods

  • Mads.spaghettiplots(madsdata::AbstractDict, number_of_samples::Integer; seed, kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L737
  • Mads.spaghettiplots(madsdata::AbstractDict, paramdictarray::OrderedCollections.OrderedDict; format, keyword, xtitle, ytitle, obs_plot_dots, seed, linewidth, pointsize, grayscale) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsPlot.jl#L742

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • number_of_samples::Integer : number of samples
  • paramdictarray::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 plots
  • linewidth : width of the lines on the plot [default=2Gadfly.pt]
  • obs_plot_dots : plot observation as dots (true (default) or false)
  • pointsize : size of the markers on the plot [default=4Gadfly.pt]
  • 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)

source

# Mads.sphericalcovMethod.

Spherical spatial covariance function

Methods

  • Mads.sphericalcov(h::Number, maxcov::Number, scale::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L45

Arguments

  • h::Number : separation distance
  • maxcov::Number : max covariance
  • scale::Number : scale

Returns:

  • covariance

source

# Mads.sphericalvariogramMethod.

Spherical variogram

Methods

  • Mads.sphericalvariogram(h::Number, sill::Number, range::Number, nugget::Number) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsKriging.jl#L61

Arguments

  • h::Number : separation distance
  • nugget::Number : nugget
  • range::Number : range
  • sill::Number : sill

Returns:

  • Spherical variogram

source

# Mads.sprintfMethod.

Convert @Printf.sprintf macro into sprintf function

source

# Mads.statusFunction.

Status of Mads modules

Methods

  • Mads.status(madsmodule::String; git, gitmore) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L257
  • Mads.status(; git, gitmore) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L252

Arguments

  • madsmodule::String : mads module

Keywords

  • git : use git [default=true or Mads.madsgit]
  • gitmore : use even more git [default=false]

Returns:

  • true or false

source

# Mads.stderrcaptureoffMethod.

Restore stderr

Methods

  • Mads.stderrcaptureoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L140

Returns:

  • standered error

source

# Mads.stderrcaptureonMethod.

Redirect stderr to a reader

Methods

  • Mads.stderrcaptureon() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L121

source

# Mads.stdoutcaptureoffMethod.

Restore stdout

Methods

  • Mads.stdoutcaptureoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L106

Returns:

  • standered output

source

# Mads.stdoutcaptureonMethod.

Redirect stdout to a reader

Methods

  • Mads.stdoutcaptureon() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L87

source

# Mads.stdouterrcaptureoffMethod.

Restore stdout & stderr

Methods

  • Mads.stdouterrcaptureoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L171

Returns:

  • standered output amd standered error

source

# Mads.stdouterrcaptureonMethod.

Redirect stdout & stderr to readers

Methods

  • Mads.stdouterrcaptureon() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsCapture.jl#L155

source

# Mads.svrdumpMethod.

Dump SVR models in files

Methods

  • Mads.svrdump(svrmodel::Array{SVR.svmmodel,1}, rootname::String, numberofsamples::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L141

Arguments

  • numberofsamples::Int64 : number of samples
  • rootname::String : root name
  • svrmodel::Array{SVR.svmmodel,1} : array of SVR models

source

# Mads.svrfreeMethod.

Free SVR

Methods

  • Mads.svrfree(svrmodel::Array{SVR.svmmodel,1}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L123

Arguments

  • svrmodel::Array{SVR.svmmodel,1} : array of SVR models

source

# Mads.svrloadMethod.

Load SVR models from files

Methods

  • Mads.svrload(npred::Int64, rootname::String, numberofsamples::Int64) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L164

Arguments

  • npred::Int64 : number of model predictions
  • numberofsamples::Int64 : number of samples
  • rootname::String : root name

Returns:

  • Array of SVR models for each model prediction

source

# Mads.svrpredictFunction.

Predict SVR

Methods

  • Mads.svrpredict(svrmodel::Array{SVR.svmmodel,1}, paramarray::Array{Float64,2}) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L96

Arguments

  • paramarray::Array{Float64,2} : parameter array
  • svrmodel::Array{SVR.svmmodel,1} : array of SVR models

Returns:

  • SVR predicted observations (dependent variables) for a given set of parameters (independent variables)

source

# Mads.svrtrainFunction.

Train SVR

Methods

  • Mads.svrtrain(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L39
  • Mads.svrtrain(madsdata::AbstractDict, paramarray::Array{Float64,2}; check, savesvr, addminmax, svm_type, kernel_type, degree, gamma, coef0, C, nu, cache_size, eps, shrinking, probability, verbose, tol) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L6
  • Mads.svrtrain(madsdata::AbstractDict, numberofsamples::Integer; addminmax, kw...) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSVR.jl#L39

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • numberofsamples::Integer : number of random samples in the training set [default=100]
  • paramarray::Array{Float64,2}

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]
  • eps : 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

source

# Mads.symlinkdirMethod.

Create a symbolic link of a file filename in a directory dirtarget

Methods

  • Mads.symlinkdir(filename::String, dirtarget::String, dirsource::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1166

Arguments

  • dirsource::String
  • dirtarget::String : target directory
  • filename::String : file name

source

# Mads.symlinkdirfilesMethod.

Create a symbolic link of all the files in a directory dirsource in a directory dirtarget

Methods

  • Mads.symlinkdirfiles(dirsource::String, dirtarget::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L1148

Arguments

  • dirsource::String : source directory
  • dirtarget::String : target directory

source

# Mads.tagFunction.

Tag Mads modules with a default argument :patch

Methods

  • Mads.tag(madsmodule::String, versionsym::Symbol) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L326
  • Mads.tag(madsmodule::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L326
  • Mads.tag(versionsym::Symbol) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L321
  • Mads.tag() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L321

Arguments

  • madsmodule::String : mads module name
  • versionsym::Symbol : version symbol [default=:patch]

source

# Mads.testFunction.

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::String; madstest) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsTest.jl#L40
  • Mads.test() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsTest.jl#L40

Arguments

  • testname::String : name of the test to execute; module or example

Keywords

  • madstest : test Mads [default=true]

source

# Mads.testjFunction.

Execute Mads tests using Julia Pkg.test (the default Pkg.test in Julia is executed in serial)

Methods

  • Mads.testj(coverage::Bool) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsTest.jl#L11
  • Mads.testj() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsTest.jl#L11

Arguments

  • coverage::Bool : [default=false]

source

# Mads.transposematrixMethod.

Transpose non-numeric matrix

Methods

  • Mads.transposematrix(a::Array{T,2} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L400

Arguments

  • a::Array{T,2} where T : matrix

source

# Mads.transposevectorMethod.

Transpose non-numeric vector

Methods

  • Mads.transposevector(a::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L390

Arguments

  • a::Array{T,1} where T : vector

source

# Mads.untagMethod.

Untag specific version

Methods

  • Mads.untag(madsmodule::String, version::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src-interactive/MadsPublish.jl#L361

Arguments

  • madsmodule::String : mads module name
  • version::String : version

source

# Mads.vectoroffMethod.

MADS vector calls off

Methods

  • Mads.vectoroff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L42

source

# Mads.vectoronMethod.

MADS vector calls on

Methods

  • Mads.vectoron() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L33

source

# Mads.veryquietoffMethod.

Make MADS not very quiet

Methods

  • Mads.veryquietoff() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L115

source

# Mads.veryquietonMethod.

Make MADS very quiet

Methods

  • Mads.veryquieton() in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsHelpers.jl#L106

source

# Mads.void2nan!Method.

Convert Nothing's into NaN's in a dictionary

Methods

  • Mads.void2nan!(dict::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L1047

Arguments

  • dict::AbstractDict : dictionary

source

# Mads.weightedstatsMethod.

Get weighted mean and variance samples

Methods

  • Mads.weightedstats(samples::Array, llhoods::Array{T,1} where T) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsSenstivityAnalysis.jl#L386

Arguments

  • llhoods::Array{T,1} where T : vector of log-likelihoods
  • samples::Array : array of samples

Returns:

  • vector of sample means
  • vector of sample variances

source

# Mads.welloff!Method.

Turn off a specific well in the MADS problem dictionary

Methods

  • Mads.welloff!(madsdata::AbstractDict, wellname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L621

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • wellname::String : name of the well to be turned off

source

# Mads.wellon!Method.

Turn on a specific well in the MADS problem dictionary

Methods

  • Mads.wellon!(madsdata::AbstractDict, wellname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L563
  • Mads.wellon!(madsdata::AbstractDict, rx::Regex) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L585

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • rx::Regex
  • wellname::String : name of the well to be turned on

source

# Mads.wellon!Method.

Turn on a specific well in the MADS problem dictionary

Methods

  • Mads.wellon!(madsdata::AbstractDict, wellname::String) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L563

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • wellname::String : name of the well to be turned on

source

# Mads.wells2observations!Method.

Convert Wells class to Observations class in the MADS problem dictionary

Methods

  • Mads.wells2observations!(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsObservations.jl#L676

Arguments

  • madsdata::AbstractDict : MADS problem dictionary

source

# Mads.writeparametersFunction.

Write model parameters

Methods

  • Mads.writeparameters(madsdata::AbstractDict) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L890
  • Mads.writeparameters(madsdata::AbstractDict, parameters::AbstractDict; respect_space) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L890

Arguments

  • madsdata::AbstractDict : MADS problem dictionary
  • parameters::AbstractDict : parameters

Keywords

  • respect_space : respect provided space in the template file to fit model parameters [default=false]

source

# Mads.writeparametersviatemplateMethod.

Write parameters via MADS template (templatefilename) to an output file (outputfilename)

Methods

  • Mads.writeparametersviatemplate(parameters, templatefilename, outputfilename; respect_space) in Mads : https://github.com/madsjulia/Mads.jl/blob/master/src/MadsIO.jl#L846

Arguments

  • outputfilename : output file name
  • parameters : parameters
  • templatefilename : tmplate file name

Keywords

  • respect_space : respect provided space in the template file to fit model parameters [default=false]

source

# Mads.@stderrcaptureMacro.

Capture stderr of a block

source

# Mads.@stdoutcaptureMacro.

Capture stdout of a block

source

# Mads.@stdouterrcaptureMacro.

Capture stderr & stderr of a block

source

# Mads.@tryimportMacro.

Try to import a module

source

# Mads.MadsModelType.

MadsModel type applied for MathProgBase analyses

source