package affectors; import main.Node; import main.Globals; /** One half of a pair of affectors which recycles proteins from one state back to another. Use this one in the pre-recycled state. Use the B version in the recycled state. The recycling occurs at some fixed rate. This can be used for both cytoplasmic and membrane-bound proteins. DOES NOT substitute for the Dissociation_Aff pair unless you don't care about the ligand.

Formula
dNODEX/dt = -NODEX / H_NODEX

Parameters
Recyclee [NODEX] The Node that is going to be recycled back to another Node.
Half-life [H_NODEX] The time it takes for half of the recyclee node to be recycled.

Usage
&NODEX

&RecycleAAff NODEX H_NODEX
&endNODEX/code> */ public class RecycleAAff extends Affector { /** The half-life in minutes for disappearance of the pre-recycled state. */ int halfLifeParam; static final String desc = "Recycler; version A for recyclee"; static final String [] nodeDescriptions = {"Recyclee"}; static final String [] paramDescriptions = {"Half-life of recyclee"}; static final int [] whichSides = {-1}; public RecycleAAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); setSided(true, whichSides); setContainsTarget(true); this.Type[GUI_CAPABLE] = 1; this.Type[CERTIFICATION] = Affector.RETURNS_DERIV; this.Type[MATHTYPE] = Affector.HH; this.Type[TERMTYPE] = Affector.CONVERSION; //??? } public void setParameterNumbers(int [] param_nums) { halfLifeParam = param_nums[0]; } public float getValue(Node which_node) { return -((Globals.characteristicTime / params[halfLifeParam]) * Nodes[0].getIntegrationValue(side)); } public float getNCValue(Node which_node) { return (-Globals.characteristicTime / params[halfLifeParam]); } }