All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface berkeley.cs.dmc.system.DynamicsSystem

public interface DynamicsSystem
The DynamicsSystem interface is intended to provide a description of a dynamical system sufficient for that system to be analysed by transformation software, either the dynamics compiler of the periodic system compiler.


Variable Index

 o CLOSED_FORM
Constant to indicate that a state variable is evaluated as a closed form function of time, and hence requires no analysis.
 o FIRST_DERIVATIVE
Constant to indicate that a state variable represents the first derivative of the preceeding variable int he array with respect to time.
 o ITERATIVE
Constant to indicate that a state variable is evaluated using some interative method, such as numerical integration.
 o SECOND_DERIVATIVE
Constant to indicate that a state variable represents the second derivative of an earlier state variable with respect to time.

Method Index

 o bufferSize()
Return the number of time values that should be buffered.
 o bufferStep()
Return the time between buffered values that should be used.
 o checkState(double, double[], boolean)
Test the quality of an approximation.
 o evaluate(double, double[], double, double[])
Evaluate the system from t_last, where it had state variables p_last, to t_now and state variables p_now.
 o evaluateFields(double, double[], float[])
Given the state variables and time, fill in the field values.
 o evaluationTechnique(int)
Return the evaluation techniques for each variable.
 o getBound(int)
Get the bound for a given variable index.
 o initialCondition(double[])
Provide an initial condition in p.
 o isCyclic(int)
Return an array indicating which dimensions of the phase space are cyclic.
 o maxApproxError()
Return the maximum allowable error in an approximation.
 o mixDiff()
Return the difference between distributions required to measure mixing in determining the sampling threshold.
 o mixTestMax()
Return the threshold for the number of cells that should be tested for the sampling threshold.
 o numFields()
Fields are the things that actually drive animations.
 o numVariables()
 o period()
 o resolutions()
Return the resolutions of each variable.
 o subsetLength()
Return the length of subsets with identical behaviour.

Variables

 o CLOSED_FORM
 public static final int CLOSED_FORM
Constant to indicate that a state variable is evaluated as a closed form function of time, and hence requires no analysis.

 o ITERATIVE
 public static final int ITERATIVE
Constant to indicate that a state variable is evaluated using some interative method, such as numerical integration.

 o FIRST_DERIVATIVE
 public static final int FIRST_DERIVATIVE
Constant to indicate that a state variable represents the first derivative of the preceeding variable int he array with respect to time.

 o SECOND_DERIVATIVE
 public static final int SECOND_DERIVATIVE
Constant to indicate that a state variable represents the second derivative of an earlier state variable with respect to time. It is assumed the basic variable is that appearing 2 previous in the state vector.

Methods

 o numVariables
 public abstract int numVariables()
Returns:
The number of state variables for the system.
 o numFields
 public abstract int numFields()
Fields are the things that actually drive animations. It may be that the state variables are best for describing state, but don't correspond to geometric transformation. In such cases, use fields. Note also that derivatives frequently appear as state variables, but rarely as fields.

Returns:
the number of fields used to set transforms.
 o subsetLength
 public abstract int subsetLength()
Return the length of subsets with identical behaviour. This number should be a divisor of the total number of variables.

Returns:
The length of indentically behaved subsets.
 o evaluationTechnique
 public abstract int evaluationTechnique(int ind)
Return the evaluation techniques for each variable. ind will be less than subsetLength().

Parameters:
ind - The index of the variable in question.
Returns:
One of CLOSED_FORM, ITERATIVE, FIRST_DERIVATIVE or SECOND_DERIVATIVE
 o period
 public abstract double period()
Returns:
The period of any driving function, if one exists. 0 if none exists.
 o isCyclic
 public abstract boolean isCyclic(int ind)
Return an array indicating which dimensions of the phase space are cyclic. ind will be less than subsetLength(). By cyclic we mean they wrap around modulo some number, such as an angle can be measured modulo 2*PI. So any angular values should return true. Basically this makes bounding easier.

