Global: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Line 25: Line 25:


===Read Only===
===Read Only===
The {{software}} also contains a list of reserved Globals. These reserved Globals are read only, because their values are set automatically by the server. Users can still inspect and query the values of these globals using [[Tygron_Query_Language#Numeric values|SELECT TQL queries]], but are unable to apply UPDATE GLOBAL TQL queries on these globals. Currently only the [[Water_Storage_(Indicator)|Water Storage Indicator]] uses this mechanism and when this indicator is added to the project, these read only globals will be visible in the list of all globals.
The {{software}} also contains a list of reserved Globals. These reserved Globals are read only, because their values are set automatically by the server. Users can still inspect and query the values of these globals using [[Tygron_Query_Language#Item statements|SELECT TQL queries]], but are unable to apply UPDATE GLOBAL TQL queries on these globals. Currently only the [[Water_Storage_(Indicator)|Water Storage Indicator]] uses this mechanism and when this indicator is added to the project, these read only globals will be visible in the list of all globals.


The following Globals are read only:
The following Globals are read only:

Revision as of 15:20, 18 February 2020

Template:Learned

Global

A global is a value that exists in the project but is not necessarily connected to a specific component. The global can be used, for example in Excel calculations and influence the calculation of an Excel indicator. A global is similar to an attribute but for the entire project rather than for a specific component. The name of the global is also the global ID that can be used in queries.

Global uses

Globals can be used, broadly speaking, to store and recall values. The most common application of this is in combination with excel sheets. Using TQL, the value of a global can be loaded into an excel sheet and used in calculations. The values of globals can also be set using TQL from excels. Globals can also be used to directly influence the budget of a specific stakeholder. Lastly, globals can be added to the 3D map, making their value directly visible to all stakeholders.

Properties of globals

A global is always made up of a name and a number. Based on the purpose of the global the number represents an amount or a value which is specified by the name.

Output

By using a SELECT_GLOBAL_WHERE_NAME_IS_GLOBALID query you can obtain the value of a global. This global's value can then be used in Excel calculations. It is also possible to connect the global to the budget of a specific stakeholder to directly influence the budget during a session. When the given value is a positive number it will increase the budget. When the given value is a negative number it will decrease the budget.

Input

There are 4 ways that a global's value can be set:

  • Each global has a starting value. At the start of a session, the global is set to this value.
  • A global can be updated using a TQL update statement, of the form UPDATE_GLOBAL_WHERE_NAME_IS_X.
  • A global's value can be changed by making use of a SET_GLOBAL_VALUE event.
  • A global can be directly linked to a TQL select statement, by setting the TQL property to a valid query.

With the exception of linking a global directly to a TQL select statement, each method is a singular action to alter the global's value at one specific moment. Linking a global directly to a TQL select query will cause the global to be updated accordingly with every calculation cycle. This will easily overwrite any singular action such as an event. When using a TQL update statement in an excel to update a global, the effect will be similarly continuous, causing the global's value to update each calculation cycle.

Read Only

The Tygron Platform also contains a list of reserved Globals. These reserved Globals are read only, because their values are set automatically by the server. Users can still inspect and query the values of these globals using SELECT TQL queries, but are unable to apply UPDATE GLOBAL TQL queries on these globals. Currently only the Water Storage Indicator uses this mechanism and when this indicator is added to the project, these read only globals will be visible in the list of all globals.

The following Globals are read only:

Read Only Global Default Value
MEASURE_ADDITIONAL_INNOVATIVE_WATER_STORAGE 0
MEASURE_CURRENT_ADDITIONAL_INNOVATIVE_WATER_STORAGE 0
MEASURE_MAQUETTE_ADDITIONAL_INNOVATIVE_WATER_STORAGE 0
MEASURE_ADDITIONAL_TRADITIONAL_WATER_STORAGE 0
MEASURE_CURRENT_ADDITIONAL_TRADITIONAL_WATER_STORAGE 0
MEASURE_MAQUETTE_ADDITIONAL_TRADITIONAL_WATER_STORAGE 0
WATER_STORAGE_ALLOWED_WATER_LEVEL_INCREASE 0.30
WATER_STORAGE_MAX_FRACTION_INNOVATIVE 0.30

Editing Globals

Adding and removing Globals

Editor → Current Situation (Ribbon tab) → Globals (Ribbon bar)
The Left Panel allows you to add, duplicate, and remove globals.
How to add a global:
  1. In the ribbon header, select "Indicators".
  2. In the ribbon bar, select "Globals".
  3. In the left panel, select "Add".
How to duplicate a global:
  1. In the ribbon header, select "Indicators".
  2. In the ribbon bar, select "Globals".
  3. In the left panel, select the global you wish to duplicate.
  4. In the left panel, select "Duplicate".
How to remove a global:
  1. In the ribbon header, select "Indicators".
  2. In the ribbon bar, select "Globals".
  3. In the left panel, select the global you wish to remove.
  4. In the left panel, select "Remove".


Changing Globals

Editor → Current Situation (Ribbon tab) → Globals (Ribbon bar)
Selecting a global makes its properties adjustable in the Right Panel.
Selecting a global in the left panel makes its properties adjustable in the right panel.


Stakeholder properties

Name

Each global has a name which is shown in the left panel as a list of all globals that are created in the project. The global's Name is the name of the Global ID which is used in queries.

Visualization Name

The Visualization Name is the name that is visible for the user after a global is made visual in the project, instead of the Name that is used as the global ID. This is the case when for example, a point is set in the 3D world, when a global is displayed in a panel or when the global is connected to the budget of a stakeholder.

TQL Query

A TQL query, the result of which will be stored in this global during a session. If the field is left empty, or the query is invalid, the global is not updated in this manner.

Start Value

The value of the global at the beginning of the session. In the scenario that the value is representing currency, the given value can be specified either as a positive or a negative number.

Assign to Budget

With this checkbox you can decide whether you want to attach the value to the budget of a certain stakeholder or not. If you check this box the value is automatically counted as currency. In this way, the global can also be used to create debt.

Stakeholder

Here you can select the stakeholders' budget which the global is assigned to.

Remove Point

With the remove point option you can remove the visual global from the 3D world. The global is still present in the project, as you can see in the right panel, only it is not visible anymore in the 3D world.

Set Point

With the set point option you can let a global be displayed at a specific point in the 3D world. You can attach the global to a specific place in the 3D world regardless of whether there is a construction. More information about how to draw a point in the 3D world is explained on the brush panel page.

Stakeholder properties