public abstract class AbstractSequentialNetworkCalculation<T>
extends java.lang.Object
Constructor and Description |
---|
AbstractSequentialNetworkCalculation(GroupController groupController)
Instantiates a new abstract sequential network calculation.
|
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> |
createNodeStateHashMap()
Creates a new node state hash map.
|
void |
doSequentialNetworkCalculation()
Does the actual network calculation with the specified in-node states of the initial
CalculationStepNode . |
CalculationGraph<T> |
getCalculationGraphForGroupNodeVector(java.util.Vector<javax.swing.tree.DefaultMutableTreeNode> groupNodeVector)
Allows to add a vector of nodes from the
GroupTreeModel that represents a simple sequential arrangement of systems
instances (e.g. for a mesh of systems). |
GroupController |
getGroupController()
Returns the current GroupController.
|
AbstractGroupEvaluationStrategy |
getGroupEvaluationStrategy()
Gets the group evaluation strategy.
|
AbstractGroupTreeAction |
getGroupTreeAction()
Returns the current group tree action.
|
abstract T |
getNewInstanceOfIntermediateDataModel()
Has to return a new instance of intermediate data model to use.
|
java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> |
getNewNodeStateHashMap(javax.swing.tree.DefaultMutableTreeNode[] omcArray)
Return a new node state hash map for the specified identifier.
|
java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> |
getNewNodeStateHashMap(java.util.Vector<javax.swing.tree.DefaultMutableTreeNode> groupNodeVector)
Return a new node state hash map for the specified identifier.
|
java.util.Vector<CalculationStepNode<T>> |
getNextCalculationStepNodes(CalculationGraph<T> calcGraph,
CalculationStepNode<T> currCalcNode)
Returns the next calculation step nodes or null, if no subsequent nodes are available.
|
abstract java.util.Vector<CalculationGraph<T>> |
getVectorOfCalculationGraphs()
Has to return the calculation graph that describes the order of the sequential network calculation steps.
|
abstract boolean |
isConsiderGroupTreeNodesOutsideSequentialNetworkCalculation()
Has to return if group tree nodes that are not used in the local vector of
CalculationGraph and
thus are not visited during the sequential network calculation have to consider too. |
boolean |
isDebugMode()
Checks if is debugMode.
|
protected void |
onFinishedCalculationGraphSequence(CalculationGraph<T> calcGraph,
java.util.Vector<CalculationStepNode<T>> finalCalculationStepNodes)
This method will be invoked after the execution of the calculations that are defined with a single
CalculationGraph . |
protected void |
onFinishedSequentialNetworkCalculation()
This method will be invoked after the execution of a sequential network calculation.
|
protected boolean |
requiresFurtherCalculationGraphSequence(CalculationGraph<T> calcGraph)
Should return true, if the specified
CalculationGraph requires another calculation sequence. |
void |
setDebugMode(boolean isDebug)
Sets that execution of the sequence should be debuged.
|
void |
setGroupEvaluationStrategy(AbstractGroupEvaluationStrategy groupEvaluationStrategy)
Sets the group evaluation strategy.
|
void |
setGroupTreeAction(AbstractGroupTreeAction groupTreeAction)
Sets the current group tree action.
|
public AbstractSequentialNetworkCalculation(GroupController groupController)
groupController
- the group controllerpublic void setDebugMode(boolean isDebug)
isDebug
- the new debug modepublic boolean isDebugMode()
public GroupController getGroupController()
public void setGroupTreeAction(AbstractGroupTreeAction groupTreeAction)
groupTreeAction
- the new group tree actionpublic AbstractGroupTreeAction getGroupTreeAction()
public void setGroupEvaluationStrategy(AbstractGroupEvaluationStrategy groupEvaluationStrategy)
groupEvaluationStrategy
- the new group evaluation strategypublic AbstractGroupEvaluationStrategy getGroupEvaluationStrategy()
public void doSequentialNetworkCalculation()
CalculationStepNode
.CalculationGraph
defined in this
extended AbstractSequentialNetworkCalculation
.protected void onFinishedCalculationGraphSequence(CalculationGraph<T> calcGraph, java.util.Vector<CalculationStepNode<T>> finalCalculationStepNodes)
CalculationGraph
.
Override this method in case that you need the information of the final CalculationStepNodescalcGraph
- the actual CalculationGraph
and its corresponding CalculationStepNode
's that were executedfinalCalculationStepNodes
- the final calculation step nodes of the calculation sequenceprotected boolean requiresFurtherCalculationGraphSequence(CalculationGraph<T> calcGraph)
CalculationGraph
requires another calculation sequence.
Override this method in case that you need to control single calculation sequences.calcGraph
- the actual CalculationGraph
and its corresponding CalculationStepNode
's that were executedprotected void onFinishedSequentialNetworkCalculation()
doSequentialNetworkCalculation()
.public java.util.Vector<CalculationStepNode<T>> getNextCalculationStepNodes(CalculationGraph<T> calcGraph, CalculationStepNode<T> currCalcNode)
calcGraph
- the CalculationGraph
currCalcNode
- the CalculationStepNode
from which search has to be executedpublic abstract T getNewInstanceOfIntermediateDataModel()
public CalculationGraph<T> getCalculationGraphForGroupNodeVector(java.util.Vector<javax.swing.tree.DefaultMutableTreeNode> groupNodeVector)
GroupTreeModel
that represents a simple sequential arrangement of systems
instances (e.g. for a mesh of systems).groupNodeVector
- the group node vectorpublic java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> createNodeStateHashMap()
public java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> getNewNodeStateHashMap(java.util.Vector<javax.swing.tree.DefaultMutableTreeNode> groupNodeVector)
groupNodeVector
- the vector of group tree nodes from the GroupTreeModel
public java.util.HashMap<javax.swing.tree.DefaultMutableTreeNode,T> getNewNodeStateHashMap(javax.swing.tree.DefaultMutableTreeNode[] omcArray)
omcArray
- the array of group tree nodes from the GroupTreeModel
public abstract java.util.Vector<CalculationGraph<T>> getVectorOfCalculationGraphs()
public abstract boolean isConsiderGroupTreeNodesOutsideSequentialNetworkCalculation()
CalculationGraph
and
thus are not visited during the sequential network calculation have to consider too.