mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-07 00:39:38 +02:00
Refactor repo structure
This commit is contained in:
parent
36ac339086
commit
8fc89fbc03
1732 changed files with 3812 additions and 67 deletions
27
Data/Questions/ingsw/0321_37/wrong 2.txt
Normal file
27
Data/Questions/ingsw/0321_37/wrong 2.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
<pre>
|
||||
model System
|
||||
|
||||
Integer y; Real r1024;
|
||||
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
|
||||
equation
|
||||
|
||||
y = if (r1024 <= 0.2) then -1 else if (r1024 <= 0.5) 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;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue