You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.1 KiB

mdp
const int energyPriceMax = 10;
const int numHouseholds = 2;
const int maxDraw = floor(energyPriceMax/numHouseholds);
const int priceLimit = 3;
// probability to initiate a job
const double D_K1 = 0.0614;
const double D_K2 = 0.0392;
const double D_K3 = 0.0304;
const double D_K4 = 0.0304;
const double D_K5 = 0.0355;
const double D_K6 = 0.0518;
const double D_K7 = 0.0651;
const double D_K8 = 0.0643;
const double D_K9 = 0.0625;
const double D_K10 = 0.0618;
const double D_K11 = 0.0614;
const double D_K12 = 0.0695;
const double D_K13 = 0.0887;
const double D_K14 = 0.1013;
const double D_K15 = 0.1005;
const double D_K16 = 0.0762;
// Expected Jobs Per Day
const int Exp_J = 9;
// Time Units Per Day
const int K = 16;
formula P_init = Exp_J *
(mod(hour,K) = 1 ? D_K1 :
(mod(hour,K) = 2 ? D_K2 :
(mod(hour,K) = 3 ? D_K3 :
(mod(hour,K) = 4 ? D_K4 :
(mod(hour,K) = 5 ? D_K5 :
(mod(hour,K) = 6 ? D_K6 :
(mod(hour,K) = 7 ? D_K7 :
(mod(hour,K) = 8 ? D_K8 :
(mod(hour,K) = 9 ? D_K9 :
(mod(hour,K) = 10 ? D_K10 :
(mod(hour,K) = 11 ? D_K11 :
(mod(hour,K) = 12 ? D_K12 :
(mod(hour,K) = 13 ? D_K13 :
(mod(hour,K) = 14 ? D_K14 :
(mod(hour,K) = 15 ? D_K15 :
D_K16)))))))))))))));
module manager
hour : [0..K] init 0;
energy_price : [0..energyPriceMax] init 1;
// TODO...
endmodule
// Probability of a household to wait if the price is above the fixed limit.
formula householdAbide = (energy_price/ 10);
module household1
move1 : [0..3] init 0;
power_draw1 : [0..maxDraw] init 0;
job_scheduled1 : bool init false;
job_executed1 : bool init false;
job_rejected1 : bool init false;
job_status1 : [0..4] init 0;
// TODO...
endmodule
formula totalDraw = power_draw1 + power_draw2;
//formula totalDraw = power_draw1 + power_draw2 + power_draw3;
rewards "energyPrice"
job_executed1: energy_price;
job_executed2: energy_price;
endrewards
rewards "energyPriceAndSatisfaction"
job_executed1: energy_price;
job_executed2: energy_price;
//job_executed3: energy_price;
job_rejected1 : -10;
job_rejected2 : -10;
//job_rejected3 : -10;
endrewards