Metro’s double-lining (and soon triple-lining) problem

Most of you have heard probably heard about Metro’s proposed plan for a loop subway around the core. The idea is to “reduce future crowding on Metrorail, provide enough capacity for future development, and expand the reach of transit in the region” However, I think that it’s only a marginal improvement that would only somewhat reduce the central cause of Metro’s core capacity issue: multiple lines sharing track.

 

Image by Lance Wyman, WMATA.
Image by Lance Wyman, WMATA.

As you can see on the map, the Orange Line shares track with the Silver Line and the Blue Line, the latter of which shares track with the Yellow Line. The Yellow Line in turn shares track with the Green Line. The Red Line is the only line is operationally independent.  This series of joint trackage causes a succession of operational and logistical hassles and limits that wouldn’t be an issue if the lines were more independent.

On any section of track, Metro can only run 26 trains per hour in one direction. So on the Red Line during rush hour WMATA runs trains about every three minutes each way between Silver Spring and Grosvenor, hitting that 26 train per hour limit. Since metro doesn’t currently run every Red Line train all the way from Shady Grove to Glenmont, there is some unused track capacity north of Grosvenor and Silver Spring, respectability. Taking advantage of this would simply be a matter of purchasing more train cars, hiring more drivers, and maybe a few upgrades to the power system.

On the other lines, however, the interlining of different rail lines causes more complication that just a few purchases and upgrades. 

IMG_1431

This May, I was heading to a National’s Game, which is at the Navy Yard stop on the Green Line. Heading from Virginia, I needed to transfer at the L’Enfant Plaza station. When I got there, a Blue Line Train had knocked out track power at Pentagon. This wasn’t resolved quickly and there was a backup of trains both Blue and Yellow which couldn’t end get past Arlington Cemetery and L’Enfant, respectfully. So while the Green Line was unaffected directly, I couldn’t get on a train since there was a Yellow Line one in the way that couldn’t get to Pentagon. The backup on the Blue Line started to affect the Orange line as well, as trains couldn’t advance past rosslyn either. So a Blue Line issue ended up backing up Yellow, Orange, and Green too. As it is separate, only the Red Line was unaffected by this. I ended up walking.  

Image via schuminweb.com
Image via schuminweb.com

Let’s take a took at the poor Yellow Line, which only has two stations and a bridge to call its own. The Yellow Line shares track with the Blue Line in Virginia and then continues onto its destination Green Line station of Mt. Vernon Square, Fort Totten, or Greenbelt, depending on the time of day, track work, or which trainyard the train you are riding on “belongs” to.

Remember that since The Yellow Line shares track with the Blue and Green Lines, it is limited in the number of Yellow trains it can run. For example, let’s say Metro decided that to meet demand for Green Line Commuters it needed to run 15 trains per hour during rush. That would mean there would only be eleven slots for yellow line trains. This is even before we get to the limits that the blue line causes. Metro currently runs seven trains per hour on the Blue Line between Franconia and Largo. In this scenario with Metro deciding on 15 Green Line Trains assuming the same number of Blue Line Trains as currently, there would be unused capacity south of Pentagon. With a 26 train per hour capacity, and eleven yellow line trains and seven blue line trains, there would be eight train slots that metro could not use.

Orange-CrushThankfully, at the moment there aren’t big capacity issues on the Yellow and Green lines that force Metro to make tradeoffs like that. However, on the Virginia side of the Orange and Blue Lines, there are capacity issues and the Silver Line will only make those tradeoffs more sharp. The Orange, Blue, and soon-to-be Silver lines share track between Rosslyn and Stadium-Armory. Just like any other piece of track, the 26 trains per hour limit applies and it create’s Rosslyn’s Orange Crush. There’s serious demand for taking metro from the parts of Virginia served by the the Orange Line. There’s more people than there are trains to carry them. Yet, west of Rosslyn, they haven’t hit the 26 train per hour limit.  Metro is already are already running 26 trains per hour from between Rosslyn and Stadium-Armory. 19 Orange and 7 Blue. That means there’s room on the west of Rosslyn for at least seven more trains. They can’t add them without further deducting blue line service and Metro already did this by sending three trains over the Yellow Line bridge to the Green Line in order to add three more Orange Trains. They expect to continue this with the Silver Line:

Rosslyn Trains Per Hour
Rosslyn Trains Per Hour

