|
From: Tom H. <tur...@gm...> - 2005-03-08 21:52:58
|
Chances are you are using java.util.Random instead of uchicago.src.sim.util.Random. But without seeing your error messages, I can't tell. Please send me the errors you are receiving. -Tom On Tue, 8 Mar 2005 16:48:29 -0500, nelson ramon <na...@hu...> w= rote: > =20 > =20 >=20 > Hello, I=B4m new using repast, hope you can help me=20 >=20 > =20 >=20 > And still ahven't been able to generate random numbers=20 >=20 > =20 >=20 > I need one to generate a random number not caring about the generation=20 >=20 > And another with a normal distribution, since I've need to feed de norm = and > estdviation.=20 >=20 > =20 >=20 > I'm doing this:=20 >=20 > =20 >=20 > One is like this:=20 >=20 > =20 >=20 > Random aleatorio =3D new Random();=20 >=20 > // initialize Random.uniform=20 >=20 > aleatorio.createUniform();=20 >=20 > =20 >=20 > // Random.uniform is now initialized and can be > used.=20 >=20 > //int index =3D aleatorio.uniform.getNextIntFromT= o(0, > 100);=20 >=20 > //se usa la funcion directamente para dar una > posicion al Macho en x,y=20 >=20 > int x , y;=20 >=20 > x =3D aleatorio.uniform.getNextIntFromTo(0,100);=20 >=20 > y =3D aleatorio.uniform.getNextIntFromTo(0,100);=20 >=20 > =20 >=20 > =20 >=20 > For the normal:=20 >=20 > =20 >=20 > Random aleatorio =3D new Random();=20 >=20 > // createNormal(double mean, double standardDeviation)=20 >=20 > //inicializar el random NORMAL=20 >=20 > aleatorio.createNormal(media, desvEst);=20 >=20 > =20 >=20 > // Random.Normal esta inicializada y se puede usar=20 >=20 > svl =3D aleatorio.nextCauchy();=20 >=20 > //poner el svl en la varibale bropia del macho=20 >=20 > this.SVL =3D svl;=20 >=20 > =20 >=20 > =20 >=20 > I'm sure it is a simple problem, sorry for the simple problem=20 >=20 > =20 >=20 > Thank you for any help you can give me=20 >=20 > =20 >=20 >=20 > ________________________________ > Este mensaje ha sido explorado por McAfee Webshield Appliance E500 y es > seguro. > Instituto Alexander von Humboldt=20 >=20 > =20 >=20 >=20 > ________________________________ > Este mensaje ha sido explorado por McAfee Webshield Appliance E500 y es > seguro. > Instituto Alexander von Humboldt=20 >=20 > |