IPB
viagra super force buy buy online

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
CARTYPEWNTED question
Frascati
post Jan 6 2008, 03:48 AM
Post #1


Conductor
**

Group: Members
Posts: 18
Joined: 28-February 07
From: United Kingdom
Member No.: 33



Hi

Is there any effect to be had by having the same car type listed more than once in an entry?

eg BOX-BOX-BOX-FLAT.

Would boxes be 3 times more likely to turn up?

Stefan R

Go to the top of the page
 
+Quote Post
sgdavis
post Jan 6 2008, 08:48 AM
Post #2


Train Master
*****

Group: Root Admin
Posts: 727
Joined: 1-October 03
From: United States
Member No.: 1



QUOTE(Frascati @ Jan 6 2008, 03:48 AM) *
Hi

Is there any effect to be had by having the same car type listed more than once in an entry?

eg BOX-BOX-BOX-FLAT.

Would boxes be 3 times more likely to turn up?

Stefan R


This was such a great question, I actually had to read through my own program code to determine how the program would respond to this. As it turns out you are correct, doing this will cause the Box car to be more likely to be selected. The way it works is the program looks at all the types that are separated by hyphens and builds a list of those. So the list in this case would have BOX, BOX, BOX, FLAT. Then the program counts the number of items in that list (in this case 4). Finally the program generates a random number between 1 and 4 and selects the type that corresponds to that humber, i.e. 1, 2 or 3 would return "BOX" and a 4 would return "FLAT".

So you have discovered a new feature of the program for those advanced template designers who would like to "stack" the odds of a certain car type to be shipped to a given industry. Of course CarTypeShipped (cars shipped OUT OF an industry) would work the same way -- it uses the same program subroutine.

Thanks,

Steve


--------------------
Steve Davis Skyline Computing SteveDavis@SkylineComputing.com
Go to the top of the page
 
+Quote Post
nbeveridge
post Jan 8 2008, 11:13 AM
Post #3


Train Master
*****

Group: Administrators
Posts: 550
Joined: 2-January 07
From: Texas
Member No.: 10



QUOTE(sgdavis @ Jan 6 2008, 08:48 AM) *
This was such a great question, I actually had to read through my own program code to determine how the program would respond to this. As it turns out you are correct, doing this will cause the Box car to be more likely to be selected. The way it works is the program looks at all the types that are separated by hyphens and builds a list of those. So the list in this case would have BOX, BOX, BOX, FLAT. Then the program counts the number of items in that list (in this case 4). Finally the program generates a random number between 1 and 4 and selects the type that corresponds to that humber, i.e. 1, 2 or 3 would return "BOX" and a 4 would return "FLAT".

So you have discovered a new feature of the program for those advanced template designers who would like to "stack" the odds of a certain car type to be shipped to a given industry. Of course CarTypeShipped (cars shipped OUT OF an industry) would work the same way -- it uses the same program subroutine.

Thanks,

Steve


COOL!!! Way back when we first talked about what features to add to AG3 (it would become AG4),Steve and I had talked about not just multiple car types on a given track, but how to portion those cars. Eg. how to have three box cars vs. one flat car because the track has three doors to the warehouse, and only one platform. So now it turns out that AG4 has been able to do this all along. WOW! Steve may say that he'd rather be lucky than good, but I think that this is another example of how his style of programming produces brilliant results!

Thanks Steve -- this may entice me to revise even the templates which are already updated to AG4!


--------------------
Norman
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th April 2024 - 03:39 PM
viagra super force bitcoin