From: Jean-Julien Fleck Date: 2010-08-19T03:42:06+09:00 Subject: Re: can i do this in ruby? a simulation process Hello, > how can i set the passenger for each vehicle? like for example > i input vehicles number: 5 > how can set the passenger of vehicle 1 which is it only allow 1 > passenger I think you misread the problem: nobody says that the first vehicle have to have 1 passenger. All it says is that if you take a pool of 100 vehicles, 20 of them will have only 1 passenger, 30 2 passengers, 10 3 passengers, 10 4 passengers and the 30 remaining will be buses of 40 passengers. Each time, you have to choose randomly one vehicle in all this pool of vehicles to let him go on the road. Cheers, -- JJ Fleck PCSI1 Lycée Kléber