mass.thermo.conc_sampling

This module contains the Hit-and-Run concentration samplers.

Key components in the thermo.conc_sampling module are the following:

  1. The sample_concentrations() function, a function to call one of the concentration sampler methods and valid concentration distributions from the :associated mass model of the ConcSolver. Currently provides two sampling methods:

    1. 'optgp' to utilize the ConcOptGPSampler

    2. 'achr' to utilize the ConcACHRSampler

  2. The ConcOptGPSampler is parallel optimized sampler with fast convergence and parallel execution based on [MHM14], with its implementation similar to the Python cobra package. See the conc_optgp documentation for more information.

  3. The ConcACHRSampler is a sampler that utilizes an Artifial Centering Hit-and-Run (ACHR) sampler for a low memory footprint and good convergence based on [KS98], with its implementation similar to the Python cobra package. See the conc_achr documentation for more information.

  4. The ConcHRSampler is the base class for the samplers. All current samplers are derived from this class and all new samplers should be derived from this class to provide a unified interface for concentration sampling. See the conc_hr_sampler documentation for more information.

To properly use the concentration samplers and associated functions, note the following:

  • It is required that a model has been loaded into a ConcSolver instance and that the solver has been setup for concentraiton sampling via the ConcSolver.setup_sampling_problem() method.

  • All numerical values to be utilized by the solver must be defined. This includes:

  • In order to perform the sampling, all numerical values are transformed from linear space into logarithmic space before the solver is populated. Therefore, all variables and constraints in the solver will exist in logspace.

    However, all numerical solution values are transformed from logspace back into a linear space before being returned, unless otherwise specified.

Submodules