This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
hpsl:sorting [2017/06/01 10:52] – kunkel | hpsl:sorting [2020/08/13 17:09] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 9: | Line 9: | ||
To adjust the equation see the [[# | To adjust the equation see the [[# | ||
+ | ====== Example ====== | ||
+ | < | ||
+ | query: | ||
+ | type:list | ||
+ | year:2017 | ||
+ | </ | ||
- | ===== List ordered according to the equation ===== | ||
- | |||
- | |||
- | < | ||
- | year:2017 | ||
- | equationBox: | ||
- | equation: | ||
- | equationUnit: | ||
- | equationName: | ||
- | storageTypes: | ||
- | columnsStorage: | ||
- | columnsSupercomputer: | ||
- | columnsSite: | ||
- | aggregateBySite: | ||
- | sortBy: | ||
- | sortASC:F | ||
- | controls:T | ||
- | </ | ||
===== Equation rules ===== | ===== Equation rules ===== | ||
- | + | * **Data types**: Attributes of top level entities (e.g., sites) are scalars | |
- | * **Expressions**: | + | * When multiple subcomponents may exist, the result for an variable is an array (one value per component, components where the value is empty are ignored) |
+ | * **Expressions**: | ||
+ | * dotMultiply and dotDivide allow to multiply characteristics per component | ||
+ | * Reduction | ||
* **Variables**: | * **Variables**: | ||
* **Computation**: | * **Computation**: | ||
* Site variables are scalars. | * Site variables are scalars. | ||
* Storage and supercomputer are arrays, since a site may have multiple supercomputers and storage systems. Therefore, you must use an reduction functions to aggregate these arrays. It is possible to compute expressions based on multiple values from the same storage and computer, though. | * Storage and supercomputer are arrays, since a site may have multiple supercomputers and storage systems. Therefore, you must use an reduction functions to aggregate these arrays. It is possible to compute expressions based on multiple values from the same storage and computer, though. | ||
- | * Example: min(storage.capacity*2) computes the minimum | + | * Example: min(x*2) computes the minimum |
- | * Example: min(storage.capacity*storage.hdds) performs | + | * Example: min(dotMultiply(x.y*x.z)) computes per component x the multiplication of y and z and then takes the minimum. |
- | * Example: sum(storage.capacity) / site.energy_consumption | + | * Example: sum(x) / y => Aggregates all x for valid subcomponents |
- | * Note: please use brackets | + | * It is not valid to operate with values from different components as their number may vary. |
- | * It is not valid to multiply | + | |
- | * The computed value is rounded to integer at the end. If you need finer accuracy just multiply the result with, e.g., 10. | + | |
- | * Sites with a value of 0, infinity or NaN are removed from the visualized list. | + | |