This gets to the crux of why interlining is a bad idea in the long term. It may be a cheaper way to add capacity in the short term. But, at some point with growth you reach a point where growth in ridership of one line starts to detach from the service for the line that one shares track with. It results in tradeoffs that are no where near the optimum outcome and force even more construction to fix a problem that should have been fixed in the first place by the original expansion.

Proposed 2040 Metrorail Core Configuration
Proposed 2040 Metrorail Core Configuration

Which is why this loop is good short-term but bad long term. Short-term the Green, like the Red Line, would operate independently and could run many more trains than it does today. Those express tracks would take some pressure off the regular Orange/Silver Lines. Put you would replace five lines that would be operationally chained but somewhat separate into two groups (Green/Yellow/Blue and Orange/Blue/Silver) with four lines that would be attached at the hip.

The number of Blue/Yellow trains would be limited by the number of Express Orange/Silver. Ditto, the number of Express Orange/Silver would be limited by the number of Blue/Yellow trains. If the loop is bi-directional (which brings in its own set of problems), you could get saturate the 52 bi-directional capacity with both lines, but that’s ONLY if all the trains go into the loop and out of the loop. Were there ever to be another branch off the loop, and expansions the other reason why you add core capacity, then these limits would still be there, subtracting from the number of slots for Blue/Yellow and Express Orange/Silver.

But then again, I’m an idealist. I’d love my grandchildren to have more lines to more places than just a loop, and to be able to not wait for a train to get there.

 

Partyin’ Like It’s 2300

Seeing how I turned 23 this month and am a big fan of star trek, specifically the TNG-era stuff that takes place in the 2300s, I decided that this year would be the best year for me to have a Star Trek themed party. However, I didn’t want to go all out or turn of my non-fan friends. Thus, I made the theme only apply to the drinks.

IMG_5119

 

Using the magic of google, I was able to find a bunch a recipes online for various drinks from the various TV series. There were Bajoran, Romulan, Vulcan, Cardassian, and various other species’s detailed drink recipes. It was really hard to narrow it down. I finally got it down to a list of less than ten drinks that were easy to make, didn’t have too extreme of ingredients, and unlike the stuff actually used on TV, tasted pretty good. Here’s a PDF. I felt like this when I was making the drinks:

Modela_aperitifBut it did turn out well. Here’s a Cardassian Sunrise:

IMG_5095

 

 

Trip to Yale and New York

Earlier this month, I had the pleasure of accompanying a Yalie friend of mine to New Haven and visited the esteem institution of Yale University:

Yale Sign

While there, I got to participate in some Yale Traditions, such as a dinner at Mory’s, a legendary Yale eating and drinking private club. I was able to try the delicious Baker’s Soup. As is traditional, our group participated in a Mory’s Cup Toasting, a ritualistic consumption of colorful libations from large two-fisted silver trophy cups passed from friend to friend around a table. The key is that every person must toast to something before passing the cup along. Then, as the last person finishes a cup and then soaks up every last drop of booze with the top of his head, everyone else sings Mory’s Song.

IMG_0955

Later, we spent the day in New York. I got to visit the Fifth Aveune Apple Store, Katz’s Delicatessen, and the New York Transit Museum. It was also great to see this so high in the sky!

IMG_0906

IMG_0909

Jared Christian Honored at Hampden-Sydney College Graduation

HAMPDEN-SYDNEY, VA (05/16/2012)(readMedia)– On May 13, at commencement ceremonies marking the end of the 237th academic year at Hampden-Sydney College, Jared Christian, Class of 2012 (right), received the Algernon Sydney Sullivan Medallion. The award was presented by Dr. Christopher B. Howard, President of Hampden-Sydney College. The Algernon Sydney Sullivan Medallion is given annually by the New York Southern Society in honor of its first president, Algernon Sydney Sullivan. This award is given to a member of the graduating class distinguished for excellence of character and generous service to his fellows.

Christian has served as the New Media Coordinator, managing social media for the Dean of Students Office and, for three years he participated in New Student Orientation, guiding incoming classes in transition to college life. In the fall of 2011, due to the absence of a Director he served as the New Student Orientation Communications Manager, co-running Orientation. He says, “It has been amazing to help so many of our new students turn into great college students, peers, leaders, and mentors.”

