Uppaal中的随机数 [英] Random number in Uppaal

查看:195
本文介绍了Uppaal中的随机数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Uppaal程序中定义全局声明时,如何创建随机数?

How can I create a random number when I define a global declaration in an Uppaal program?

我想拥有一个包含一个随机数的变量,就像在C程序中一样:

I want to have a variable that contains a random number as in a C program:

int x = rand (100);

推荐答案

根据上传邮件列表,此代码段select: i : int[0,3]

将不确定地将i绑定到0到3范围内的整数.

will non-deterministically bind i to an integer in the range 0 to 3.

因此,在您的情况下,只需使用select: x : int[0, 100].

So, in Your case just use select: x : int[0, 100].

这篇关于Uppaal中的随机数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