affectors
Class Affector

java.lang.Object
  extended byaffectors.Affector
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Affector_Template, Cleavage2A_ICAff, Cleavage2B_ICAff, CleavageA_ECAff, CleavageA_ICAff, CleavageA_ICDipAff, CleavageB_ECAff, CleavageB_ICAff, CleavageB_ICDipAff, CleaveA_Aff, CleaveB_Aff, CompAct2Aff, ConstantInputAff, ConstantLevelAff, ConversionEAff, ConversionIAff, DecayAff, DecayRegDownAff, DecayRegUpAff, DefinedValuesAff, DefinedValuesIndicatorAff, Dephosphor1StepA_ICAff, Dephosphor1StepB_ICAff, DephosphorylateA_Aff, DephosphorylateB_Aff, DephosphorylationA_ICAff, DephosphorylationB_ICAff, Dimerize_AAff, Dimerize_BAff, DimerizeAllMembrane_AAff, DimerizeAllMembrane_BAff, DimerizeCrossMembrane_AAff, DimerizeCrossMembrane_BAff, DimerizeCytoMem_AAff, DimerizeCytoMem_BAff, DimerizeCytoMem_CAff, DimerizeMemCyto_AAff, DimerizeMemCyto_BAff, DimerizeMemCyto_CAff, DissociationA_Aff, DissociationB_Aff, DissociationC_Aff, DissociationCytoMemA_Aff, DissociationCytoMemB_Aff, DissociationCytoMemC_Aff, DissociationEC_Com_Aff, DissociationEC_Lig_Aff, DissociationEC_Rec_Aff, EndoEAff, EndoIAff, EnhancerRegionAff, EnzymeConversionEC_Pro_Aff, EnzymeConversionEC_Sub_Aff, ExoEAff, ExoIAff, Formula1Aff, HeatShockAff, LMxferEAff, LMxferIAff, MxferInAff, MxferOutAff, NoChangeAff, Phosphor1StepA_ICAff, Phosphor1StepB_ICAff, PhosphorylateA_Aff, PhosphorylateB_Aff, PhosphorylationA_ICAff, PhosphorylationB_ICAff, PlaceHolderAff, PsiAff, PsiECAff, RecycleAAff, RecycleBAff, TlnAff, TlnRegUpAff, Txn1Aff, Txn1ECAff, Txn2aAff, Txn2aDipAff, Txn2bAff, Txn2bDipAff, Txn3aAff, Txn3bAff, Txn4Aff, Txn4DipAff, Txn5Aff, Txn6aAff, Txn6bAff, TxnLeakyCyceAff, TxnSiteActInhibit2Aff, TxnSiteActInhibit3Aff, TxnSiteActInhibitAff, TxnSiteActivatorAff, TxnSiteAddInhibitorAff, TxnSiteInhibitorAff, VonForresterA_Aff, VonForresterA_ECAff, VonForresterA_ICAff, VonForresterB_Aff, VonForresterB_ECAff, VonForresterB_ICAff, WhiteNoiseAff, XferInAff, XferOutAff

public abstract class Affector
extends java.lang.Object
implements java.lang.Cloneable

Stores the formula for how a node changes over time. Each affector encapsulates a particular bit of the full formula for each node, generally an additive term of the differential equation. The base class Affector also stores the current values of all the parameters in the model.


Field Summary
 java.lang.String ADesc
          Descriptors for use by the GUI; set these to point to static final Strings that say in as few words as possible what the Affector does (ADesc), what nodes need to be specified (NDesc), and what parameters it uses (PDesc).
 int affectorType
           
static int CC
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
static int CERTIFICATION
          Position meanings for Type[].
static int CONVERSION
          Type.[TERMTYPE] values;
 float copyNumber
           
static int DEGRADATION
          Type.[TERMTYPE] values;
static int FF
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
static int firstFreeParam
           
static int GG
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
static int GUI_CAPABLE
          Position meanings for Type[].
static int HH
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
static int KK
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
static int MATHTYPE
          Position meanings for Type[].
 java.lang.String[] NDesc
           
 java.lang.String[] PDesc
           
static int PRODUCTION
          Type.[TERMTYPE] values;
static int RETURNS_DERIV
          Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS.
static int RETURNS_PARTIALS
          Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS.
static int TERMTYPE
          Position meanings for Type[].
static int TT
          Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.
 int[] Type
          The Type array is public only so it can be read without the cost of a method call...
static int UNSPECIFIED
          Type.[] default value.
 
Method Summary
static void addDefaultParam(java.lang.String name, float val, float low, float high, java.lang.String variation)
           
 float Chi(float M, float K, float nu)
           
static void clearStatic()
           
 void copy_(Affector cp)
           
 Affector copy()
           
 boolean doesContainTarget(Node which_node)
           
static int findOrCreateParam(java.lang.String name)
          for use of the CalculatorNode or other things that need to look up parameters if they already exist but make them if they do not...
static int findParam(java.lang.String name)
           
 void fixNodes(Cell cell, java.lang.String[] node_names)
           
 float getNCValue(Node which_node)
           
 Node[] getNodes()
          This function is here so that viewers can examine an affector.
 int getNumNodes()
           
 int getNumParameters()
           
static int getOtherSide(int side)
           
static Parameter getParameter(int pos)
          Use this to read a Parameter object, identified by number, from the static arrays held by Affector.
static Parameter getParameter(java.lang.String name)
          Use this to read a Parameter object, identified by name, from the static arrays held by Affector.
static java.lang.String getParamName(int pos)
           
static int getParamPos(java.lang.String name)
          This function should only be called when constructing a model from the init() function of an iterator.
static float getParamValue(int pos)
          Use this instead of getting a whole Parameter object if all you want is the value of a parameter identified by its position.
static float getParamValue(java.lang.String name)
          Use this instead of getting a whole Parameter object if all you want is the named parameter's value.
static int getParamVariationMode(int pos)
           
 float getValue(Node which_node)
           
 void init(int side, int num_params, java.lang.String[] params)
           
 boolean isLinearInTarget()
           
 float Phi(float M, float K, float nu)
           
 float Psi(float M, float K, float nu)
           
protected  void setContainsTarget(boolean b)
           
protected  void setDescriptions(java.lang.String aff_desc, java.lang.String[] node_desc, java.lang.String[] param_desc)
           
protected abstract  void setLabelsAndTypes()
           
static void setParameter(Parameter p)
          Use this to set a parameter using a Parameter object.
abstract  void setParameterNumbers(int[] param_nums)
           
static void setParamRange(java.lang.String name, float lower, float upper, int mode)
           
static void setParamRange(java.lang.String name, float lower, float upper, java.lang.String mode)
           
static void setParamValue(int param_pos, float val)
           
static void setParamValue(java.lang.String name, float val)
           
 void setSide(int side)
           
protected  void setSided(boolean sided, int[] which_sides)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstFreeParam

public static int firstFreeParam

copyNumber

public float copyNumber

affectorType

public int affectorType

Type

public int[] Type
The Type array is public only so it can be read without the cost of a method call... NO ONE should set any value in this array except in the constructor of and Affector subclass, and then only when you know what you're doing.


TERMTYPE

public static final int TERMTYPE
Position meanings for Type[].

See Also:
Constant Field Values

MATHTYPE

public static final int MATHTYPE
Position meanings for Type[].

See Also:
Constant Field Values

CERTIFICATION

public static final int CERTIFICATION
Position meanings for Type[].

See Also:
Constant Field Values

GUI_CAPABLE

public static final int GUI_CAPABLE
Position meanings for Type[].

See Also:
Constant Field Values

UNSPECIFIED

public static final int UNSPECIFIED
Type.[] default value.

See Also:
Constant Field Values

FF

public static final int FF
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

GG

public static final int GG
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

HH

public static final int HH
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

KK

public static final int KK
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

CC

public static final int CC
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

TT

public static final int TT
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time.

See Also:
Constant Field Values

PRODUCTION

public static final int PRODUCTION
Type.[TERMTYPE] values;

See Also:
Constant Field Values

CONVERSION

public static final int CONVERSION
Type.[TERMTYPE] values;

See Also:
Constant Field Values

DEGRADATION

public static final int DEGRADATION
Type.[TERMTYPE] values;

See Also:
Constant Field Values

RETURNS_DERIV

