eyeling 1.5.19 → 1.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/expression-eval.n3 +70 -0
- package/examples/family-cousins.n3 +63 -0
- package/examples/gps.n3 +68 -0
- package/examples/light-eaters.n3 +109 -0
- package/examples/odrl-trust.n3 +146 -0
- package/examples/output/expression-eval.n3 +23 -0
- package/examples/output/family-cousins.n3 +663 -0
- package/examples/output/gps.n3 +53 -0
- package/examples/output/light-eaters.n3 +326 -0
- package/examples/output/odrl-trust.n3 +51 -0
- package/examples/output/spectral-week.n3 +366 -0
- package/examples/spectral-week.n3 +104 -0
- package/package.json +1 -1
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
@prefix : <http://example.org/spectral-week#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :Shade :redEnergy 180 .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :Shade :redIntensity 60.0 .
|
|
8
|
+
# :Shade :redHours 3.0 .
|
|
9
|
+
# (60.0 3.0) math:product 180 .
|
|
10
|
+
# via the schematic forward rule:
|
|
11
|
+
# {
|
|
12
|
+
# ?Loc :redIntensity ?RI .
|
|
13
|
+
# ?Loc :redHours ?RH .
|
|
14
|
+
# (?RI ?RH) math:product ?Ered .
|
|
15
|
+
# } => {
|
|
16
|
+
# ?Loc :redEnergy ?Ered .
|
|
17
|
+
# } .
|
|
18
|
+
# with substitution (on rule variables):
|
|
19
|
+
# ?Ered = 180
|
|
20
|
+
# ?Loc = :Shade
|
|
21
|
+
# ?RH = 3.0
|
|
22
|
+
# ?RI = 60.0
|
|
23
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
24
|
+
# ----------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
:Shade :redEnergy 180 .
|
|
27
|
+
|
|
28
|
+
# ----------------------------------------------------------------------
|
|
29
|
+
# Proof for derived triple:
|
|
30
|
+
# :Greenhouse :redEnergy 960 .
|
|
31
|
+
# It holds because the following instance of the rule body is provable:
|
|
32
|
+
# :Greenhouse :redIntensity 120.0 .
|
|
33
|
+
# :Greenhouse :redHours 8.0 .
|
|
34
|
+
# (120.0 8.0) math:product 960 .
|
|
35
|
+
# via the schematic forward rule:
|
|
36
|
+
# {
|
|
37
|
+
# ?Loc :redIntensity ?RI .
|
|
38
|
+
# ?Loc :redHours ?RH .
|
|
39
|
+
# (?RI ?RH) math:product ?Ered .
|
|
40
|
+
# } => {
|
|
41
|
+
# ?Loc :redEnergy ?Ered .
|
|
42
|
+
# } .
|
|
43
|
+
# with substitution (on rule variables):
|
|
44
|
+
# ?Ered = 960
|
|
45
|
+
# ?Loc = :Greenhouse
|
|
46
|
+
# ?RH = 8.0
|
|
47
|
+
# ?RI = 120.0
|
|
48
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
49
|
+
# ----------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
:Greenhouse :redEnergy 960 .
|
|
52
|
+
|
|
53
|
+
# ----------------------------------------------------------------------
|
|
54
|
+
# Proof for derived triple:
|
|
55
|
+
# :Shade :blueEnergy 80 .
|
|
56
|
+
# It holds because the following instance of the rule body is provable:
|
|
57
|
+
# :Shade :blueIntensity 80.0 .
|
|
58
|
+
# :Shade :blueHours 1.0 .
|
|
59
|
+
# (80.0 1.0) math:product 80 .
|
|
60
|
+
# via the schematic forward rule:
|
|
61
|
+
# {
|
|
62
|
+
# ?Loc :blueIntensity ?BI .
|
|
63
|
+
# ?Loc :blueHours ?BH .
|
|
64
|
+
# (?BI ?BH) math:product ?Eblue .
|
|
65
|
+
# } => {
|
|
66
|
+
# ?Loc :blueEnergy ?Eblue .
|
|
67
|
+
# } .
|
|
68
|
+
# with substitution (on rule variables):
|
|
69
|
+
# ?BH = 1.0
|
|
70
|
+
# ?BI = 80.0
|
|
71
|
+
# ?Eblue = 80
|
|
72
|
+
# ?Loc = :Shade
|
|
73
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
74
|
+
# ----------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
:Shade :blueEnergy 80 .
|
|
77
|
+
|
|
78
|
+
# ----------------------------------------------------------------------
|
|
79
|
+
# Proof for derived triple:
|
|
80
|
+
# :Greenhouse :blueEnergy 400 .
|
|
81
|
+
# It holds because the following instance of the rule body is provable:
|
|
82
|
+
# :Greenhouse :blueIntensity 200.0 .
|
|
83
|
+
# :Greenhouse :blueHours 2.0 .
|
|
84
|
+
# (200.0 2.0) math:product 400 .
|
|
85
|
+
# via the schematic forward rule:
|
|
86
|
+
# {
|
|
87
|
+
# ?Loc :blueIntensity ?BI .
|
|
88
|
+
# ?Loc :blueHours ?BH .
|
|
89
|
+
# (?BI ?BH) math:product ?Eblue .
|
|
90
|
+
# } => {
|
|
91
|
+
# ?Loc :blueEnergy ?Eblue .
|
|
92
|
+
# } .
|
|
93
|
+
# with substitution (on rule variables):
|
|
94
|
+
# ?BH = 2.0
|
|
95
|
+
# ?BI = 200.0
|
|
96
|
+
# ?Eblue = 400
|
|
97
|
+
# ?Loc = :Greenhouse
|
|
98
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
99
|
+
# ----------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
:Greenhouse :blueEnergy 400 .
|
|
102
|
+
|
|
103
|
+
# ----------------------------------------------------------------------
|
|
104
|
+
# Proof for derived triple:
|
|
105
|
+
# :Fern :absorbedRed 72 .
|
|
106
|
+
# It holds because the following instance of the rule body is provable:
|
|
107
|
+
# :Fern a :Plant .
|
|
108
|
+
# :Fern :location :Shade .
|
|
109
|
+
# :Fern :absorbRed 0.40 .
|
|
110
|
+
# :Shade :redEnergy 180 .
|
|
111
|
+
# (180 0.40) math:product 72 .
|
|
112
|
+
# via the schematic forward rule:
|
|
113
|
+
# {
|
|
114
|
+
# ?P a :Plant .
|
|
115
|
+
# ?P :location ?Loc .
|
|
116
|
+
# ?P :absorbRed ?AR .
|
|
117
|
+
# ?Loc :redEnergy ?Ered .
|
|
118
|
+
# (?Ered ?AR) math:product ?Ared .
|
|
119
|
+
# } => {
|
|
120
|
+
# ?P :absorbedRed ?Ared .
|
|
121
|
+
# } .
|
|
122
|
+
# with substitution (on rule variables):
|
|
123
|
+
# ?AR = 0.40
|
|
124
|
+
# ?Ared = 72
|
|
125
|
+
# ?Ered = 180
|
|
126
|
+
# ?Loc = :Shade
|
|
127
|
+
# ?P = :Fern
|
|
128
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
129
|
+
# ----------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
:Fern :absorbedRed 72 .
|
|
132
|
+
|
|
133
|
+
# ----------------------------------------------------------------------
|
|
134
|
+
# Proof for derived triple:
|
|
135
|
+
# :Sunflower :absorbedRed 816 .
|
|
136
|
+
# It holds because the following instance of the rule body is provable:
|
|
137
|
+
# :Sunflower a :Plant .
|
|
138
|
+
# :Sunflower :location :Greenhouse .
|
|
139
|
+
# :Sunflower :absorbRed 0.85 .
|
|
140
|
+
# :Greenhouse :redEnergy 960 .
|
|
141
|
+
# (960 0.85) math:product 816 .
|
|
142
|
+
# via the schematic forward rule:
|
|
143
|
+
# {
|
|
144
|
+
# ?P a :Plant .
|
|
145
|
+
# ?P :location ?Loc .
|
|
146
|
+
# ?P :absorbRed ?AR .
|
|
147
|
+
# ?Loc :redEnergy ?Ered .
|
|
148
|
+
# (?Ered ?AR) math:product ?Ared .
|
|
149
|
+
# } => {
|
|
150
|
+
# ?P :absorbedRed ?Ared .
|
|
151
|
+
# } .
|
|
152
|
+
# with substitution (on rule variables):
|
|
153
|
+
# ?AR = 0.85
|
|
154
|
+
# ?Ared = 816
|
|
155
|
+
# ?Ered = 960
|
|
156
|
+
# ?Loc = :Greenhouse
|
|
157
|
+
# ?P = :Sunflower
|
|
158
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
159
|
+
# ----------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
:Sunflower :absorbedRed 816 .
|
|
162
|
+
|
|
163
|
+
# ----------------------------------------------------------------------
|
|
164
|
+
# Proof for derived triple:
|
|
165
|
+
# :Fern :absorbedBlue 60 .
|
|
166
|
+
# It holds because the following instance of the rule body is provable:
|
|
167
|
+
# :Fern a :Plant .
|
|
168
|
+
# :Fern :location :Shade .
|
|
169
|
+
# :Fern :absorbBlue 0.75 .
|
|
170
|
+
# :Shade :blueEnergy 80 .
|
|
171
|
+
# (80 0.75) math:product 60 .
|
|
172
|
+
# via the schematic forward rule:
|
|
173
|
+
# {
|
|
174
|
+
# ?P a :Plant .
|
|
175
|
+
# ?P :location ?Loc .
|
|
176
|
+
# ?P :absorbBlue ?AB .
|
|
177
|
+
# ?Loc :blueEnergy ?Eblue .
|
|
178
|
+
# (?Eblue ?AB) math:product ?Ablue .
|
|
179
|
+
# } => {
|
|
180
|
+
# ?P :absorbedBlue ?Ablue .
|
|
181
|
+
# } .
|
|
182
|
+
# with substitution (on rule variables):
|
|
183
|
+
# ?AB = 0.75
|
|
184
|
+
# ?Ablue = 60
|
|
185
|
+
# ?Eblue = 80
|
|
186
|
+
# ?Loc = :Shade
|
|
187
|
+
# ?P = :Fern
|
|
188
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
189
|
+
# ----------------------------------------------------------------------
|
|
190
|
+
|
|
191
|
+
:Fern :absorbedBlue 60 .
|
|
192
|
+
|
|
193
|
+
# ----------------------------------------------------------------------
|
|
194
|
+
# Proof for derived triple:
|
|
195
|
+
# :Sunflower :absorbedBlue 220.00000000000003 .
|
|
196
|
+
# It holds because the following instance of the rule body is provable:
|
|
197
|
+
# :Sunflower a :Plant .
|
|
198
|
+
# :Sunflower :location :Greenhouse .
|
|
199
|
+
# :Sunflower :absorbBlue 0.55 .
|
|
200
|
+
# :Greenhouse :blueEnergy 400 .
|
|
201
|
+
# (400 0.55) math:product 220.00000000000003 .
|
|
202
|
+
# via the schematic forward rule:
|
|
203
|
+
# {
|
|
204
|
+
# ?P a :Plant .
|
|
205
|
+
# ?P :location ?Loc .
|
|
206
|
+
# ?P :absorbBlue ?AB .
|
|
207
|
+
# ?Loc :blueEnergy ?Eblue .
|
|
208
|
+
# (?Eblue ?AB) math:product ?Ablue .
|
|
209
|
+
# } => {
|
|
210
|
+
# ?P :absorbedBlue ?Ablue .
|
|
211
|
+
# } .
|
|
212
|
+
# with substitution (on rule variables):
|
|
213
|
+
# ?AB = 0.55
|
|
214
|
+
# ?Ablue = 220.00000000000003
|
|
215
|
+
# ?Eblue = 400
|
|
216
|
+
# ?Loc = :Greenhouse
|
|
217
|
+
# ?P = :Sunflower
|
|
218
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
219
|
+
# ----------------------------------------------------------------------
|
|
220
|
+
|
|
221
|
+
:Sunflower :absorbedBlue 220.00000000000003 .
|
|
222
|
+
|
|
223
|
+
# ----------------------------------------------------------------------
|
|
224
|
+
# Proof for derived triple:
|
|
225
|
+
# :Sunflower :absorbedEnergy 1036 .
|
|
226
|
+
# It holds because the following instance of the rule body is provable:
|
|
227
|
+
# :Sunflower :absorbedRed 816 .
|
|
228
|
+
# :Sunflower :absorbedBlue 220.00000000000003 .
|
|
229
|
+
# (816 220.00000000000003) math:sum 1036 .
|
|
230
|
+
# via the schematic forward rule:
|
|
231
|
+
# {
|
|
232
|
+
# ?P :absorbedRed ?Ared .
|
|
233
|
+
# ?P :absorbedBlue ?Ablue .
|
|
234
|
+
# (?Ared ?Ablue) math:sum ?Abs .
|
|
235
|
+
# } => {
|
|
236
|
+
# ?P :absorbedEnergy ?Abs .
|
|
237
|
+
# } .
|
|
238
|
+
# with substitution (on rule variables):
|
|
239
|
+
# ?Ablue = 220.00000000000003
|
|
240
|
+
# ?Abs = 1036
|
|
241
|
+
# ?Ared = 816
|
|
242
|
+
# ?P = :Sunflower
|
|
243
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
244
|
+
# ----------------------------------------------------------------------
|
|
245
|
+
|
|
246
|
+
:Sunflower :absorbedEnergy 1036 .
|
|
247
|
+
|
|
248
|
+
# ----------------------------------------------------------------------
|
|
249
|
+
# Proof for derived triple:
|
|
250
|
+
# :Fern :absorbedEnergy 132 .
|
|
251
|
+
# It holds because the following instance of the rule body is provable:
|
|
252
|
+
# :Fern :absorbedRed 72 .
|
|
253
|
+
# :Fern :absorbedBlue 60 .
|
|
254
|
+
# (72 60) math:sum 132 .
|
|
255
|
+
# via the schematic forward rule:
|
|
256
|
+
# {
|
|
257
|
+
# ?P :absorbedRed ?Ared .
|
|
258
|
+
# ?P :absorbedBlue ?Ablue .
|
|
259
|
+
# (?Ared ?Ablue) math:sum ?Abs .
|
|
260
|
+
# } => {
|
|
261
|
+
# ?P :absorbedEnergy ?Abs .
|
|
262
|
+
# } .
|
|
263
|
+
# with substitution (on rule variables):
|
|
264
|
+
# ?Ablue = 60
|
|
265
|
+
# ?Abs = 132
|
|
266
|
+
# ?Ared = 72
|
|
267
|
+
# ?P = :Fern
|
|
268
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
269
|
+
# ----------------------------------------------------------------------
|
|
270
|
+
|
|
271
|
+
:Fern :absorbedEnergy 132 .
|
|
272
|
+
|
|
273
|
+
# ----------------------------------------------------------------------
|
|
274
|
+
# Proof for derived triple:
|
|
275
|
+
# :Fern :dailyStored 33 .
|
|
276
|
+
# It holds because the following instance of the rule body is provable:
|
|
277
|
+
# :Fern :absorbedEnergy 132 .
|
|
278
|
+
# :Fern :conversion 0.25 .
|
|
279
|
+
# (132 0.25) math:product 33 .
|
|
280
|
+
# via the schematic forward rule:
|
|
281
|
+
# {
|
|
282
|
+
# ?P :absorbedEnergy ?Abs .
|
|
283
|
+
# ?P :conversion ?C .
|
|
284
|
+
# (?Abs ?C) math:product ?Stored .
|
|
285
|
+
# } => {
|
|
286
|
+
# ?P :dailyStored ?Stored .
|
|
287
|
+
# } .
|
|
288
|
+
# with substitution (on rule variables):
|
|
289
|
+
# ?Abs = 132
|
|
290
|
+
# ?C = 0.25
|
|
291
|
+
# ?P = :Fern
|
|
292
|
+
# ?Stored = 33
|
|
293
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
294
|
+
# ----------------------------------------------------------------------
|
|
295
|
+
|
|
296
|
+
:Fern :dailyStored 33 .
|
|
297
|
+
|
|
298
|
+
# ----------------------------------------------------------------------
|
|
299
|
+
# Proof for derived triple:
|
|
300
|
+
# :Sunflower :dailyStored 259 .
|
|
301
|
+
# It holds because the following instance of the rule body is provable:
|
|
302
|
+
# :Sunflower :absorbedEnergy 1036 .
|
|
303
|
+
# :Sunflower :conversion 0.25 .
|
|
304
|
+
# (1036 0.25) math:product 259 .
|
|
305
|
+
# via the schematic forward rule:
|
|
306
|
+
# {
|
|
307
|
+
# ?P :absorbedEnergy ?Abs .
|
|
308
|
+
# ?P :conversion ?C .
|
|
309
|
+
# (?Abs ?C) math:product ?Stored .
|
|
310
|
+
# } => {
|
|
311
|
+
# ?P :dailyStored ?Stored .
|
|
312
|
+
# } .
|
|
313
|
+
# with substitution (on rule variables):
|
|
314
|
+
# ?Abs = 1036
|
|
315
|
+
# ?C = 0.25
|
|
316
|
+
# ?P = :Sunflower
|
|
317
|
+
# ?Stored = 259
|
|
318
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
319
|
+
# ----------------------------------------------------------------------
|
|
320
|
+
|
|
321
|
+
:Sunflower :dailyStored 259 .
|
|
322
|
+
|
|
323
|
+
# ----------------------------------------------------------------------
|
|
324
|
+
# Proof for derived triple:
|
|
325
|
+
# :Sunflower :weeklyStored 1813 .
|
|
326
|
+
# It holds because the following instance of the rule body is provable:
|
|
327
|
+
# :Sunflower :dailyStored 259 .
|
|
328
|
+
# (259 7) math:product 1813 .
|
|
329
|
+
# via the schematic forward rule:
|
|
330
|
+
# {
|
|
331
|
+
# ?P :dailyStored ?D .
|
|
332
|
+
# (?D 7) math:product ?W .
|
|
333
|
+
# } => {
|
|
334
|
+
# ?P :weeklyStored ?W .
|
|
335
|
+
# } .
|
|
336
|
+
# with substitution (on rule variables):
|
|
337
|
+
# ?D = 259
|
|
338
|
+
# ?P = :Sunflower
|
|
339
|
+
# ?W = 1813
|
|
340
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
341
|
+
# ----------------------------------------------------------------------
|
|
342
|
+
|
|
343
|
+
:Sunflower :weeklyStored 1813 .
|
|
344
|
+
|
|
345
|
+
# ----------------------------------------------------------------------
|
|
346
|
+
# Proof for derived triple:
|
|
347
|
+
# :Fern :weeklyStored 231 .
|
|
348
|
+
# It holds because the following instance of the rule body is provable:
|
|
349
|
+
# :Fern :dailyStored 33 .
|
|
350
|
+
# (33 7) math:product 231 .
|
|
351
|
+
# via the schematic forward rule:
|
|
352
|
+
# {
|
|
353
|
+
# ?P :dailyStored ?D .
|
|
354
|
+
# (?D 7) math:product ?W .
|
|
355
|
+
# } => {
|
|
356
|
+
# ?P :weeklyStored ?W .
|
|
357
|
+
# } .
|
|
358
|
+
# with substitution (on rule variables):
|
|
359
|
+
# ?D = 33
|
|
360
|
+
# ?P = :Fern
|
|
361
|
+
# ?W = 231
|
|
362
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
363
|
+
# ----------------------------------------------------------------------
|
|
364
|
+
|
|
365
|
+
:Fern :weeklyStored 231 .
|
|
366
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# -------------
|
|
2
|
+
# Spectral week
|
|
3
|
+
# -------------
|
|
4
|
+
|
|
5
|
+
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
|
|
6
|
+
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
|
|
7
|
+
@prefix : <http://example.org/spectral-week#>.
|
|
8
|
+
|
|
9
|
+
# ------------------------------------------------------------
|
|
10
|
+
# Spectral light intake (red + blue) and weekly energy storage
|
|
11
|
+
# ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
# Locations: daily hours of red/blue light, and intensity per hour.
|
|
14
|
+
:Greenhouse :redHours 8.0; :blueHours 2.0;
|
|
15
|
+
:redIntensity 120.0;
|
|
16
|
+
:blueIntensity 200.0.
|
|
17
|
+
|
|
18
|
+
:Shade :redHours 3.0; :blueHours 1.0;
|
|
19
|
+
:redIntensity 60.0;
|
|
20
|
+
:blueIntensity 80.0.
|
|
21
|
+
|
|
22
|
+
# Plants with wavelength-dependent absorption + conversion efficiency.
|
|
23
|
+
# absorption is in [0..1], conversion efficiency in [0..1].
|
|
24
|
+
:Sunflower a :Plant; :location :Greenhouse;
|
|
25
|
+
:absorbRed 0.85; :absorbBlue 0.55; :conversion 0.25.
|
|
26
|
+
|
|
27
|
+
:Fern a :Plant; :location :Shade;
|
|
28
|
+
:absorbRed 0.40; :absorbBlue 0.75; :conversion 0.25.
|
|
29
|
+
|
|
30
|
+
# ------------------------------------
|
|
31
|
+
# Compute per-location spectral energy
|
|
32
|
+
# Ered = redIntensity * redHours
|
|
33
|
+
# Eblue = blueIntensity * blueHours
|
|
34
|
+
# ------------------------------------
|
|
35
|
+
|
|
36
|
+
{
|
|
37
|
+
?Loc :redIntensity ?RI; :redHours ?RH.
|
|
38
|
+
(?RI ?RH) math:product ?Ered.
|
|
39
|
+
}
|
|
40
|
+
=>
|
|
41
|
+
{ ?Loc :redEnergy ?Ered. }.
|
|
42
|
+
|
|
43
|
+
{
|
|
44
|
+
?Loc :blueIntensity ?BI; :blueHours ?BH.
|
|
45
|
+
(?BI ?BH) math:product ?Eblue.
|
|
46
|
+
}
|
|
47
|
+
=>
|
|
48
|
+
{ ?Loc :blueEnergy ?Eblue. }.
|
|
49
|
+
|
|
50
|
+
# -------------------------------------------
|
|
51
|
+
# Daily absorbed energy by plant
|
|
52
|
+
# Ared = Loc.redEnergy * Plant.absorbRed
|
|
53
|
+
# Ablue = Loc.blueEnergy * Plant.absorbBlue
|
|
54
|
+
# absorbed = Ared + Ablue
|
|
55
|
+
# -------------------------------------------
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
?P a :Plant; :location ?Loc; :absorbRed ?AR.
|
|
59
|
+
?Loc :redEnergy ?Ered.
|
|
60
|
+
(?Ered ?AR) math:product ?Ared.
|
|
61
|
+
}
|
|
62
|
+
=>
|
|
63
|
+
{ ?P :absorbedRed ?Ared. }.
|
|
64
|
+
|
|
65
|
+
{
|
|
66
|
+
?P a :Plant; :location ?Loc; :absorbBlue ?AB.
|
|
67
|
+
?Loc :blueEnergy ?Eblue.
|
|
68
|
+
(?Eblue ?AB) math:product ?Ablue.
|
|
69
|
+
}
|
|
70
|
+
=>
|
|
71
|
+
{ ?P :absorbedBlue ?Ablue. }.
|
|
72
|
+
|
|
73
|
+
{
|
|
74
|
+
?P :absorbedRed ?Ared.
|
|
75
|
+
?P :absorbedBlue ?Ablue.
|
|
76
|
+
(?Ared ?Ablue) math:sum ?Abs.
|
|
77
|
+
}
|
|
78
|
+
=>
|
|
79
|
+
{ ?P :absorbedEnergy ?Abs. }.
|
|
80
|
+
|
|
81
|
+
# -------------------------------------------------
|
|
82
|
+
# Daily stored energy = absorbedEnergy * conversion
|
|
83
|
+
# -------------------------------------------------
|
|
84
|
+
|
|
85
|
+
{
|
|
86
|
+
?P :absorbedEnergy ?Abs; :conversion ?C.
|
|
87
|
+
(?Abs ?C) math:product ?Stored.
|
|
88
|
+
}
|
|
89
|
+
=>
|
|
90
|
+
{ ?P :dailyStored ?Stored. }.
|
|
91
|
+
|
|
92
|
+
# ------------------------------------
|
|
93
|
+
# Weekly stored energy = dailyStored*7
|
|
94
|
+
# ------------------------------------
|
|
95
|
+
|
|
96
|
+
{
|
|
97
|
+
?P :dailyStored ?D.
|
|
98
|
+
(?D 7) math:product ?W.
|
|
99
|
+
}
|
|
100
|
+
=>
|
|
101
|
+
{
|
|
102
|
+
?P :weeklyStored ?W.
|
|
103
|
+
}.
|
|
104
|
+
|