Skip to content
Snippets Groups Projects
UncertainityOptions.h 2.29 KiB
Newer Older
  • Learn to ignore specific revisions
  • Radim Vavřík's avatar
    Radim Vavřík committed
    // 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 
    
    Radim Vavřík's avatar
    Radim Vavřík committed
    
    		/* 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
    	};
    }