public static final int RETURNS_DERIV
Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS.

See Also:
Constant Field Values

RETURNS_PARTIALS

public static final int RETURNS_PARTIALS
Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS.

See Also:
Constant Field Values

ADesc

public java.lang.String ADesc
Descriptors for use by the GUI; set these to point to static final Strings that say in as few words as possible what the Affector does (ADesc), what nodes need to be specified (NDesc), and what parameters it uses (PDesc). Once your Affector subclass does all this, set this.Type.[GUI_CAPABLE]=1


NDesc

public java.lang.String[] NDesc

PDesc

public java.lang.String[] PDesc
Method Detail

clearStatic

public static void clearStatic()

setLabelsAndTypes

protected abstract void setLabelsAndTypes()

setParameterNumbers

public abstract void setParameterNumbers(int[] param_nums)

getNumNodes

public int getNumNodes()

getNumParameters

public int getNumParameters()

init

public void init(int side,
                 int num_params,
                 java.lang.String[] params)

setDescriptions

protected void setDescriptions(java.lang.String aff_desc,
                               java.lang.String[] node_desc,
                               java.lang.String[] param_desc)

setSided

protected void setSided(boolean sided,
                        int[] which_sides)

setSide

public void setSide(int side)

setContainsTarget

protected void setContainsTarget(boolean b)

isLinearInTarget

public boolean isLinearInTarget()

getValue

public float getValue(Node which_node)

getNCValue

public float getNCValue(Node which_node)

doesContainTarget

public boolean doesContainTarget(Node which_node)

copy_

public void copy_(Affector cp)

copy

public Affector copy()

fixNodes

public void fixNodes(Cell cell,
                     java.lang.String[] node_names)
              throws java.lang.Exception
Throws:
java.lang.Exception

getOtherSide

public static int getOtherSide(int side)

Phi

public final float Phi(float M,
                       float K,
                       float nu)

Psi

public final float Psi(float M,
                       float K,
                       float nu)

Chi

public final float Chi(float M,
                       float K,
                       float nu)

findParam

public static int findParam(java.lang.String name)
                     throws java.lang.Exception
Throws:
java.lang.Exception

findOrCreateParam

public static int findOrCreateParam(java.lang.String name)
                             throws java.lang.Exception
for use of the CalculatorNode or other things that need to look up parameters if they already exist but make them if they do not... mimics getParamPos. Use with care.

Throws:
java.lang.Exception

getParamPos

public static int getParamPos(java.lang.String name)
                       throws java.lang.Exception
This function should only be called when constructing a model from the init() function of an iterator. If called from other places, it may screw stuff up.

Throws:
java.lang.Exception

getParamName

public static java.lang.String getParamName(int pos)

getParamVariationMode

public static int getParamVariationMode(int pos)

setParamRange

public static void setParamRange(java.lang.String name,
                                 float lower,
                                 float upper,
                                 java.lang.String mode)
                          throws java.lang.Exception
Throws:
java.lang.Exception

setParamRange

public static void setParamRange(java.lang.String name,
                                 float lower,
                                 float upper,
                                 int mode)

getParameter

public static Parameter getParameter(java.lang.String name)
Use this to read a Parameter object, identified by name, from the static arrays held by Affector.


getParameter

public static Parameter getParameter(int pos)
Use this to read a Parameter object, identified by number, from the static arrays held by Affector.


setParameter

public static void setParameter(Parameter p)
Use this to set a parameter using a Parameter object.


getParamValue

public static float getParamValue(int pos)
Use this instead of getting a whole Parameter object if all you want is the value of a parameter identified by its position.


getParamValue

public static float getParamValue(java.lang.String name)
                           throws java.lang.Exception
Use this instead of getting a whole Parameter object if all you want is the named parameter's value.

Throws:
java.lang.Exception

setParamValue

public static void setParamValue(java.lang.String name,
                                 float val)

setParamValue

public static void setParamValue(int param_pos,
                                 float val)

addDefaultParam

public static void addDefaultParam(java.lang.String name,
                                   float val,
                                   float low,
                                   float high,
                                   java.lang.String variation)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getNodes

public Node[] getNodes()
This function is here so that viewers can examine an affector. They should not be used by any of the modeling classes themselves.