Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fasttrips #9

Merged
merged 3 commits into from
Dec 30, 2015
Merged

Fasttrips #9

merged 3 commits into from
Dec 30, 2015

Conversation

sdrewc
Copy link
Member

@sdrewc sdrewc commented Dec 30, 2015

GENERAL COMMENTS

There is a conflict between populating fields (route_id, for instance) between using human-friendly values and values that relate back easily to CHAMP. For instance, the route_id for AC Transit's line 218 could be represented by '40_218' or 'actransit_218'. In general, I opted for the former as much of the human-friendly content is populated to other fields and it will likely ease integration with CHAMP.

UPDATES

  1. fare_id and fare_class names have changed. Previously, fare_id contained the suffix '_zone_x_to_y' where x and y could be either zone_ids or station names associated with those zone_ids, if those names were known. Now that suffix is dropped and a new suffix is added, '_Zi' where i is and integer index. All fares for a given operator and price, even if they have different origin/destination zones, will belong to the same fare_id. The fare_class simply adds a time-of-day suffix to the fare_id, so the same simplification is reflected in fare_class, too. This greatly reduces the number of fare_ids, fare_classes, and fare_transfer_rules. The drawback is that the '_Zi' suffix is arbitrary and loses information about the origin/destination stations or zones. But this information is included in fare_rules and fare_rules_ft.
  2. fare_price has been updated. Previously, fare_price was calculated from either 1) a base fare plus the cost of traversing a farelink, or 2) a base fare (which should always be 0) plus an OD fare. Some lines have both OD fares and cross farelinks. Now these are calculated as base fare plus OD fare plus farelinks fare.
  3. psuedo-random departure times now use lognormal distribution instead of normal distribution.

… turned off by user.

Then add logic to TransitNetwork to collapse identical fares together and create
a new incrementable suffix for new fares.

In getFastTripsSupplinks, stop checking if a supplink has already been added because this
takes longer than just adding a duplicate.  And because the supplink is added to a dict,
the original will just be overwritten and now duplicates created anyway.

Signed-off-by: Drew <[email protected]>
… Previously,

if OD fares existed, only OD fares were used.

Signed-off-by: Drew <[email protected]>
Signed-off-by: Drew <[email protected]>
sdrewc added a commit that referenced this pull request Dec 30, 2015
merging updates for fasttrips
@sdrewc sdrewc merged commit 39c0326 into sfcta:fasttrips Dec 30, 2015
@@ -457,7 +464,7 @@ def get_psuedo_random_departure_time(self, time_period_start, headway, min_start
mean = (max_start_time + min_start_time)/2
# Using 3 because 3 Standard deviatons should account for 99.7% of a population in a normal distribution.
sd = mean/3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's discuss this decision - I don't think it is necessarily what we want...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants