Model

In DEPS, a design problem is represented by a set of DEPS models instances. So the fundamental feature of the DEPS language is the Model. Any model encapsulates in order: a set of arguments, a set of constants, a set of variables, a set of elements and a set of properties. Arguments can be either constants or elements identifiers. Elements are instances of other models.

Note

In the last version of DEPS language, collections of elements can also be passed as arguments of Models.

Syntax

A Model is defined according to the following syntax:

<Model> ::=
        Model <ModelName>( <listOfArguments> )  <ModelOptions>
        Constants       <listOfConstantDeclarationOrDefinition>
        Variables       <listOfVariablesDefinition>
        Elements        <ListOfElementsDeclarationOrDefinition>
        Properties      <ListOf Properties>
        End

With

<ModelOptions> ::=
               |
               abstract
               |
               extends  <ModelSignature>
               |
               abstract extends <ModelSignature>

Abstract model

A model can be qualified as abstract (optional keyword abstract). In this case it cannot be instantiated. An instance of a model is called an Element. Therefore, no instance of an abstract model can be displayed in the Elements area of a model.

Extended model

DEPS models can simply inherit from each other (keyword extends). This is public inheritance: arguments, constants, variables, elements and properties are thus directly inherited.

Examples

Model Dipole() abstract
Constants

Variables
V : Voltage;
I : Current;

Elements

Properties

End

Model Resistor() extends Dipole[]
Constants

Variables
R : Resistance;

Elements

Properties
V = R*I;
End