package affectors; import main.Node; import main.Cell; import main.Globals; /** This is one half of a pair of Affectors that moves things from one cell to neighboring cells. That is, this is a rough means to have diffusive transport directly from cytoplasm to cytoplasm (e.g. in a syncytium where the "cells" represent unit volumes of cytoplasm rather than real cells. The transfer rate should be the same in both the XferOutAff and XferInAff. Note that all interfaces between adjacent cells are assumed to have the same area and permeability.

Formula
dNODEX/dt = Number of cell faces * Xfer_NODEX * NODEX

Parameters
Target [NODEX] The Node undergoing difusion.
Transfer rate [Mxfer_NODEX] The rate at which the Node transfers across the each boundary.

Usage
&NODEX

&XferOutAff NODEX Xfer_NODEX &XferInAff NODEX Xfer_NODEX
&endNODEX/code> */ public class XferOutAff extends Affector { /** "Diffusion" rate. */ int xferRateParam; static final String desc = "Cell-to-cell transfer bypassing membrane; version Out for efflux"; static final String [] nodeDescriptions = {"Target"}; static final String [] paramDescriptions = {"Rate of transfer"}; static final int [] whichSides = { -1 }; public XferOutAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); 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) { xferRateParam = param_nums[0]; } public float getValue(Node which_node) { return -Globals.characteristicTime * Globals.cellNumSides * params[xferRateParam] * Nodes[0].getIntegrationValue(); } public float getNCValue(Node which_node) { return -Globals.characteristicTime * Globals.cellNumSides * params[xferRateParam]; } }