KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
models.golf.Model Class Reference

Model: More...

Detailed Description

Model:

Documentation Update:
Author
Daniel Wirtz
Date
2015-08-06
New in 0.7:
(Daniel Wirtz, 2015-08-06) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 19 of file Model.m.

Public Member Functions

 Model (greenfile)
 
function [ double t , colvec< double > x ,
double
ctime ] = 
computeTrajectory (colvec< double > mu,integer inputidx)
 
function status = ODE_Callback (double t,matrix< double > y, flag)
 
function  loadGreen (filename)
 LOADGREEN Loads a stored golf setting. More...
 
function z = green (colvec< double > x,matrix< double > y)
 Green - Erzeugt eine Hügellandschaft mit gegebenen Parametern. More...
 
function dx = gradgreen (colvec< double > x)
 Gradient von g. More...
 
function map = golfcolormap ()
 
function ax = initPlot (pm)
 Plotgreen: Zeichnet das Putting-Green und das zugehörige Loch. More...
 
function  plot (double t,matrix< double > y, pm)
 global rad_ball BX BY BZ t hFigure sol;% hBall; More...
 
- Public Member Functions inherited from models.BaseModel
 BaseModel ()
 
function  delete ()
 
function  initDefaultParameter ()
 Reads the default values of the System's ModelParam list and initializes the BaseModel.DefaultMu with it. More...
 
function [ rowvec< double > t ,
matrix
< double > y , double sec ,
x ] = 
simulate (colvec< double > mu,integer inputidx)
 Simulates the system and produces the system's output. More...
 
function [ handle f , handle ax ] = plot (rowvec< double > t,matrix< double > y, varargin)
 Plots the results of the simulation. Override in subclasses for a more specific plot if desired. More...
 
function [ handle f , handle ax ] = plotState (rowvec t,matrix< double > x, varargin)
 Plots the results of the simulation. Override in subclasses for a more specific plot if desired. More...
 
function [ f ,
ax ] = 
plotSingle (double t,colvec< double > y, varargin)
 Plots a single solution. Override in subclasses for specific plot behaviour. More...
 
function  plotInputs (pm)
 
function [ double t , colvec< double > x ,
double
ctime ] = 
solveStatic (colvec< double > mu,integer inputidx)
 Solves the linear system \(A(t,\mu)*x + f(t,\mu) + B(t,\mu)*u(t) = 0\). Spatial dependence of f is neglected in the current implementation (since this would require solving a nonlinear system). More...
 
function [ rowvec< double > t ,
matrix
< double > x , double ctime ] = 
computeTrajectory (colvec< double > mu,integer inputidx)
 Computes a solution/trajectory for the given mu and inputidx in the SCALED state space. More...
 
function matrix
< double > mu = 
getRandomParam (integer num,integer seed)
 Gets a random parameter sample from the system's parameter domain P. More...
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 

Static Public Member Functions

static function res = test_Golf ()
 

Public Attributes

 rad_ball = 0.021
 Golfballradius in Meter gut: 0.015 m (42mm Durchmesser von Wikipedia) More...
 
 rad_hole = 0.054
 
 detail = 0.02
 Geländeauflösung. More...
 
 vmin = 0.03
 
 Green
 
 Hole
 
 Ball
 
- Public Attributes inherited from models.BaseModel
models.BaseFirstOrderSystem System = "[]"
 The actual dynamical system used in the model. More...
 
char Name = ""
 The name of the Model. More...
 
matrix< doubleG = 1
 The custom scalar product matrix \(\vG\). More...
 
double RealTimePlottingMinPause = .1
 Minimum pause between successive steps when RealTimePlotting is enabled. More...
 
logical isStatic = false
 Determines if the model is time dependent or static. More...
 
integer DefaultInput = "[]"
 The default input to use if none is given. More...
 
 Times
 Evaluation points \(\{0=t_0,\ldots,t_n=T\}\) of the model. More...
 
rowvec< doublescaledTimes
 The time steps Times in scaled time units \(\tilde{t_i} = \frac{t_i}{\tau}\). More...
 
double Tscaled
 The scaled end time \(\tilde{T} = \frac{T}{\tau}\). More...
 
double tau
 Time scaling factor \(\tau\). More...
 
double T
 The final timestep \(T\) up to which to simulate. More...
 
double dt
 The desired time-stepsize \(\Delta t\) for simulations. More...
 
solvers.BaseSolver ODESolver
 The solver to use for the ODE. Must be an instance of any solvers.BaseSolver subclass. More...
 
logical RealTimePlotting
 Determines if the simulation should plot intermediate steps during computation. More...
 
colvec< doubleDefaultMu = "[]"
 The default parameter value if none is given. More...
 
 dtscaled = .1
 The scaled timestep \(\tilde{\Delta t} = \frac{\Delta t}{\tau}\). More...
 
