package affectors; import main.Node; import main.Globals; /** We call our basic upside-down sigmoid function "Psi". We often use this function to do inhibition. Psi is just 1 minus our Phi function. If the input node is membrane-bound and this affector is being used to calculate derivative of a membrane-bound node, then this affector will only use concentration of the inhibitor on the appropriate side. Otherwise it will add up inhibitor across the whole cell. Often you will use this inside of a ProductAff to multiply some other term by an inhibitory term.

Formula
dnodex/dt = 1 - (NODEY ^ nu) / (K ^ nu + NODEY ^ nu)

Parameters
Affecting Node [NODEY] Usually an inhibitor node.
Half-maximal inhibition level [K_NODEYnodex] The concentration of inhibitor at which transcription is reduced by half.
Cooperativity [nu_NODEYnodex] The non-linearity of the inhibiting function. The higher the value, the sharper the curves in the S-shaped inhibition function.

Usage
&nodex

&PsiAff NODEY K_NODEYnodex nu_NODEYnodex
&endProductAff &endnodex/code> */ public class PsiAff extends Affector { /** The half-maximal coefficient. */ int kParam; /** The "cooperativity" exponent. */ int nuParam; static final String desc = "Sigmoid turn-off formula"; static final String [] nodeDescriptions = {"Inhibitor"}; static final String [] paramDescriptions = {"Kappa: half-maximal coefficient", "nu: cooperativity"}; public PsiAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); this.Type[GUI_CAPABLE] = 1; this.Type[CERTIFICATION] = Affector.RETURNS_DERIV; } public void setParameterNumbers(int [] param_nums) { kParam = param_nums[0]; nuParam = param_nums[1]; } public float getValue(Node which_node) { return (Globals.characteristicTime * Psi(Nodes[0].getIntegrationValue(side),params[kParam],params[nuParam])); } }