I wonder how Amtrak sells anything on their web site

Amtrak Unlimited Discussion Forum

Help Support Amtrak Unlimited Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
It's obviously not that simple, because sometimes the website gets it right:

roomette_correct_2.png


roomette_correct_1.png


Room charge stays the same at $158.

Railfare correctly doubles from $94 to $188.
 
This is just bad business logic programming. Let me at it and I'd have it fixed in a week, I don't care what language it's written in.

(Of course, Amtrak probably can't afford me.)

"what if n is larger than the number of tickets that are available / they're willing to sell at low-bucket?"

That doesn't matter. It's a roomette. The number of tickets in a given bucket is completely irrelevant to the roomette reservation...

The correct business logic is certainly not simple, but any competent programmer can program it. I assume Amtrak's programmers are not competent.

This is how I'd approach it given the limitations of the existing interface.

- first collect the number of adults and the number of children

- compute the possible room options for that group, and offer them to the user (as currently)

- then collect the selected collection of rooms

- run through the rooms once to assign each room to an "owner" adult (doubly-linked structure)

- run through the adults a second time to fill the rooms' primary capacity with other adults (doubly-linked structure)

- run through the children to fill the rooms' "child" capacity (doubly-linked structure)

- run through the adults and children again to get coach seats for those who do not have rooms assigned

- grab the room prices with current buckets, also grab low bucket rail fares for those people and apply discounts

- grab the coach seat prices with current buckets, apply discounts

- total

- (repeat for each train)

I actually might redesign the interface if I were doing it, to allow for more complicated purchases such as "open sleeper tickets", but that's just me...
 
...and poking around, I suspect that Amtrak does have some competent programmers....

....because I can't generate the buggy pricing any more. The bug may have been fixed.

Can anyone else manage to trigger the bug?
 
I've found another bug. I'm in California at the moment (10:00pm PT) and am booking a trip for Sunday (three days from now) using my NARP discount. On the website it claims I'm outside the 3 day advance window for the discount while I just booked my trip using the NARP discount via the app on my iPhone.

I think its just a glitch after Midnight ET for three hours.

This bug caused me to book a roomette directly through the Amtrak app since it was low-bucket!
 
Last edited by a moderator:
I wouldn't bet on the length of time. With a stupid problem like that, it could require that the garbage code be thrown out and they hire a competent company to start from ground zero and build a properly working pricing system. But I do agree with you that it is fixable.
Maybe Amtrak came to the same conclusion and that's why it is taking so long.

But why would anyone want to start from ground zero when it's a simple arithmetic formula that needs to be changed. From n(R + A) or what ever the bug is to nR+A, where n is the number of passengers, R the low bucket rail fare, and A the current accommodation charge.
I was thinking something like this as well. I'm thinking of the SimCity fiasco, where in order to confront the player backlash at not having single player, they had to spend six months rebuilding code. Likewise, there was an election program at William and Mary (used to run IRV) when I was an undergrad that had been written by someone who was, quite seriously, going insane at the time. The code worked, more or less, but operating it slowly became something of an oral tradition, and when that chain got broken they decided to scrap it.

Sometimes a problem requires amending a couple of lines...and sometimes it requires sorting through a few thousand lines only to find that the kludges you'd need to fix the problem are too hard to actually fix correctly and you just throw it out.
 
...and poking around, I suspect that Amtrak does have some competent programmers....

....because I can't generate the buggy pricing any more. The bug may have been fixed.

Can anyone else manage to trigger the bug?
From another thread:

I also checked a single in a roomette to ensure that the pricing bug doesn't screw things up (they don't).
Note: It's my understanding that the "pricing bug" only bites when it's the last room left in the current bucket. In other words, if there are 5 rooms in the bucket and 2, 3, 4, or all 5 are still available for sale, everything will price correctly. However, if the other 4 have already been sold leaving only 1 room left at that bucket price when you check fares; then adding the second person will cause the bug to bite you.
 
From another thread:
I also checked a single in a roomette to ensure that the pricing bug doesn't screw things up (they don't).
Note: It's my understanding that the "pricing bug" only bites when it's the last room left in the current bucket. In other words, if there are 5 rooms in the bucket and 2, 3, 4, or all 5 are still available for sale, everything will price correctly. However, if the other 4 have already been sold leaving only 1 room left at that bucket price when you check fares; then adding the second person will cause the bug to bite you.
I tried tomorrow and it failed. I successively went through every day from tomorrow on until I found a date when there was more than one room. It worked fine on that day. Then I went back and tried a couple of 1-room days. Failed on all of them.

Wonder if we could bill Amtrak for consulting assistance? :)
 
Sometimes a problem requires amending a couple of lines...and sometimes it requires sorting through a few thousand lines only to find that the kludges you'd need to fix the problem are too hard to actually fix correctly and you just throw it out.
Yeah. I don't think of this sort of "throw out and rewrite" as taking very long, though... maybe that's because I get really into code restructuring. ;)
 
Status
Not open for further replies.
Back
Top