mdp
const double p=0.5;
const double accu_load1;
const double accu_load2;
const double fd;
const int COUNTER;
const double risky2;
const double risky6;
global stop : bool init false;
formula roz = (r=8) | (w=3&a=1) | (w=3&a=2) | (w=5&a=2);
module operator
k:[0..100] init 0;
t:[0..2] init 0;
s:[0..2] init 0;
c:[0..3] init 0;
[image] !stop & t=0 & s=0 -> (1-p):(t'=1) & (s'=0) + p:(t'=2) & (s'=0);
[process] !stop & t=1 & s=0 & k<=COUNTER -> accu_load1:(s'=1)&(k'=k+1) + (1-accu_load1):(s'=2)&(k'=k+1);
[process] !stop & t=1 & s=0 & k>COUNTER -> accu_load1*fd:(s'=1) + (1-accu_load1*fd):(s'=2);
[process] !stop & t=2 & s=0 & k<=COUNTER -> accu_load2:(s'=1)&(k'=k+1) + (1-accu_load2):(s'=2)&(k'=k+1);
[process] !stop & t=2 & s=0 & k>COUNTER -> accu_load2*fd:(s'=1) + (1-accu_load2*fd):(s'=2);
[wait] !stop & s=2 -> (t'=0) & (s'=0);
[go] !stop & s=1 & w=2 -> risky2:(c'=2) & (t'=0) & (s'=0) + (1-risky2)/3:(c'=3) & (t'=0) & (s'=0)
+(1-risky2)/3:(c'=1) & (t'=0) & (s'=0) + (1-risky2)/3:(c'=0) & (t'=0) & (s'=0);
[go] !stop & s=1 & w=5 -> 1/3:(c'=2) & (t'=0) & (s'=0) + 1/3:(c'=1) & (t'=0) & (s'=0)
+ 1/3:(c'=0) & (t'=0) & (s'=0);
[go] !stop & s=1 & w=6 -> risky6:(c'=2) & (t'=0) & (s'=0) + (1-risky6)/2:(c'=1) & (t'=0) & (s'=0)
+ (1-risky6)/2:(c'=0) & (t'=0) & (s'=0);
[go] !stop & s=1 & (w!=2 & w!=5 & w!=6) -> (t'=0) & (s'=0);
[] !stop & w1 & w2 & w6 -> (stop'=true);
[operator_stop] stop -> true;
endmodule
module UAV
w:[0..6] init 1;
a:[0..8] init 0;
r:[0..9] init 0;
send: bool init true;
in: bool init true;
w1: bool init true;
w2: bool init false;
w3: bool init false;
w4: bool init false;
w5: bool init false;
w6: bool init false;
[image] w!=0 & a=0 & r=0 & send -> (send'=false);
[wait] !send -> (send'=true);
[camera] w=1 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w1'=true);
[camera] w=2 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w2'=true);
[camera] w=3 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w3'=true);
[camera] w=4 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w4'=true);
[camera] w=5 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w5'=true);
[camera] w=6 & a!=0 & r=0 & in -> (a'=0) & (send'=true) & (w6'=true);
[go] w!=0 & a=0 & r=0 -> 1/8:(a'=1) & (in'=false)
+ 1/8:(a'=2) & (in'=false)
+ 1/8:(a'=3) & (in'=false)
+ 1/8:(a'=4) & (in'=false)
+ 1/8:(a'=5) & (in'=false)
+ 1/8:(a'=6) & (in'=false)
+ 1/8:(a'=7) & (in'=false)
+ 1/8:(a'=8) & (in'=false);
[fly] c=0 & w=2 & (a!=0) & r=0 & !in -> (r'=5);
[fly] c=1 & w=2 & (a!=0) & r=0 & !in -> (r'=6);
[fly] c=2 & w=2 & (a!=0) & r=0 & !in -> (r'=7);
[fly] c=3 & w=2 & (a!=0) & r=0 & !in -> (r'=9);
[fly] c=0 & w=5 & (a!=0) & r=0 & !in -> (r'=3);
[fly] c=1 & w=5 & (a!=0) & r=0 & !in -> (r'=4);
[fly] c=2 & w=5 & (a!=0) & r=0 & !in -> 1/8:(w'=4) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=8) & (r'=0) & (in'=true);
[fly] c=0 & w=6 & (a!=0) & r=0 & !in -> (r'=2);
[fly] c=1 & w=6 & (a!=0) & r=0 & !in -> (r'=3);
[fly] c=2 & w=6 & (a!=0) & r=0 & !in -> (r'=8);
[fly] w=1 & (a!=0) & r=0 & !in -> (r'=1);
[fly] w=1 & (a!=0) & r=0 & !in -> (r'=9);
[fly] w=3 & (a!=0) & r=0 & !in -> (r'=6);
[fly] w=3 & (a!=0) & r=0 & !in -> 1/8:(w'=4) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=4) & (a'=8) & (r'=0) & (in'=true);
[fly] w=4 & (a!=0) & r=0 & !in -> 1/8:(w'=3) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=8) & (r'=0) & (in'=true);
[fly] w=4 & (a!=0) & r=0 & !in -> 1/8:(w'=5) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=8) & (r'=0) & (in'=true);
[fly] r=1 -> (r'=2);
[fly] r=1 -> 1/8:(w'=1) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=8) & (r'=0) & (in'=true);
[fly] r=2 -> (r'=1);
[fly] r=2 -> 1/8:(w'=6) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=8) & (r'=0) & (in'=true);
[fly] r=3 -> 1/8:(w'=5) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=8) & (r'=0) & (in'=true);
[fly] r=3 -> 1/8:(w'=6) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=8) & (r'=0) & (in'=true);
[fly] r=4 -> (r'=5);
[fly] r=4 -> 1/8:(w'=5) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=5) & (a'=8) & (r'=0) & (in'=true);
[fly] r=5 -> (r'=4);
[fly] r=5 -> 1/8:(w'=2) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=8) & (r'=0) & (in'=true);
[fly] r=6 -> 1/8:(w'=2) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=8) & (r'=0) & (in'=true);
[fly] r=6 -> 1/8:(w'=3) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=3) & (a'=8) & (r'=0) & (in'=true);
[fly] r=7 -> 1/8:(w'=2) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=8) & (r'=0) & (in'=true);
[fly] r=7 -> (r'=8);
[fly] r=8 -> 1/8:(w'=6) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=6) & (a'=8) & (r'=0) & (in'=true);
[fly] r=8 -> (r'=7);
[fly] r=9 -> 1/8:(w'=1) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=1) & (a'=8) & (r'=0) & (in'=true);
[fly] r=9 -> 1/8:(w'=2) & (a'=1) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=2) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=3) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=4) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=5) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=6) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=7) & (r'=0) & (in'=true)
+ 1/8:(w'=2) & (a'=8) & (r'=0) & (in'=true);
endmodule
rewards "time"
[wait] true: 10;
[fly] true: 60;
endrewards
rewards "ROZ"
[fly] roz : 1;
endrewards