Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## biouml.plugins.simulation
Class SimulationEngine

    |
    +--biouml.plugins.simulation.SimulationEngine

Direct Known Subclasses:
  MatlabSimulationEngine, JavaSimulationEngine

public abstract class SimulationEngine
extends Option

General class for simulation engine. It defines common contract (properties and methods) for any simulation engine.

Inner Class Summary
`public static class` | SimulationEngine.VariableType

Field Summary
`final static double` | `DEFAULT_ABSOLUTE_TOLERANCE`
`final static double` | `DEFAULT_RELATIVE_TOLERANCE`
`boolean` | `needToShowPlot`
`final static String` | `srcDir`

Method Summary
`void` | `clearContext()`
`boolean` | `containsDelays()` Returns true if the differential equations contain delays when derivatives computing.
`void` | `error(String message)`
`void` | `error(String messageBundleKey, String[] params)`
`void` | `error(String messageBundleKey, String[] params, Throwable t)`
`void` | `fillSimulationResult(SimulationResult result)`
`abstract File[]` | `generateModel()`
`abstract String` | `generateVariableCodeName(int n)`
`double` | `getAbsTolerance()`
`double` | `getCompletionTime()`
`Diagram` | `getDiagram()`
`EModel` | `getExecutableModel()`
`abstract Formatter` | `getFormatter()` Returns formatter corresponding for given engine.
`double` | `getInitialTime()`
`boolean` | `getNeedToShowPlot()`
`String` | `getOutputDir()`
`String` | `getQualifiedName(String name, DiagramElement de)` Resolves brief varibale name to fully qualified variable name.
`double` | `getRelTolerance()`
`ResourceBundle` | `getResourceBundle()`
`String` | `getResourceString(String key)` Returns string from the resource bundle for the specified key.
`String` | `getSolverName()`
`double` | `getTimeIncrement()`
`String` | `normalize(String name)` Normalize name to be valid simulation script name.
`void` | `setAbsTolerance(double absTolerance)`
`void` | `setCompletionTime(double completionTime)`
`void` | `setDiagram(Diagram diagram)`
`void` | `setInitialTime(double initialTime)`
`void` | `setNeedToShowPlot(boolean value)`
`void` | `setOutputDir(String outputDir)`
`void` | `setRelTolerance(double relTolerance)`
`void` | `setSolverName(String solverName)`
`void` | `setTimeIncrement(double timeIncrement)`
`abstract String` | `simulate(File[] files)`
`void` | `warn(String messageBundleKey, String[] params)`
`void` | `writeAssignment(String variable, String expression, Role role)`
`abstract void` | `writeComment(String comment)`
`void` | `writeFile(String source, String outDir, String outFile, boolean rewrite)` Utility method to write needed source files from the specified source to the specified directory.

Field Detail

### DEFAULT_ABSOLUTE_TOLERANCE

    public final static double DEFAULT_ABSOLUTE_TOLERANCE

### DEFAULT_RELATIVE_TOLERANCE

    public final static double DEFAULT_RELATIVE_TOLERANCE

### needToShowPlot

    public boolean needToShowPlot

### srcDir

    public final static String srcDir

Method Detail

### clearContext

    public void clearContext()
                       throws java.lang.Exception

### containsDelays

    public boolean containsDelays()

  Returns true if the differential equations contain delays when derivatives computing.

### error

    public void error(String message)

### error

    public void error(String messageBundleKey, String[] params)

### error

    public void error(String messageBundleKey, String[] params, Throwable t)

### fillSimulationResult

    public void fillSimulationResult(SimulationResult result)
                               throws java.lang.Exception

### generateModel

    public abstract File[] generateModel()
                                   throws java.lang.Exception

### generateVariableCodeName

    public abstract String generateVariableCodeName(int n)

### getAbsTolerance

    public double getAbsTolerance()

### getCompletionTime

    public double getCompletionTime()

### getDiagram

    public Diagram getDiagram()

### getExecutableModel

    public EModel getExecutableModel()

### getFormatter

    public abstract Formatter getFormatter()

  Returns formatter corresponding for given engine.

### getInitialTime

    public double getInitialTime()

### getNeedToShowPlot

    public boolean getNeedToShowPlot()

### getOutputDir

    public String getOutputDir()

### getQualifiedName

    public String getQualifiedName(String name, DiagramElement de)

  Resolves brief varibale name to fully qualified variable name. Generates error if variable can not be resolved.
  See Also:
    biouml.model.dynamics.EModel.getQualifiedName(java.lang.String,biouml.model.DiagramElement)

### getRelTolerance

    public double getRelTolerance()

### getResourceBundle

    public ResourceBundle getResourceBundle()

### getResourceString

    public String getResourceString(String key)

  Returns string from the resource bundle for the specified key. If the sting is absent the key string is returned instead and the message is printed in `log4j.Category`.

### getSolverName

    public String getSolverName()

### getTimeIncrement

    public double getTimeIncrement()

### normalize

    public String normalize(String name)

  Normalize name to be valid simulation script name.

### setAbsTolerance

    public void setAbsTolerance(double absTolerance)

### setCompletionTime

    public void setCompletionTime(double completionTime)

### setDiagram

    public void setDiagram(Diagram diagram)

### setInitialTime

    public void setInitialTime(double initialTime)

### setNeedToShowPlot

    public void setNeedToShowPlot(boolean value)

### setOutputDir

    public void setOutputDir(String outputDir)

### setRelTolerance

    public void setRelTolerance(double relTolerance)

### setSolverName

    public void setSolverName(String solverName)

### setTimeIncrement

    public void setTimeIncrement(double timeIncrement)

### simulate

    public abstract String simulate(File[] files)
                              throws java.lang.Exception

### warn

    public void warn(String messageBundleKey, String[] params)

### writeAssignment

    public void writeAssignment(String variable, String expression, Role role)

### writeComment

    public abstract void writeComment(String comment)

### writeFile

    public void writeFile(String source, String outDir, String outFile, boolean rewrite)
                    throws java.lang.Exception

  Utility method to write needed source files from the specified source to the specified directory.

Association Links

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class org.apache.log4j.Category

to Class java.util.Map

  Stores list of equations for used diagram variable.

to Class java.util.List

  List of all equations.

to Class java.util.List

  List of all variables however used in model.

to Class java.util.Map

  maps "variable name" -> "scalar equation, calculating this variable"

to Class biouml.plugins.simulation.MathWriter

to Class biouml.model.Diagram

to Class biouml.model.dynamics.EModel

to Class java.lang.String

  Output directory where the code will be generated.

to Class java.lang.String

to Class java.util.ResourceBundle

  Resource bundle containing necessary String data. This resource bundle contains join of childResources with parentResources.

to Class java.util.ResourceBundle

  Resource bundle containing necessary String data.

to Class java.util.ResourceBundle

  Common description is located in biouml.plugins.simulation.resources.MessagesBundle. This bundle is used as parent bundle for resources.

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM