biouml.plugins.matlab
Class MatlabSimulationEngine

java.lang.Object
  extended bycom.beanexplorer.beans.Option
      extended bybiouml.plugins.simulation.SimulationEngine
          extended bybiouml.plugins.matlab.MatlabSimulationEngine

public class MatlabSimulationEngine
extends SimulationEngine


Nested Class Summary
 
Nested classes inherited from class biouml.plugins.simulation.SimulationEngine
SimulationEngine.VariableType
 
Field Summary
protected  double absTolerance
           
static int COMMENT_INDENT
           
static java.lang.String CURRENT_TIME
           
static java.lang.String DEFAULT_MATLAB_WORK_DIR
           
protected  java.util.Map filePositions
           
static java.lang.String MATLAB_PATH
           
static int MAX_MATLAB_ID_LEN
           
protected  boolean modelUsesStateTransition
           
protected  boolean optionAreSet
           
protected  double relTolerance
           
 
Fields inherited from class biouml.plugins.simulation.SimulationEngine
childResources, currentIndent, DEFAULT_ABSOLUTE_TOLERANCE, DEFAULT_RELATIVE_TOLERANCE, diagram, endl, equationList, equationMap, executableModel, hasConstVariables, log, macros, modelType, needToShowPlot, outputDir, parentResources, resources, solverName, srcDir, status, tab, tab2, tab3, tab4, usedVariableList, writer
 
Fields inherited from class com.beanexplorer.beans.Option
notificationEnabled, propagationEnabled
 
Constructor Summary
MatlabSimulationEngine()
           
 
Method Summary
 void clearContext()
           
 void closeMatlab()
           
 void fillSimulationResult(SimulationResult result)
           
protected  java.io.File[] generateDynamicModel()
           
 java.io.File[] generateModel()
           
protected  java.io.File[] generateStaticModel()
           
 java.lang.String generateVariableCodeName(int n)
           
 double getAbsTolerance()
           
 Formatter getFormatter()
          Returns formatter corresponding for given engine.
static java.lang.String getMainFunctionName(java.lang.String diagramName)
           
 double getRelTolerance()
           
 java.lang.String normalize(java.lang.String name)
          Normalize name to be valid simulation script name.
 void setAbsTolerance(double absTolerance)
           
 void setRelTolerance(double relTolerance)
           
 java.lang.String simulate(java.io.File[] files)
           
 void writeAssignmentImpl(java.lang.String variable, java.lang.String expression, Role role, boolean declare)
           
 void writeComment(java.lang.String comment)
           
protected  void writeDelayDeclaration()
           
protected  void writeInitialStateEntering()
           
protected  void writeTransition(State currentState, Transition transition)
           
protected  void writeVariables()
           
 
Methods inherited from class biouml.plugins.simulation.SimulationEngine
containsDelays, error, error, error, findVariable, getCompletionTime, getDiagram, getExecutableModel, getInitialTime, getNeedToShowPlot, getOutputDir, getQualifiedName, getResourceBundle, getResourceString, getScalarEquations, getSolverName, getTimeIncrement, init, initAlgebraic, initMath, initResources, isSignificantVariable, parseAssignments, parseEquation, processMath, processVarNode, setCompletionTime, setDiagram, setInitialTime, setNeedToShowPlot, setOutputDir, setSolverName, setTimeIncrement, warn, writeAssignment, writeFile, writeFunctionDeclarations, writeMath, writeRateEquation, writeRules, writeRulesImpl, writeScalarRule, writeSignificantRules
 
Methods inherited from class com.beanexplorer.beans.Option
addPropertyChangeListener, copyListenersTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getParent, isNotificationEnabled, isPropagationEnabled, removePropertyChangeListener, setNotificationEnabled, setParent, setPropagationEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MATLAB_WORK_DIR

public static final java.lang.String DEFAULT_MATLAB_WORK_DIR
See Also:
Constant Field Values

MATLAB_PATH

public static final java.lang.String MATLAB_PATH
See Also:
Constant Field Values

COMMENT_INDENT

public static final int COMMENT_INDENT
See Also:
Constant Field Values

CURRENT_TIME

public static final java.lang.String CURRENT_TIME
See Also:
Constant Field Values

filePositions

protected java.util.Map filePositions

absTolerance

protected double absTolerance

relTolerance

protected double relTolerance

optionAreSet

protected boolean optionAreSet

modelUsesStateTransition

protected boolean modelUsesStateTransition

MAX_MATLAB_ID_LEN

public static final int MAX_MATLAB_ID_LEN
See Also:
Constant Field Values
Constructor Detail

MatlabSimulationEngine

public MatlabSimulationEngine()
Method Detail

getFormatter

public Formatter getFormatter()
Description copied from class: SimulationEngine
Returns formatter corresponding for given engine.

Specified by:
getFormatter in class SimulationEngine

getAbsTolerance

public double getAbsTolerance()
Overrides:
getAbsTolerance in class SimulationEngine

setAbsTolerance

public void setAbsTolerance(double absTolerance)
Overrides:
setAbsTolerance in class SimulationEngine

getRelTolerance

public double getRelTolerance()
Overrides:
getRelTolerance in class SimulationEngine

setRelTolerance

public void setRelTolerance(double relTolerance)
Overrides:
setRelTolerance in class SimulationEngine

getMainFunctionName

public static java.lang.String getMainFunctionName(java.lang.String diagramName)

generateVariableCodeName

public java.lang.String generateVariableCodeName(int n)
Specified by:
generateVariableCodeName in class SimulationEngine

generateModel

public java.io.File[] generateModel()
                             throws java.lang.Exception
Specified by:
generateModel in class SimulationEngine
Throws:
java.lang.Exception

generateDynamicModel

protected java.io.File[] generateDynamicModel()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

generateStaticModel

protected java.io.File[] generateStaticModel()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

writeAssignmentImpl

public void writeAssignmentImpl(java.lang.String variable,
                                java.lang.String expression,
                                Role role,
                                boolean declare)
Overrides:
writeAssignmentImpl in class SimulationEngine

writeComment

public void writeComment(java.lang.String comment)
Specified by:
writeComment in class SimulationEngine

writeVariables

protected void writeVariables()
                       throws java.lang.Exception
Throws:
java.lang.Exception

writeInitialStateEntering

protected void writeInitialStateEntering()
Overrides:
writeInitialStateEntering in class SimulationEngine

writeTransition

protected void writeTransition(State currentState,
                               Transition transition)
Overrides:
writeTransition in class SimulationEngine

writeDelayDeclaration

protected void writeDelayDeclaration()

clearContext

public void clearContext()
                  throws java.lang.Exception
Overrides:
clearContext in class SimulationEngine
Throws:
java.lang.Exception

closeMatlab

public void closeMatlab()

simulate

public java.lang.String simulate(java.io.File[] files)
                          throws java.lang.Exception
Specified by:
simulate in class SimulationEngine
Throws:
java.lang.Exception

fillSimulationResult

public void fillSimulationResult(SimulationResult result)
                          throws java.lang.Exception
Overrides:
fillSimulationResult in class SimulationEngine
Throws:
java.lang.Exception

normalize

public java.lang.String normalize(java.lang.String name)
Description copied from class: SimulationEngine
Normalize name to be valid simulation script name.

Overrides:
normalize in class SimulationEngine


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.