Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: other simulate
Hello every body I have an arena simulation HW and I got stuck on this part:
"Since each driver fills different amount of gas, therefore the net profit is not fixed, it has continuous values between 10 $ to 30$. it follows a probability distribution that is 10$ for 40% of the cars, the other 40% is 25$. and the last 20% is 30$"
The question is how to make a continuous values between 10 and 30.
Plz help.
Posted 21-Feb-13 8:48am
Comments
Sergey Alexandrovich Kryukov at 21-Feb-13 14:59pm
   
What do you mean "make"? Do you want to pick a random number? what distribution? what's the problem?
Language, platform? libraries you use, other relevant detail?
—SA
TRK3 at 21-Feb-13 17:38pm
   
The problem is contradictory.
 
The problem states that 40% have the value 10$, 40% have the value 25$ and 20% have the value 40$ -- that's a total of 100%.
 
There aren't any other values in the problem except those three discrete values. The value is not "continuous". It has only 1 of 3 discrete values.
 
Do you know how to represent that int your simulation system?
elfuego81 at 22-Feb-13 7:30am
   
This is the problem I know how to represent one value but representing 3 values is the problem.
TRK3 at 22-Feb-13 10:56am
   
Without knowing anything about your simulation system, that's kind of hard for us to answer.
 
Is this simulation software something you've written yourself, or are you using an existing simulation library/package of some kind? This is a pretty basic thing and ought to be covered in the documentation of the library/package you are using.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 410
1 Abhinav S 260
2 Nirav Prabtani 252
3 Andreas Gieriet 155
4 Dave Kreskowiak 155
0 OriginalGriff 7,545
1 Sergey Alexandrovich Kryukov 6,757
2 Maciej Los 3,909
3 Peter Leow 3,693
4 CHill60 2,712


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100