README.md 2.95 KB
Newer Older
1
# de.hftstuttgart.cityunits
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
2

3
Create Eclipse P2 repository with Ecore data type `Quantity` for units based on Indriya reference implementation of Units of Measurement Java specification (JSR 385) and some special units for urban simulation.
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
4

5
Also adds another Ecore data type `TimeOfDay` useful to model schedules and the like.
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
6

7
To install this feature in an Eclipse application add site [https://transfer.hft-stuttgart.de/pages/neqmodplus/de.hft-stuttgart.cityunits/p2repo]() via `Eclipse -> Help -> Install New Software...` and select _City Units_.
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

For an introduction on dealing with units in Java, see
[Baeldung: Introduction to javax.measure](https://www.baeldung.com/javax-measure).

Find demos on how to define new dimensions and units, e.g. in the energy domain under [github.com/unitsofmeasurement](https://github.com/unitsofmeasurement/uom-demos/tree/master/domain).

Some examples for valid units:

| Symbol   | Dimension           
| -------- | ------------------- 
| Hz       | 1/[T] 
| Bq       | 1/[T] 
| A        | [I] 
| F        | [I]²·[T]^4/([L]²·[M]) 
| S        | [I]²·[T]³/([L]²·[M]) 
| C        | [I]·[T] 
| cd       | [J] 
| lm       | [J] 
| lx       | [J]/[L]² 
| m        | [L] 
| m/s      | [L]/[T] 
| km/h     | [L]/[T] 
| m/s²     | [L]/[T]² 
| m²       | [L]² 
| Sv       | [L]²/[T]² 
| Gy       | [L]²/[T]² 
| H        | [L]²·[M]/([I]²·[T]²) 
| Ω        | [L]²·[M]/([I]²·[T]³) 
| Wb       | [L]²·[M]/([I]·[T]²) 
| V        | [L]²·[M]/([I]·[T]³) 
| J        | [L]²·[M]/[T]² 
| W        | [L]²·[M]/[T]³ 
| l        | [L]³ 
| m³       | [L]³ 
| N        | [L]·[M]/[T]² 
| kg       | [M] 
| g        | [M] 
| T        | [M]/([I]·[T]²) 
| Pa       | [M]/([L]·[T]²) 
| mol      | [N] 
| kat      | [N]/[T] 
| h        | [T] 
| year     | [T] 
| s        | [T] 
| day      | [T] 
| week     | [T] 
| min      | [T] 
| K        | [Θ] 
| ℃        | [Θ] 
| one      | one 
| %        | one 
| rad      | one 
| sr       | one 

Some derived units of special interest for urban simulation like kW·h (encodes kWh) as measure of energy or m³/min as measure of flow rate.

| Symbol   | Dimension           
| -------- | -------------- 
| W·s      | [L]²·[M]/[T]² 
| W·h      | [L]²·[M]/[T]² 
| kW·h     | [L]²·[M]/[T]² 
| MW·h     | [L]²·[M]/[T]² 
70
71
72
73
74
| m³/min   | [L]³/[T] VolumetricFlowRate
| m³/h     | [L]³/[T] VolumetricFlowRate
| m³/s     | [L]³/[T] VolumetricFlowRate
| m³/d     | [L]³/[T] VolumetricFlowRate
| l/min    | [L]³/[T] VolumetricFlowRate
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
75
76
77
78
79
80
81
82

Some units of special interest for urban simulation introduced with this plug-in:

| Symbol   | Dimension           
| -------- | -------------- 
| W/m²     | [M]/[T]³ Intensity
| ppm      | one 
| dB       | one 
83
84
85
| gCO₂eq   | [M] CarbonEmission
| kgCO₂eq  | [M] CarbonEmission
| tonCO₂eq | [M] CarbonEmission
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
86
87
88
89
| €        | [$]
| $        | [$]

Note that monetary units have been added ad hoc to City Units to model costs, but may be abandoned in future.