Browse Source
some quick and dirty optimizations (that need to be reviewed)
some quick and dirty optimizations (that need to be reviewed)
Former-commit-id: 86fbc66c90
tempestpy_adaptions
TimQu
8 years ago
27 changed files with 314 additions and 431 deletions
-
4examples/multiobjective/ma/polling/polling.ma
-
16examples/multiobjective/ma/polling/untitled.txt
-
21examples/multiobjective/ma/stream/stream.ma
-
50examples/multiobjective/ma/stream/stream10.ma
-
50examples/multiobjective/ma/stream/stream100.ma
-
50examples/multiobjective/ma/stream/stream1000.ma
-
50examples/multiobjective/ma/stream/stream2.ma
-
50examples/multiobjective/ma/stream/stream50.ma
-
50examples/multiobjective/ma/stream/stream500.ma
-
50examples/multiobjective/ma/stream/stream5000.ma
-
1resources/3rdparty/carl
-
2src/logic/Bound.h
-
5src/logic/OperatorFormula.h
-
54src/modelchecker/multiobjective/helper/SparseMaMultiObjectiveWeightVectorChecker.cpp
-
148src/modelchecker/multiobjective/helper/SparseMultiObjectiveHelper.cpp
-
2src/modelchecker/multiobjective/helper/SparseMultiObjectiveHelper.h
-
40src/modelchecker/multiobjective/helper/SparseMultiObjectivePostprocessor.cpp
-
5src/modelchecker/multiobjective/helper/SparseMultiObjectiveResultData.h
-
30src/modelchecker/multiobjective/helper/SparseMultiObjectiveWeightVectorChecker.cpp
-
1src/models/sparse/MarkovAutomaton.cpp
-
19src/solver/GmmxxLinearEquationSolver.cpp
-
1src/solver/GmmxxLinearEquationSolver.h
-
12src/solver/StandardMinMaxLinearEquationSolver.cpp
-
3src/solver/StandardMinMaxLinearEquationSolver.h
-
6src/storage/SparseMatrix.cpp
-
21src/utility/vector.h
-
4test/functional/modelchecker/SparseMdpMultiObjectiveModelCheckerTest.cpp
@ -0,0 +1,16 @@ |
|||
mdp |
|||
|
|||
const int J = 0; |
|||
|
|||
|
|||
module test |
|||
|
|||
x : [0..1]; |
|||
j : [0..1] init 1; |
|||
z : [0..1]; |
|||
[] j=1 -> 1 : (x'=j); |
|||
[] j<1 -> 1 : (x'=0); |
|||
[] x=1 -> (z'=1); |
|||
endmodule |
|||
|
|||
|
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=10; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=100; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=1000; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N = 2; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=50; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=500; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
@ -1,50 +0,0 @@ |
|||
|
|||
ma |
|||
|
|||
const int N=5000; // num packages |
|||
|
|||
const double inRate = 4; |
|||
const double processingRate = 5; |
|||
|
|||
module streamingclient |
|||
|
|||
s : [0..3]; // current state: |
|||
// 0: decide whether to start |
|||
// 1: buffering |
|||
// 2: running |
|||
// 3: done |
|||
|
|||
n : [0..N]; // number of received packages |
|||
k : [0..N]; // number of processed packages |
|||
|
|||
[buffer] s=0 & n<N -> 1 : (s'=1); |
|||
[start] s=0 & k<n -> 1 : (s'=2) & (k'=k+1); |
|||
|
|||
<> s=1 -> inRate : (n'=n+1) & (s'=0); |
|||
|
|||
<> s=2 & n<N & k<n -> inRate : (n'=n+1) + processingRate : (k'=k+1); |
|||
<> s=2 & n<N & k=n -> inRate : (n'=n+1) + processingRate : (s'=0); |
|||
<> s=2 & n=N & k<n -> processingRate : (k'=k+1); |
|||
<> s=2 & n=N & k=N -> processingRate : (s'=3); |
|||
|
|||
<> s=3 -> 1 : true; |
|||
endmodule |
|||
|
|||
// All packages received and buffer empty |
|||
label "done" = (s=3); |
|||
|
|||
rewards "buffering" |
|||
s=1 : 1; |
|||
endrewards |
|||
|
|||
rewards "initialbuffering" |
|||
s=1 & k = 0: 1; |
|||
endrewards |
|||
|
|||
rewards "intermediatebuffering" |
|||
s=1 & k > 0: 1; |
|||
endrewards |
|||
|
|||
rewards "numRestarts" |
|||
[start] k > 0 : 1; |
|||
endrewards |
Write
Preview
Loading…
Cancel
Save
Reference in new issue