Newer
Older
1
2
3
4
5
6
7
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
// UncertainityOptions.h
#pragma once
#include "Limit.h"
#include <vector>
#include <string>
namespace math1d_cl
{
/**
* Random type to be used for randomization
*/
enum class RandomType {
KERNEL_DENSITY,
UNIFORM,
NORMAL
};
/**
* Options to be passed to random distributions
*/
struct NormalRandomOptions {
double mean;
double stddev;
};
struct UniformRandomOptions {
double min;
double max;
};
typedef union RandomOptions {
UniformRandomOptions uRandom;
NormalRandomOptions normRandom;
} RandomOptions;
/**
* Simulation parameter to be randomized
*/
struct SimulationParameter {
bool precipitations = false;
bool cn = false;
bool manning = false;
};
/* Precipitation limit with path to CDF file */
typedef struct PrecipLimit {
double upperLimit;
std::string pathCDF;
} PrecipLimit_t;
/**
* Options array for uncertainity simulations
*/
struct UncertainityOptions
{
/* General */
int simulationCount; // How many Monte Carlo loops are performed
std::string resultsDir; // Where to put quantile results
struct SimulationParameter simParameter; // Bitmask of which parameters to randomize
// Not used std::vector<int> chunkSizes; // Number of iterations belonging to given process
int chunkSize; // Number of iterations for given process
/* Precipitation */
enum RandomType precipRandType; // Type of random function used for precipitations
double precipDeviation; // Precipitation deviation to compute with in %
//std::vector<double> limits; // Limits vector, dividing precipitation intensity into categories
std::vector<PrecipLimit_t> limits; // Limits vector, dividing precipitation intensity into categories
int daysMeasured; // Days with measured values from the beginning of the data
int daysPredicted; // Days with predicted values
int valuesPerDay; // Values per day (every hour - 24)
std::vector<double> quantiles; // List of quantiles to gather
/* CN */
double cnDeviation; // CN deviation to compute in %
Limit cnLimits; // Physical limits of CN curve number
enum RandomType cnRandType; // Random distribution generator
/* N */
double nDeviation; // N deviation to compute in %
Limit nLimits; // Physical limits of Manning's roughness coefficient
enum RandomType nRandType; // Random distribution generator
};
}