mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 16: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
14
legacy/Data/Questions/ingsw/0621_1/correct.txt
Normal file
14
legacy/Data/Questions/ingsw/0621_1/correct.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
model System
|
||||
Integer y;
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 <= 0.3) then 1 else 0;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
1
legacy/Data/Questions/ingsw/0621_1/quest.txt
Normal file
1
legacy/Data/Questions/ingsw/0621_1/quest.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Si consideri l'ambiente (use case) che consiste di un utente che, ad ogni unità di tempo (ad esempio, un secondo) manda al nostro sistema input 1 (ad esempio, esegue una prenotazione) con probabilità 0.3 oppure input 0 con probabilità 0.7. Quale dei seguenti modelli Modelica rappresenta correttamente tale ambiente.
|
13
legacy/Data/Questions/ingsw/0621_1/wrong1.txt
Normal file
13
legacy/Data/Questions/ingsw/0621_1/wrong1.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
model System
|
||||
Integer y; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 <= 0.3) then 0 else 1;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
13
legacy/Data/Questions/ingsw/0621_1/wrong2.txt
Normal file
13
legacy/Data/Questions/ingsw/0621_1/wrong2.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
model System
|
||||
Integer y; Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
equation
|
||||
y = if (r1024 >= 0.3) then 1 else 0;
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
end when;
|
||||
end System;
|
Loading…
Add table
Add a link
Reference in a new issue