-
Notifications
You must be signed in to change notification settings - Fork 0
/
qbd_analytic_solver.hpp
39 lines (35 loc) · 1.19 KB
/
qbd_analytic_solver.hpp
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
#ifndef QBD_ANALYTIC_SOLVER_HPP
#define QBD_ANALYTIC_SOLVER_HPP
#include "probability_solver.hpp"
#include "pmf.hpp"
namespace PrositCore {
class AnalyticResourceReservationProbabilitySolver
: public ResourceReservationProbabilitySolver {
protected:
unique_ptr<PrositAux::pmf> prob_function;
unsigned int server_period;
unsigned int budget;
double pi_0 = 1.0; //where the result probability will be stored
///@brief Generates matrices required for the solution
void pre_process();
///@brief checks that everything is ok for computation
void post_process();
///@brief computes the various probababilities after the "core" problem has
///been solved
void fill_in_probability_map();
///@brief Applies algorithm
void apply_algorithm();
public:
/*
* @param p probability mass function
* @param N server period
* @param Q budget
*/
AnalyticResourceReservationProbabilitySolver(unique_ptr<PrositAux::pmf> p,
unsigned int N,
unsigned int Q)
: prob_function(std::move(p)), server_period(N), budget(Q){};
virtual ~AnalyticResourceReservationProbabilitySolver(){};
};
}
#endif