Systems Theory and Automatic Control

ADMITMonteCarlo
ADMIT documentation: ADMITMonteCarlo

ADMITMonteCarlo

ADMITMonteCarlo samples all variables of interest and simulates the
model using the information contained in the ADMITinfo-object optInfo.

Note that if you want to do Monte Carlo simulation set only the initial
conditions (parameters and states for the initial step) to 'ofInterest'.

[FEASDATA, INFEASDATA] = ADMITMonteCarlo(OPTINFO,[SEEDAMOUNT],[OPTIONS])
takes a uniformly distributed (between lower and upper bound) sample of
all variables of interest and simulates the model.

Inputs
  [...]      : square brackets notify that input is optional.
  OPTINFO    : valid ADMITinfo object
  OPTIONS    : valid ADMIToptions object
  SEEDAMOUNT : number of Monte Carlo samples to be generated (default 1)

Returns
  FEASDATA   : ADMITdata object that contains feasible sample values
  INFEASDATA : ADMITdata object that contains infeasible sample values

Examples

% For this example you need a MichaelisMenten.opt file from the
% ./examples/MichaelisMenten folder
opt = ADMITproject('MichaelisMenten.opt');
% For simulation to work, all variables should either be set to singleton
% values, be denoted as "ofInterest", or be implicitly found via the
% constraints from the first two.
opt = opt + ADMITconstraint('s(0):=[1]') + ...
            ADMITconstraint('c(0):=[0]');
% The variables of interest will be seeded from their given uncertain
% bounds, hence we shrink the bounds to improve the chances of finding
% feasible solutions.
opt = opt + ADMITconstraint('p1:=[0.9,1.1]') + ...
            ADMITconstraint('p2:=[0.5,1.5]') + ...
            ADMITconstraint('p3:=[0.7,1.3]');
optInfo = ADMITcompose(opt);
% As the data was simulated using (p1,p2,p3)=(1,1,1), we can confirm that
% this point is feasible by manually sampling with these values:
[infeasible, data] = ADMITsimulate(optInfo, [1 1 1])
ADMITplot(data,{'c','s'});
% To sample random points we call the following function (increase the
% sample size to improve the chances of finding valid points):
[feasData, infeasData] = ADMITMonteCarlo(optInfo,100);
% You can plot the valid solutions versus the measurement data by
% importing the bounds in the ADMITdata format:
feasData=ADMITimportData(feasData,optInfo);
ADMITplot(feasData,{'c','s'});
ADMITplot(feasData,{'p1','p2','p3'});