Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA » Generating Random Numbers
Generating Random Numbers [message #1691236] Fri, 03 April 2015 16:53 Go to next message
MSh h2 is currently offline MSh h2Friend
Messages: 5
Registered: October 2014
Junior Member
Hi

I was wondering if there is a function for generating random numbers.

I need to generate random numbers between 0 and 1 and then use it in a loop and if else.

Many Thanks
Re: Generating Random Numbers [message #1691264 is a reply to message #1691236] Sat, 04 April 2015 08:48 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 335
Registered: July 2015
Senior Member
Hi,

as far as I recall, there is no built-in support for random number generation. On the other hand, the concept of native functions can be used to provide additional functions implemented in Java code, that can easily be used for this reason.

The basic idea is that you have to create an Eclipse extension for the native function, provide the implementation and install the plug-in. As an example, we have some string operations implemented in a non-eclipse.org SVN repository here: https://viatra.inf.mit.bme.hu/svn/experimental/trunk/natives/hu.bme.mit.viatra2.natives.strings/

I hope this helps.

Cheers,
Zoltán
Re: Generating Random Numbers [message #1691450 is a reply to message #1691264] Tue, 07 April 2015 11:08 Go to previous message
MSh h2 is currently offline MSh h2Friend
Messages: 5
Registered: October 2014
Junior Member
Hi Zoltan

It was helpful. Thanks for the reply.

Regards,
Previous Topic:Error while importing metamodels in model space
Next Topic:[model obfuscator] Cannot see GUI contribution
Goto Forum:
  


Current Time: Sat Nov 25 02:01:38 GMT 2017

Powered by FUDForum. Page generated in 0.01622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software