char gitRefOnSave = ""
 Contains the GIT revision of this model when it was last saved. More...
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. More...
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More...
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More...
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends. More...
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function. More...
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More...
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects. More...
 
 findprop
 Returns a meta.property objects associated with the specified property name. More...
 
 fields
 Returns a cell array of string containing the names of public properties. More...
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More...
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More...
 
 eq
 Relational functions example. See details for more information. More...
 
 transpose
 Transposes the elements of the handle object array. More...
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function. More...
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More...
 
 sort
 ort the handle objects in any array in ascending or descending order. More...
 

Additional Inherited Members

- Protected Member Functions inherited from models.BaseModel
function this = saveobj ()
 Store the current GIT branch in the object. More...
 
function  plotstep (src, ed)
 Callback for the ODE solvers StepPerformed event that enables during-simulation-plotting. More...
 
- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 
- Static Protected Member Functions inherited from models.BaseModel
static function this = loadobj (this, s)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Constructor & Destructor Documentation

models.golf.Model.Model (   greenfile)

Definition at line 90 of file Model.m.

References models.BaseModel.dt, loadGreen(), models.BaseModel.ODESolver, models.golf.System.System(), and models.BaseModel.T.

Here is the call graph for this function:

Member Function Documentation

function [doublet , colvec<double>x , doublectime ] = models.golf.Model.computeTrajectory ( colvec< double mu,
integer  inputidx 
)

Definition at line 109 of file Model.m.

References ODE_Callback(), models.BaseModel.ODESolver, and t.

Here is the call graph for this function:

function map = models.golf.Model.golfcolormap ( )

Definition at line 232 of file Model.m.

References t.

Referenced by initPlot().

Here is the caller graph for this function:

function dx = models.golf.Model.gradgreen ( colvec< double x)

Gradient von g.

Parameters
xThe state variable vector \(\vx(t)\)

Definition at line 218 of file Model.m.

References green().

Referenced by ODE_Callback(), and plot().

Here is the call graph for this function:

Here is the caller graph for this function:

function z = models.golf.Model.green ( colvec< double x,
matrix< double y 
)

Green - Erzeugt eine Hügellandschaft mit gegebenen Parametern.

Parameters
xThe state variable vector \(\vx(t)\)
yThe output variable vector \(\vy(t) = \vC(t,\vmu)\vx(t),~t=0\ldots T\) (general notation)

Definition at line 200 of file Model.m.

References Green.

Referenced by gradgreen(), initPlot(), and plot().

Here is the caller graph for this function:

function ax = models.golf.Model.initPlot (   pm)

Plotgreen: Zeichnet das Putting-Green und das zugehörige Loch.

Required fields of pm:

Definition at line 243 of file Model.m.

References detail, golfcolormap(), Green, green(), models.BaseFirstOrderSystem.mu, and rad_hole.

Referenced by plot().

Here is the call graph for this function:

Here is the caller graph for this function:

function models.golf.Model.loadGreen (   filename)

LOADGREEN Loads a stored golf setting.

Definition at line 156 of file Model.m.

References models.BaseModel.DefaultMu, and Green.

Referenced by Model().

Here is the caller graph for this function:

function status = models.golf.Model.ODE_Callback ( double  t,
matrix< double y,
  flag 
)

Definition at line 121 of file Model.m.

References gradgreen(), Green, models.BaseFirstOrderSystem.mu, rad_hole, models.BaseModel.System, and vmin.

Referenced by computeTrajectory().

Here is the call graph for this function:

Here is the caller graph for this function:

function models.golf.Model.plot ( double  t,
matrix< double y,
  pm 
)

global rad_ball BX BY BZ t hFigure sol;% hBall;

Parameters
tThe current time(s) \(t \in [0, T]\)
yThe output variable vector \(\vy(t) = \vC(t,\vmu)\vx(t),~t=0\ldots T\) (general notation)

Definition at line 296 of file Model.m.

References models.BaseModel.dt, gradgreen(), green(), initPlot(), PlotManager.LeaveOpen, rad_ball, and t.

Here is the call graph for this function:

static function res = models.golf.Model.test_Golf ( )
static

Definition at line 423 of file Model.m.

References t.

Member Data Documentation

models.golf.Model.Ball

Definition at line 69 of file Model.m.

models.golf.Model.detail = 0.02

Geländeauflösung.


Default: 0.02

Definition at line 53 of file Model.m.

Referenced by initPlot().

models.golf.Model.Green

Definition at line 65 of file Model.m.

Referenced by green(), initPlot(), loadGreen(), and ODE_Callback().

models.golf.Model.Hole

Definition at line 67 of file Model.m.

models.golf.Model.rad_ball = 0.021

Golfballradius in Meter gut: 0.015 m (42mm Durchmesser von Wikipedia)


Default: 0.021

Definition at line 41 of file Model.m.

Referenced by plot().

models.golf.Model.rad_hole = 0.054

Definition at line 50 of file Model.m.

Referenced by initPlot(), and ODE_Callback().

models.golf.Model.vmin = 0.03

Definition at line 62 of file Model.m.

Referenced by ODE_Callback().


The documentation for this class was generated from the following file: