Template:VariableTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(124 intermediate revisions by 10 users not shown)
Line 58: Line 58:
{{{DriverGroup|}}}</td></tr>
{{{DriverGroup|}}}</td></tr>
}}
}}
{{#ifeq:{{{Source|}}}|||
{{#ifeq:{{{Source|}}}{{{Source2|}}}{{{Source3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
{{{Source|}}}</td></tr>
{{{Source|}}}{{{Source2|}}}{{{Source3|}}}</td></tr>
}}
}}
{{#ifeq:{{{BasedOn|}}}|||
{{#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">
{{{BasedOn|}}}</td></tr>
{{{BasedOn|}}}{{{BasedOn2|}}}</td></tr>
}}
}}
{{#ifeq:{{{Reference|}}}|||
{{#ifeq:{{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<td class="PageWidthTableRemainderCell">
<td class="PageWidthTableRemainderCell">
{{{Reference|}}}</td></tr>
{{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}</td></tr>
}}
}}
{{#ifeq:{{{Source2|}}}|||
</table><br/>
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
 
<td class="PageWidthTableRemainderCell">
{{#ifeq:{{{VariableType|}}}
{{#arraymap:{{{Source2|}}}|;|x|[[HasSource::x]]}}</td></tr>
}}
{{#ifeq:{{{BasedOn2|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Values based on:'''</td>
<td class="PageWidthTableRemainderCell">
{{{BasedOn2|}}}</td></tr>
}}
{{#ifeq:{{{Reference2|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Reference:'''</td>
<td class="PageWidthTableRemainderCell">
{{{Reference2|}}}</td></tr>
}}
{{#ifeq:{{{Source3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<td class="PageWidthTableRemainderCell">
{{{Source3|}}}</td></tr>
}}
{{#ifeq:{{{Reference3|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Source:'''</td>
<td class="PageWidthTableRemainderCell">
{{{Reference3|}}}</td></tr>
}}
</table><br/>{{#ifeq:{{{VariableType|}}}
  |driver
  |driver
  |Drivers are described in the {{#ask:[[Category:Component]][[FrameworkElementType::driver component]]|format=list}} component.
  |Drivers are described in the {{#ask:[[Category:Component]][[FrameworkElementType::driver component]]|format=Plainlist}} component.
}}{{#ifexpr:{{PropertyTestTemplate
|}}
 
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasOutputVar
   |prop=HasOutputVar
   |page={{FULLPAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}}>0
   |reverse=1}}>0
   |''Variable is output of model component:''{{#ask:
   |''Variable is output of model component:''{{#ask:
  [[{{FULLPAGENAME}}]]  
  [[{{PAGENAME}}]]  
  | mainLabel=Variable
  | mainLabel=Variable
  | ?IsOutputOf = output
  | ?IsOutputOf = output
  | format=graph
  | format=graph
| graphname=outputvariable
  | graphcolor=yes
  | graphcolor=yes
  | graphlink=yes
  | graphlink=yes
Line 116: Line 96:
  | arrowdirection=TB
  | arrowdirection=TB
  | relation=parent
  | relation=parent
  | graphsize=4
  | graphsize==
  | limit=200
  | limit=2000
  }}
  }}
|}}<br/>
|}}<br/>
{{#ifexpr:{{PropertyTestTemplate
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasInputVar
   |prop=HasInputVar
   |page={{FULLPAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}} >0
   |reverse=1}} >0
   |''Variable is input of model component(s):''{{#ask:
   |''Variable is input of model component(s):''{{#ask:
   [[{{FULLPAGENAME}}]]
   [[{{PAGENAME}}]]
   | mainLabel=Variable
   | mainLabel=Variable
   | ?IsInputFor = input  
   | ?IsInputFor = input  
   | format=graph
   | format=graph
  | graphname=inputvariable
   | graphcolor=yes
   | graphcolor=yes
   | graphlink=yes
   | graphlink=yes
Line 140: Line 121:
{{#ifexpr:{{PropertyTestTemplate
{{#ifexpr:{{PropertyTestTemplate
   |prop=HasParameter
   |prop=HasParameter
   |page={{FULLPAGENAME}}
   |page={{PAGENAME}}
   |reverse=1}} > 0  
   |reverse=1}} > 0  
   |''External parameter is input of model component(s):''{{#ask:
   |''External parameter is input of model component(s):''{{#ask:
   [[{{FULLPAGENAME}}]]
   [[{{PAGENAME}}]]
   | mainLabel=Variable
   | mainLabel=Variable
   | ?IsParameterOf = input parameter of
   | ?IsParameterOf = input parameter of
   | format=graph
   | format=graph
  | graphname=inputparameter
   | graphcolor=yes
   | graphcolor=yes
   | graphlink=yes
   | graphlink=yes
Line 159: Line 141:
* Click on a box to open the model component.
* Click on a box to open the model component.
[[Category:Variable]]
[[Category:Variable]]
<!-- property settings
<!-- property settings-->
-->{{#ifeq:{{{Label|}}}|||{{#set:HasLabel={{{Label|}}}}} }}<!--
{{#set:HasLabel={{{Label|}}}
-->{{#ifeq:{{{ShortDescription|}}}
  |HasShortDescription={{{Description|}}}
    ||{{#set:HasShortDescription={{{Description|}}}}}
  |HasDescription={{{Description|}}}
|{{#set:HasShortDescription={{{ShortDescription|}}}}}
  |HasDimension={{{Dimension|}}}|+sep=,
    }}<!--
  |HasDefaultUnit={{{Unit|}}}
-->{{#ifeq:{{{Description|}}}|||{{#set:HasDescription={{{Description|}}}}} }}<!--
  |HasVariableType={{{VariableType|}}}
-->{{#arraymap:{{{Dimension|}}}
  |DriverGroup={{{DriverGroup|}}}
    |,|xx
  |HasSource={{{Source|}}}{{{Source2|}}}{{{Source3|}}}|+sep=;
|{{#set:HasDimension=xx}}
  |HasValuesBasedOn={{{BasedOn|}}}{{{BasedOn2|}}}|+sep=;
  |}}<!--
  |HasReference={{{Reference|}}}{{{Reference2|}}}{{{Reference3|}}}|+sep=;
-->{{#ifeq:{{{Unit|}}}|||{{#set:HasDefaultUnit={{{Unit|}}}}} }}<!--
}}
-->{{#ifeq:{{{VariableType|}}}|||{{#set:HasVariableType={{{VariableType|}}}}} }}<!--
  {{#arraymap:
-->{{#ifeq:{{{DriverGroup|}}}|||{{#set:DriverGroup={{{DriverGroup|}}}}} }}<!--
-->{{#ifeq:{{{Source|}}}||
      {{#ifeq:{{{Source2|}}}||
{{#ifeq:{{{Source3|}}}||
  |{{#arraymap:{{{Source3|}}}|;|xx|{{#set:HasSource=xx|}} }}
}}
|{{#arraymap:{{{Source2|}}}|;|xx|{{#set:HasSource=xx|}} }}
  }}
  |{{#arraymap:{{{Source|}}}|;|xx|{{#set:HasSource=}} }}
}}<!--
-->{{#ifeq:{{{BasedOn|}}}||
    {{#ifeq:{{{BasedOn2|}}}||
  |{{#arraymap:{{{BasedOn2|}}}|;|xx|{{#set:HasValuesBasedOn=xx}} |}}
}}
|{{#arraymap:{{{BasedOn|}}} |;|xx|{{#set:HasValuesBasedOn=xx}} |}}
  }}<!--
-->{{#ifeq:{{{Reference|}}}||
    {{#ifeq:{{{Reference2|}}}||
  {{#ifeq:{{{Reference3|}}}||
|{{#arraymap:{{{Reference3|}}} |;|xx|{{#set:HasReference=xx}} |}}
  }}
  |{{#arraymap:{{{Reference2|}}} |;|xx|{{#set:HasReference=xx}} |}}
  }}
  |{{#arraymap:{{{Reference|}}} |;|xx|{{#set:HasReference=xx}} |}}
  }}<!--
-->{{#arraymap:
     {{#ask:[[HasInputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     {{#ask:[[HasInputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     |;|xx
     |;|xx
     |{{#set:IsInputFor=xx}}
     |{{#set:IsInputFor=xx}}
     |}}<!--
     |}}
-->{{#arraymap:
  {{#arraymap:
     {{#ask:[[HasOutputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     {{#ask:[[HasOutputVar::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     |;|xx
     |;|xx
     |{{#set:IsOutputOf=xx}}
     |{{#set:IsOutputOf=xx}}
     |}} <!--
     |}}
-->{{#arraymap:
  {{#arraymap:
     {{#ask:[[HasParameter::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     {{#ask:[[HasParameter::{{PAGENAME}}]][[Concept:AllComponentLevels]]|link=none|sep=;}}
     |;|xx
     |;|xx
     |{{#set:IsParameterOf=xx}}
     |{{#set:IsParameterOf=xx}}
     |}}</includeonly>
     |}}</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.