Christian served as Chairman of Elections and Surveys, a student government cabinet position, in his junior and senior years and was a member of the College Democrats, the Spanish Club, and the Chess Club. He was elected a member of the national honor society, the Society for College Journalists for his work with the student radio station, WWHS. He was the recipient at Opening Convocation in August 2010 of the President’s Award for Scholarship and Character and was recognized for leadership in the 2012 and 2011 editions of Who’s Who Among Students in American Colleges and Universities. Graduating with a B.S. in computer science, Christian is the grandson of Ellis & Grace Rustand of Chestertown.

A private college for men, Hampden-Sydney is ranked in the top tier of liberal arts colleges by U.S. News & World Report. The College is known for its liberal arts curriculum, the Honor Code which stresses individual and collective responsibility, and a focus on the needs of young men.

Social Network, Part 4

For this addition to my social network, I wanted to take the opportunity to really learn something more that just how to write the network itself in PHP. One big thing in web programing is making things dynamic and loading stuff via JavaScript. I also was interested in XML. Since this addition was the inclusion of a new stream feature, I figured it was the perfect time to learn how to generate and use XML.

It turns out that PHP includes a way make XML, called SimpleXML. It’s actually quite simple to generate trees. For example, this would generate an xml file, with a node friend that has a child node userid with the value ‘123456.’

$xml = new SimpleXMLElement(‘<xml/>’);
$friend = $xml->addChild(‘friend’);
$friend->addChild(‘userid’, “123456”);

So I took this tool and used it to generate XML files of a user’s stream, a user’s info, and a user’s friend list. Then to make my profile simpler, I rewrote the thing using CSS and JavaScript to use a tabbed interface. Using display properties and ids, I selectively showed divs by pressing buttons that were made of table cells. It was really awesome to learn that you can turn table cells into buttons using javascript. I even made them change color on a mouse over. For each of the tabs, the content is loaded, parsed, and formatted into HTML via JavaScript then inserted into the page via innerHTML.

The big user facing feature is the dispatches feature. Dispatches are what I am calling statuses and wall posts. I built this feature from the ground up using XML. Beyond learning about XML, this feature helped me really understand MySQL subqueries, joins, and sorting keywords. The query is actually kind of interesting:

SELECT * from (SELECT * FROM messages where (userid = ‘$userid’ AND recipientid IS NULL) OR recipientid = ‘$userid’) as feed NATURAL JOIN userinfo as feedwithinfo ORDER BY timestamp DESC;

Changelog and Screenshots Below:

What’s new in version theBrotherhood 0.4 (Apr-23-2012):
*Dispatches. Now you can post dispatches for you and your friends to see. Your feed of dispatches is now on the homepage.
*Redesigned Profiles. Due to the addition of more features, User Profiles have been redesigned with a tab interface.
*JavaScript is now required for using the website
*Lots of the backend is now built on XML and is dynamically loaded in the background

 

 

iOS and Objective-C, Part 1

As a longterm Mac user and iOS user who is majoring in Computer Science, I have always been interested in learning how to write for OS X based platforms. So when I saw that Stanford University had put their class CS 193P iPhone Application Development on iTunes, I just knew. While I’ve been focusing on my Social Network (more to come on Monday!) I also have been devoting some time to learning this. Tonight, I finished the first assignment: an RPN Calculator, which use stacks.

While it was mostly a walk through, it was still pretty challenging. The syntax of Objective-C is so much different than stuff I am accustomed to in C, C++, and PHP. It is certainly a learning curve. That said, there are a few things that I already starting to enjoy. Just like Javascript, one varible.can.be.dotted.on.multiple times like so:

double result = [self.brain performOperation:sender.currentTitle];

New in iOS is Automatic Garbage Collection. It is so nice to not have to worry about what is happening to every single piece of memory that is allocated. At the same time, Xcode is really really nice. Xcode is really great about auto completing variables, and it is very easy to access documentation so if I do not know how to do something, I can easily figure it out. I’m looking forward to continuing this iTunes U course.

Screenshots Below:

Social Network, Part 3

Over the past few weeks, I have been working on building a web based social network in order to teach myself PHP, MySQL, HTML, CSS, Javascript, and other web technologies. Over the first two versions, as I have added more features, the user interface has gotten more and more clumsy. For this version, I wanted to add search. Unfortunately, an addition of another option pushed my user interface to its limit. Especially since I was not using that much CSS. Therefore, in this version, I rewrote the top navigation so that it worked better. It has an all new design. Some highlights are below:

  • Built using CSS font and alignment properties.
  • I designed and made a custom logo using The Gimp to replace what was a text link
  • All the navigation items are now buttons instead of text links. This provides more surface area for users to click.
  • The content of the page between the navigation top and the bottom footer is now enclosed in a table to provide a uniform look.
  • The navigation top is flush with the top and sides of the window.

