60 this.
System= models.iciam2011.ICIAMSystem(
this);
66 s = solvers.ExplEuler;
71 this.
System.
addParam(
" mu1 ", .5,
" Range ", [0 1],
" Desired ", 4);
73 this.
Sampler= sampling.GridSampler;
75 e1 = [ones(dims,1) zeros(dims,1)];
76 e2 = [zeros(dims,1) ones(dims,1)];
78 x0 = dscomponents.AffineInitialValue;
79 x0.addMatrix(
" mu(2) ", ones(dims,1));
84 fexp.Ma= repmat(-exp(-fexp.Centers.xi(1,:)/15),dims,1);
91 B = dscomponents.AffLinInputConv;
92 B.addMatrix(
" mu(1) ", e1);
93 B.addMatrix(
" 1-mu(1) ", e2);
101 V = ones(dims,1)/sqrt(dims);
102 s = spacereduction.ManualReduction(V,V);
109 s = spacereduction.RotationDecorator(s);
114 e = error.IterationCompLemmaEstimator;
115 e.UseTimeDiscreteC=
true;
130 d.EstimatorVersions= [1 1 0 0 1 0 0 1 1];
131 d.SingleFigures=
true;
137 d.start([mu1; 1], 1);
140 md = d.ModelData(end);
141 absmax = 30*abs(md.ErrT(7)-md.ErrT(1));
142 relmax = 30*abs(md.RelErrT(7)-md.RelErrT(1));
146 axis(a,[0 m.T md.MinErr*.9 min(1e4,absmax)]);
147 set(legend(a),
" Location ",
" NorthEast ");
148 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_errors ", mu1, s.Degree),
" fig ");
150 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_errors ", mu1, s.Degree));
152 f = d.Figures[2]; a = gca(f);
153 axis(a,[0 m.T md.MinRelErr*.9 min(1,relmax)]);
154 set(legend(a),
" Location ",
" NorthEast ");
155 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_relerr ", mu1, s.Degree),
" fig ");
157 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_relerr ", mu1, s.Degree));
159 f = d.Figures[3]; a = gca(f);
160 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_ctimes ", mu1, s.Degree),
" fig ");
162 Utils.
saveFigure(f,sprintf(
" ICIAM_mu1_%d_deg%f_ctimes ", mu1, s.Degree));
166 PlotParamSweep(r,[1; 1],1,1,-.1:.05:1.1);
Collection of generally useful functions.
Numerical experiments class for Paper ICIAM.
error.BaseEstimator ErrorEstimator
The associated error estimator for this model.
The base class for any KerMor detailed model.
double dt
The desired time-stepsize for simulations.
integer TrainingInputs
The indices of inputs to use for training data generation. Uses the DefaultInput if not set (and Defa...
sampling.BaseSampler Sampler
The sampling strategy the Model uses.
models.BaseFirstOrderSystem System
The actual dynamical system used in the model.
dscomponents.AInputConv B
The input conversion.
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
rowvec EstimatorIterations
How many estimator iterations should be performed?
dscomponents.AInitialValue x0
Function handle to initial state evaluation.
solvers.BaseSolver ODESolver
The solver to use for the ODE. Must be an instance of any solvers.BaseSolver subclass.
static function saveFigure(fig, filename, ext)
Opens a matlab save dialog and saves the given figure to the file selected.
Inputs
The system's possible input functions. A cell array of function handles, each taking a time argument ...
approx.BaseApprox Approx
The approximation method for the CoreFunction.
double T
The final timestep up to which to simulate.
Analysis class for the error estimators.
spacereduction.BaseSpaceReducer SpaceReducer
The reduction algorithm for subspaces.
dscomponents.LinearOutputConv C
The output conversion Defaults to an LinearOutputConv instance using a 1-matrix, which just forwards ...
dscomponents.ACoreFun f
The core f function from the dynamical system.
static function [ d , r , m ] = CreatePlots(dim)
dim
The system's dimension.
function ModelParam p = addParam(char name, default, varargin)
Adds a parameter with the given values to the parameter collection of the current dynamical system...