Parameters:
ind - The index of the state variable in question.
Returns:
True if the variable can be measured modulo somthing.
 o getBound
 public abstract double[] getBound(int ind)
Get the bound for a given variable index. ind will be less than subsetLength(). This method will only be called for state variables that are cyclic, as given by isCyclic().

Parameters:
ind - The index of the variable in question.
Returns:
A 2d array, where the first element is the min and the second the max.
 o initialCondition
 public abstract boolean initialCondition(double p[])
Provide an initial condition in p. Returns true if this is a random value. p will be the full set of parameters. This function should also do burn in - ie the values returned are assumed to be typical for the system. Finally, the values returned should be within their expected bounds, particularly for cyclic variables.

Parameters:
p - Space for the initial condition. The method should fill this.
Returns:
True if the value is random, false if the same value will always be returned.
 o evaluate
 public abstract float evaluate(double t_last,
                                double p_last[],
                                double t_now,
                                double p_now[])
Evaluate the system from t_last, where it had state variables p_last, to t_now and state variables p_now. p_last and p_now are the full set of state variables. The value returned should be the percentage of the maximum amount of work for a given frame. Returning 1.0 indicates that no more work should be done for this system this frame, while 0.1 indicates that 10 times more work could be done.

Parameters:
t_last - The time for the last set of state variables.
p_last - The set of state variables at time t_last.
t_now - The time to evaluate the state variables.
p_now - The array to be filled with the new state variable values.
Returns:
The amount of work done, between 0 and 1.
 o evaluateFields
 public abstract void evaluateFields(double t,
                                     double params[],
                                     float fields[])
Given the state variables and time, fill in the field values.

Parameters:
t - The time corresponding to these values.
params - The state variable values at time t.
fields - The array of field values to be filled by the method.
 o checkState
 public abstract boolean checkState(double t,
                                    double p[],
                                    boolean discard)
Test the quality of an approximation. This routine is free to modify the value before returning. The third argument is true if the value can be discarded. In this case, the function should return true if the value is usable, and false if it should be discarded. p wil be the full set of state variables, and t is the evaluation time.

Parameters:
t - The time for the given state.
p - The state variables. The method may modify these.
discard - True if the method may discard the given state completely.
Returns:
True if the value is usable, False if it should be discarded.
 o bufferStep
 public abstract float bufferStep()
Return the time between buffered values that should be used. This is really a measure of how quickly the system changes state, because continuous values will be linearly interpolated between buffered values. Also, the system will be asked to evaluate over periods that are multiples of the buffer step.

Returns:
The interval to use between values in the state buffer.
 o bufferSize
 public abstract int bufferSize()
Return the number of time values that should be buffered. The more buffered, the less chance the system will be without state. But more buffered means much more memory used.

Returns:
The number of state entries in the buffer
 o resolutions
 public abstract double[] resolutions()
Return the resolutions of each variable. This defines the resolution of the cell decomposition used for approximation. Higher resolutions means better approximations, but much more memory used and bigger final file sizes.

Returns:
An array giving the resolution of each state variable.
 o mixTestMax
 public abstract double mixTestMax()
Return the threshold for the number of cells that should be tested for the sampling threshold. N cells will be tested, where the sum of the probability of the N cells is the smallest number greater than the value returned by this function.

Returns:
The amount of probability density to test for the sampling threshold.
 o mixDiff
 public abstract double mixDiff()
Return the difference between distributions required to measure mixing in determining the sampling threshold. Higher values means a weaker test, and smaller files and more efficient dynamics, but with looser approximations. Lower values make the test harder.

Returns:
The minimum distance, between 0 and 1.
 o maxApproxError
 public abstract double maxApproxError()
Return the maximum allowable error in an approximation. Smaller values give better results. The error of an approximation is the sum of the squared error for each scaled sample. In other samples are scaled between 0-1, the approximation is scaled identically, then the difference is computed, squared and added to the total. You can always set this value to be very low and stop the approximation learning by hand when you are happy with the quality.

Returns:
The maximum approximation error.

All Packages  Class Hierarchy  This Package  Previous  Next  Index