Beyond the redesign that allowed me to learn a lot about CSS, I took the time to implement some features that I thought were needed.

  • People Search. Users can now search for other users by either first or last name OR first and last name and then add them directly from the search results.
  • Profile Picture: User can now upload a picture to use as a profile picture. This image is automatically resized to the proper size. The system will make sure the picture is displayed properly.
  • I built the picture upload mechanism in such a way that it will be easy to add uploading of non-profile picture pictures in a future release.
  • There is rudimentary support of XML. It is possible to generate an XML file of a friends list. Nothing is done with it right now, but the hope is to create an AJAX friends list on the profile in a future release.
  • Now when on the pages of other users, a user can add their friends as his os her friends directly without having to navigate to that users page.

Screenshots below:

Social Network, Part 2

One of the programming projects I’ve been working on is a Social Network in PHP using MySQL databases. Here’s an update on how it’s going. Here’s the improvements I’ve added since last time.

  • The Social Network now has a favicon
  • The top navigation bar is flush with the top of the page.
  • Friending! You can be friends with multiple users
  1. You can request and deny to be in a friending relation with another user.
  2. The navigation bar alerts of new friend requests
  3. Friends are displayed on the homepage
  • There is a new alert area that has pending friend requests and ways to fill in missing profile information.
  • If a user has not filled out all his  table is not complete, the alert area will nag a user to fill in the information.
  • It is now possible to view other profiles of other users

In building this social network, I’ve tried to think ahead and implement things with the future in mind. In the background, I am storing things in a relations table. Right now it only stores requests and friendships, but it’s been designed to be used to store users who block each other. This is a feature I hope to implement in the next version.

Screenshots below:

Social Network, Part 1

I’m someone who is always up for a challenge. It’s very interesting to see how awesome sites like Facebook and MySpace work. So recently I’ve taken a Databases and Dynamic Webpages class. Using knowledge, I’ve embarked upon an effort to code my own Social Networking site using PHP and MySQL. This past week, I have started on the actually coding of it. Here is what I have accomplished so far:

  • Users can register
  • Users can login
  • On the login and register form, there is javascript validation.
  • The welcome page displays basic user information.
  • A user can view his own profile, this is built in such a way to easily enable looking at others in next version.
  • The system checks weather a user is logged in an will not allow non-logged-in users to view profiles, the welcome page, and anything that requires an account.
  • System is COPPA complaint.

A note on design. I took my time writing this project. As much as I could, I tried to make the entire website have a uniform design. Using the same php file in multiple user facing pages, I was able to write less code that did more in more places.

Screenshots  below:

 

 

Social Network, Design

I’m interested in learning how things work so that I can learn how to do more. Sites like Facebook and MySpace are especially interesting because there is so much too them.. So recently I’ve taken a Databases and Dynamic Webpages class. I’m thinking about coding my own Social Networking site using PHP and MySQL.

However, before I can start it, I need to think about how it would work. After a lot of thinking, here is my design for the underlying MySQL tables. From the tables, it should be clear the features I have put consideration into.

 

Table # 1: Login

CREATE TABLE `login` (

`email` char(255) NOT NULL,

`password` char(255) NOT NULL,

`userid` int(11) NOT NULL AUTO_INCREMENT,

`online` bool DEFAULT 0,

PRIMARY KEY (`email`),

UNIQUE KEY `userid` (`userid`)

)

Notes: Email is the primary key because I am trying to give the user the least to remember so it will be more simple for him or her to start using the site. In the login process, the user will login with the email and password and the browser will be given a session using the userid, which is the unique key that identifies users. When a user logs on, ‘online’ is set to true, when the user logs off or the session expires, it is set to 1.

Table # 2: User info

