How to create an Excel background calculation model: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Panel]]s form a (custom) interface element for the end-user. When backed by an [[Excel]], a [[Panel]] can perform calculations and affect the [[3D World]], even when the [[Panel]] is not actually accessible to an end-user.
[[Panel]]s form a (custom) interface element for the end-user. When backed by an [[Excel]], a [[Panel]] can perform calculations and change the state of [[Item]]s in your [[project]], such as [[Building]]s, even when the [[Panel]] is not actually accessible to an end-user.


The instructions below will create a [[Panel]] which changes the traffic on all roads in a [[Project]] based on the amount of houses added during a [[Session]].
The instructions below will create a [[Panel]] which changes the traffic on all roads in a [[Project]] based on the amount of houses added during a [[Session]].
Line 14: Line 14:
| In the [[Editor]], add a new Excel [[Panel]].
| In the [[Editor]], add a new Excel [[Panel]].
| Upload the created [[Excel]] file for the added [[Panel]].
| Upload the created [[Excel]] file for the added [[Panel]].
| Now the amount of traffic on all roads in the [[Session]] starts as 0, but increases as the amount of housing in the [[3D World]] is added during a [[Session]].
| Now the amount of traffic on all roads in the [[Session]] starts as 0, but increases as the amount of housing in the [[project]] is added during a [[Session]].
}}
}}
{{clear}}
{{clear}}
Line 24: Line 24:
* [[Excel]]
* [[Excel]]
* [[Panel]]
* [[Panel]]
|howtos=* [[How to add a Panel]]
|howtos=
*[[How to configure a Query for an Excel Indicator]]
* [[How to add a Panel]]
*[[How to use the Query Tool to test queries from an Excel Indicator spreadsheet]]
* [[How to configure a Query for an Excel Indicator]]
* [[How to use the Query Tool to test queries from an Excel Indicator spreadsheet]]
 
}}
}}
[[Category:How-to's]]

Latest revision as of 13:58, 30 January 2024

Panels form a (custom) interface element for the end-user. When backed by an Excel, a Panel can perform calculations and change the state of Items in your project, such as Buildings, even when the Panel is not actually accessible to an end-user.

The instructions below will create a Panel which changes the traffic on all roads in a Project based on the amount of houses added during a Session.

Editor → Current Situation (Ribbon tab) → Panels (Ribbon bar)
How to add a Panel:
  1. Create a new Excel file.
  2. Add a "SELECT_UNITS_WHERE_MAP_IS_CURRENT" cell to the Excel file.
  3. Add a "SELECT_UNITS_WHERE_MAP_IS_MAQUETTE" cell to the Excel file.
  4. Add an "UPDATE_BUILDING_TRAFFIC_FLOW_WHERE_CATEGORY_IS_ROAD" cell to the Excel file.
  5. Add an "EXPLANATION" cell to the Excel file.
  6. Set the formula of the "UPDATE" cell to "=MAX(0;SELECT_UNITS_WHERE_MAP_IS_MAQUETTE - SELECT_UNITS_WHERE_MAP_IS_CURRENT)".
  7. In the Editor, add a new Excel Panel.
  8. Upload the created Excel file for the added Panel.
  9. Now the amount of traffic on all roads in the Session starts as 0, but increases as the amount of housing in the project is added during a Session.

Notes

  • If the Project is set to automatically recalculate, the Panel's will immediately set the traffic in the Project to 0. Otherwise, traffic will change when a calculation has been run.
  • The described formula may differ based on language settings for your particular version of Excel.

How-to's

See also