User:Jcreer/SMS:DMI File Definitions Elements: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOINDEX__
{{TOCright}}
==Elements==
=====Element ''<card>''=====
=====Element ''<card>''=====
{|class="wikitable"
{|class="wikitable"
Line 50: Line 53:
|}
|}


=====Element ''<export_format>''=====
=====Element ''<end_card>''=====
{|class="wikitable"
{|class="wikitable"
|-
|-
|width="70"|'''Info'''
|width="70"|'''Info'''
|width="530"| Placed inside the [[SMS:Dynamic Model Interface Schema#Element <card>|<card>]] to determine how the card format will be displayed when exporting to a text file. Uses the standard printf and sprintf format (www.cplusplus.com/reference/clibrary/cstdio/printf/).  “#card_name” should be used when displaying the card.  When using an element that starts with “custom_control”, a user can use the # character to get to the value or units.
|width="530"|Defines that the card end with a single iteration of the enclosing <process_each_XXX>
|-
|'''Versions'''
|1
|-
|'''Attributes'''
|none
|-
|'''Children'''
|none
|-
|'''Used by'''
|anything starting with process_each
|-
|'''Example'''
|
|}
 
=====Element ''<files>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"|
|-
|'''Versions'''
| 2
|-
|'''Attributes'''
|
|-
|'''Children'''
|width="530"| file_def
|-
|'''Used by'''
| width="530"| model_control_executable
|-
|'''Example'''
|width="530"|
|}
 
=====Element ''<input_file>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| Defines a file to be used for input for an executable. 
|-
|'''Versions'''
| 2
|-
|'''Attributes'''
|none
|-
|'''Children'''
|width="530"| file_ref, [[SMS:Dynamic Model Interface Schema#Element <export_location>|export_location]], [[SMS:Dynamic Model Interface Schema#Element <execute>|execute]], [[SMS:Dynamic Model Interface Schema#Element <command_args>|command_args]], [[SMS:Dynamic Model Interface Schema#Element <process_each_row>|process_each_row]], [[SMS:Dynamic Model Interface Schema#Element <process_each_coverage>|process_each_coverage]], [[SMS:Dynamic Model Interface Schema#Element <process_each_material>|process_each_material]]
|-
|'''Used by'''
| width="530"| [[SMS:Dynamic Model Interface Schema#Element <executable>|executable]]
|-
|'''Example'''
|width="530"| See executable example.
|}
 
=====Element ''<input_files>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| A container to place all of the input files into for a simulation.  
|-
|'''Versions'''
| 3
|-
|'''Attributes'''
|none
|-
|'''Children'''
|width="530"| input_file
|-
|'''Used by'''
| width="530"| simulation
|-
|'''Example'''
|width="530"|
|}
 
=====Element ''<output_file>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| Defines a file to be created by the executable.  
|-
|-
|'''Versions'''
|'''Versions'''
Line 60: Line 151:
|-
|-
|'''Attributes'''
|'''Attributes'''
|ignore_on_read
|none
|-
|-
|'''Children'''
|'''Children'''
|width="530"| none
|width="530"| file_ref, [[SMS:Dynamic Model Interface Schema#Element <export_location>|export_location]], [[SMS:Dynamic Model Interface Schema#Element <execute>|execute]], export_table, export_each_coverage, export_each_material
|-
|'''Used by'''
| width="530"| [[SMS:Dynamic Model Interface Schema#Element <executable>|executable]]
|-
|'''Example '''
|width="530"|See executable example.
|}
 
=====Element ''<output_files>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| A container to place all of the output files into for a simulation. 
|-
|'''Versions'''
| 3
|-
|'''Attributes'''
|none
|-
|'''Children'''
|width="530"| output_file
|-
|-
|'''Used by'''
|'''Used by'''
|width="530"| [[SMS:Dynamic Model Interface Schema#Element <card>|card]]
| width="530"| simulation
|-
|'''Example '''
|width="530"|See executable example.
|}
 
=====Element ''<section>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| Defines a section of a file that may be in a different, but compatible, file format. 
|-
|'''Versions'''
| 3
|-
|-
|'''Example 1'''
|'''Attributes'''
|width="530"|
|file_type
<edit_box>
 
  <unique_name>MyEditBox</unique_name>
ignore_on_read
</edit_box>
 
file_ref
<card>
 
    <card_name>FIFTH_GRAIN</card_name>
file_type
    <export_format>”%s %lf\n", #card_name, MyEditBox</export_format>
|-
</card>
|'''Children'''
|width="530"| card, use_file_def
|-
|-
|'''Example 2'''
|'''Used by'''
|width="530"|  
| width="530"| card, anything beginning with “process_each”
If the edit_box has the value of 15, this would print out:
FIFTH_GRAIN 15
|-
|-
|'''Example 3'''
|'''Example '''
|width="530"|
|width="530"|
If export_format was changed to this:
|}
<export_format>”%s \”%lf\” // comment\n", #card_name, MyEditBox
 
</export_format>
=====Element ''<separator>''=====
{|class="wikitable"
FIFTH_GRAIN “15” // comment
|-
|width="70"|'''Info'''
|width="530"| Determines how to separate text that is being exported into a text file. 
|-
|'''Versions'''
| 1, 2
|-
|'''Attributes'''
|none
|-
|'''Children'''
|width="530"| none
|-
|'''Used by'''
| width="530"| export_each_row
|-
|'''Example '''
|width="530"|See <export_table>
|}
 
==Attributes==
=====Attribute @ ''<file_type>''=====
{|class="wikitable"
|-
|-
|'''Example 4'''
|width="70"|'''Info'''
|width="530"|
|width="530"|
<control_length>
Specifies a file type of <declare_file_def> defines the file type.
  <unique_name>MyLength</unique_name>
  ...
</control_length>
<card>
    <card_name>ADAPTATION_LENGTH_TOTAL</card_name>
    <export_format>”%s %lf, %s\n", #card_name, MyLength#value,
                              MyLength#units</export_format>
</card>
ADAPTATION_LENGTH_TOTAL 25 cm


|-
|'''Values'''
|“CARD_ASCII”, “SEQUENTIAL_ASCII”, “SEQUENTIAL_BINARY”, “XMDF”
|-
|'''Version'''
|2
|-
|'''Used by'''
|width="530"|declare_file_def, section
|}
|}
[[Category:Jcreer|DMI]]

Latest revision as of 16:13, 4 March 2019


Elements

Element <card>
Info Determines the card name and format when the item is exported. For more examples see <export_format>.
Versions 1, 2
Attributes none
Children card_name, export_format, export_location, dependency, anything beginning with “process_each_”, export_group, export_optional
Used by file_def
Example
<item>
   <text>Formulation</text>
   <card>
         <card_name>FORMULATION</card_name>
         <export_format>card "formulationUnits"</export_format>
   </card> 	
Element <card_name>
Info The name of the card which is used in the card file.
Versions 1, 2
Attributes none
Children none
Used by card
Example
Element <end_card>
Info Defines that the card end with a single iteration of the enclosing <process_each_XXX>
Versions 1
Attributes none
Children none
Used by anything starting with process_each
Example
Element <files>
Info
Versions 2
Attributes
Children file_def
Used by model_control_executable
Example
Element <input_file>
Info Defines a file to be used for input for an executable.
Versions 2
Attributes none
Children file_ref, export_location, execute, command_args, process_each_row, process_each_coverage, process_each_material
Used by executable
Example See executable example.
Element <input_files>
Info A container to place all of the input files into for a simulation.
Versions 3
Attributes none
Children input_file
Used by simulation
Example
Element <output_file>
Info Defines a file to be created by the executable.
Versions 1, 2
Attributes none
Children file_ref, export_location, execute, export_table, export_each_coverage, export_each_material
Used by executable
Example See executable example.
Element <output_files>
Info A container to place all of the output files into for a simulation.
Versions 3
Attributes none
Children output_file
Used by simulation
Example See executable example.
Element <section>
Info Defines a section of a file that may be in a different, but compatible, file format.
Versions 3
Attributes file_type

ignore_on_read

file_ref

file_type

Children card, use_file_def
Used by card, anything beginning with “process_each”
Example
Element <separator>
Info Determines how to separate text that is being exported into a text file.
Versions 1, 2
Attributes none
Children none
Used by export_each_row
Example See <export_table>

Attributes

Attribute @ <file_type>
Info

Specifies a file type of <declare_file_def> defines the file type.

Values “CARD_ASCII”, “SEQUENTIAL_ASCII”, “SEQUENTIAL_BINARY”, “XMDF”
Version 2
Used by declare_file_def, section