Normal random generator

Hello,
Can I customize "normal random generator" to have a input for seed unless a parameter data? In both, "block" and "block script" solution a only can use seed like a parameter.
Thank´s in advance.

OK.
OBJECTIVE: Create several dll for models using a Normal Random Generator Block
ACTION: Change the "PARAMETER SEED" to a "INPUT SEED". This way, I will config the dll without need a new compilation with diferent seed parameter adjusted for each dll.
Thank´s.

Similar Messages

  • Is Java Random Generator good?

    I need to do a simulation for a research project which requires more than 10,000 random numbers that follow normal distribution. I am wondering if Java is good enough. Will it recycle data as EXCEL generator does? Please...anyone help?

    I don't know about the true randomness of the
    numbers, but Random's nextGaussian always uses a mean
    of 0.0 and a std dev of 1.0, so if that's not what
    you need, then you'll probably need a third party
    library anyway.Or, change it himself:
    http://en.wikipedia.org/wiki/Normal_distribution
    From the "Standardizing normal random variables" section of that:
    If "Z" is a standard normal variable (as nextGaussian gives), then to get a variable X with mean M and standard deviation s, use:
    X = s Z + M
    X =  (s * rand.nextGaussian()) +  M(I changed the variables Wiki used (mu->M and sigma->s) because I don't know the HTML codes for them.)

  • Random generator for given distribution function

    I need to write a random generator, not for normal distribution only but for any distribution function.
    That function can be a black-box distribution function, or that can be a table [ x | f(x) ].
    For those not familiar with this term, distribution function is f(x) that returns the posibility of that the radmon number is lesser than x. f(-inf) = 0, f(+inf) = 1, x > y => f(x) >= f(y).

    I don't have my stats text books with me, but Google is your friend! :-)
    This looks like what we coverd in stats class:
    http://www.mathworks.com/access/helpdesk/help/toolbox/stats/prob_di7.shtml
    >
    Inversion
    The inversion method works due to a fundamental theorem that relates the uniform distribution to other continuous distributions.
    If F is a continuous distribution with inverse F^-1, and U is a uniform random number, then F^-1(U) has distribution F.
    So, you can generate a random number from a distribution by applying the inverse function for that distribution to a uniform random number. Unfortunately, this approach is usually not the most efficient.
    How do you get a random number from a uniform distribution? Easy: with java.util.Random, or some other java math package (I like http://hoschek.home.cern.ch/hoschek/colt/index.htm).
    The first link details some other methods, as will most stats text books.

  • How to create a new user in IDM 8.1 with random generated password?

    Hi, i want create a new user using a modified tabbed user fom that cannot ask for password and confirm password to the administrator but randomly generate a new password (only when the form is opened in user creation) according to password policy and display it on the form.
    I think it is possible because Reset User Password Form does it, but i don't know how put this kind og logic in an other form.
    thanks
    Marco

    If you want to generate a users password randomly then you could take a look at the com.waveset.provision.PasswordGenerator class inside the Identity Mgr REF kit. Here's an example:
    <Rule name='generateRandomPassword'>
           <Comments>generate a random password</Comments>
           <RuleArgument name='accountId' value='Configurator'>
             <Comments>accountId of the user</Comments>
             <String>Configurator</String>
           </RuleArgument>
           <RunAsUser>
             <ObjectRef type='User' id='#ID#Configurator' name='Configurator'/>
           </RunAsUser>
           <block trace='true'>
             <defvar name='session'>
               <or>
                 <ref>context</ref>
                 <ref>display.session</ref>
               </or>
             </defvar>
             <defvar name='wsuser'>
               <invoke name='getObject' class='com.waveset.ui.FormUtil'>
                 <ref>session</ref>
                 <s>User</s>
                 <ref>accountId</ref>
               </invoke>
             </defvar>
              <defvar name='pwgenerator'>
               <new class='com.waveset.provision.PasswordGenerator'>
                 <ref>session</ref>
               </new>
             </defvar>
             <invoke name='generatePassword'>
               <ref>pwgenerator</ref>
               <ref>wsuser</ref>
             </invoke>
           </block>
        </Rule> You'll want to take the password.password field and inside the Default event handler check to see if waveset.id is null, if it is then call the Rule above.
    HTH,
    Paul

  • Identity Sync - Password randomly generated in AD

    Configuration:
    DS 5.2 Patch 2
    on Solaris 9
    with Identity Sync for Windows 1 2004Q3
    configured to Synch from DS to AD
    I have set up object creation to flow from DS to AD, and the user creation works okay but the password I create the account with is not being pushed to AD. Instead it creates the account with a randomly generated password. Is there a way around this, I am attempting to script new user creations. Here is log entry I get in error.log when I create a user.
    [08/Mar/2005:11:35:59.416 +1000] WARNING 29 CNN101 tyr "Successfully created user cn=James Test,cn=users,dc=xxx,dc=xxx,dc=xx with randomly generated password. This account will be unusable until another password is set." (Action ID=CNN100-1027FA4BBD3-491, SN=2)
    Thankyou in advance for any assistance!!
    regards
    Gryph

    I've been doing some more testing and have some more information that might be important.
    I have been testing the attribute synchronisation for the mappings I have done, and noticed that if I modify the userpassword attribute in the DS console it is not being synch'd to AD, but I can modify other attributes and they do get synch'd. If I modify the password on the AD side it gets synch'd back to DS ok. I have attribute modification set to flow in both directions and the password mapping is (DS) userpassword <--> unicodepwd (AD).
    Given it seems to ignore changes to the userpassword attribute for modifications, it looks like this is also holding true for creations, and I guess this is why it's randomly assigning a password.
    Any ideas why it sees other attribute modifcations and synch's them from the DS side, but is not seeing the userpassword attribute?
    Regards
    Gryph

  • How to use the random generator in java

    hey peeps, this is the class in which i am trying to implement the random generator in;
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int g;
            int y;
                for (g = 0; g < 4; g++)//g = game
                    for (y = 17; y > -1; y--)//y = green house
                        /** Check to see if the game is empty */
                        if (sd.getgh(y).getGame(g).equalsIgnoreCase(""))
                            for (int x = 0; x < 18; x++) //x = yellow house
                                if (sd.getyh(x).getGame(g).equalsIgnoreCase(""))
                                    if (sd.getgh(y).getC_lass() != sd.getyh(x).getC_lass())
                                        /** Check to see if the person has played the other person */
                                        if (sd.getgh(y).checkPlayed(sd.getyh(x).getName()) == false)
                                            /** Set the game to the name of the opponent played */
                                            sd.getyh(x).changeGame(g, sd.getgh(y).getName());
                                            sd.getgh(y).changeGame(g, sd.getyh(x).getName());
                                            /** Build the match list step by step using append with \n at the end to create a new line */
                                            matchList.append(sd.getyh(x).getName() + " vs " + sd.getgh(y).getName() + "\n");
                                            matches++;
                                            break;
                /** Convert the stringbuilder into an actual string, then return it */
                String completeMatchList = matchList.toString();
                System.out.println(matches);
                for (int i = 0; i <18; i++)
                    sd.getyh(i).getEmptyMatches();
                    sd.getgh(i).getEmptyMatches();
                return completeMatchList;
        }what i dont understand is how to implement it to pick my matches at random using the http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html java tutorials from here
    regards

    How to use Random ?
    First you open API then you read it, then you use it.
    You mention you try to use it but i just see a horrible nested for for for if if if loop.
    Restructure code and question and maybe it makes more sense.
    Edited by: pgeuens on 10-mrt-2008 22:58

  • How to make a random generator with a max and a minimum

    hello
    can anybody telle me how to make a random generator for numbers with a maximum and minimum input
    thanks in advance

    Hi suske,
    If you want a random day for a given month, this is how I would do it.
    Hope this helps,
    -D
    Message Edited by Darren on 02-02-2006 01:35 PM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    Days_per_month.jpg ‏32 KB

  • Writing a class using random generator in bluej

    Hello
    Im trying to write a class for a deck of cards. Im using a random generator but I dont know how to write the instance variable.
    I have to make 4 suits heart, club, spade, dimonds. and 13 for face value. I know how to random generate numbers. Like if I were making a slot machine to give me 3 numbers in a rage from 0-10. Thats just numbers. How do I random generate values of 1-13 and have it output a random suit? Also how do I make it say if its a jack king or queen? Do I need a constructor or how would I make the card with the face value of 13 suit heart and the card be a queen.
    before jumping down my throat about this being a homework assignment...yes it is but this step Im seeking help on there is no example for this type of generating.
    Thanks for any help
    Rewind

    Well, this is far from bullet-proof, but I think gets the basic idea across. This does sampling with replacement; if you wanted to do something like shuffle a deck of cards you'll need a smarter approach than this.
    import java.util.*;
    public class RandomCards {
      public static void main(String[] args) {
        Suit suit=new Suit();
        for (int i=0; i < 10; i++) {
          System.out.println(suit.nextSuit());
      private static class Suit {
        public static final String HEART="Heart";
        public static final String DIAMOND="Diamond";
        public static final String SPADE="Spade";
        public static final String CLUB="Club";
        private final String[] SUITS={ HEART, DIAMOND, SPADE, CLUB };
        private Gen suitGen=new Gen(0,3);
        public String nextSuit() {
          return SUITS[suitGen.nextInt()];
      private static class Gen {
        private int floor,ceiling;
        private Random rand;
        public Gen(int floor, int ceiling) {
          this.floor=floor;
          this.ceiling=ceiling;
          rand=new Random();
        public int nextInt() {
          return rand.nextInt(ceiling-floor)+floor;

  • CHARM error - No Target system for Normal transport generated from another client

    Hi Gurus,
    This is regarding normal change. We have two clients in development. (Workbench and Customizing)
    We were trying to do Automatic import from development client to Quality. When importing the job, I’m getting an error related to Project Status switch. "you cannot import any request for the project at the moment" It works fine for another development client and we can see the target system in Project status switch.
    But, checking the Project Status switch, looks like there’s no Target System defined for Normal transport generated from another client of development.
    I attached some screenshots related to this.
    Can you please help how to add a target system for another client of development ?
    Regards,
    Salman

    yes, client 110 is present in the task list of the project. yes route is defined because it is working for urgent change

  • Random generated number along with barcode in smartforms

    Hi All,
    Is it possible to add some random generated number by system to add along with the end of the barcode in smartforms. (what could be the field) If so how it can be done. Tanks in advance
    Regards
    GK

    Hi Tankx man 4 the valuable reply,
         I am able to get that, but what my problem is,
    Eg: In my GR a item with 10 qty, so i made the qty as input and based upon that i am printing 10 labels. for ur ref the code is below"
    menge = TRUNC( is_mseg-menge ).
    DO menge TIMES.
    header-slno = header-slno + 1.
    APPEND header TO itab.
    the complete program is like as follows;
    menge = TRUNC( is_mseg-menge ).
    DO menge TIMES.
    header-slno = header-slno + 1.
    APPEND header TO itab.
    CALL FUNCTION 'QF05_RANDOM_INTEGER'
    EXPORTING
    RAN_INT_MAX   = '999999999'
    RAN_INT_MIN   = '100000000'
    IMPORTING
    RAN_INT       = RANINT
    EXCEPTIONS
    INVALID_INPUT = 1
    OTHERS        = 2.
    IF SY-SUBRC EQ 0.
    ENDIF.
    WRITE :/ RANINT.
    ENDDO.
    but in my barcode all the label has the same random number, can u say how to solve this.

  • SPro | SQR APY1060 is randomly generating Corrupted PDF's

    Hi,
    We're in the process of implementing SPro FSCM 8.9 on 8.47.11 for one of our clients. While the running the OOB SQR APY1060, we've found that the SQR randomly generates corrupted PDF. When we run the Process again, it works fine...Its is also difficult to replicate in other environments.
    Has any body faced an issues like this earlier with any PS delivered SQR.
    We've been able to zero in on the culprit - Control-M ... We've noticed a pattern, using the same run control ID, if we run it (PSJob) using the online page, then the PSJob runs absolutely fine. However, when we schedule it through Control-M the corruption happens. Also, if we create separate Process Requests in Control-M to schedule individual processes rather than the OOB PSJob, the SQR runs fine...Not sure if some one has come across such an issue...
    Thank You
    Prashant
    Edited by: PSFT_PP on Feb 9, 2009 8:47 AM

    I am not sure about this..but do you have different run control for the different OS or the same run control. Unix always recognises CAPS runcontrol values. do a check on that please.

  • Randomly generate an ID for SQL Create Table command

    Hi,
    I need help to randomly generate an integer, which i can use as a primary key for the ID of a table field. I have no idea how to do this so that it generates a different number every single time.
    Right now it just increments the ID by 1. Maybe, is there a way to get the last ID value of the table field and then increment starting from that one? thanks

    Your analysis is flawed! One of my main reasons for
    doing this is to reduce the load on the db server. I
    don't have to go to the db to get an id every time I
    need one. Every now and again (usually less than one
    in a 2000) I have to repeat an insert operation.
    You already stated that this was the reason, so I used that as part of my assessment. With most, perhaps all databases, the ability to increment a key is done as part of the insert operation. It requires no additional 'trip' to the database to get the ID. There is so much wrong with your idea, I hardly know where to start. I wouldn't be so firm except you stated that you do this all the time. Even using it once is very questionable I wouldn't want this idea to profilerate to other peoples systems without comment.
    You also said:
    On one project I was having to place usage transaction records
    into a database with each one needing an ID. I started using your
    technique but it was taking almost as much time as the insert of
    each transaction into the database.I agree, and I think dcminter agreed that there are less expensive practices then max(fld)+1 which are in fact using the vendor specific capabilities. However, if this was taking as long as your insert, there was probably something else wrong. For example, if the field you are getting the max value for isn't indexed, or isn't the first field in a contatenated index (an index of multiple fields), then some databases (there are exceptions like redbrick) will require either a full table scan, an index scan or an ackward index lookup to give back the max value. It shouldn't be that way, but it is and you have undestand how your database is resolving max() in order to make the best decisions.
    I stand by analysis and I would suggest that rather then use your method "all the time" that you save it for that unusual situation where nothing else will work for you.

  • QCPatch 'Random Generator' Broken Seed?

    Hi there all,
    Just putting this out there - perhaps I'm wrong, but want some other QC developers who are more experienced to compare with.
    Quartz Composer Patch "Random Generator" - one of the inbuilt patches available.
    Its purpose is to generate random numbers between a range, and supply the number on its output port.
    To this end, it works fine.
    My problem with this patches behavior occurs when it is nested in a macro patch, and that patch is then duplicated (purpose obvious).
    *The duplicated macro patch appears to also copy the Random Generators' base seed.*
    For example I have the same picture resulting from Random Generators nested inside a macro patch that contains processing for a random choice of image to a sprite.
    The only way i could work around this (and this may help others with the same problem) was to Publish the Input ports all the way up to the root level patch, and supply new instances of a Random Generator for each instance of the duplicated macro patch.
    Then I received fresh random seeds from the generator and different images were selected for output to my nested sprite.
    Awfully inconvenient given that each macro had 4 levels of nesting using objects like render in image, 3D transformation and Lighting - all patches that require nesting, and also reset your ports being passed to a parent, meaning you have to - 're-map' the Published Inputs with every layer of nesting. Not to mention the fact that the root level of the document is cluttered all to **** with millions of Random Generator patches.
    Anyone get this behavior?
    Please let me know if I'm just screwing my design up, or if this is encountered by you too and we should report it as a bug. (Ive only been devving QC for several weeks straight, so I'm want to actually report it as a bug yet).
    Many thanks in advance,
    Wilks.

    A random created with the same seed will give the same set of random numbers.
    Take out the Random creation from the loop
    try
                 BufferedWriter out = new BufferedWriter(new FileWriter("c:/test.txt"));
                    //Create Random here.
                     Random r = new Random( );//No need for any seed
                 for (int i = 0; i < 1000; i++)
                      out.write(String.valueOf(r.nextInt(9)));
                 out.close();
    catch (IOException e)
    [url http://www.feedfeeds.com/feedtv]Feed Your Feeds

  • Implementing the random generator

    Hello, i have posrted this question in the forum yesterday, and didnt get a reply, so i am reposting, hope i havent violated any of the forum rules? If i have can a mod tell me, delete it and ill try and find my old post
    The problem i am having is trying to implement thwe random generator in to my code, it hasnt been done correctly as its not printing out a list of matches based on the conditons, can someone tell me what is wrong? thanks
    import java.util.Random;
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private Random studentPicker = new Random();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int game;
            int yellowStudent = 0;
            int currentGame = 0;
            int matchAttempt = 0;
            while (matches < 70)
                makeMatches:
                for (game = 0; game < 4; game++)//g = game
                    for (int greenStudent = 0; greenStudent < 17; greenStudent++)
                        while (sd.getgh(greenStudent).getGame(game).equalsIgnoreCase(""))
                            matchAttempt++;
                            if (matchAttempt > 800)
                                sd = new studentdetails();
                                game = 0;
                                matches = 0;
                                break makeMatches;
                            yellowStudent = studentPicker.nextInt(17);
                            if (sd.getyh(yellowStudent).getGame(game).equalsIgnoreCase(""))
                                if (sd.getgh(greenStudent).getC_lass() != sd.getyh(yellowStudent).getC_lass())
                                    /** Check to see if the person has played the other person */
                                    if (sd.getgh(greenStudent).checkPlayed(sd.getyh(yellowStudent).getName()) == false)
                                        /** Set the game to the name of the opponent played */
                                        sd.getyh(yellowStudent).changeGame(game, sd.getgh(greenStudent).getName());
                                        sd.getgh(greenStudent).changeGame(game, sd.getyh(yellowStudent).getName());
                                        /** Build the match list step by step using append with \n at the end to create a new line */
                                        matchList.append(sd.getyh(yellowStudent).getName() + " vs " + sd.getgh(greenStudent).getName() + "\n");
                                        matches++;
                                        currentGame++;
                                        if (currentGame == 18)
                                            currentGame = 0;
                                            break;
            /** Convert the stringbuilder into an actual string, then return it */
            String completeMatchList = matchList.toString();
            System.out.println(matches);
            for (int i = 0; i < 18; i++)
                sd.getyh(i).getEmptyMatches();
                sd.getgh(i).getEmptyMatches();
            return completeMatchList;
        }

    Where is it occuring? What are the values of the variabels at that point? We can't even run your code to find out because it could be in the studentdetails class which you haven't posted. I suggest you use an IDE to set breakpoints and step through it in a debugger which will allow you to examine the state of the program a any given point and identify where the NPE is coming from.
    For Netbeans
    http://www.netbeans.org/kb/55/using-netbeans/debug.html
    For Eclipse
    http://pages.cs.wisc.edu/~cs302/resources/EclipseDebugTutorial/

  • Labview random generator leds

    Hey Labview users,
    I'm a novice with labview and i have to solve the next exercise. Create a random generator 10 which generates random numbers between 0 and 100.
    Provide between 2 numbers generated a delay of 1s.
    Provide also 3 LEDs that light up as follows:
    - Red LED: 70 <random number
    - Green LED: 30 <random number <70
    - Orange LED: random number <30
    Only when the 10 random numbers are generated, enter this  1 dimensional, profiled collection (1D array).
    Can anybody show me the block diagram
    Can somebody help me please ? It's quite urgent.(i have untill saterday 26/1)
    Any solution is welcome !

    Well, if you have to have this done, you hade better get on with it.
    A couple hints:
    The random number generator built into LV puts out a DBL float value between 0 and 1.
    You can use the threshold function to determine which of the three LEDs should be on.
    You know ahead of time that the VI needs to loop 10 times, so you can use a for loop.
    There is a wait function in LV that you can use to generate the 1 sec delay.
    Beyond this, we will not write your homework for you. We don't need your degree, we have degrees of our own.
    Post code and we will help you by answering specific questions.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for