CREATE TABLE `userinfo` (

`userid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`nickname` char(128) DEFAULT NULL,

`fname` char(128) NOT NULL DEFAULT ”,

`mname` char(128) DEFAULT NULL,

`lname` char(128) NOT NULL DEFAULT ”,

`gender` tinyint(1) DEFAULT NULL,

`bdate` date NOT NULL,

`phonenum` int(10) DEFAULT NULL,

`schoolid` int(11) DEFAULT NULL,

`employerid` int(11) DEFAULT NULL,

`addressline1` char(255) DEFAULT NULL,

`addressline2` char(255) DEFAULT NULL,

`city` char(60) DEFAULT NULL,

`state` char(60) DEFAULT NULL,

`defaultpicid` int(11) DEFAULT NULL,

PRIMARY KEY (`userid`)

)

Notes: Based upon the userid, this table stores the info that would be listed on the persons profile. For items that might be shared with other users, like schools and employers, I made it an id number that can be looked up in another table. The default picture can be looked up in a picture table. Age can be calculated based on the bdate. Some of this info will be filled in, optionally, by the user after registration. If a value is not filled in (is NULL) it will simply not be displayed.

Table # 3: Relations

CREATE TABLE `relations` (

`relationidnum` int(11) unsigned NOT NULL AUTO_INCREMENT,

`userid` int(11),

`userid2` int(11),

`relation` smallint(1),

PRIMARY KEY (`relationidnum`)

)

Notes: ‘Userid’ one user in a relation who is related to ‘Userid2’ in some way. The ‘relation’ key shows kind of relation it is. 1 = Friend, 2 = Super friend. 3 = ‘Userid’ follows ‘Userid2.’ 4 = ‘Userid2’ follows ‘Userid’

Table # 4: Requests

CREATE TABLE `requests` (

`requestid` int(11) unsigned AUTO_INCREMENT,

`userid` int(11),

`requesteruserid` int(11),

`requestkind` smallint(1),

PRIMARY KEY (`requestid`)

)

Notes: ‘Userid’ is the user who is being requested to be in a relation with ‘requesteruserid’ by ‘requesteruserid.’ `requestkind` is the kind of relation that ‘requesteruserid’ is requesting to be. 1 = Friend, 2 = Super friend. 3 = Follow ‘Userid’ 4 = Have ‘Userid’ follow ‘requesteruserid’

Table # 5: Statuses

CREATE TABLE `statuses` (

`statusid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`userid` int(11),

`text` char(255),

`link` char(255),

`pictureid` int(11),

`time` timestamp,

PRIMARY KEY (`statusid`)

)

Notes: ‘userid’ is the user who posted the status. ‘timestamp’ is the time it was posted. The rest is the content of the status. The statuses in this table could be updated (UPDATE command) by the user provided that a proper interface was provided. By deleting a tuple out of this table, statuses can be erased.

Table # 6: Comments

CREATE TABLE `comments` (

`commentid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`statusid` int(11),

`userid` int(11),

`comment` char(11),

PRIMARY KEY (`commentid`)

)

Notes: This table stores the comments on statuses arranged by ‘statusid’ The ‘userid’ is the id of the person making the comment. The ‘commentid’ could be used in the future to implement a ‘like’ feature where users ‘like’ a comment.

Table # 7: Blocking

CREATE TABLE `blocking` (

`blockingid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`userid` int(11),

`blockeduserid` int(11),

PRIMARY KEY (`blockingid`)

)

Notes: `userid` blocks `blockeduserid`

Table # 8: Two-Way Messages 

CREATE TABLE `msgs` (

`msgid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`senderid` int(11),

`recieverid` int(11),

`body` char(255),

`read` bool DEFAULT 0,

PRIMARY KEY (`msgid`)

)

Notes: `senderid` sends ‘body’ to ‘recieverid’ It’s possible to do an ‘inbox’ and ‘outbox’ using this table. Delete messages by removing its tuple. Both users can do this.

Table # 9: Group Messages

CREATE TABLE `msgs` (

`msgid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`senderid` int(11),

`groupid` int(11),

`body` char(255),

PRIMARY KEY (`msgid`)

)

Notes: `senderid` sends ‘body’ to the group ‘groupid’ It’s possible to do an ‘inbox’ and ‘outbox’ using this table. Delete messages by removing its tuple. Only the sender should be able to delete group messages. Not sure if messages to a ‘group’ should be posted on a page for that ‘group’ or instead sent to the ‘inbox’ of the user, hence the lack of read. unread feature for group messages.

Table # 10: Schools

CREATE TABLE `schools` (

`schoolid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`name` char(255) ,

PRIMARY KEY (`schoolid`)

)

Table # 11: Employers

CREATE TABLE `employers` (

`workid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`name` char(255),

PRIMARY KEY (`workid`)

)

Table # 12: Pictures

CREATE TABLE `pictures` (

`picid` int(11) unsigned NOT NULL AUTO_INCREMENT,

`location` char(255),

PRIMARY KEY (`picid`)

)