mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 14:19:38 +02:00
Adapt to new bot structure
This commit is contained in:
parent
ff7e08ada9
commit
3f84e1d831
3414 changed files with 41525 additions and 709 deletions
25
legacy/Data/ingsw/17/correct.txt
Normal file
25
legacy/Data/ingsw/17/correct.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
if (myrandom() <= 0.8)
|
||||
then
|
||||
x := x + 1;
|
||||
else
|
||||
x := max(0, x - 1);
|
||||
end if;
|
||||
else
|
||||
x := max(0, x - 1);
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
10
legacy/Data/ingsw/17/quest.txt
Normal file
10
legacy/Data/ingsw/17/quest.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
Un'azienda decide di organizzare il processo di sviluppo di un grosso software in 101 phasi sequenziali, numerate da 0 a 100. La
|
||||
phase 0 è quella iniziale. La phase 100 è quella finale in cui lo sviluppo è completato. Tutte le fasi hanno circa la stessa durata.
|
||||
Alla fine di ogni fase viene eseguita una batteria di tests. I risultati del testing possono essere:
|
||||
a) si può passare alla fase successiva;
|
||||
b) bisogna ripetere la fase corrente;
|
||||
c) bisogna rivedere il lavoro fatto nella fase precedente (reworking).
|
||||
Dai dati storici è noto che la probabilità del caso a) è 0.72, del caso b) è 0.18 e del caso c) è 0.1.
|
||||
Allo scopo di stimare attraverso una simulazione MonteCarlo il valore atteso del tempo di completamento del progetto viene
|
||||
realizzato un modello Modelica del processo di sviluppo descritto sopra.
|
||||
Quale dei seguenti modelli Modelica modella correttamente il processo di sviluppo descritto sopra?
|
19
legacy/Data/ingsw/17/wrong 2.txt
Normal file
19
legacy/Data/ingsw/17/wrong 2.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.8)
|
||||
then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
x := x + 1;
|
||||
else
|
||||
x := max(0, x - 1);
|
||||
end if;
|
25
legacy/Data/ingsw/17/wrong.txt
Normal file
25
legacy/Data/ingsw/17/wrong.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x;
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.9)
|
||||
then
|
||||
if (myrandom() <= 0.72)
|
||||
then
|
||||
x := x + 1;
|
||||
else
|
||||
x := max(0, x - 1);
|
||||
end if;
|
||||
else
|
||||
x := max(0, x - 1);
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain;
|
Loading…
Add table
Add a link
Reference in a new issue