Template:VariableTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(179 intermediate revisions by 11 users not shown)
Line 10: Line 10:
|VariableType=
|VariableType=
|DriverGroup=
|DriverGroup=
|ExternalModelDriver=
|Source=
|Source=
|BasedOn
|Reference
|Source2=
|Source2=
|ExternalModel=
|BasedOn2=
|Reference2=
|Source3=
|Reference3=
}}
}}
</pre>
</pre>
Line 22: Line 26:
<tr><td class="PageWidthTableFirstCell">'''Label:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Label:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[HasLabel::{{{Label|}}}]]</td></tr>
{{{Label|}}}</td></tr>
}}
{{#ifeq:{{{ShortDescription|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Short description:'''</td>
<td class="PageWidthTableRemainderCell">
{{{ShortDescription|}}}</td></tr>
}}
}}
{{#ifeq:{{{Description|}}}|||
{{#ifeq:{{{Description|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Description:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Description:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[HasDescription::{{{Description|}}}]]</td></tr>
{{{Description|}}}</td></tr>
}}
}}
{{#ifeq:{{{Dimension|}}}|||
{{#ifeq:{{{Dimension|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Dimensions:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Dimensions:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{Dimension|}}}|,|x|[[HasDimension::x]]}}</td></tr>
{{{Dimension|}}}</td></tr>
}}
}}
{{#ifeq:{{{Unit|}}}|||
{{#ifeq:{{{Unit|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Default unit:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Default unit:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[HasDefaultUnit::{{{Unit|}}}]]</td></tr>
{{{Unit|}}}</td></tr>
}}
}}
{{#ifeq:{{{VariableType|}}}|||
{{#ifeq:{{{VariableType|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Variable type:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Variable type:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[HasVariableType::{{{VariableType|}}}]]</td></tr>
{{{VariableType|}}}</td></tr>
}}
}}
{{#ifeq:{{{DriverGroup|}}}|||
{{#ifeq:{{{DriverGroup|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Driver group:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Driver group:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[DriverGroup::{{{DriverGroup|}}}]]</td></tr>
{{{DriverGroup|}}}</td></tr>
}}
{{#ifeq:{{{Source|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{Source|}}}|;|x|[[HasSource::x]]}}</td></tr>
}}
{{#ifeq:{{{BasedOn|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Values based on:'''</td>
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{BasedOn|}}}|;|x|[[HasValuesBasedOn::x]]}}</td></tr>
}}
{{#ifeq:{{{Reference|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{Reference|}}}|;|x|[[HasReference::x]]}}</td></tr>
}}
}}
{{#ifeq:{{{Source2|}}}|||
{{#ifeq:{{{Source|}}}{{{Source2|}}}{{{Source3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{Source2|}}}|;|x|[[HasSource::x]]}}</td></tr>
{{{Source|}}}{{{Source2|}}}{{{Source3|}}}</td></tr>
}}
}}
{{#ifeq:{{{BasedOn2|}}}|||
{{#ifeq:{{{BasedOn|}}}{{{BasedOn2|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Values based on:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Values based on:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
[[HasValuesBasedOn::{{{BasedOn2|}}}]]</td></tr>
{{{BasedOn|}}}{{{BasedOn2|}}}</td></tr>
}}
}}
{{#ifeq:{{{Reference2|}}}|||
{{#ifeq:{{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{Reference2|}}}|;|x|[[HasReference::x]]}}</td></tr>
{{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}</td></tr>
}}
{{#ifeq:{{{ExternalModel|}}}|||
<tr><td class="PageWidthTableFirstCell">'''External model:'''</td>
<td class="PageWidthTableRemainderCell">
{{#arraymap:{{{ExternalModel|}}}|;|y|[[HasExternalModel::y]]|; }}</td></tr>
}}
}}
</table><br/>
</table><br/>
   
 
{{#ifeq:{{{VariableType|}}}
|driver
|Drivers are described in the {{#ask:[[Category:Component]][[FrameworkElementType::driver component]]|format=Plainlist}} component.
|}}
 
{{#ifexpr:{{PropertyTestTemplate
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasOutputVar
   |prop=HasOutputVar
   |page= {{PAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}}>0
   |reverse=1}}>0
   |''Variable is output of model component:''
   |''Variable is output of model component:''{{#ask:
{{#ask:[[Category:Variable]][[HasPageName::{{PAGENAME}}]][[-HasOutputVar::+]]  
[[{{PAGENAME}}]]  
  | mainLabel=Variable
  | mainLabel=Variable
  | ?-HasOutputVar = output
  | ?IsOutputOf = output
  | format=graph
  | format=graph
| graphname=outputvariable
  | graphcolor=yes
  | graphcolor=yes
  | graphlink=yes
  | graphlink=yes
Line 101: Line 96:
  | arrowdirection=TB
  | arrowdirection=TB
  | relation=parent
  | relation=parent
  | graphsize=1.5
  | graphsize==
  | limit=200
  | limit=2000
  }}
  }}
|}}<br clear="all"/>{{#ask:[[Category:Variable]]
|}}<br/>
{{#ifexpr:{{PropertyTestTemplate
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasInputVar
   |prop=HasInputVar
   |page= {{PAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}} >0
   |reverse=1}} >0
   |''Variable is input of model component(s):''
   |''Variable is input of model component(s):''{{#ask:
  [[{{PAGENAME}}]]
  | mainLabel=Variable
  | ?IsInputFor = input
  | format=graph
  | graphname=inputvariable
  | graphcolor=yes
  | graphlink=yes
  | graphlabel=yes
  | nodeshape=box
  | arrowdirection=TB
  | graphsize=9
  | limit=200
}}
|}}
|}}
{{#ifexpr:{{PropertyTestTemplate
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasParameter
   |prop=HasParameter
   |page= {{PAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}} > )
   |reverse=1}} > 0
   |''Parameter is input of model component(s):''
   |''External parameter is input of model component(s):''{{#ask:
|}}
  [[{{PAGENAME}}]]
[[Category:Variable]][[HasPageName::{{PAGENAME}}]][[-HasInputVar::+]] OR
  | mainLabel=Variable
[[Category:Variable]][[HasPageName::{{PAGENAME}}]][[-HasParameter::+]]
  | ?IsParameterOf = input parameter of
| mainLabel=Variable
  | format=graph
| ?-HasInputVar = input
  | graphname=inputparameter
| ?-HasParameter = input parameter of
  | graphcolor=yes
| format=graph
  | graphlink=yes
| graphcolor=yes
  | graphlabel=yes
| graphlink=yes
  | nodeshape=box
| graphlabel=yes
  | arrowdirection=TB
| nodeshape=box
  | graphsize=9
| arrowdirection=TB
  | limit=200
| graphsize=9
}}
| limit=200
|}}<br/>
}}<br clear="all"/>
<br clear="all"/>


* Click on a box to open the model component.
* Click on a box to open the model component.
[[Category:Variable]]
[[Category:Variable]]
 
<!-- property settings-->
[[HasPageName::{{PAGENAME}}| ]]
{{#set:HasLabel={{{Label|}}}
 
  |HasShortDescription={{{Description|}}}
</includeonly>
  |HasDescription={{{Description|}}}
  |HasDimension={{{Dimension|}}}|+sep=,
  |HasDefaultUnit={{{Unit|}}}
  |HasVariableType={{{VariableType|}}}
  |DriverGroup={{{DriverGroup|}}}
  |HasSource={{{Source|}}}{{{Source2|}}}{{{Source3|}}}|+sep=;
  |HasValuesBasedOn={{{BasedOn|}}}{{{BasedOn2|}}}|+sep=;
  |HasReference={{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}|+sep=;
}}
  {{#arraymap:
    {{#ask:[[HasInputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
    |;|xx
    |{{#set:IsInputFor=xx}}
    |}}
  {{#arraymap:
    {{#ask:[[HasOutputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
    |;|xx
    |{{#set:IsOutputOf=xx}}
    |}}
  {{#arraymap:
    {{#ask:[[HasParameter::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
    |;|xx
    |{{#set:IsParameterOf=xx}}
    |}}</includeonly>

Latest revision as of 16:19, 17 April 2024

This is the "VariableTemplate" template. It should be called in the following format:

{{VariableTemplate
|Label=
|Description=
|Dimension=
|Unit=
|VariableType=
|DriverGroup=
|Source=
|BasedOn
|Reference
|Source2=
|BasedOn2=
|Reference2=
|Source3=
|Reference3=
}}

Edit the page to see the template text.