mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 18:59:37 +02:00
move legacy code to separate branch
This commit is contained in:
parent
68a30c8ee6
commit
11b4c48c3a
3528 changed files with 14477 additions and 53258 deletions
69
Data/Questions/ingsw/0321_20/correct.txt
Normal file
69
Data/Questions/ingsw/0321_20/correct.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
<pre>
|
||||
model System
|
||||
|
||||
parameter Integer F1 = 1;
|
||||
|
||||
parameter Integer F2 = 2;
|
||||
|
||||
parameter Integer F3 = 3;
|
||||
|
||||
parameter Integer End = 4;
|
||||
|
||||
parameter Real p = 0.3;
|
||||
|
||||
parameter Real A[4, 4] =
|
||||
|
||||
[
|
||||
|
||||
0, 1, 0, 0;
|
||||
|
||||
p, 0, 1-p, 0;
|
||||
|
||||
0, p, 0, 1-p;
|
||||
|
||||
0, 0, 0, 1
|
||||
|
||||
];
|
||||
|
||||
Integer x; Real r1024;
|
||||
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
|
||||
algorithm
|
||||
|
||||
when initial() then
|
||||
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
|
||||
x := F1;
|
||||
|
||||
r1024 := 0;
|
||||
|
||||
elsewhen sample(0,1) then
|
||||
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
|
||||
if (r1024 <= A[x, F1]) then
|
||||
|
||||
x := F1;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
|
||||
x := F2;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
|
||||
x := F3;
|
||||
|
||||
else
|
||||
|
||||
x := End;
|
||||
|
||||
end if;
|
||||
|
||||
end when;
|
||||
|
||||
end System;
|
||||
|
||||
|
||||
</pre>
|
2
Data/Questions/ingsw/0321_20/quest.txt
Normal file
2
Data/Questions/ingsw/0321_20/quest.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
img=https://i.imgur.com/l6Qc8kQ.png
|
||||
Si consideri la seguente Markov Chain, quale dei seguenti modelli Modelica fornisce un modello ragionevole per la Markov Chain?
|
67
Data/Questions/ingsw/0321_20/wrong 1.txt
Normal file
67
Data/Questions/ingsw/0321_20/wrong 1.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
<pre>
|
||||
model System
|
||||
|
||||
parameter Integer F1 = 1;
|
||||
|
||||
parameter Integer F2 = 2;
|
||||
|
||||
parameter Integer F3 = 3;
|
||||
|
||||
parameter Integer End = 4;
|
||||
|
||||
parameter Real p = 0.3;
|
||||
|
||||
parameter Real A[4, 4] =
|
||||
|
||||
[
|
||||
|
||||
0, 1, 0, 0;
|
||||
|
||||
p, 1-p, 0, 0;
|
||||
|
||||
0, 0, p, 1-p;
|
||||
|
||||
0, 0, 0, 1
|
||||
|
||||
];
|
||||
|
||||
Integer x; Real r1024;
|
||||
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
|
||||
algorithm
|
||||
|
||||
when initial() then
|
||||
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
|
||||
x := F1;
|
||||
|
||||
r1024 := 0;
|
||||
|
||||
elsewhen sample(0,1) then
|
||||
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
|
||||
if (r1024 <= A[x, F1]) then
|
||||
|
||||
x := F1;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
|
||||
x := F2;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
|
||||
x := F3;
|
||||
|
||||
else
|
||||
|
||||
x := End;
|
||||
|
||||
end if;
|
||||
|
||||
end when;
|
||||
|
||||
end System;
|
||||
</pre>
|
68
Data/Questions/ingsw/0321_20/wrong 2.txt
Normal file
68
Data/Questions/ingsw/0321_20/wrong 2.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
<pre>
|
||||
model System
|
||||
|
||||
parameter Integer F1 = 1;
|
||||
|
||||
parameter Integer F2 = 2;
|
||||
|
||||
parameter Integer F3 = 3;
|
||||
|
||||
parameter Integer End = 4;
|
||||
|
||||
parameter Real p = 0.3;
|
||||
|
||||
parameter Real A[4, 4] =
|
||||
|
||||
[
|
||||
|
||||
0, 1, 0, 0;
|
||||
|
||||
p, 0, 0, 1-p;
|
||||
|
||||
0, 0, p, 1-p;
|
||||
|
||||
0, 0, 0, 1
|
||||
|
||||
];
|
||||
|
||||
Integer x; Real r1024;
|
||||
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
|
||||
algorithm
|
||||
|
||||
when initial() then
|
||||
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
|
||||
x := F1;
|
||||
|
||||
r1024 := 0;
|
||||
|
||||
elsewhen sample(0,1) then
|
||||
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
|
||||
if (r1024 <= A[x, F1]) then
|
||||
|
||||
x := F1;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2]) then
|
||||
|
||||
x := F2;
|
||||
|
||||
elseif (r1024 <= A[x, F1] + A[x, F2] + A[x, F3]) then
|
||||
|
||||
x := F3;
|
||||
|
||||
else
|
||||
|
||||
x := End;
|
||||
|
||||
end if;
|
||||
|
||||
end when;
|
||||
|
||||
end System;
|
||||
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue