@dnv-plant/typescriptpws 1.0.86 → 1.0.88
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/.vscode/launch.json +16 -0
- package/azure-test-folder-job.yml +2 -2
- package/index.ts +3 -3
- package/package.json +7 -6
- package/src/calculations/applicationTools.ts +29 -36
- package/src/calculations/discharge.ts +423 -321
- package/src/calculations/dispersion.ts +52 -84
- package/src/calculations/dispersionView.ts +311 -549
- package/src/calculations/fireball.ts +45 -69
- package/src/calculations/jetFire.ts +80 -129
- package/src/calculations/lateExplosion.ts +120 -210
- package/src/calculations/linkedRunners.ts +727 -1275
- package/src/calculations/poolFire.ts +45 -69
- package/src/calculations/properties.ts +32 -42
- package/src/calculations/radiation.ts +415 -714
- package/src/calculations/standalones.ts +39 -57
- package/src/calculations/toxics.ts +50 -78
- package/src/calculations/utilities.ts +357 -588
- package/src/constants.ts +9 -3
- package/src/entities.ts +3 -3
- package/src/entity-schemas.ts +3 -3
- package/src/enums.ts +4 -27
- package/src/materials.ts +236 -75
- package/src/utilities.ts +40 -9
- package/tsconfig.json +0 -100
- package/vitest.config.ts +9 -0
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
* Editing it may lead to inconsistent results and limit DNV's ability to provide support.
|
|
7
7
|
* Please contact DNV if you believe changes are required.
|
|
8
8
|
*
|
|
9
|
-
* Version: 1.0.
|
|
10
|
-
* Date/time:
|
|
9
|
+
* Version: 1.0.89
|
|
10
|
+
* Date/time: 29 Jul 2025 17:59:11
|
|
11
11
|
* Template: templates/typescriptpws/calculations.razor.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
***********************************************************************/
|
|
15
13
|
|
|
16
14
|
import * as Enums from "../enums";
|
|
17
15
|
import * as Entities from "../entities";
|
|
@@ -36,12 +34,17 @@ class CalculationBase {
|
|
|
36
34
|
messages: string[] = [];
|
|
37
35
|
calculationElapsedTime?: number = 0.0;
|
|
38
36
|
operationId?: string = "";
|
|
37
|
+
controller?: AbortController;
|
|
38
|
+
|
|
39
|
+
constructor(controller?: AbortController) {
|
|
40
|
+
this.controller = controller;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
43
|
/**
|
|
41
44
|
* Post JSON to URL and time the call
|
|
42
45
|
*/
|
|
43
46
|
async postRequest(url: string, data: string): Promise<AxiosResponse> {
|
|
44
|
-
return postRequest(url, data);
|
|
47
|
+
return postRequest(url, data, this.controller);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/**
|
|
@@ -177,16 +180,8 @@ class ConcentrationAtPointCalculationRequest extends CalculationRequestBase {
|
|
|
177
180
|
/**
|
|
178
181
|
* ConcentrationAtPoint calculation request class.
|
|
179
182
|
*
|
|
180
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
181
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
182
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - Array of dispersion record.
|
|
183
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
184
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
185
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
186
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
187
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
188
183
|
*/
|
|
189
|
-
constructor(
|
|
184
|
+
constructor(data: {
|
|
190
185
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
191
186
|
weather: Entities.Weather,
|
|
192
187
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -195,16 +190,16 @@ class ConcentrationAtPointCalculationRequest extends CalculationRequestBase {
|
|
|
195
190
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
196
191
|
material: Entities.Material,
|
|
197
192
|
dispersionParameters: Entities.DispersionParameters
|
|
198
|
-
) {
|
|
193
|
+
}) {
|
|
199
194
|
super();
|
|
200
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
201
|
-
this.weather = weather;
|
|
202
|
-
this.dispersionRecords = dispersionRecords;
|
|
203
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
204
|
-
this.substrate = substrate;
|
|
205
|
-
this.dispersionOutputConfig = dispersionOutputConfig;
|
|
206
|
-
this.material = material;
|
|
207
|
-
this.dispersionParameters = dispersionParameters;
|
|
195
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
196
|
+
this.weather = data.weather;
|
|
197
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
198
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
199
|
+
this.substrate = data.substrate;
|
|
200
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
201
|
+
this.material = data.material;
|
|
202
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
208
203
|
}
|
|
209
204
|
}
|
|
210
205
|
|
|
@@ -248,16 +243,7 @@ export class ConcentrationAtPointCalculationRequestSchema {
|
|
|
248
243
|
}
|
|
249
244
|
|
|
250
245
|
makeCalculationRequest(data: ConcentrationAtPointCalculationRequestSchemaData): ConcentrationAtPointCalculationRequest {
|
|
251
|
-
return new ConcentrationAtPointCalculationRequest(
|
|
252
|
-
data.scalarUdmOutputs,
|
|
253
|
-
data.weather,
|
|
254
|
-
data.dispersionRecords,
|
|
255
|
-
data.dispersionRecordCount,
|
|
256
|
-
data.substrate,
|
|
257
|
-
data.dispersionOutputConfig,
|
|
258
|
-
data.material,
|
|
259
|
-
data.dispersionParameters
|
|
260
|
-
);
|
|
246
|
+
return new ConcentrationAtPointCalculationRequest(data);
|
|
261
247
|
}
|
|
262
248
|
}
|
|
263
249
|
|
|
@@ -275,16 +261,8 @@ export class ConcentrationAtPointCalculation extends CalculationBase {
|
|
|
275
261
|
/**
|
|
276
262
|
* Calculates the concentration at a particular distance downwind and crosswind position at the current effect height and averaging time.
|
|
277
263
|
*
|
|
278
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
279
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
280
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - Array of dispersion record.
|
|
281
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
282
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
283
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
284
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
285
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
286
264
|
*/
|
|
287
|
-
constructor(
|
|
265
|
+
constructor(data: {
|
|
288
266
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
289
267
|
weather: Entities.Weather,
|
|
290
268
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -293,30 +271,31 @@ export class ConcentrationAtPointCalculation extends CalculationBase {
|
|
|
293
271
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
294
272
|
material: Entities.Material,
|
|
295
273
|
dispersionParameters: Entities.DispersionParameters
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
this.
|
|
300
|
-
this.
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
303
|
-
this.
|
|
304
|
-
this.
|
|
305
|
-
this.
|
|
274
|
+
controller?: AbortController;
|
|
275
|
+
}) {
|
|
276
|
+
super(data.controller);
|
|
277
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
278
|
+
this.weather = data.weather;
|
|
279
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
280
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
281
|
+
this.substrate = data.substrate;
|
|
282
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
283
|
+
this.material = data.material;
|
|
284
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
306
285
|
}
|
|
307
286
|
|
|
308
287
|
async run() {
|
|
309
288
|
try {
|
|
310
|
-
const request = new ConcentrationAtPointCalculationRequest(
|
|
311
|
-
this.scalarUdmOutputs,
|
|
312
|
-
this.weather,
|
|
313
|
-
this.dispersionRecords,
|
|
314
|
-
this.dispersionRecordCount,
|
|
315
|
-
this.substrate,
|
|
316
|
-
this.dispersionOutputConfig,
|
|
317
|
-
this.material,
|
|
318
|
-
this.dispersionParameters
|
|
319
|
-
);
|
|
289
|
+
const request = new ConcentrationAtPointCalculationRequest({
|
|
290
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
291
|
+
weather: this.weather,
|
|
292
|
+
dispersionRecords: this.dispersionRecords,
|
|
293
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
294
|
+
substrate: this.substrate,
|
|
295
|
+
dispersionOutputConfig: this.dispersionOutputConfig,
|
|
296
|
+
material: this.material,
|
|
297
|
+
dispersionParameters: this.dispersionParameters
|
|
298
|
+
});
|
|
320
299
|
|
|
321
300
|
const schema = new ConcentrationAtPointCalculationRequestSchema();
|
|
322
301
|
const validatedRequest = schema.validate(request);
|
|
@@ -375,21 +354,20 @@ export class ConcentrationAtPointCalculationResponse extends CalculationResponse
|
|
|
375
354
|
/**
|
|
376
355
|
* ConcentrationAtPoint calculation response class.
|
|
377
356
|
*
|
|
378
|
-
* @param {number} concentration - Concentration at a position of interest.
|
|
379
357
|
*/
|
|
380
|
-
constructor(
|
|
358
|
+
constructor(data: {
|
|
381
359
|
concentration: number,
|
|
382
360
|
resultCode: Enums.ResultCode,
|
|
383
361
|
messages: string[],
|
|
384
362
|
calculationElapsedTime: number,
|
|
385
363
|
operationId: string
|
|
386
|
-
) {
|
|
364
|
+
}) {
|
|
387
365
|
super();
|
|
388
|
-
this.concentration = concentration;
|
|
389
|
-
this.resultCode = resultCode;
|
|
390
|
-
this.messages = messages;
|
|
391
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
392
|
-
this.operationId = operationId;
|
|
366
|
+
this.concentration = data.concentration;
|
|
367
|
+
this.resultCode = data.resultCode;
|
|
368
|
+
this.messages = data.messages;
|
|
369
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
370
|
+
this.operationId = data.operationId;
|
|
393
371
|
}
|
|
394
372
|
|
|
395
373
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -450,13 +428,7 @@ export class ConcentrationAtPointCalculationResponseSchema {
|
|
|
450
428
|
}
|
|
451
429
|
|
|
452
430
|
makeCalculationResponse(data: ConcentrationAtPointCalculationResponseSchemaData): ConcentrationAtPointCalculationResponse {
|
|
453
|
-
return new ConcentrationAtPointCalculationResponse(
|
|
454
|
-
data.concentration,
|
|
455
|
-
data.resultCode,
|
|
456
|
-
data.messages,
|
|
457
|
-
data.calculationElapsedTime,
|
|
458
|
-
data.operationId
|
|
459
|
-
);
|
|
431
|
+
return new ConcentrationAtPointCalculationResponse(data);
|
|
460
432
|
}
|
|
461
433
|
}
|
|
462
434
|
|
|
@@ -486,17 +458,8 @@ class DistancesAndFootprintsToConcentrationLevelsCalculationRequest extends Calc
|
|
|
486
458
|
/**
|
|
487
459
|
* DistancesAndFootprintsToConcentrationLevels calculation request class.
|
|
488
460
|
*
|
|
489
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
490
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
491
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
492
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
493
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
494
|
-
* @param {Entities.DispersionOutputConfig[]} dispersionOutputConfigs - an array of dispersion output configs.
|
|
495
|
-
* @param {number} dispersionOutputConfigCount - Number of dispersion output configs.
|
|
496
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
497
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
498
461
|
*/
|
|
499
|
-
constructor(
|
|
462
|
+
constructor(data: {
|
|
500
463
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
501
464
|
weather: Entities.Weather,
|
|
502
465
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -506,17 +469,17 @@ class DistancesAndFootprintsToConcentrationLevelsCalculationRequest extends Calc
|
|
|
506
469
|
dispersionOutputConfigCount: number,
|
|
507
470
|
dispersionParameters: Entities.DispersionParameters,
|
|
508
471
|
material: Entities.Material
|
|
509
|
-
) {
|
|
472
|
+
}) {
|
|
510
473
|
super();
|
|
511
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
512
|
-
this.weather = weather;
|
|
513
|
-
this.dispersionRecords = dispersionRecords;
|
|
514
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
515
|
-
this.substrate = substrate;
|
|
516
|
-
this.dispersionOutputConfigs = dispersionOutputConfigs;
|
|
517
|
-
this.dispersionOutputConfigCount = dispersionOutputConfigCount;
|
|
518
|
-
this.dispersionParameters = dispersionParameters;
|
|
519
|
-
this.material = material;
|
|
474
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
475
|
+
this.weather = data.weather;
|
|
476
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
477
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
478
|
+
this.substrate = data.substrate;
|
|
479
|
+
this.dispersionOutputConfigs = data.dispersionOutputConfigs;
|
|
480
|
+
this.dispersionOutputConfigCount = data.dispersionOutputConfigCount;
|
|
481
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
482
|
+
this.material = data.material;
|
|
520
483
|
}
|
|
521
484
|
}
|
|
522
485
|
|
|
@@ -562,17 +525,7 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculationRequestSchema
|
|
|
562
525
|
}
|
|
563
526
|
|
|
564
527
|
makeCalculationRequest(data: DistancesAndFootprintsToConcentrationLevelsCalculationRequestSchemaData): DistancesAndFootprintsToConcentrationLevelsCalculationRequest {
|
|
565
|
-
return new DistancesAndFootprintsToConcentrationLevelsCalculationRequest(
|
|
566
|
-
data.scalarUdmOutputs,
|
|
567
|
-
data.weather,
|
|
568
|
-
data.dispersionRecords,
|
|
569
|
-
data.dispersionRecordCount,
|
|
570
|
-
data.substrate,
|
|
571
|
-
data.dispersionOutputConfigs,
|
|
572
|
-
data.dispersionOutputConfigCount,
|
|
573
|
-
data.dispersionParameters,
|
|
574
|
-
data.material
|
|
575
|
-
);
|
|
528
|
+
return new DistancesAndFootprintsToConcentrationLevelsCalculationRequest(data);
|
|
576
529
|
}
|
|
577
530
|
}
|
|
578
531
|
|
|
@@ -595,17 +548,8 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculation extends Calc
|
|
|
595
548
|
/**
|
|
596
549
|
* Calculates the distances and maximum footprints to specified concentration of interest levels for the dispersion modelling.
|
|
597
550
|
*
|
|
598
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
599
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
600
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
601
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
602
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
603
|
-
* @param {Entities.DispersionOutputConfig[]} dispersionOutputConfigs - an array of dispersion output configs.
|
|
604
|
-
* @param {number} dispersionOutputConfigCount - Number of dispersion output configs.
|
|
605
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
606
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
607
551
|
*/
|
|
608
|
-
constructor(
|
|
552
|
+
constructor(data: {
|
|
609
553
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
610
554
|
weather: Entities.Weather,
|
|
611
555
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -615,32 +559,33 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculation extends Calc
|
|
|
615
559
|
dispersionOutputConfigCount: number,
|
|
616
560
|
dispersionParameters: Entities.DispersionParameters,
|
|
617
561
|
material: Entities.Material
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
this.
|
|
622
|
-
this.
|
|
623
|
-
this.
|
|
624
|
-
this.
|
|
625
|
-
this.
|
|
626
|
-
this.
|
|
627
|
-
this.
|
|
628
|
-
this.
|
|
562
|
+
controller?: AbortController;
|
|
563
|
+
}) {
|
|
564
|
+
super(data.controller);
|
|
565
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
566
|
+
this.weather = data.weather;
|
|
567
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
568
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
569
|
+
this.substrate = data.substrate;
|
|
570
|
+
this.dispersionOutputConfigs = data.dispersionOutputConfigs;
|
|
571
|
+
this.dispersionOutputConfigCount = data.dispersionOutputConfigCount;
|
|
572
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
573
|
+
this.material = data.material;
|
|
629
574
|
}
|
|
630
575
|
|
|
631
576
|
async run() {
|
|
632
577
|
try {
|
|
633
|
-
const request = new DistancesAndFootprintsToConcentrationLevelsCalculationRequest(
|
|
634
|
-
this.scalarUdmOutputs,
|
|
635
|
-
this.weather,
|
|
636
|
-
this.dispersionRecords,
|
|
637
|
-
this.dispersionRecordCount,
|
|
638
|
-
this.substrate,
|
|
639
|
-
this.dispersionOutputConfigs,
|
|
640
|
-
this.dispersionOutputConfigCount,
|
|
641
|
-
this.dispersionParameters,
|
|
642
|
-
this.material
|
|
643
|
-
);
|
|
578
|
+
const request = new DistancesAndFootprintsToConcentrationLevelsCalculationRequest({
|
|
579
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
580
|
+
weather: this.weather,
|
|
581
|
+
dispersionRecords: this.dispersionRecords,
|
|
582
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
583
|
+
substrate: this.substrate,
|
|
584
|
+
dispersionOutputConfigs: this.dispersionOutputConfigs,
|
|
585
|
+
dispersionOutputConfigCount: this.dispersionOutputConfigCount,
|
|
586
|
+
dispersionParameters: this.dispersionParameters,
|
|
587
|
+
material: this.material
|
|
588
|
+
});
|
|
644
589
|
|
|
645
590
|
const schema = new DistancesAndFootprintsToConcentrationLevelsCalculationRequestSchema();
|
|
646
591
|
const validatedRequest = schema.validate(request);
|
|
@@ -736,13 +681,8 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculationResponse exte
|
|
|
736
681
|
/**
|
|
737
682
|
* DistancesAndFootprintsToConcentrationLevels calculation response class.
|
|
738
683
|
*
|
|
739
|
-
* @param {number[]} concsUsed - an array of concentrations of interest, corresponding to the dispersion output configs.
|
|
740
|
-
* @param {number[]} nContourPoints - an array of the number of contour points, corresponding to the dispersion output configs.
|
|
741
|
-
* @param {number[]} areasContour - an array of areas of footprint contours, corresponding to the dispersion output configs.
|
|
742
|
-
* @param {number[]} distancesConcentration - an array of the maximum distances downwind, corresponding to the dispersion output configs.
|
|
743
|
-
* @param {Entities.LocalPosition[]} contourPoints - Contour points of maximum footprints to concentration level.
|
|
744
684
|
*/
|
|
745
|
-
constructor(
|
|
685
|
+
constructor(data: {
|
|
746
686
|
concsUsed: number[],
|
|
747
687
|
nContourPoints: number[],
|
|
748
688
|
areasContour: number[],
|
|
@@ -752,17 +692,17 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculationResponse exte
|
|
|
752
692
|
messages: string[],
|
|
753
693
|
calculationElapsedTime: number,
|
|
754
694
|
operationId: string
|
|
755
|
-
) {
|
|
695
|
+
}) {
|
|
756
696
|
super();
|
|
757
|
-
this.concsUsed = concsUsed;
|
|
758
|
-
this.nContourPoints = nContourPoints;
|
|
759
|
-
this.areasContour = areasContour;
|
|
760
|
-
this.distancesConcentration = distancesConcentration;
|
|
761
|
-
this.contourPoints = contourPoints;
|
|
762
|
-
this.resultCode = resultCode;
|
|
763
|
-
this.messages = messages;
|
|
764
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
765
|
-
this.operationId = operationId;
|
|
697
|
+
this.concsUsed = data.concsUsed;
|
|
698
|
+
this.nContourPoints = data.nContourPoints;
|
|
699
|
+
this.areasContour = data.areasContour;
|
|
700
|
+
this.distancesConcentration = data.distancesConcentration;
|
|
701
|
+
this.contourPoints = data.contourPoints;
|
|
702
|
+
this.resultCode = data.resultCode;
|
|
703
|
+
this.messages = data.messages;
|
|
704
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
705
|
+
this.operationId = data.operationId;
|
|
766
706
|
}
|
|
767
707
|
|
|
768
708
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -853,17 +793,7 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculationResponseSchem
|
|
|
853
793
|
}
|
|
854
794
|
|
|
855
795
|
makeCalculationResponse(data: DistancesAndFootprintsToConcentrationLevelsCalculationResponseSchemaData): DistancesAndFootprintsToConcentrationLevelsCalculationResponse {
|
|
856
|
-
return new DistancesAndFootprintsToConcentrationLevelsCalculationResponse(
|
|
857
|
-
data.concsUsed,
|
|
858
|
-
data.nContourPoints,
|
|
859
|
-
data.areasContour,
|
|
860
|
-
data.distancesConcentration,
|
|
861
|
-
data.contourPoints,
|
|
862
|
-
data.resultCode,
|
|
863
|
-
data.messages,
|
|
864
|
-
data.calculationElapsedTime,
|
|
865
|
-
data.operationId
|
|
866
|
-
);
|
|
796
|
+
return new DistancesAndFootprintsToConcentrationLevelsCalculationResponse(data);
|
|
867
797
|
}
|
|
868
798
|
}
|
|
869
799
|
|
|
@@ -893,17 +823,8 @@ class DistancesToConcLevelsCalculationRequest extends CalculationRequestBase {
|
|
|
893
823
|
/**
|
|
894
824
|
* DistancesToConcLevels calculation request class.
|
|
895
825
|
*
|
|
896
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
897
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
898
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
899
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
900
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
901
|
-
* @param {Entities.DispersionOutputConfig[]} dispersionOutputConfigs - an array of dispersion output configs.
|
|
902
|
-
* @param {number} dispersionOutputConfigCount - Number of dispersion output configs.
|
|
903
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
904
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
905
826
|
*/
|
|
906
|
-
constructor(
|
|
827
|
+
constructor(data: {
|
|
907
828
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
908
829
|
weather: Entities.Weather,
|
|
909
830
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -913,17 +834,17 @@ class DistancesToConcLevelsCalculationRequest extends CalculationRequestBase {
|
|
|
913
834
|
dispersionOutputConfigCount: number,
|
|
914
835
|
material: Entities.Material,
|
|
915
836
|
dispersionParameters: Entities.DispersionParameters
|
|
916
|
-
) {
|
|
837
|
+
}) {
|
|
917
838
|
super();
|
|
918
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
919
|
-
this.weather = weather;
|
|
920
|
-
this.dispersionRecords = dispersionRecords;
|
|
921
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
922
|
-
this.substrate = substrate;
|
|
923
|
-
this.dispersionOutputConfigs = dispersionOutputConfigs;
|
|
924
|
-
this.dispersionOutputConfigCount = dispersionOutputConfigCount;
|
|
925
|
-
this.material = material;
|
|
926
|
-
this.dispersionParameters = dispersionParameters;
|
|
839
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
840
|
+
this.weather = data.weather;
|
|
841
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
842
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
843
|
+
this.substrate = data.substrate;
|
|
844
|
+
this.dispersionOutputConfigs = data.dispersionOutputConfigs;
|
|
845
|
+
this.dispersionOutputConfigCount = data.dispersionOutputConfigCount;
|
|
846
|
+
this.material = data.material;
|
|
847
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
927
848
|
}
|
|
928
849
|
}
|
|
929
850
|
|
|
@@ -969,17 +890,7 @@ export class DistancesToConcLevelsCalculationRequestSchema {
|
|
|
969
890
|
}
|
|
970
891
|
|
|
971
892
|
makeCalculationRequest(data: DistancesToConcLevelsCalculationRequestSchemaData): DistancesToConcLevelsCalculationRequest {
|
|
972
|
-
return new DistancesToConcLevelsCalculationRequest(
|
|
973
|
-
data.scalarUdmOutputs,
|
|
974
|
-
data.weather,
|
|
975
|
-
data.dispersionRecords,
|
|
976
|
-
data.dispersionRecordCount,
|
|
977
|
-
data.substrate,
|
|
978
|
-
data.dispersionOutputConfigs,
|
|
979
|
-
data.dispersionOutputConfigCount,
|
|
980
|
-
data.material,
|
|
981
|
-
data.dispersionParameters
|
|
982
|
-
);
|
|
893
|
+
return new DistancesToConcLevelsCalculationRequest(data);
|
|
983
894
|
}
|
|
984
895
|
}
|
|
985
896
|
|
|
@@ -999,17 +910,8 @@ export class DistancesToConcLevelsCalculation extends CalculationBase {
|
|
|
999
910
|
/**
|
|
1000
911
|
* Calculates the maximum downwind distance to a number of concentration level in the direction of the wind, at the effect height and averaging time.
|
|
1001
912
|
*
|
|
1002
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1003
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1004
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1005
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1006
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1007
|
-
* @param {Entities.DispersionOutputConfig[]} dispersionOutputConfigs - an array of dispersion output configs.
|
|
1008
|
-
* @param {number} dispersionOutputConfigCount - Number of dispersion output configs.
|
|
1009
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1010
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1011
913
|
*/
|
|
1012
|
-
constructor(
|
|
914
|
+
constructor(data: {
|
|
1013
915
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1014
916
|
weather: Entities.Weather,
|
|
1015
917
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1019,32 +921,33 @@ export class DistancesToConcLevelsCalculation extends CalculationBase {
|
|
|
1019
921
|
dispersionOutputConfigCount: number,
|
|
1020
922
|
material: Entities.Material,
|
|
1021
923
|
dispersionParameters: Entities.DispersionParameters
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
this.
|
|
1026
|
-
this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1029
|
-
this.
|
|
1030
|
-
this.
|
|
1031
|
-
this.
|
|
1032
|
-
this.
|
|
924
|
+
controller?: AbortController;
|
|
925
|
+
}) {
|
|
926
|
+
super(data.controller);
|
|
927
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
928
|
+
this.weather = data.weather;
|
|
929
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
930
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
931
|
+
this.substrate = data.substrate;
|
|
932
|
+
this.dispersionOutputConfigs = data.dispersionOutputConfigs;
|
|
933
|
+
this.dispersionOutputConfigCount = data.dispersionOutputConfigCount;
|
|
934
|
+
this.material = data.material;
|
|
935
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1033
936
|
}
|
|
1034
937
|
|
|
1035
938
|
async run() {
|
|
1036
939
|
try {
|
|
1037
|
-
const request = new DistancesToConcLevelsCalculationRequest(
|
|
1038
|
-
this.scalarUdmOutputs,
|
|
1039
|
-
this.weather,
|
|
1040
|
-
this.dispersionRecords,
|
|
1041
|
-
this.dispersionRecordCount,
|
|
1042
|
-
this.substrate,
|
|
1043
|
-
this.dispersionOutputConfigs,
|
|
1044
|
-
this.dispersionOutputConfigCount,
|
|
1045
|
-
this.material,
|
|
1046
|
-
this.dispersionParameters
|
|
1047
|
-
);
|
|
940
|
+
const request = new DistancesToConcLevelsCalculationRequest({
|
|
941
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
942
|
+
weather: this.weather,
|
|
943
|
+
dispersionRecords: this.dispersionRecords,
|
|
944
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
945
|
+
substrate: this.substrate,
|
|
946
|
+
dispersionOutputConfigs: this.dispersionOutputConfigs,
|
|
947
|
+
dispersionOutputConfigCount: this.dispersionOutputConfigCount,
|
|
948
|
+
material: this.material,
|
|
949
|
+
dispersionParameters: this.dispersionParameters
|
|
950
|
+
});
|
|
1048
951
|
|
|
1049
952
|
const schema = new DistancesToConcLevelsCalculationRequestSchema();
|
|
1050
953
|
const validatedRequest = schema.validate(request);
|
|
@@ -1116,24 +1019,22 @@ export class DistancesToConcLevelsCalculationResponse extends CalculationRespons
|
|
|
1116
1019
|
/**
|
|
1117
1020
|
* DistancesToConcLevels calculation response class.
|
|
1118
1021
|
*
|
|
1119
|
-
* @param {number[]} concUsed - an array of concentrations of interest, corresponding to the dispersion output configs.
|
|
1120
|
-
* @param {number[]} distances - an array of the distances to concentration of interest, corresponding to the dispersion output configs.
|
|
1121
1022
|
*/
|
|
1122
|
-
constructor(
|
|
1023
|
+
constructor(data: {
|
|
1123
1024
|
concUsed: number[],
|
|
1124
1025
|
distances: number[],
|
|
1125
1026
|
resultCode: Enums.ResultCode,
|
|
1126
1027
|
messages: string[],
|
|
1127
1028
|
calculationElapsedTime: number,
|
|
1128
1029
|
operationId: string
|
|
1129
|
-
) {
|
|
1030
|
+
}) {
|
|
1130
1031
|
super();
|
|
1131
|
-
this.concUsed = concUsed;
|
|
1132
|
-
this.distances = distances;
|
|
1133
|
-
this.resultCode = resultCode;
|
|
1134
|
-
this.messages = messages;
|
|
1135
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1136
|
-
this.operationId = operationId;
|
|
1032
|
+
this.concUsed = data.concUsed;
|
|
1033
|
+
this.distances = data.distances;
|
|
1034
|
+
this.resultCode = data.resultCode;
|
|
1035
|
+
this.messages = data.messages;
|
|
1036
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1037
|
+
this.operationId = data.operationId;
|
|
1137
1038
|
}
|
|
1138
1039
|
|
|
1139
1040
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1200,14 +1101,7 @@ export class DistancesToConcLevelsCalculationResponseSchema {
|
|
|
1200
1101
|
}
|
|
1201
1102
|
|
|
1202
1103
|
makeCalculationResponse(data: DistancesToConcLevelsCalculationResponseSchemaData): DistancesToConcLevelsCalculationResponse {
|
|
1203
|
-
return new DistancesToConcLevelsCalculationResponse(
|
|
1204
|
-
data.concUsed,
|
|
1205
|
-
data.distances,
|
|
1206
|
-
data.resultCode,
|
|
1207
|
-
data.messages,
|
|
1208
|
-
data.calculationElapsedTime,
|
|
1209
|
-
data.operationId
|
|
1210
|
-
);
|
|
1104
|
+
return new DistancesToConcLevelsCalculationResponse(data);
|
|
1211
1105
|
}
|
|
1212
1106
|
}
|
|
1213
1107
|
|
|
@@ -1235,16 +1129,8 @@ class MaxConcDistanceCalculationRequest extends CalculationRequestBase {
|
|
|
1235
1129
|
/**
|
|
1236
1130
|
* MaxConcDistance calculation request class.
|
|
1237
1131
|
*
|
|
1238
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1239
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1240
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1241
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1242
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1243
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
1244
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1245
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1246
1132
|
*/
|
|
1247
|
-
constructor(
|
|
1133
|
+
constructor(data: {
|
|
1248
1134
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1249
1135
|
weather: Entities.Weather,
|
|
1250
1136
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1253,16 +1139,16 @@ class MaxConcDistanceCalculationRequest extends CalculationRequestBase {
|
|
|
1253
1139
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
1254
1140
|
material: Entities.Material,
|
|
1255
1141
|
dispersionParameters: Entities.DispersionParameters
|
|
1256
|
-
) {
|
|
1142
|
+
}) {
|
|
1257
1143
|
super();
|
|
1258
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
1259
|
-
this.weather = weather;
|
|
1260
|
-
this.dispersionRecords = dispersionRecords;
|
|
1261
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
1262
|
-
this.substrate = substrate;
|
|
1263
|
-
this.dispersionOutputConfig = dispersionOutputConfig;
|
|
1264
|
-
this.material = material;
|
|
1265
|
-
this.dispersionParameters = dispersionParameters;
|
|
1144
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1145
|
+
this.weather = data.weather;
|
|
1146
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1147
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1148
|
+
this.substrate = data.substrate;
|
|
1149
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1150
|
+
this.material = data.material;
|
|
1151
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1266
1152
|
}
|
|
1267
1153
|
}
|
|
1268
1154
|
|
|
@@ -1306,16 +1192,7 @@ export class MaxConcDistanceCalculationRequestSchema {
|
|
|
1306
1192
|
}
|
|
1307
1193
|
|
|
1308
1194
|
makeCalculationRequest(data: MaxConcDistanceCalculationRequestSchemaData): MaxConcDistanceCalculationRequest {
|
|
1309
|
-
return new MaxConcDistanceCalculationRequest(
|
|
1310
|
-
data.scalarUdmOutputs,
|
|
1311
|
-
data.weather,
|
|
1312
|
-
data.dispersionRecords,
|
|
1313
|
-
data.dispersionRecordCount,
|
|
1314
|
-
data.substrate,
|
|
1315
|
-
data.dispersionOutputConfig,
|
|
1316
|
-
data.material,
|
|
1317
|
-
data.dispersionParameters
|
|
1318
|
-
);
|
|
1195
|
+
return new MaxConcDistanceCalculationRequest(data);
|
|
1319
1196
|
}
|
|
1320
1197
|
}
|
|
1321
1198
|
|
|
@@ -1334,16 +1211,8 @@ export class MaxConcDistanceCalculation extends CalculationBase {
|
|
|
1334
1211
|
/**
|
|
1335
1212
|
* Calculate the maximum concentration vs distance, i.e. the maximum concentration reached at points downwind out to the minimum concentration of interest. Dispersion results produced from a successful dispersion calculation are required as input. Include the effects of along-wind diffusion (AWD).
|
|
1336
1213
|
*
|
|
1337
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1338
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1339
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1340
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1341
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1342
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
1343
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1344
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1345
1214
|
*/
|
|
1346
|
-
constructor(
|
|
1215
|
+
constructor(data: {
|
|
1347
1216
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1348
1217
|
weather: Entities.Weather,
|
|
1349
1218
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1352,30 +1221,31 @@ export class MaxConcDistanceCalculation extends CalculationBase {
|
|
|
1352
1221
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
1353
1222
|
material: Entities.Material,
|
|
1354
1223
|
dispersionParameters: Entities.DispersionParameters
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
this.
|
|
1359
|
-
this.
|
|
1360
|
-
this.
|
|
1361
|
-
this.
|
|
1362
|
-
this.
|
|
1363
|
-
this.
|
|
1364
|
-
this.
|
|
1224
|
+
controller?: AbortController;
|
|
1225
|
+
}) {
|
|
1226
|
+
super(data.controller);
|
|
1227
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1228
|
+
this.weather = data.weather;
|
|
1229
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1230
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1231
|
+
this.substrate = data.substrate;
|
|
1232
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1233
|
+
this.material = data.material;
|
|
1234
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1365
1235
|
}
|
|
1366
1236
|
|
|
1367
1237
|
async run() {
|
|
1368
1238
|
try {
|
|
1369
|
-
const request = new MaxConcDistanceCalculationRequest(
|
|
1370
|
-
this.scalarUdmOutputs,
|
|
1371
|
-
this.weather,
|
|
1372
|
-
this.dispersionRecords,
|
|
1373
|
-
this.dispersionRecordCount,
|
|
1374
|
-
this.substrate,
|
|
1375
|
-
this.dispersionOutputConfig,
|
|
1376
|
-
this.material,
|
|
1377
|
-
this.dispersionParameters
|
|
1378
|
-
);
|
|
1239
|
+
const request = new MaxConcDistanceCalculationRequest({
|
|
1240
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
1241
|
+
weather: this.weather,
|
|
1242
|
+
dispersionRecords: this.dispersionRecords,
|
|
1243
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
1244
|
+
substrate: this.substrate,
|
|
1245
|
+
dispersionOutputConfig: this.dispersionOutputConfig,
|
|
1246
|
+
material: this.material,
|
|
1247
|
+
dispersionParameters: this.dispersionParameters
|
|
1248
|
+
});
|
|
1379
1249
|
|
|
1380
1250
|
const schema = new MaxConcDistanceCalculationRequestSchema();
|
|
1381
1251
|
const validatedRequest = schema.validate(request);
|
|
@@ -1442,24 +1312,22 @@ export class MaxConcDistanceCalculationResponse extends CalculationResponseBase
|
|
|
1442
1312
|
/**
|
|
1443
1313
|
* MaxConcDistance calculation response class.
|
|
1444
1314
|
*
|
|
1445
|
-
* @param {number} concUsed - Concentration of interest.
|
|
1446
|
-
* @param {Entities.ConcentrationRecord[]} concentrationRecords - an array of maximum concentration at x, y, z coordinates.
|
|
1447
1315
|
*/
|
|
1448
|
-
constructor(
|
|
1316
|
+
constructor(data: {
|
|
1449
1317
|
concUsed: number,
|
|
1450
1318
|
concentrationRecords: Entities.ConcentrationRecord[],
|
|
1451
1319
|
resultCode: Enums.ResultCode,
|
|
1452
1320
|
messages: string[],
|
|
1453
1321
|
calculationElapsedTime: number,
|
|
1454
1322
|
operationId: string
|
|
1455
|
-
) {
|
|
1323
|
+
}) {
|
|
1456
1324
|
super();
|
|
1457
|
-
this.concUsed = concUsed;
|
|
1458
|
-
this.concentrationRecords = concentrationRecords;
|
|
1459
|
-
this.resultCode = resultCode;
|
|
1460
|
-
this.messages = messages;
|
|
1461
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1462
|
-
this.operationId = operationId;
|
|
1325
|
+
this.concUsed = data.concUsed;
|
|
1326
|
+
this.concentrationRecords = data.concentrationRecords;
|
|
1327
|
+
this.resultCode = data.resultCode;
|
|
1328
|
+
this.messages = data.messages;
|
|
1329
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1330
|
+
this.operationId = data.operationId;
|
|
1463
1331
|
}
|
|
1464
1332
|
|
|
1465
1333
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1532,14 +1400,7 @@ export class MaxConcDistanceCalculationResponseSchema {
|
|
|
1532
1400
|
}
|
|
1533
1401
|
|
|
1534
1402
|
makeCalculationResponse(data: MaxConcDistanceCalculationResponseSchemaData): MaxConcDistanceCalculationResponse {
|
|
1535
|
-
return new MaxConcDistanceCalculationResponse(
|
|
1536
|
-
data.concUsed,
|
|
1537
|
-
data.concentrationRecords,
|
|
1538
|
-
data.resultCode,
|
|
1539
|
-
data.messages,
|
|
1540
|
-
data.calculationElapsedTime,
|
|
1541
|
-
data.operationId
|
|
1542
|
-
);
|
|
1403
|
+
return new MaxConcDistanceCalculationResponse(data);
|
|
1543
1404
|
}
|
|
1544
1405
|
}
|
|
1545
1406
|
|
|
@@ -1567,16 +1428,8 @@ class MaxConcFootprintCalculationRequest extends CalculationRequestBase {
|
|
|
1567
1428
|
/**
|
|
1568
1429
|
* MaxConcFootprint calculation request class.
|
|
1569
1430
|
*
|
|
1570
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1571
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1572
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1573
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1574
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1575
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
1576
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1577
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1578
1431
|
*/
|
|
1579
|
-
constructor(
|
|
1432
|
+
constructor(data: {
|
|
1580
1433
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1581
1434
|
weather: Entities.Weather,
|
|
1582
1435
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1585,16 +1438,16 @@ class MaxConcFootprintCalculationRequest extends CalculationRequestBase {
|
|
|
1585
1438
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
1586
1439
|
material: Entities.Material,
|
|
1587
1440
|
dispersionParameters: Entities.DispersionParameters
|
|
1588
|
-
) {
|
|
1441
|
+
}) {
|
|
1589
1442
|
super();
|
|
1590
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
1591
|
-
this.weather = weather;
|
|
1592
|
-
this.dispersionRecords = dispersionRecords;
|
|
1593
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
1594
|
-
this.substrate = substrate;
|
|
1595
|
-
this.dispersionOutputConfig = dispersionOutputConfig;
|
|
1596
|
-
this.material = material;
|
|
1597
|
-
this.dispersionParameters = dispersionParameters;
|
|
1443
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1444
|
+
this.weather = data.weather;
|
|
1445
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1446
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1447
|
+
this.substrate = data.substrate;
|
|
1448
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1449
|
+
this.material = data.material;
|
|
1450
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1598
1451
|
}
|
|
1599
1452
|
}
|
|
1600
1453
|
|
|
@@ -1638,16 +1491,7 @@ export class MaxConcFootprintCalculationRequestSchema {
|
|
|
1638
1491
|
}
|
|
1639
1492
|
|
|
1640
1493
|
makeCalculationRequest(data: MaxConcFootprintCalculationRequestSchemaData): MaxConcFootprintCalculationRequest {
|
|
1641
|
-
return new MaxConcFootprintCalculationRequest(
|
|
1642
|
-
data.scalarUdmOutputs,
|
|
1643
|
-
data.weather,
|
|
1644
|
-
data.dispersionRecords,
|
|
1645
|
-
data.dispersionRecordCount,
|
|
1646
|
-
data.substrate,
|
|
1647
|
-
data.dispersionOutputConfig,
|
|
1648
|
-
data.material,
|
|
1649
|
-
data.dispersionParameters
|
|
1650
|
-
);
|
|
1494
|
+
return new MaxConcFootprintCalculationRequest(data);
|
|
1651
1495
|
}
|
|
1652
1496
|
}
|
|
1653
1497
|
|
|
@@ -1666,16 +1510,8 @@ export class MaxConcFootprintCalculation extends CalculationBase {
|
|
|
1666
1510
|
/**
|
|
1667
1511
|
* Calculate the maximum footprint of the cloud for a given concentration level. The output is a contour line defined by a set of x,y values.
|
|
1668
1512
|
*
|
|
1669
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1670
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1671
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1672
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1673
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1674
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
1675
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1676
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1677
1513
|
*/
|
|
1678
|
-
constructor(
|
|
1514
|
+
constructor(data: {
|
|
1679
1515
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1680
1516
|
weather: Entities.Weather,
|
|
1681
1517
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1684,30 +1520,31 @@ export class MaxConcFootprintCalculation extends CalculationBase {
|
|
|
1684
1520
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
1685
1521
|
material: Entities.Material,
|
|
1686
1522
|
dispersionParameters: Entities.DispersionParameters
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
this.
|
|
1691
|
-
this.
|
|
1692
|
-
this.
|
|
1693
|
-
this.
|
|
1694
|
-
this.
|
|
1695
|
-
this.
|
|
1696
|
-
this.
|
|
1523
|
+
controller?: AbortController;
|
|
1524
|
+
}) {
|
|
1525
|
+
super(data.controller);
|
|
1526
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1527
|
+
this.weather = data.weather;
|
|
1528
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1529
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1530
|
+
this.substrate = data.substrate;
|
|
1531
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1532
|
+
this.material = data.material;
|
|
1533
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1697
1534
|
}
|
|
1698
1535
|
|
|
1699
1536
|
async run() {
|
|
1700
1537
|
try {
|
|
1701
|
-
const request = new MaxConcFootprintCalculationRequest(
|
|
1702
|
-
this.scalarUdmOutputs,
|
|
1703
|
-
this.weather,
|
|
1704
|
-
this.dispersionRecords,
|
|
1705
|
-
this.dispersionRecordCount,
|
|
1706
|
-
this.substrate,
|
|
1707
|
-
this.dispersionOutputConfig,
|
|
1708
|
-
this.material,
|
|
1709
|
-
this.dispersionParameters
|
|
1710
|
-
);
|
|
1538
|
+
const request = new MaxConcFootprintCalculationRequest({
|
|
1539
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
1540
|
+
weather: this.weather,
|
|
1541
|
+
dispersionRecords: this.dispersionRecords,
|
|
1542
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
1543
|
+
substrate: this.substrate,
|
|
1544
|
+
dispersionOutputConfig: this.dispersionOutputConfig,
|
|
1545
|
+
material: this.material,
|
|
1546
|
+
dispersionParameters: this.dispersionParameters
|
|
1547
|
+
});
|
|
1711
1548
|
|
|
1712
1549
|
const schema = new MaxConcFootprintCalculationRequestSchema();
|
|
1713
1550
|
const validatedRequest = schema.validate(request);
|
|
@@ -1774,24 +1611,22 @@ export class MaxConcFootprintCalculationResponse extends CalculationResponseBase
|
|
|
1774
1611
|
/**
|
|
1775
1612
|
* MaxConcFootprint calculation response class.
|
|
1776
1613
|
*
|
|
1777
|
-
* @param {number} concUsed - Concentration of interest.
|
|
1778
|
-
* @param {Entities.LocalPosition[]} contourPoints - an array of points along the footprint contour.
|
|
1779
1614
|
*/
|
|
1780
|
-
constructor(
|
|
1615
|
+
constructor(data: {
|
|
1781
1616
|
concUsed: number,
|
|
1782
1617
|
contourPoints: Entities.LocalPosition[],
|
|
1783
1618
|
resultCode: Enums.ResultCode,
|
|
1784
1619
|
messages: string[],
|
|
1785
1620
|
calculationElapsedTime: number,
|
|
1786
1621
|
operationId: string
|
|
1787
|
-
) {
|
|
1622
|
+
}) {
|
|
1788
1623
|
super();
|
|
1789
|
-
this.concUsed = concUsed;
|
|
1790
|
-
this.contourPoints = contourPoints;
|
|
1791
|
-
this.resultCode = resultCode;
|
|
1792
|
-
this.messages = messages;
|
|
1793
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1794
|
-
this.operationId = operationId;
|
|
1624
|
+
this.concUsed = data.concUsed;
|
|
1625
|
+
this.contourPoints = data.contourPoints;
|
|
1626
|
+
this.resultCode = data.resultCode;
|
|
1627
|
+
this.messages = data.messages;
|
|
1628
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1629
|
+
this.operationId = data.operationId;
|
|
1795
1630
|
}
|
|
1796
1631
|
|
|
1797
1632
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1864,14 +1699,7 @@ export class MaxConcFootprintCalculationResponseSchema {
|
|
|
1864
1699
|
}
|
|
1865
1700
|
|
|
1866
1701
|
makeCalculationResponse(data: MaxConcFootprintCalculationResponseSchemaData): MaxConcFootprintCalculationResponse {
|
|
1867
|
-
return new MaxConcFootprintCalculationResponse(
|
|
1868
|
-
data.concUsed,
|
|
1869
|
-
data.contourPoints,
|
|
1870
|
-
data.resultCode,
|
|
1871
|
-
data.messages,
|
|
1872
|
-
data.calculationElapsedTime,
|
|
1873
|
-
data.operationId
|
|
1874
|
-
);
|
|
1702
|
+
return new MaxConcFootprintCalculationResponse(data);
|
|
1875
1703
|
}
|
|
1876
1704
|
}
|
|
1877
1705
|
|
|
@@ -1899,16 +1727,8 @@ class MaxDistanceToConcCalculationRequest extends CalculationRequestBase {
|
|
|
1899
1727
|
/**
|
|
1900
1728
|
* MaxDistanceToConc calculation request class.
|
|
1901
1729
|
*
|
|
1902
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
1903
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
1904
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
1905
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
1906
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
1907
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
1908
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
1909
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
1910
1730
|
*/
|
|
1911
|
-
constructor(
|
|
1731
|
+
constructor(data: {
|
|
1912
1732
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
1913
1733
|
weather: Entities.Weather,
|
|
1914
1734
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -1917,16 +1737,16 @@ class MaxDistanceToConcCalculationRequest extends CalculationRequestBase {
|
|
|
1917
1737
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
1918
1738
|
dispersionParameters: Entities.DispersionParameters,
|
|
1919
1739
|
material: Entities.Material
|
|
1920
|
-
) {
|
|
1740
|
+
}) {
|
|
1921
1741
|
super();
|
|
1922
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
1923
|
-
this.weather = weather;
|
|
1924
|
-
this.dispersionRecords = dispersionRecords;
|
|
1925
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
1926
|
-
this.substrate = substrate;
|
|
1927
|
-
this.dispersionOutputConfig = dispersionOutputConfig;
|
|
1928
|
-
this.dispersionParameters = dispersionParameters;
|
|
1929
|
-
this.material = material;
|
|
1742
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1743
|
+
this.weather = data.weather;
|
|
1744
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1745
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1746
|
+
this.substrate = data.substrate;
|
|
1747
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1748
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1749
|
+
this.material = data.material;
|
|
1930
1750
|
}
|
|
1931
1751
|
}
|
|
1932
1752
|
|
|
@@ -1970,16 +1790,7 @@ export class MaxDistanceToConcCalculationRequestSchema {
|
|
|
1970
1790
|
}
|
|
1971
1791
|
|
|
1972
1792
|
makeCalculationRequest(data: MaxDistanceToConcCalculationRequestSchemaData): MaxDistanceToConcCalculationRequest {
|
|
1973
|
-
return new MaxDistanceToConcCalculationRequest(
|
|
1974
|
-
data.scalarUdmOutputs,
|
|
1975
|
-
data.weather,
|
|
1976
|
-
data.dispersionRecords,
|
|
1977
|
-
data.dispersionRecordCount,
|
|
1978
|
-
data.substrate,
|
|
1979
|
-
data.dispersionOutputConfig,
|
|
1980
|
-
data.dispersionParameters,
|
|
1981
|
-
data.material
|
|
1982
|
-
);
|
|
1793
|
+
return new MaxDistanceToConcCalculationRequest(data);
|
|
1983
1794
|
}
|
|
1984
1795
|
}
|
|
1985
1796
|
|
|
@@ -1998,16 +1809,8 @@ export class MaxDistanceToConcCalculation extends CalculationBase {
|
|
|
1998
1809
|
/**
|
|
1999
1810
|
* Calculates the maximum downwind distance to a concentration level in the direction of the wind, at the current effect height and averaging time.
|
|
2000
1811
|
*
|
|
2001
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion results.
|
|
2002
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
2003
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
2004
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
2005
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
2006
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
2007
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
2008
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
2009
1812
|
*/
|
|
2010
|
-
constructor(
|
|
1813
|
+
constructor(data: {
|
|
2011
1814
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
2012
1815
|
weather: Entities.Weather,
|
|
2013
1816
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -2016,30 +1819,31 @@ export class MaxDistanceToConcCalculation extends CalculationBase {
|
|
|
2016
1819
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
2017
1820
|
dispersionParameters: Entities.DispersionParameters,
|
|
2018
1821
|
material: Entities.Material
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
this.
|
|
2023
|
-
this.
|
|
2024
|
-
this.
|
|
2025
|
-
this.
|
|
2026
|
-
this.
|
|
2027
|
-
this.
|
|
2028
|
-
this.
|
|
1822
|
+
controller?: AbortController;
|
|
1823
|
+
}) {
|
|
1824
|
+
super(data.controller);
|
|
1825
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
1826
|
+
this.weather = data.weather;
|
|
1827
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
1828
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
1829
|
+
this.substrate = data.substrate;
|
|
1830
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
1831
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
1832
|
+
this.material = data.material;
|
|
2029
1833
|
}
|
|
2030
1834
|
|
|
2031
1835
|
async run() {
|
|
2032
1836
|
try {
|
|
2033
|
-
const request = new MaxDistanceToConcCalculationRequest(
|
|
2034
|
-
this.scalarUdmOutputs,
|
|
2035
|
-
this.weather,
|
|
2036
|
-
this.dispersionRecords,
|
|
2037
|
-
this.dispersionRecordCount,
|
|
2038
|
-
this.substrate,
|
|
2039
|
-
this.dispersionOutputConfig,
|
|
2040
|
-
this.dispersionParameters,
|
|
2041
|
-
this.material
|
|
2042
|
-
);
|
|
1837
|
+
const request = new MaxDistanceToConcCalculationRequest({
|
|
1838
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
1839
|
+
weather: this.weather,
|
|
1840
|
+
dispersionRecords: this.dispersionRecords,
|
|
1841
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
1842
|
+
substrate: this.substrate,
|
|
1843
|
+
dispersionOutputConfig: this.dispersionOutputConfig,
|
|
1844
|
+
dispersionParameters: this.dispersionParameters,
|
|
1845
|
+
material: this.material
|
|
1846
|
+
});
|
|
2043
1847
|
|
|
2044
1848
|
const schema = new MaxDistanceToConcCalculationRequestSchema();
|
|
2045
1849
|
const validatedRequest = schema.validate(request);
|
|
@@ -2101,24 +1905,22 @@ export class MaxDistanceToConcCalculationResponse extends CalculationResponseBas
|
|
|
2101
1905
|
/**
|
|
2102
1906
|
* MaxDistanceToConc calculation response class.
|
|
2103
1907
|
*
|
|
2104
|
-
* @param {number} concUsed - Concentration of interest.
|
|
2105
|
-
* @param {number} distance - Maximum distance to concentration of interest.
|
|
2106
1908
|
*/
|
|
2107
|
-
constructor(
|
|
1909
|
+
constructor(data: {
|
|
2108
1910
|
concUsed: number,
|
|
2109
1911
|
distance: number,
|
|
2110
1912
|
resultCode: Enums.ResultCode,
|
|
2111
1913
|
messages: string[],
|
|
2112
1914
|
calculationElapsedTime: number,
|
|
2113
1915
|
operationId: string
|
|
2114
|
-
) {
|
|
1916
|
+
}) {
|
|
2115
1917
|
super();
|
|
2116
|
-
this.concUsed = concUsed;
|
|
2117
|
-
this.distance = distance;
|
|
2118
|
-
this.resultCode = resultCode;
|
|
2119
|
-
this.messages = messages;
|
|
2120
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2121
|
-
this.operationId = operationId;
|
|
1918
|
+
this.concUsed = data.concUsed;
|
|
1919
|
+
this.distance = data.distance;
|
|
1920
|
+
this.resultCode = data.resultCode;
|
|
1921
|
+
this.messages = data.messages;
|
|
1922
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1923
|
+
this.operationId = data.operationId;
|
|
2122
1924
|
}
|
|
2123
1925
|
|
|
2124
1926
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2185,14 +1987,7 @@ export class MaxDistanceToConcCalculationResponseSchema {
|
|
|
2185
1987
|
}
|
|
2186
1988
|
|
|
2187
1989
|
makeCalculationResponse(data: MaxDistanceToConcCalculationResponseSchemaData): MaxDistanceToConcCalculationResponse {
|
|
2188
|
-
return new MaxDistanceToConcCalculationResponse(
|
|
2189
|
-
data.concUsed,
|
|
2190
|
-
data.distance,
|
|
2191
|
-
data.resultCode,
|
|
2192
|
-
data.messages,
|
|
2193
|
-
data.calculationElapsedTime,
|
|
2194
|
-
data.operationId
|
|
2195
|
-
);
|
|
1990
|
+
return new MaxDistanceToConcCalculationResponse(data);
|
|
2196
1991
|
}
|
|
2197
1992
|
}
|
|
2198
1993
|
|
|
@@ -2220,16 +2015,8 @@ class SideviewAtTimeCalculationRequest extends CalculationRequestBase {
|
|
|
2220
2015
|
/**
|
|
2221
2016
|
* SideviewAtTime calculation request class.
|
|
2222
2017
|
*
|
|
2223
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion outputs.
|
|
2224
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
2225
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
2226
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
2227
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
2228
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
2229
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
2230
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
2231
2018
|
*/
|
|
2232
|
-
constructor(
|
|
2019
|
+
constructor(data: {
|
|
2233
2020
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
2234
2021
|
weather: Entities.Weather,
|
|
2235
2022
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -2238,16 +2025,16 @@ class SideviewAtTimeCalculationRequest extends CalculationRequestBase {
|
|
|
2238
2025
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
2239
2026
|
material: Entities.Material,
|
|
2240
2027
|
dispersionParameters: Entities.DispersionParameters
|
|
2241
|
-
) {
|
|
2028
|
+
}) {
|
|
2242
2029
|
super();
|
|
2243
|
-
this.scalarUdmOutputs = scalarUdmOutputs;
|
|
2244
|
-
this.weather = weather;
|
|
2245
|
-
this.dispersionRecords = dispersionRecords;
|
|
2246
|
-
this.dispersionRecordCount = dispersionRecordCount;
|
|
2247
|
-
this.substrate = substrate;
|
|
2248
|
-
this.dispersionOutputConfig = dispersionOutputConfig;
|
|
2249
|
-
this.material = material;
|
|
2250
|
-
this.dispersionParameters = dispersionParameters;
|
|
2030
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
2031
|
+
this.weather = data.weather;
|
|
2032
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
2033
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
2034
|
+
this.substrate = data.substrate;
|
|
2035
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
2036
|
+
this.material = data.material;
|
|
2037
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
2251
2038
|
}
|
|
2252
2039
|
}
|
|
2253
2040
|
|
|
@@ -2291,16 +2078,7 @@ export class SideviewAtTimeCalculationRequestSchema {
|
|
|
2291
2078
|
}
|
|
2292
2079
|
|
|
2293
2080
|
makeCalculationRequest(data: SideviewAtTimeCalculationRequestSchemaData): SideviewAtTimeCalculationRequest {
|
|
2294
|
-
return new SideviewAtTimeCalculationRequest(
|
|
2295
|
-
data.scalarUdmOutputs,
|
|
2296
|
-
data.weather,
|
|
2297
|
-
data.dispersionRecords,
|
|
2298
|
-
data.dispersionRecordCount,
|
|
2299
|
-
data.substrate,
|
|
2300
|
-
data.dispersionOutputConfig,
|
|
2301
|
-
data.material,
|
|
2302
|
-
data.dispersionParameters
|
|
2303
|
-
);
|
|
2081
|
+
return new SideviewAtTimeCalculationRequest(data);
|
|
2304
2082
|
}
|
|
2305
2083
|
}
|
|
2306
2084
|
|
|
@@ -2319,16 +2097,8 @@ export class SideviewAtTimeCalculation extends CalculationBase {
|
|
|
2319
2097
|
/**
|
|
2320
2098
|
* Calculates the sideview of the cloud downwind from the release point and at the current averaging time.
|
|
2321
2099
|
*
|
|
2322
|
-
* @param {Entities.ScalarUdmOutputs} scalarUdmOutputs - Scalar dispersion outputs.
|
|
2323
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
2324
|
-
* @param {Entities.DispersionRecord[]} dispersionRecords - an array of dispersion records.
|
|
2325
|
-
* @param {number} dispersionRecordCount - Number of dispersion records.
|
|
2326
|
-
* @param {Entities.Substrate} substrate - a substrate entity.
|
|
2327
|
-
* @param {Entities.DispersionOutputConfig} dispersionOutputConfig - a dispersion output config entity.
|
|
2328
|
-
* @param {Entities.Material} material - a material entity with post-discharge composition.
|
|
2329
|
-
* @param {Entities.DispersionParameters} dispersionParameters - a dispersion parameters entity.
|
|
2330
2100
|
*/
|
|
2331
|
-
constructor(
|
|
2101
|
+
constructor(data: {
|
|
2332
2102
|
scalarUdmOutputs: Entities.ScalarUdmOutputs,
|
|
2333
2103
|
weather: Entities.Weather,
|
|
2334
2104
|
dispersionRecords: Entities.DispersionRecord[],
|
|
@@ -2337,30 +2107,31 @@ export class SideviewAtTimeCalculation extends CalculationBase {
|
|
|
2337
2107
|
dispersionOutputConfig: Entities.DispersionOutputConfig,
|
|
2338
2108
|
material: Entities.Material,
|
|
2339
2109
|
dispersionParameters: Entities.DispersionParameters
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
this.
|
|
2344
|
-
this.
|
|
2345
|
-
this.
|
|
2346
|
-
this.
|
|
2347
|
-
this.
|
|
2348
|
-
this.
|
|
2349
|
-
this.
|
|
2110
|
+
controller?: AbortController;
|
|
2111
|
+
}) {
|
|
2112
|
+
super(data.controller);
|
|
2113
|
+
this.scalarUdmOutputs = data.scalarUdmOutputs;
|
|
2114
|
+
this.weather = data.weather;
|
|
2115
|
+
this.dispersionRecords = data.dispersionRecords;
|
|
2116
|
+
this.dispersionRecordCount = data.dispersionRecordCount;
|
|
2117
|
+
this.substrate = data.substrate;
|
|
2118
|
+
this.dispersionOutputConfig = data.dispersionOutputConfig;
|
|
2119
|
+
this.material = data.material;
|
|
2120
|
+
this.dispersionParameters = data.dispersionParameters;
|
|
2350
2121
|
}
|
|
2351
2122
|
|
|
2352
2123
|
async run() {
|
|
2353
2124
|
try {
|
|
2354
|
-
const request = new SideviewAtTimeCalculationRequest(
|
|
2355
|
-
this.scalarUdmOutputs,
|
|
2356
|
-
this.weather,
|
|
2357
|
-
this.dispersionRecords,
|
|
2358
|
-
this.dispersionRecordCount,
|
|
2359
|
-
this.substrate,
|
|
2360
|
-
this.dispersionOutputConfig,
|
|
2361
|
-
this.material,
|
|
2362
|
-
this.dispersionParameters
|
|
2363
|
-
);
|
|
2125
|
+
const request = new SideviewAtTimeCalculationRequest({
|
|
2126
|
+
scalarUdmOutputs: this.scalarUdmOutputs,
|
|
2127
|
+
weather: this.weather,
|
|
2128
|
+
dispersionRecords: this.dispersionRecords,
|
|
2129
|
+
dispersionRecordCount: this.dispersionRecordCount,
|
|
2130
|
+
substrate: this.substrate,
|
|
2131
|
+
dispersionOutputConfig: this.dispersionOutputConfig,
|
|
2132
|
+
material: this.material,
|
|
2133
|
+
dispersionParameters: this.dispersionParameters
|
|
2134
|
+
});
|
|
2364
2135
|
|
|
2365
2136
|
const schema = new SideviewAtTimeCalculationRequestSchema();
|
|
2366
2137
|
const validatedRequest = schema.validate(request);
|
|
@@ -2427,24 +2198,22 @@ export class SideviewAtTimeCalculationResponse extends CalculationResponseBase {
|
|
|
2427
2198
|
/**
|
|
2428
2199
|
* SideviewAtTime calculation response class.
|
|
2429
2200
|
*
|
|
2430
|
-
* @param {number} concUsed - Concentration of interest.
|
|
2431
|
-
* @param {Entities.LocalPosition[]} contourPoints - an array of points along the sideview contour.
|
|
2432
2201
|
*/
|
|
2433
|
-
constructor(
|
|
2202
|
+
constructor(data: {
|
|
2434
2203
|
concUsed: number,
|
|
2435
2204
|
contourPoints: Entities.LocalPosition[],
|
|
2436
2205
|
resultCode: Enums.ResultCode,
|
|
2437
2206
|
messages: string[],
|
|
2438
2207
|
calculationElapsedTime: number,
|
|
2439
2208
|
operationId: string
|
|
2440
|
-
) {
|
|
2209
|
+
}) {
|
|
2441
2210
|
super();
|
|
2442
|
-
this.concUsed = concUsed;
|
|
2443
|
-
this.contourPoints = contourPoints;
|
|
2444
|
-
this.resultCode = resultCode;
|
|
2445
|
-
this.messages = messages;
|
|
2446
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2447
|
-
this.operationId = operationId;
|
|
2211
|
+
this.concUsed = data.concUsed;
|
|
2212
|
+
this.contourPoints = data.contourPoints;
|
|
2213
|
+
this.resultCode = data.resultCode;
|
|
2214
|
+
this.messages = data.messages;
|
|
2215
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2216
|
+
this.operationId = data.operationId;
|
|
2448
2217
|
}
|
|
2449
2218
|
|
|
2450
2219
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2517,13 +2286,6 @@ export class SideviewAtTimeCalculationResponseSchema {
|
|
|
2517
2286
|
}
|
|
2518
2287
|
|
|
2519
2288
|
makeCalculationResponse(data: SideviewAtTimeCalculationResponseSchemaData): SideviewAtTimeCalculationResponse {
|
|
2520
|
-
return new SideviewAtTimeCalculationResponse(
|
|
2521
|
-
data.concUsed,
|
|
2522
|
-
data.contourPoints,
|
|
2523
|
-
data.resultCode,
|
|
2524
|
-
data.messages,
|
|
2525
|
-
data.calculationElapsedTime,
|
|
2526
|
-
data.operationId
|
|
2527
|
-
);
|
|
2289
|
+
return new SideviewAtTimeCalculationResponse(data);
|
|
2528
2290
|
}
|
|
2529
2291
|
}
|