Class AbstractCompartment
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.models.networks.components.AbstractNetworkComponent
mgui.neuro.components.AbstractNeuroComponent
mgui.neuro.components.AbstractNeuronalComponent
mgui.neuro.components.compartments.AbstractCompartment
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<DynamicModelComponent>
,AttributeListener
,AttributeObject
,InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
,DynamicModelComponent
,DynamicModelODEComponent
,TimeStepListener
,Updateable
,NeuronalComponent
,org.opensourcephysics.numerics.ODE
- Direct Known Subclasses:
SimpleCompartment
public abstract class AbstractCompartment extends AbstractNeuronalComponent implements DynamicModelODEComponent
Basic compartment for compartmental model components.
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description double
potential
org.opensourcephysics.numerics.ODESolver
solver
double[]
state
Fields inherited from class mgui.neuro.components.AbstractNeuronalComponent
parent
Fields inherited from class mgui.neuro.components.AbstractNeuroComponent
attributes, clock, connections, events, hasSubComponents, id, listeners, updated
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description AbstractCompartment()
-
Method Summary
Modifier and Type Method Description java.lang.Object
clone()
protected boolean
executeEvent(DynamicModelEvent e)
org.opensourcephysics.numerics.ODESolver
getODESolver()
abstract void
getRate(double[] state, double[] rate)
double[]
getState()
protected void
init()
abstract void
reset()
Reset the compartment's temporary variablesvoid
resetSolver()
void
timeElapsed(double time)
boolean
updateFromClock()
Methods inherited from class mgui.neuro.components.AbstractNeuronalComponent
getParent, setParent
Methods inherited from class mgui.neuro.components.AbstractNeuroComponent
addConnection, addEvent, addListener, addToEngine, attributeUpdated, compareTo, executeEvents, fireListeners, fireListeners, getAttribute, getAttributes, getConnections, getDelay, getID, getName, getSolver, getSubComponents, hasSubComponents, removeConnection, removeListener, resetClock, setAttribute, setAttributes, setDelay, setID, setID, setName, setODESolver, setSolver, setSolver, updateComponent
Methods inherited from class mgui.models.networks.components.AbstractNetworkComponent
getAttributeValue
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getTreeLabel, isDestroyed, issueTreeNode, setTreeNode, updateTreeNodes
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mgui.interfaces.util.CleanableObject
clean
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface mgui.models.dynamic.DynamicModelComponent
addConnection, addEvent, addToEngine, executeEvents, getID, getSubComponents, hasSubComponents, removeConnection, setID, setID
Methods inherited from interface mgui.interfaces.InterfaceObject
destroy, isDestroyed
Methods inherited from interface mgui.interfaces.NamedObject
getName, setName
Methods inherited from interface mgui.interfaces.trees.TreeObject
getTreeLabel, issueTreeNode, setTreeNode
-
Field Details
-
potential
public double potential -
state
public double[] state -
solver
public org.opensourcephysics.numerics.ODESolver solver
-
-
Constructor Details
-
AbstractCompartment
public AbstractCompartment()
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classAbstractNeuroComponent
-
executeEvent
- Overrides:
executeEvent
in classAbstractNeuroComponent
- Throws:
NeuroException
-
timeElapsed
public void timeElapsed(double time)- Specified by:
timeElapsed
in interfaceTimeStepListener
- Overrides:
timeElapsed
in classAbstractNeuroComponent
-
updateFromClock
public boolean updateFromClock()- Overrides:
updateFromClock
in classAbstractNeuroComponent
-
clone
public java.lang.Object clone()- Specified by:
clone
in interfaceDynamicModelComponent
- Specified by:
clone
in classAbstractNeuronalComponent
-
resetSolver
- Throws:
ODEException
-
reset
public abstract void reset()Reset the compartment's temporary variables- Specified by:
reset
in interfaceDynamicModelComponent
- Overrides:
reset
in classAbstractNeuroComponent
-
getODESolver
public org.opensourcephysics.numerics.ODESolver getODESolver()- Overrides:
getODESolver
in classAbstractNeuroComponent
-
getRate
public abstract void getRate(double[] state, double[] rate)- Specified by:
getRate
in interfaceorg.opensourcephysics.numerics.ODE
- Overrides:
getRate
in classAbstractNeuroComponent
-
getState
public double[] getState()- Specified by:
getState
in interfaceorg.opensourcephysics.numerics.ODE
-