Definition and Usage
____________________
-A conditional group appears (or not) depending on evaluation of a python condition (often parameter == value). This python condition is dynamically evaluated.
-Otherwise, conditional group has the same syntax as non-conditional group.
+| In a user dataset, a conditional group appears (or not) depending on the evaluation of a python condition (often parameter == value). This python condition is dynamically evaluated.
+| Conditional group has the same syntax as non-conditional group.
Syntax
______
Syntax is :
::
- myConditionalGroup = BLOC ( ( condition= " python statement",
+ myConditionalGroup = BLOC( condition= " python statement",
... #included keywords or others fact/bloc
)
# else step_to_be_printed (list) is required.
-Remember this is as python code. All "keywords" are arguments and in python, arguments are separated by comma "," and inside of parenthesis. note also that conditions are statement but also python string. use single quotes inside double quotes if needed.
+Remember this is as python code. All "keywords" are arguments and in python, arguments are separated by comma "," and must be inside parenthesis. Note that conditions are statement but also python string. Use single quotes inside double quotes if needed.
Cardinality
~~~~~~~~~~~
- - BLOC appears depanding on the evaluation of the conditional statement. it has no mandatory or optional status
- - BLOC cannot be repeat. but FACT or SIMP included can
+ - BLOC appears depending on the evaluation of the conditional statement. it has no mandatory or optional status
+ - BLOC cannot be repeat but included FACT or SIMP can
- if keywords inside the BLOC have a status. this status is applied within the BLOC
::
wind_speed = SIMP(statut='o', typ = 'R'),
Definition and Usage
____________________
-|A group is a collection of elements, which together have a meaning for end-users. These elements can be keywords or other groups.
-|A group has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact).
+| A group is a collection of elements. Grouping these elements has significance from the point of view of business data modeling These elements are keywords or other groups.
+| A group has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact).
Syntax
______
)
"myGroup" is a python label. A group can not have the same name as its brothers.
-It contains simple elements or groups.(No limit is defined for the recursivity height)
-Source code :
+It contains simple elements or groups. There is no recursivity depth limit.
::
- job_properties = FACT(statut='o',
- job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0),
- stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ job_properties = FACT(statut='o',
+ job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0),
+ stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','sometimes']),
- close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
),
Definition of FACT including others groups :
::
ThresholdExceedence = FACT (
Event = FACT (
- Threshold = SIMP ( typ = "R", ang = "Failure threshold",),
+ Threshold = SIMP ( typ = "R", ang = "Failure threshold",),
ComparisonOperator = SIMP ( typ = "TXM", into = ( "Less", "LessOrEqual", "Equal", "GreaterOrEqual", "Greater" ),),
),
Method = SIMP ( typ = "TXM", into = ( "Simulation", "FORM_SORM" ), ang = "Method",),
If min=max=1 (default), the FACT appears only once in a valid dataset. If max > 1, the group of parameters can appear more than once. min/max specifies the minimum/maximum number of repetitions. "**" means there is no upper limit for the maximal cardinality.
::
species_parameters = FACT(statut='o', max="**",
- species_name=SIMP(statut='o',typ='TXM'),
- species_mass=SIMP(statut='o',typ='R',defaut=1.0),
- species_is_frozen = SIMP(statut='f', typ=bool,),
+ species_name = SIMP(statut='o',typ='TXM'),
+ species_mass = SIMP(statut='o',typ='R',defaut=1.0),
+ species_is_frozen = SIMP(statut='f',typ=bool,),
)
-Note that a group can be mandatory or optional. It has optional and mandatory elements, independantly of its status. In the previous example, species_parameters has to be defined at least one time (in a valid dataset). Inside this group, species_is_frozen is not mandatory. For each instance of species_parameters, species_is_frozen may or may not appear
+Note that a group status can be mandatory or optional. The group contents optional and mandatory elements, independantly of its status. In the previous example, species_parameters has to be defined at least one time (in a valid dataset). Inside this group, species_is_frozen is not mandatory. For each instance of species_parameters, species_is_frozen may or may not appear.
Other useful attributes
~~~~~~~~~~~~~~~~~~~~~~~
First Notions of Catalogs
==========================
-Catalogs are a simple way to express data model. It organizes elements and specifies some relationship to one another.
-it could be seen as a hierarchical model ordered in a tree structure.
+Catalogs are a simple way to express a data model.
+It organizes the elements and specifies relationships between them.
+this could be seen as a hierarchical model ordered in a tree.
Catalogs have a python syntax :ref:`python-label`
Apart of the root node, catalogs contains three natures of items :
- - terminal leaves or "Simple Keyword"
+ - terminal leaves or Keyword
- group of elements :
- inside elements are leaves or others groups.
- - grouping these items has a meaning from the business data modelisation point of view.
- - a set can be conditional : it is needed only if an other parameter has a specfic value. (ie wind_direction is needed only if wind_speed is not nul)
- - commands : PROC (short for procedure) or OPER (short for operator).
- - they are the second level of the hierachical tree (after root node).
+ - grouping these elements has significance from the point of view of business data modeling.
+ - a set of elements can be conditional : it becomes necessary only if another parameter has a specfic value. (ie wind_direction is needed only if wind_speed is not nul)
+ - commands : PROC (shortcut for procedure) or OPER (shortcut for operator).
+ - they constitute the second level of the hierachical tree (after root node).
- both "proc" and "oper" contain other elements (group or leaves).
- an OPER returns an object (which has to be named and typed), unlike PROC which returns nothing.
Welcome to VIMMP's documentation!
==================================
-This documentation covers the usage of VIMMP as data setting tool.
-This is intended for developers who want to write a datamodel and not for end-users.
+This documentation explain how in VIMMP you can create a data model and how you can use it for setting datas.
+
+This is a developer documentation for writing datamodels, this not an end-users documentation.
Contents:
Definition and Usage
____________________
-A keyword defines an input parameter. it specifies the information and some of the constraints about the value of this parameter.
-It has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact).
+A model keyword specifies an input parameter. It specifies the information (ie name, type) and some of the constraints on the value of the parameter.
+A model keyword has a parent : It is located in a command (in a proc or oper at the second level of the tree) or inside a group (bloc or fact).
Syntax
______
| Attribute "typ" defines the keyword type (in this case, float)
| "myKeyword" is the keyword name. it is a python label. A keyword can not have the same name as its brothers.
-| Attribute typ is mandatory. Other attributes (see below) have default value and are optional.
+| Attribute typ is mandatory. Other SIMP attributes (see below) have default value and are optional.
-Types
-~~~~~~
+Typ
+~~~
The attribute typ can take several values :
Examples :
::
- number_of_species = SIMP( typ='I'),
- YoungModulus = SIMP( typ='R'),
- electrostatics_is_on = SIMP('o', typ=bool, )
+ number_of_species = SIMP( typ='I' ),
+ YoungModulus = SIMP( typ='R' ),
+ electrostatics_is_on = SIMP( typ=bool, ),
-
-
- Valid values for number_of_species : 1, -6, 128
- Valid values for YoungModulus : 1, 110.3, -6., 14.5×10−3
- Valid values for electrostatics_is_on : True, False , 0, 1
+ Valid values for number_of_species : 1, -6, 128
+ Valid values for YoungModulus : 1, 110.3, -6., 14.5×10−3
+ Valid values for electrostatics_is_on : True, False , 0, 1
- A tuple of N elements (Tuple(3)).
def info(self):
return "Tuple of %s elements" % self.ntuple
- * Then, inside each tuple, each element has a specified type.
+ * Then, inside each tuple, each model element has a specified type.
::
- pair_identification= SIMP(statut ='o', typ=Tuple(2),validators=VerifTypeTuple(('TXM','TXM')),),
- simulation_box_sizes= SIMP(statut ='o', typ=Tuple(3),validators=VerifTypeTuple(('R','R','R')),
- length= SIMP(statut ='o', typ=Tuple(2),validators=VerifTypeTuple(('R','TXM')),),
+ pair_identification = SIMP(statut ='o', typ=Tuple(2), validators=VerifTypeTuple(('TXM','TXM' )),),
+ simulation_box_sizes = SIMP(statut ='o', typ=Tuple(3), validators=VerifTypeTuple(('R' ,'R', 'R')),),
+ length = SIMP(statut ='o', typ=Tuple(2), validators=VerifTypeTuple(('R' ,'TXM' )),),
means that pair_identification is a tuple of two strings, simulation_box_sizes a tuple of three floats and lenght a tuple which first parameter is a float and second a string.
::
- Valid values for pair_identification : ('A', 'A'), ('A','B')
+ Valid values for pair_identification : ('A', 'A'), ('A','B')
Valid values for simulation_box_sizes : (1,1.,0), (2.,-2.5, 10+3)
- Valid values for length : (1,'m'), (2., 'cm') but also (-500, 'Fahr') or (32, 'fareneit')
+ Valid values for length : (1,'m'), (2., 'cm') but also (-500, 'Fahr') or (32, 'fareneit')
Note that a tuple element is not seen as a list but as ONE element. (it is possible to define list of tuple)
|
- - Or type previously defined in the catalog (for example a mesh)
+ - Or previously user defined type in the catalog (a mesh for example)
A user-defined class inherits from the class ASSD
::
myMesh=SIMP(typ = 'mesh')
In this case, myMesh is a keyword waiting a mesh instance. this instance has to be created with an OPER command.
- (see XXX)
+ (todo label)
Cardinality
~~~~~~~~~~~
It is possible to constrain the number of instances (cardinality) of a keyword. The cardinality is specified using the min and max attributes.
-If min=max=1 (default), the keyword has a single value. if max > 1, parameter is a list. min/max specify the minimum/maximum number of occurence in the list. 'max= "**"' sets no upper limit for the maximal cardinality.
+If min=max=1 (default), the keyword has a single value. if max > 1, parameter is a list. min/max specify the minimum/maximum number of occurences in the list. 'max= "**"' sets no upper limit for the maximal cardinality.
::
- scalar=SIMP(typ = 'R')
- list_of_scalars=SIMP(typ = 'R',max="**")
- list_of_3_to_5_scalars=SIMP(typ = 'R',max=5, min=3)
+ scalar = SIMP(typ = 'R')
+ list_of_scalars = SIMP(typ = 'R',max="**")
+ list_of_3_to_5_scalars= SIMP(typ = 'R',max=5, min=3)
- Valid values for scalar : 1., 2.,
- Valid values for list_of_scalars: (1.,1.,0), (2.,5., 7.,8,.,... 999.), (1.,)
+ Valid values for scalar : 1., 2.,
+ Valid values for list_of_scalars : (1.,1.,0), (2.,5., 7.,8,.,... 999.), (1.,)
Valid values for list_of_3_to_5_scalars : (1.,1.,1), (1.,1.,1.,1.),(1.,1.,1.)
Note that a list can be mandatory or optional.
+=============+=================================================+===========+
| statut |status 'o' if mandatory and 'f' if not | f |
+-------------+-------------------------------------------------+-----------+
- |into |finite set of value | |
+ |into |finite set of value | None |
+-------------+-------------------------------------------------+-----------+
|val_min |minimal value |float(-inf)|
+-------------+-------------------------------------------------+-----------+
|val_max |maximal value |float(inf) |
+-------------+-------------------------------------------------+-----------+
- |ang |short documentation | |
+ |ang |short documentation | None |
+-------------+-------------------------------------------------+-----------+
- |defaut |default value | |
+ |defaut |default value | None |
+-------------+-------------------------------------------------+-----------+
And some examples :
::
print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','10 steps'])
- close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
- number_of_steps= SIMP(statut='f', typ='I', defaut=100,val_min=0, val_max=1000)
+ close_time = SIMP(statut='f', typ='R' , defaut=1000, val_min=0),
+ number_of_steps = SIMP(statut='f', typ='I' , defaut=100 , val_min=0, val_max=1000)
Valid values for print_frequency : 'every','never','10 steps' and no others
- Valid values for close_time : positive float (not nul)
+ Valid values for close_time : positive float (not nul)
Valid values for number_of_steps : integer between 1 and 999
-VIMMP dataModel
-==============
+VIMMP DataModel
+===============
Definition and Usage
____________________
-Vimmp data model is designed in order to help code developers :
- * It generates automatically drivers for input parameters
- * it allows users to write a parameter file for a code. It handles with syntax and semantic and insures integrity of the file.
- * it provides an help to define calculation scheme
+The VIMMP data model is designed to help code developers:
+ * Automatically generate XML drivers for input / output parameters
+ * Allow users to write a specific code parameter file in xml or python format. It deals with syntax and semantics issues ensuring the integrity of the file.
+ * Provide help to define the calculation scheme
+
+The generated python input parameter files can also be seen as a way to supervise a set of computational steps (commands) with their arguments.
+The available commands are defined by the data model (also called catalog).
+Building a new user data set that conforms to a data model consists of choosing the desired commands from the available commands.
+Each selected command has its specific parameters that the user must define. Some are required, some require multiple occurrences, others require the user to name the returned concept.
-Input parameter files could also be seen as a way to write a set of calculation steps (commands) with their arguments.
-Building dataset consists of adding new 'commands', entering parameter values and if necessary naming return concepts.
General Behaviour
_________________
-In order to benefit of these features, data model has to be represented as :
- - XSD (XML Schema Definition) respecting XXX ( eric que met-on ici ? il y a des restrictions si on veut automatiser la creation du noeud YACS ?)
- - Eficas Catalog
-
-
-Eficas transforms Catalog into XSD.
+Xml driver generation requires an XML schema definition describing the data model.
+You may be writing your data model in XSD, but it will be painful and time consuming.
+In addition, there are several ways to describe the same model in XSD.
+Eficas tool is useful to describe quickly your data model in a catalog and will provides you an .xsd mapping involving easy to use generated drivers.
+Eficas manages dynamic validation rules and also provides a graphical (model-compliant) interface for creating valid sets of documents / user data.
-common data Model
+Common Data Model
_________________
-adding specifics data
-_________________
+The set of VIMMP usecases are converted into executable workflows managed by an orchestrator as YACS module of the SALOME project.
+These workflows manipulate parameters to launch the different codes.
+Some parameters are common to multiple workflows and define the VIMMP common data model for launching the workflows.
-Outputs
-_________________
+Specific Data Model
+___________________
+
+Some parameters are specific to a workflow/a code and is useless to the others.
+However they are needed to launch the workflow then you will have to define the VIMMP specific data model for being able to launch the workflows.
- - drivers
- - un schema de noeud yacs ?
- - ihm
-