MikeMike,
An interesting definition and solution to the problem, but I have taken a somewhat different approach. Check out the user's manual
CMTM User's Manual September 09 release
My solution completely ignores the Trainz Way Bill and Commoditiy system. My solution focuses on car movements and traffic patterns. I assume that you are modeling prototype operation and as such, very few if any car movements are from one on-route industry to another on-route industry. So, most inbound freight to local industies originates off route and most outbound shippments from local industries are destined off route. This breaks the vicious intert-twining of on route industies Trainz loves to promote. Users have gone crazy trying to fine tune this process. In the real world, this industry interaction is not the responsibility of the railroad. It may be fun for a computer game, but I am more concerned with simulating prototype operations.
I have taken the approach that an industry has inbound freight, outbound freight or both. Rather than identifying the commodity that is being shipped, I am more concerned with where it is coming from and it's destination.
So industry A recieves 1 boxcar of freight on Monday, Wednesday and Thursday, and an open bottom dump hopper of coal to keep the boilers going on Tuesdays. The Monday boxcar comes from points west, the Tuesday hopper car comes from an interchange with a foreign road, the Wednesday and Thursday boxcars come from points east.
If sorted by source we have the following:
West Portal - one boxcar on Monday
East Portal - one box car on Wednesday and Thursday
Foreign Road Portal - one open hopper on Tuesday
All the car movements for all the industries are sorted for the given day of operation. There may be 7 boxcars from the west destined for various industries. When the first train of the session is emitted from the west portal, the first 7 boxcars that are emited will be assigned to the various local destinations. It makes little difference which boxcars those may be, but they should probably be from western roads relative to your road.
There need not be meticulous matching of commodity types, capacities, etc.
When the car is delivered to the industry and it is unloaded, it is then returned via a route prescribed in the database.
You can use inteactive industries to load and unload open cars to keep the simulation as acurate as possible, but that is the only reason I use interactive industies.
Hope this answers some of your questions.
David