affectors
Class DefinedValuesAff

java.lang.Object
  extended byaffectors.Affector
      extended byaffectors.DefinedValuesAff
All Implemented Interfaces:
java.lang.Cloneable

public class DefinedValuesAff
extends Affector

An artificial Affector which brings a Node from its initial value to a second value starting at a specified time and taking a specified amount of time to do the change. Then it holds it at the second value for another specified period of time. Finally, it drops it to a final value over yet another specified period of time. You might use this for a transient pre-pattern, for instance. Note that by setting some of the times to 0, you can simplify the pattern produced.

AN ADDITIONAL COMPLICATION: In order that this affector can be used in a spatially patterned way, the affector pays attention to the initial values in each cell. If the initial value is 0, then the affector always returns 0. If the initial value is 0.00001 or less, the value that this affector is trying to reach is multiplied by / 0.00001. If the init value is > 0.00001, there is no special behavior.

Formula
dnodex/dt = 0 | before first_time
dnodex/dt = (second_value - initial_value) / (second_time - first_time) | between first and second times
dnodex/dt = 0 | between second and third times
dnodex/dt = (third_value - second_value) / (fourth_time - third_time) | between third and fourth times
dnodex/dt = 0 | after fourth_time

Parameters

Target [nodex] The Node which this Affector is acting on
First time [first_t] See formula above
Second time [second_t] See formula above
Third time [third_t] See formula above
Fourth time [fourth_t] See formula above
Second value [second_v] See formula above
Third value [third_v] See formula above

Usage
&nodex

&DefinedValuesAff nodex first_t second_t third_t fourth_t second_v third_v
&endnodex


Field Summary
 
Fields inherited from class affectors.Affector
ADesc, affectorType, CC, CERTIFICATION, CONVERSION, copyNumber, DEGRADATION, FF, firstFreeParam, GG, GUI_CAPABLE, HH, KK, MATHTYPE, NDesc, PDesc, PRODUCTION, RETURNS_DERIV, RETURNS_PARTIALS, TERMTYPE, TT, Type, UNSPECIFIED
 
Constructor Summary
DefinedValuesAff()
           
 
Method Summary
 float getValue(Node which_node)
           
protected  void setLabelsAndTypes()
           
 void setParameterNumbers(int[] param_nums)
           
 
Methods inherited from class affectors.Affector
addDefaultParam, Chi, clearStatic, copy_, copy, doesContainTarget, findOrCreateParam, findParam, fixNodes, getNCValue, getNodes, getNumNodes, getNumParameters, getOtherSide, getParameter, getParameter, getParamName, getParamPos, getParamValue, getParamValue, getParamVariationMode, init, isLinearInTarget, Phi, Psi, setContainsTarget, setDescriptions, setParameter, setParamRange, setParamRange, setParamValue, setParamValue, setSide, setSided
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinedValuesAff

public DefinedValuesAff()
Method Detail

setLabelsAndTypes

protected void setLabelsAndTypes()
Specified by:
setLabelsAndTypes in class Affector

setParameterNumbers

public void setParameterNumbers(int[] param_nums)
Specified by:
setParameterNumbers in class Affector

getValue

public float getValue(Node which_node)
Overrides:
getValue in class Affector