<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>AmarManiar.com</title>
	<atom:link href="http://amarkm.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amarkm.wordpress.com</link>
	<description>technophile</description>
	<lastBuildDate>Mon, 08 Aug 2011 23:38:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='amarkm.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>AmarManiar.com</title>
		<link>http://amarkm.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://amarkm.wordpress.com/osd.xml" title="AmarManiar.com" />
	<atom:link rel='hub' href='http://amarkm.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Train train &#8230;.come again another day&#8230; Oh no wait!</title>
		<link>http://amarkm.wordpress.com/2010/02/12/train-train-come-again-another-day-oh-no-wait/</link>
		<comments>http://amarkm.wordpress.com/2010/02/12/train-train-come-again-another-day-oh-no-wait/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 02:46:32 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Anything Goes]]></category>
		<category><![CDATA[The song remains the same]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/?p=112</guid>
		<description><![CDATA[Yeah this crazy snowfall has gotten me all in the whirlwind. I meant rain. NO! Wait i want the rain to als come, even the snow actually&#8230; Ok that does it&#8230; No real purpose for this post is there? May be there is and i haven&#8217;t quite figured it out yet. A shame but a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=112&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yeah this crazy snowfall has gotten me all in the whirlwind. I meant rain. NO! Wait i want the rain to als come, even the snow actually&#8230; Ok that does it&#8230; No real purpose for this post is there? May be there is and i haven&#8217;t quite figured it out yet. A shame but a start nonetheless, wouldn&#8217;t u say? Just like most things in life&#8230; U need a start! </p>
<p> Posted by <a href="http://wordmobi.googlecode.com">  Wordmobi </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=112&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2010/02/12/train-train-come-again-another-day-oh-no-wait/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>LFS (Linux from Scratch)</title>
		<link>http://amarkm.wordpress.com/2007/09/30/lfs/</link>
		<comments>http://amarkm.wordpress.com/2007/09/30/lfs/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 01:49:16 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[custom linux]]></category>
		<category><![CDATA[lfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scratch]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/10/25/lfs/</guid>
		<description><![CDATA[This is a project that helps you build your very own custom linux system, entirely from source code. Step-by-step instructions help you go about it with ease. Actually, the &#8220;ease&#8221; part would depend on your experience with using linux. This Linux From Scratch book provides readers with the background and instruction to design and build. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=100&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a project that helps you build your very own custom linux system, entirely from source code. Step-by-step instructions help you go about it with ease. Actually, the &#8220;ease&#8221; part would depend on your experience with using linux. This Linux From Scratch book provides readers with the background and instruction to design and build. You can find it at <a target="_blank" href="http://www.linuxfromscratch.org/">http://www.linuxfromscratch.org/</a></p>
<p>Building an LFS system is not a simple task. The following are the recommended pre-requisites from the book for novice users:</p>
<ul>
<li>Software-Building-HOWTO<br />
<a target="_blank" href="http://www.tldp.org/HOWTO/Software-Building-HOWTO.html">http://www.tldp.org/HOWTO/Software-Building-HOWTO.html</a><br />
This is a comprehensive guide to building and installing “generic” Unix software packages under Linux.</li>
<li>The Linux Users&#8217; Guide<br />
<a target="_blank" href="http://www.linuxhq.com/guides/LUG/guide.html">http://www.linuxhq.com/guides/LUG/guide.html</a><br />
This guide covers the usage of assorted Linux software.</li>
<li>The Essential Pre-Reading Hint<br />
<a target="_blank" href="http://www.linuxfromscratch.org/hints/downloads/files/essential_prereading.txt">http://www.linuxfromscratch.org/hints/downloads/files/essential_prereading.txt</a><br />
This is an LFS Hint written specifically for users new to Linux. It includes a list of links to excellent sources of information on a wide range of topics. Anyone attempting to install LFS should have an understanding of many of the topics in this hint.</li>
</ul>
<p>I haven&#8217;t yet built the system but slowly and surely am moving towards it. When I do however build it, I will write up something about my experiences and put it here. So, watch this space&#8230;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/100/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/100/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=100&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2007/09/30/lfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>Favicon (that &#8220;A&#8221; you see in the address bar)</title>
		<link>http://amarkm.wordpress.com/2007/09/25/favicon/</link>
		<comments>http://amarkm.wordpress.com/2007/09/25/favicon/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 10:11:05 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Whole Lotta Fun]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[website icon]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/10/25/favicon/</guid>
		<description><![CDATA[A favicon (short for &#8216;favorites icon&#8217;), also known as a website icon, a page icon or an urlicon, is an icon associated with a particular website or webpage. A web designer can create such an icon, and many recent web browsers can then make use of them. Browsers that support favicons may display them in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=107&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A favicon (short for &#8216;favorites icon&#8217;), also known as a website icon, a page icon or an urlicon, is an icon associated with a particular website or webpage. A web designer can create such an icon, and many recent web browsers can then make use of them. Browsers that support favicons may display them in the browser&#8217;s URL bar, next to the site&#8217;s name in lists of bookmarks, and next to the page&#8217;s title in a tabbed document interface. A tutorial for creating one and using it can be found <a target="_blank" href="http://www.clickfire.com/viewpoints/articles/favicons.php">here</a>.</p>
<p>FYI: Internet Explorer 7 sometimes has issues displaying the favicon.<br />
My recommendation: Use Opera. Click <a target="_blank" href="http://www.opera.com/download/index.dml?custom=yes" title="Opera download">here</a> to download.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/107/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/107/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=107&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2007/09/25/favicon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>Sony ACID Pro and QuarkXpress</title>
		<link>http://amarkm.wordpress.com/2007/07/01/sonyacid-quarkxpress/</link>
		<comments>http://amarkm.wordpress.com/2007/07/01/sonyacid-quarkxpress/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 03:11:08 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Whole Lotta Fun]]></category>
		<category><![CDATA[quarkxpress]]></category>
		<category><![CDATA[sony acid]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/07/01/sonyacid-quarkxpress/</guid>
		<description><![CDATA[Sony ACID Pro is a loop-based music sequencer software, originally published by Sonic Foundry, now owned and run by Sony. This software runs on PCs with all versions of Microsoft Windows since Windows 2000. It is a powerful audio editing tool that can stretch or shrink sound without altering its pitch (see sound effect techniques [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=108&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.sonycreativesoftware.com/products/product.asp?pid=383">Sony ACID Pro</a> is a loop-based music sequencer software, originally published by Sonic Foundry, now owned and run by Sony. This software runs on PCs with all versions of Microsoft Windows since Windows 2000. It is a powerful audio editing tool that can stretch or shrink sound without altering its pitch (see sound effect techniques for more information on typical audio editing techniques). ACID Pro currently includes over 20 DirectX audio effects, employs the new Media Manager technology, the Beatmapper tool, and the Chopper tool, as well the ability to mix in 5.1 channel surround.</p>
<blockquote>
<p class="quote">I love music and being able to create it will have an extra sense of pleasure. Although learning musical instruments would be ideal (also something I&#8217;m getting at), I think this is definitely NOT a step in the wrong direction.</p>
</blockquote>
<p><a target="_blank" href="http://www.quark.com/products/xpress/">QuarkXPress</a> (&#8220;Quark&#8221;) is a computer application for creating and editing complex page layouts in a WYSIWYG (<strong>W</strong>hat <strong>Y</strong>ou <strong>S</strong>ee <strong>I</strong>s <strong>W</strong>hat <strong>Y</strong>ou <strong>G</strong>et) environment. It runs on Mac OS X and Windows. It was first released by Quark, Inc. in 1987 and is still owned and published by them. The most recent version is 7.3 and includes editions for publishing in American English, International English, and over a dozen other languages. QuarkXPress is primarily used by large publishing houses to produce the kinds of complex page layouts required by magazines, newspapers, catalogs, and similar printed materials. It is one of two products (the other being Adobe InDesign) that dominate that market space. </p>
<blockquote>
<p class="quote">Not so long ago, one of the things that I tried starting at Drexel, along with some freshmen, was a magazine. MediuM, as it was to be called, eventually got shelved primarily in part because of the lack of people (including me) not knowing the preferred software for publishing literature, QuarkXpress. So, I&#8217;ve decided to learn it.</p>
</blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/108/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/108/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=108&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2007/07/01/sonyacid-quarkxpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>Parsing CSV files using Java</title>
		<link>http://amarkm.wordpress.com/2007/05/30/csv/</link>
		<comments>http://amarkm.wordpress.com/2007/05/30/csv/#comments</comments>
		<pubDate>Wed, 30 May 2007 12:16:56 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[parsing]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/05/25/csv/</guid>
		<description><![CDATA[CSV stands for Comma Separated Variables/Values. So, this project involved using Java to parse CSV files and separating them into fields. eg: for input a,b,c; the output will be: line = &#8216;a,b,c&#8217; field[0] = `a&#8217; field[1] = `b&#8217; field[2] = `c&#8217; The example above is the simplest of examples. However, the program below can handle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=102&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CSV stands for Comma Separated Variables/Values. So, this project involved using Java to parse CSV files and separating them into fields.</p>
<p>eg: for input a,b,c; the output will be:<br />
line = &#8216;a,b,c&#8217;<br />
field[0] = `a&#8217;<br />
field[1] = `b&#8217;<br />
field[2] = `c&#8217;</p>
<p>The example above is the simplest of examples. However, the program below can handle complex ones also. It can deal with spaces or consecutive commas and semicolons. Try it out. By the way, I used netbeans for this project; it&#8217;s pretty good. Download link at end of page.</p>
<p><u><b>The CSV class file</b></u>:</p>
<blockquote><p>/*<br />
* Csv.java<br />
*<br />
* Created on May 29, 2007, 4:26 AM<br />
*<br />
* To change this template, choose Tools | Template Manager<br />
* and open the template in the editor.<br />
*/</p>
<p>package csv;</p>
<p>import java.util.*; //This will be used to work with lists.<br />
import java.lang.String; //This will be used for string manipulations.</p>
<p>/**<br />
*<br />
* @author Amar Maniar<br />
*/<br />
public class Csv { //This class will handle all the logic need to parse CSV files.</p>
<p>private<br />
int nfield; //This will hold the number fields that were seperated by commas.<br />
char fieldSep; //This will hold the actual field seperator. For this exercise it is &#8220;,&#8221;<br />
List field = new ArrayList(); //This will hold the actual values that were comma seperated.<br />
String fld = new String(); //Will be used as a temporary variable that will hold each field<br />
//before its placed in the final list.</p>
<p>public int split(String line) { //This function will split the input on commas.<br />
//It needs to decide whether to parse normally<br />
//or consider special scenarios like &#8220;Amar,Maniar&#8221;.<br />
//This function returns the number of fields present<br />
//in the input.<br />
int i, j;<br />
fld = &#8220;&#8221;;</p>
<p>nfield = 0;<br />
if (line.length() == 0) //If the input line length is 0, then there are no fields<br />
return 0;   //there fore the return value is 0.<br />
i = 0;<br />
do {<br />
if (i &lt; line.length() &amp;&amp; line.charAt(i) == &#8216;&#8221;&#8216;) //If quotes are present in the input handle<br />
j = advquoted(line, ++i);     //them specially, by calling the advqouted method.<br />
else<br />
j = advplain(line, i); //Else just handle them normally.</p>
<p>field.add(fld); //Once any of the above functions return, the fld string will be set.<br />
//This value of fld should be placed in the final list, so that fld can<br />
//now take the next parsed value.<br />
nfield++; //The value of number of fields prased will also increase by one.<br />
i = j + 1; //This line will increment the index for the over all input. The value of j is set by<br />
//either advquoted or advplain, where j is the index value of the last read character.<br />
} while (j &lt; line.length()); //Processing runs untill there are no more character to be read.</p>
<p>return nfield; //Return the number of fields parsed.<br />
}</p>
<p>public int advplain(String line, int i) { //This function will parse all fields that are not in quotes. advplain &#8211; advance for plain input<br />
int j;</p>
<p>j = line.indexOf(fieldSep, i); //This will give the index of the next occurance<br />
//of filed seperator starting from i.<br />
//i is the current location of parser in the<br />
//over all input.</p>
<p>if (j == -1) {<br />
fld = line.substring(i); //If there is no such field then just return length of line.<br />
return line.length();  //This means that there are no more fields left to seperate.<br />
} else<br />
fld = line.substring(i,j); //Else return the substring between i and j. Eg: ,123, i=first comma j=second comma<br />
return j;     //therefore substring will hold 123. Here j is returned, that index of last character read.<br />
}         //Fld will hold 123 which will be placed in the final list of fields.</p>
<p>public int advquoted(String line, int i) { //This function will parse all fields that are in quotes. advquoted &#8211; advance for quoted input<br />
int j;<br />
fld = &#8220;&#8221;;<br />
for (j=i; j&lt;line.length(); j++) { //to move from the current location (which is i) to the end(the length of the string)<br />
if (line.charAt(j) == &#8216;&#8221;&#8216; &amp;&amp; j+1 &lt; line.length()) { //If the the current location has a &#8216;&#8221;&#8216; and if the next location is not the end<br />
if (line.charAt(j+1) == &#8216;&#8221;&#8216;) { //if the next location is a &#8216;&#8221;&#8216;<br />
j++;                         //go to the next location<br />
} else if (line.charAt(j+1) == fieldSep) { //or if the next location is our field separator, a comma<br />
j++;                  //go the next location and break since we&#8217;re done one case of quotes, the beginning ones<br />
break;<br />
}<br />
} else if (line.charAt(j) == &#8216;&#8221;&#8216; &amp;&amp; j+1 == line.length()) { //now, if the &#8216;&#8221;&#8216; is the last, i.e. at the end of the string<br />
break; //done                      //we&#8217;re done<br />
}<br />
fld = fld+line.charAt(j);                                    //so, now the field to be dealt with is where it&#8217;s currently at added to j, the position after<br />
}                                                                  //dealing with quoted text<br />
return j;                              // returning the current position<br />
}<br />
/** Creates a new instance of Csv */<br />
public Csv() { //This is the default constructor for the class<br />
fieldSep = &#8216;,&#8217;; //The default field seperator is &#8220;,&#8221; (this can be changed to anything and it would act like a separator<br />
}<br />
public Csv(char sep) { //This constructor can be used when a different<br />
fieldSep = sep;  //field seperator needs to be used. Like for example |<br />
}</p>
<p>public String getfield(int n) { //This function will return the field values<br />
if (n &lt; 0 || n &gt;= nfield) //from the final list, and these values are<br />
return &#8220;&#8221;;    //indexed from 1 to n, where n is the total<br />
else      //number of fields. Once we reach the max number<br />
return field.get(n).toString(); //of fields, any more queries will return empty strings.<br />
}</p>
<p>public int getnfield() { //This function will return the total number of lists parsed.<br />
return nfield;<br />
}<br />
}</p></blockquote>
<p><u><b>The Main class file</b></u>:</p>
<blockquote><p>/* class Main.<br />
* This is the driver class, that will take user input<br />
* either directly or as a file. It will then output<br />
* various fields that were comma seperated.<br />
*/</p>
<p>import csv.*; // this is the class that I created<br />
import java.io.*; //We need this to be able to access user input or files.</p>
<p>public final class Main {<br />
/** Constructor. */<br />
public Main() {}</p>
<p>public static void main(String[] args) throws IOException {<br />
int n;<br />
int i = 0;<br />
String line = new String();</p>
<p>if (args.length == 0) { //If no arguments were provided then user will input<br />
// the comma seperated values.<br />
BufferedReader is = new BufferedReader(new InputStreamReader(System.in)); //Allows us to access and perform<br />
//actions on the input from the console.<br />
while ((line = is.readLine()) != null) { //In a continuous while loop<br />
//so as to access user input and parse<br />
//it.<br />
Csv csv = new Csv(); //Instantiate the csv object, so that parsing can be done.<br />
System.out.println(&#8220;line = `&#8221; + line + &#8220;&#8216;&#8221;); //Print the unparsed line.<br />
n = csv.split(line); //Calls the split method, that will spit the line into various fields<br />
//and returns the number of fields that were obtained after the split.<br />
while (i&lt;n) { //Print the various fields that were obtained after the input line was split.<br />
System.out.println(&#8220;field[" + i + "] = `&#8221; + csv.getfield(i) + &#8220;&#8216;&#8221;);<br />
i++;<br />
}<br />
}<br />
} else {<br />
for (i=0; i&lt;args.length; i++) { //User specified which file to read the input from.<br />
BufferedReader is = new BufferedReader(new FileReader(args[i])); //Allows us to access and perform<br />
//actions on the input from file.<br />
while ((line = is.readLine()) != null) {<br />
Csv csv = new Csv(); //Instantiate the csv object, so that parsing can be done.<br />
System.out.println(&#8220;line = `&#8221; + line + &#8220;&#8216;&#8221;); //Print the unparsed line.<br />
n = csv.split(line); //Calls the split method, that will spit the line into various fields<br />
//and returns the number of fields that were obtained after the split.<br />
i = 0;<br />
while (i&lt;n) { //Print the various fields that were obtained after the input line was split.<br />
System.out.println(&#8220;field[" + i + "] = `&#8221; + csv.getfield(i) + &#8220;&#8216;&#8221;);<br />
i++;<br />
}<br />
}<br />
}</p>
<p>}<br />
}</p>
<p>}</p></blockquote>
<p><a href="http://www.pages.drexel.edu/~akm29/CSV.rar" target="_blank" title="CSV_rar">Click here</a> to download with the &#8220;Read Me&#8221; file (includes makefile also)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/102/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/102/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=102&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2007/05/30/csv/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>Remote desktop over NAT</title>
		<link>http://amarkm.wordpress.com/2007/01/14/nat/</link>
		<comments>http://amarkm.wordpress.com/2007/01/14/nat/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 03:09:33 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/01/24/nat/</guid>
		<description><![CDATA[You will not believe me if I said that there is virtually no documentation on the internet for this. But it is true; at least at the time when I wanted it, there wasn&#8217;t any. Therefore, I decided to write up one. From the description below, with NAT, the internal and external IP addresses differ; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=80&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You will not believe me if I said that there is virtually no documentation on the internet for this. But it is true; at least at the time when I wanted it, there wasn&#8217;t any. Therefore, I decided to write up one. From the description below, with NAT, the internal and external IP addresses differ; in other words, the IP address that the computer shows you when type &#8220;ipconfig&#8221; at the command prompt is different than what the world sees. So, remote desktop-ing into your home computer becomes a problem. Your actual IP address, as seen by the world and also the one that you would need to find your computer on the internet (to remote desktop) can be found <a target="_blank" href="http://whatismyip.com/" title="IP address?">here</a>.</p>
<blockquote><p>NAT stands for Network Address Translation. It is a standard that enables a local-area network (LAN) to use one set of IP addresses for internal traffic and a second set of addresses for external traffic.</p></blockquote>
<p><u>The Problem</u>: The router gives everyone on the network a different set of IP addresses and itself has a different one. Therefore, even after you know the IP address from the link above, there is needed a way to reach your computer on the network. </p>
<p><u>The solution</u>: It is actually very simple. In a nutshell, you need to tell your modem to route any incoming remote desktop connections to your computer. By default, the modem does not know how to respond. The idea is to have the application level gateway on your modem use a rule (specified by you) when dealing with communication on a specific port on your computer (for remote desktop, it is 3389). The official term for this is port forwarding. Refer to the tutorial below:</p>
<p><u>Tutorial</u>:</p>
<p>First of all, you need to get into your router. One of the most common addresses is http://192.168.1.1; you need to find out the one for yours. You can search for it on any search engine or the router documentation would definitely have it.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/1.jpg" title="NAT1"><img src="http://amarkm.files.wordpress.com/2007/10/1.jpg?w=497" alt="NAT1" /></a></p>
<p>After you do that, you will asked for a username and password. Some of the common ones are:</p>
<table border="1" cellPadding="0" cellSpacing="0" style="border-collapse:collapse;border:medium none;" class="MsoTableGrid">
<tr>
<td vAlign="top" style="background-color:transparent;border:windowtext 1pt solid;padding:0 5.4pt;">
<p align="center" style="text-align:center;margin:0;" class="MsoNormal"><strong><u><span style="font-family:Georgia;"><font size="3">Username</font></span></u></strong></p>
</td>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left:#ece9d8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><strong><u><span style="font-family:Georgia;"><font size="3">Password</font></span></u></strong></td>
</tr>
<tr>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">admin</font></span></td>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">password</font></span></td>
</tr>
<tr>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">admin</font></span></td>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">&lt;blank&gt;</font></span></td>
</tr>
<tr>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">&lt;blank&gt;</font></span></td>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">admin</font></span></td>
</tr>
<tr>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">admin</font></span></td>
<td vAlign="top" style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><span style="font-family:Georgia;"><font size="3">admin</font></span></td>
</tr>
</table>
<p>Next, something like this will open up:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/2.jpg" title="NAT2"><img src="http://amarkm.files.wordpress.com/2007/10/2.jpg?w=497" alt="NAT2" /></a></p>
<p>You need to click on Setup/Configuration.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/3.jpg" title="NAT3"><img src="http://amarkm.files.wordpress.com/2007/10/3.jpg?w=497" alt="NAT3" /></a></p>
<p>Then click on Advanced Setup.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/4.jpg" title="NAT4"><img src="http://amarkm.files.wordpress.com/2007/10/4.jpg?w=497" alt="NAT4" /></a></p>
<p>Click to Begin Advanced Setup.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/5.jpg" title="NAT5"><img src="http://amarkm.files.wordpress.com/2007/10/5.jpg?w=497" alt="NAT5" /></a></p>
<p>Now, click on Application Level Gateway to open up something as shown above. Then select the User radio button. The Available Rule &#8220;remote&#8221; was created by me.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/6.jpg" title="NAT6"><img src="http://amarkm.files.wordpress.com/2007/10/6.jpg?w=497" alt="NAT6" /></a></p>
<p>To create a rule, click on New. It will open up Rule Management; fill in the information as shown below and hit Apply.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/7.jpg" title="NAT7"><img src="http://amarkm.files.wordpress.com/2007/10/7.jpg?w=497" alt="NAT7" /></a></p>
<p>Now that you&#8217;ve created the rule, go back to the previous page by clicking Back.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/8.jpg" title="NAT8"><img src="http://amarkm.files.wordpress.com/2007/10/8.jpg?w=497" alt="NAT8" /></a></p>
<p>As shown above, you now need to add that rule to a LAN device; this dropdown list will contain computers on the network by their names. So, my computer being ragno, I selected it and added the rule &#8220;remote&#8221; to it. When you&#8217;re done with that, just hit Save and Restart.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/9.jpg" title="NAT9"><img src="http://amarkm.files.wordpress.com/2007/10/9.jpg?w=497" alt="NAT9" /></a></p>
<p>The router will restart and then when you put in your &#8220;real&#8221; IP address when you&#8217;re out somewhere, the remote desktop connection is forwarded to your computer and you can connect to your computer. IP addresses on your network will have the same &#8220;real&#8221; IP address, so don&#8217;t use any of them. Although for using remote desktop from your own network, you&#8217;d just need the name of your computer.</p>
<p>However, IP addresses are hard to remember. To deal with that, you can get a DNS hostname. It is available for free at <a target="_blank" href="http://www.no-ip.com" title="DNS hostname">no-ip.com</a>. DNS hostname is basically just a name associated with your IP address. You will need to download a client that will update everytime your IP address changes (IP addresses change when they are dynamic, which is the case for homes).</p>
<p><u>Food for thought</u>: I think with this, it is only one computer on the network that can be &#8216;remote desktop&#8217;ed into; since every other windows machine will have the same remote desktop port. I haven&#8217;t researched into how to do this on several computers or if it is even possible.</p>
<p>Feel free to comment and give suggestions.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/80/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/80/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=80&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2007/01/14/nat/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/1.jpg" medium="image">
			<media:title type="html">NAT1</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/2.jpg" medium="image">
			<media:title type="html">NAT2</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/3.jpg" medium="image">
			<media:title type="html">NAT3</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/4.jpg" medium="image">
			<media:title type="html">NAT4</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/5.jpg" medium="image">
			<media:title type="html">NAT5</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/6.jpg" medium="image">
			<media:title type="html">NAT6</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/7.jpg" medium="image">
			<media:title type="html">NAT7</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/8.jpg" medium="image">
			<media:title type="html">NAT8</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/9.jpg" medium="image">
			<media:title type="html">NAT9</media:title>
		</media:content>
	</item>
		<item>
		<title>Krysamar City (A spin-off from Sin City)</title>
		<link>http://amarkm.wordpress.com/2006/12/02/krysamar-city/</link>
		<comments>http://amarkm.wordpress.com/2006/12/02/krysamar-city/#comments</comments>
		<pubDate>Sat, 02 Dec 2006 22:08:06 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Whole Lotta Fun]]></category>
		<category><![CDATA[krysamar]]></category>
		<category><![CDATA[sin city spinoff]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/10/25/krysamar-city-a-spin-off-from-sin-city/</guid>
		<description><![CDATA[I took a Film &#38; Video course at Drexel: FMVD 125 &#8211; Basic Television Studio It covers the basics of television studio operation through a series of exercises in a workshop setting, culminating in projects written and produced by the students. My team included Krystal &#38; Me; hence the title. This was sort of our [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=106&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I took a Film &amp; Video course at Drexel:</p>
<blockquote><p>FMVD 125 &#8211; Basic Television Studio<br />
It covers the basics of television studio operation through a series of exercises in a workshop setting, culminating in projects written and produced by the students.</p></blockquote>
<p>My team included Krystal &amp; Me; hence the title. This was sort of our final, wherein we were given about one and a half hours to produce a short story (about 2-3 minutes) utilizing all the TV equipment and man-power that was available; the man-power being the rest of the class. The catch was, we cannot edit it once it is recorded which meant that it has to be one perfect take. Getting the crew to understand your vision and have them do exactly what you want, when you want takes quite a bit of effort in that allotted time. However, we got through it and it was fun!!</p>
<p>The script can be found <a target="_blank" href="http://www.pages.drexel.edu/~akm29/Krysamar%20City.pdf" title="krysamar-city">here</a> (.pdf); I think we did good in the allotted time.</p>
<blockquote><p>Script nomenclature: (also: left side is camera shots and right is dialogue &amp; action)<br />
CU &#8211; Close Up, MS &#8211; Medium Shot, LS &#8211; Long Shot, ELS &#8211; Extra Long Shot, CG &#8211; Computer Graphics<br />
OTS &#8211; Over The Shoulder<br />
The numbers before the shots are camera numbers.<br />
There were 3 cameras that we could use at any given time.</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/106/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/106/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=106&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2006/12/02/krysamar-city/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>VHDL test bench for RAM</title>
		<link>http://amarkm.wordpress.com/2006/11/26/vhdl/</link>
		<comments>http://amarkm.wordpress.com/2006/11/26/vhdl/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 17:11:30 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[modelsim]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[test bench]]></category>
		<category><![CDATA[vhdl]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2006/11/25/vhdl/</guid>
		<description><![CDATA[This project involved creating a test bench for a RAM (created &#38; simulated in Modelsim). Given below is the code I wrote for the RAM that had an 8-bit address bus and 4-bit data bus. Library ieee; Use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity RAM_tb is constant ntb: natural := 8; constant mtb: natural := 4; end RAM_tb; architecture [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=101&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This project involved creating a test bench for a RAM (created &amp; simulated in Modelsim). Given below is the code I wrote for the RAM that had an 8-bit address bus and 4-bit data bus.</p>
<blockquote><p>Library ieee;<br />
Use ieee.std_logic_1164.all;<br />
use ieee.std_logic_arith.all;</p>
<p>entity RAM_tb is<br />
constant ntb: natural := 8;<br />
constant mtb: natural := 4;<br />
end RAM_tb;</p>
<p>architecture bt_MAR of RAM_tb is</p>
<p>component RAM<br />
generic(m:natural:=4;n:natural:=8);<br />
port(clk,clr,rw:in std_logic; addrbus:in std_logic_vector(m-1 downto 0);<br />
 databus:inout std_logic_vector(n-1 downto 0));<br />
end component;</p>
<p>type array_tb is array(natural range &lt;&gt;) of std_logic_vector(ntb-1 downto 0);<br />
type array_tb2 is array(natural range &lt;&gt;) of std_logic_vector(mtb-1 downto 0);<br />
signal abus: array_tb2((mtb-2) downto 0) := (&#8220;0010&#8243;,&#8221;0001&#8243;,&#8221;0000&#8243;);<br />
signal dbus: array_tb((mtb-2) downto 0) := (&#8220;00000000&#8243;,&#8221;UUUU0000&#8243;,&#8221;UUUUUUUU&#8221;);</p>
<p>&#8211;type ram_type is array(0 to n-1) of std_logic_vector(n-1 downto 0);<br />
&#8211;signal ramram: ram_type;<br />
signal cr,rww: std_logic;<br />
signal adrbus: std_logic_vector(mtb-1 downto 0);<br />
signal dtbus: std_logic_vector(ntb-1 downto 0);<br />
signal ck: std_logic := &#8217;1&#8242;;</p>
<p>type state is (start,assign,writeit,readit,check,over);<br />
signal n_s:state;</p>
<p>begin<br />
ck &lt;= not ck after 50 ns;</p>
<p>R: RAM port map(ck,cr,rww,adrbus,dtbus);</p>
<p>Process(ck)<br />
variable i: integer:=0;<br />
begin<br />
 case n_s is<br />
  when start =&gt;<br />
   n_s &lt;= assign;<br />
 <br />
  when assign =&gt;<br />
   cr&lt;=&#8217;0&#8242;;<br />
   adrbus&lt;=abus(i);<br />
   dtbus&lt;=dbus(i);<br />
   n_s&lt;=writeit;<br />
   <br />
  when writeit =&gt;<br />
   cr&lt;=&#8217;1&#8242;;<br />
   rww&lt;=&#8217;1&#8242;;<br />
   n_s&lt;=readit after 50 ns;<br />
  <br />
  when readit =&gt;<br />
   rww&lt;=&#8217;0&#8242;;<br />
   adrbus&lt;=abus(i);<br />
   n_s&lt;=check after 50 ns;<br />
  <br />
  when check =&gt;<br />
   assert(dtbus=dbus(i)) report &#8220;RAM ERROR&#8221; severity error;<br />
   i:=i+1;<br />
   if (i&lt;(mtb-1)) then<br />
    n_s&lt;=assign;<br />
   else<br />
    n_s&lt;=over;<br />
   end if;<br />
   <br />
  when over =&gt;<br />
   assert(false) report &#8220;TEST DONE&#8221; severity failure;<br />
   <br />
 end case;<br />
end process;<br />
end bt_MAR;</p></blockquote>
<p>It worked the last time I checked. You might have to deal with formatting issues. As for the RAM, you can create one based on this test bench. If I feel like it, I might write it up and post it here.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/101/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/101/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=101&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2006/11/26/vhdl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>
	</item>
		<item>
		<title>TCP improvements in wireless environments</title>
		<link>http://amarkm.wordpress.com/2006/08/20/tcp/</link>
		<comments>http://amarkm.wordpress.com/2006/08/20/tcp/#comments</comments>
		<pubDate>Sun, 20 Aug 2006 07:36:22 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[freeze-tcp]]></category>
		<category><![CDATA[networks]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[tcp fast start]]></category>
		<category><![CDATA[transport later]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2006/10/25/tcp/</guid>
		<description><![CDATA[The inherent instability of wireless networks renders regular TCP inefficient. Therefore, implementations of TCP that better adapt to the idiosyncrasies of wireless networks are needed. Freeze‐TCP and TCP Fast Start are two such implementations that deal with disconnections and idle periods respectively. Our project involved combining features of Freeze‐TCP and TCP Fast Start, in effect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=90&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The inherent instability of wireless networks renders regular TCP inefficient. Therefore, implementations of TCP that better adapt to the idiosyncrasies of wireless networks are needed. Freeze‐TCP and TCP Fast Start are two such implementations that deal with disconnections and idle periods respectively. Our project involved combining features of Freeze‐TCP and TCP Fast Start, in effect building a hybrid protocol under Gentoo Linux.</p>
<p>TCP is part of the transport layer as shown below. The transport layer is not just any other layer. It is the heart of the whole protocol hierarchy. Its task is to provide reliable, cost-effective data transport from the source machine to the destination machine, independently of the physical network or networks currently in use. Without the transport layer, the whole concept of layered protocol would make little sense.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp1.jpg" title="tcp1"><img src="http://amarkm.files.wordpress.com/2007/10/tcp1.jpg?w=497" alt="tcp1" /></a></p>
<p>The ultimate goal of the transport layer is to provide efficient, reliable and cost-effective service to its users, normally processes in the application layer. To achieve this goal, the transport layer makes use of the services provided by the network layer.</p>
<p>The internet has two main protocols in the transport layer, a connectionless protocol and a connection-oriented one. The former one is UDP (User Datagram Protocol) and the latter is the topic of our discussion, TCP (Transmission Control Protocol). UDP provides a way for applications to send encapsulated IP datagrams and send them without having to establish a connection. It is a simple protocol and it has some niche uses, such as client-server interactions and multimedia, but for most Internet applications, reliable, sequential delivery is needed. UDP cannot provide this, so another protocol is required. It is called TCP and is the main workhorse of the Internet.</p>
<p>TCP was specifically designed to procide a reliable end-to-end byte stream over an unreliable internetwork. An internetwork differs from a single network because different parts may have wildly different topologies, bandwidths, delays, packet sizes, and other parameters. TCP was designed to dynamically adapt to properties of the internetwork and to be robust in the face of many kinds of failures. Therefore, packets (information) sent need to be acknowledged after they are received.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp2.jpg" title="tcp2"><img src="http://amarkm.files.wordpress.com/2007/10/tcp2.jpg?w=497" alt="tcp2" /></a><br />
A max of W-unacknowledged packets can be in the network at any time, where W being the window size. If W=0, the sender halts transmission. This is the sliding window of transmission. Below is the slow start mechanism used by TCP to probe network bandwidth.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp3.jpg" title="tcp3"><img src="http://amarkm.files.wordpress.com/2007/10/tcp3.jpg?w=497" alt="tcp3" /></a><br />
A transmission starts with W=1. If it is successful, the window size doubles to become W=W x 2 (so, 2, 4, etc..). If a packet is lost, then W becomes 1 all over again and then the window again ramps up to the max size it can achieve. This size depends on the network since this is the TCP way to probe network for bandwidth.</p>
<p>In theory, transport protocols should be independent of the technology of the underlying layer. In particular, TCP should not care whether IP is running over fiber or over radio. In practice, it does matter because most TCP implementations have been carefully optimized based on assumptions that are true for wired networks but that fail for wireless networks. Ignoring the properties of wireless transmission can lead to horrendous performance even though the logic behind it is sound. The inherent instability of wireless networks is the main concern here. There tend to be disconnections and bandwidth fluctuations. With regular TCP described above, the slow start mechanism will start over and over in an instable wireless environment. Therefore, TCP implementations better able to adapt to the challenges of wireless networks need to be used. See figure below. Click for bigger picture.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp4.jpg" title="tcp4"><img src="http://amarkm.files.wordpress.com/2007/10/tcp4.thumbnail.jpg?w=497" alt="tcp4" /></a></p>
<p>Two implementations optimized for wireless networks that we worked with were TCP Fast Start and Freeze-TCP. The figure below shows you how Freeze-TCP that is primarily designed to deal with disconnection events handles them as opposed to regular TCP.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp5.jpg" title="tcp5"><img src="http://amarkm.files.wordpress.com/2007/10/tcp5.thumbnail.jpg?w=497" alt="tcp5" /></a></p>
<p>TCP Fast Start is primarily designed for dealing with idle periods i.e. periods of no use of network bandwidth. In the case regular TCP, the window size would begin from W=1 after an idle period and then ramp back up. In the case of TCP Fast Start, it will start from the window size used before the idle period. The congestion window size and other relevant parameters are cached for this.</p>
<p>Our project involved in combining the features of each of these implementations into a TCP hybrid protocol. The results of our hybrid in a simulated enviorment are shown below. Ethereal was our packet sniffer.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/tcp6.jpg" title="tcp6"><img src="http://amarkm.files.wordpress.com/2007/10/tcp6.thumbnail.jpg?w=497" alt="tcp6" /></a>  <a href="http://amarkm.files.wordpress.com/2007/10/tcp7.jpg" title="tcp7"><img src="http://amarkm.files.wordpress.com/2007/10/tcp7.thumbnail.jpg?w=497" alt="tcp7" /></a>  <a href="http://amarkm.files.wordpress.com/2007/10/tcp8.jpg" title="tcp8"><img src="http://amarkm.files.wordpress.com/2007/10/tcp8.thumbnail.jpg?w=497" alt="tcp8" /></a></p>
<p>Feel free to comment and leave suggestions.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/90/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/90/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=90&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2006/08/20/tcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp1.jpg" medium="image">
			<media:title type="html">tcp1</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp2.jpg" medium="image">
			<media:title type="html">tcp2</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp3.jpg" medium="image">
			<media:title type="html">tcp3</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp4.thumbnail.jpg" medium="image">
			<media:title type="html">tcp4</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp5.thumbnail.jpg" medium="image">
			<media:title type="html">tcp5</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp6.thumbnail.jpg" medium="image">
			<media:title type="html">tcp6</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp7.thumbnail.jpg" medium="image">
			<media:title type="html">tcp7</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/tcp8.thumbnail.jpg" medium="image">
			<media:title type="html">tcp8</media:title>
		</media:content>
	</item>
		<item>
		<title>Analysis and Simulation of highway traffic flow</title>
		<link>http://amarkm.wordpress.com/2006/04/30/traffic-flow/</link>
		<comments>http://amarkm.wordpress.com/2006/04/30/traffic-flow/#comments</comments>
		<pubDate>Sun, 30 Apr 2006 12:58:39 +0000</pubDate>
		<dc:creator>AmAr</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[gaper block]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[simulink]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://amarkm.wordpress.com/2007/10/24/traffic-flow/</guid>
		<description><![CDATA[The mathematical study of traffic flow has been going on since the 1950s; the aim is to better understand this phenomenon in order to prevent traffic congestion problems. Our project was to simulate and analyze abrupt as well as gradual changes in speed that may occur in highway traffic and their consequences from a microscopic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=36&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The mathematical study of traffic flow has been going on since the 1950s; the aim is to better understand this phenomenon in order to prevent traffic congestion problems. Our project was to simulate and analyze abrupt as well as gradual changes in speed that may occur in highway traffic and their consequences from a microscopic point of view. We did this using Simulink in Matlab.</p>
<p>In studying traffic, there are two approaches to modeling that are used as a result of the dynamical problems which can not be described in analytical terms, they are stochastic and deterministic models. Deterministic models are created by exact mathematical relationships. Stochastic approaches have processes that include probabilistic density functions to describe an event in the system.  Three types of simulations exist microscopic, macroscopic, and mesoscopic. Mesoscopic models describe all states of the system at a high level but with less attention to the interactions of the vehicles/drivers. Macroscopic models manifest the traffic system as it is perceived, for example the wave that describes the flow of traffic on a congested highway. Microscopic models exemplifies the interactions of state of they system in high level of detail, for example lane changing. The majority of traffic simulations are dynamical which show how the setting changes or evolves from one moment of time to the next. Continuous simulations express how the elements change continuously over time in response to instantaneous inputs. Discrete simulations represent real world systems and change state at discrete intervals of time or at discrete events. </p>
<p>A Stochastic process is a non-countable infinity of random variables, one for each time t. In stochastic analysis uniform random generation is used commonly as inputs to the random variables. Uniform distributions have a probability density function in the form of , where a and b are constants. Two processes are generally used to describe traffic flow; they are Random Walks and Poisson processes. A Random Walk is a sequence of independent random variables. In two dimensions a random walk has the probability of unity for reaching any point in the system as the number of steps approaches infinity. A random walk can be used to model a non-linear system, (a system that is a function of time and position). Poisson Process is a process that satisfies the following properties, the number of changes in nonoverlapping intervals is independent for all intervals, the probability of two or more changes in a small interval is zero and the probability of one change in a small interval is the probability of change divided by the total number of trials. A Poisson Process has the probability density function in the form:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic1.jpg" title="traffic eqn1"><img src="http://amarkm.files.wordpress.com/2007/10/traffic1.jpg?w=497" alt="traffic eqn1" /></a></p>
<p><u>Single Phase Fluid Model</u>:</p>
<p>Single Phase fluid model was proposed in 1955 by Lighthill and Whitham and again by Richards in 1956. Their traffic models became commonly referred to as the LWR kinematic model. The LWR model for single lane traffic on a unidirectional highway follows the mass conservation law or “conservation of car law”.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic2.jpg" title="traffic eqn2"><img src="http://amarkm.files.wordpress.com/2007/10/traffic2.jpg?w=497" alt="traffic eqn2" /></a></p>
<p>Density (ρ) is the density of cars as a function of time of distance x and time t and v(x, t) is the velocity of the car located at point x at time t. The LWR model makes the assumption that the v is a function of density only which allows the driver to instantaneously adjust his velocity to the local car density.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic3.jpg" title="traffic eqn3"><img src="http://amarkm.files.wordpress.com/2007/10/traffic3.jpg?w=497" alt="traffic eqn3" /></a><br />
<a href="http://amarkm.files.wordpress.com/2007/10/traffic4.jpg" title="traffic eqn4"><img src="http://amarkm.files.wordpress.com/2007/10/traffic4.jpg?w=497" alt="traffic eqn4" /></a></p>
<p>Vmax is a maximum velocity a driver could go on a free highway, and V (ρ) is a ‘hindrance’ function taking into account the presence of other cars(which cause the driver to decelerate).  ρmax is the maximum car density corresponding to the ‘bumper-to-bumper’ traffic. </p>
<p>Haight in 1974 expressed the fundamental diagram for traffic into seven types state equations. None of the models can be directly applied to mixing traffic.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic5.jpg" title="traffic table"><img src="http://amarkm.files.wordpress.com/2007/10/traffic5.jpg?w=497" alt="traffic table" /></a></p>
<p>However, improvements to the model were made by Daganzo in 1995. Daganzo show that the LWR model for traffic on freeways was inaccurate.  It was determined that because of the mixing traffic flow the LWR model needs to be modified to evaluate the system.</p>
<p><u>Two Phase Fluid Model</u>:</p>
<p>The first two fluid model for traffic was developed by Herman and Prigogine in 1979 and is based on the mass conservation law. The traffic is viewed as slow moving and fast moving traffic. The vehicles for freeway models are composed into two parts, density and speed. Using mixing traffic flow on freeways the vehicles are divided into slow moving and fast moving clusters. The flow does not take into account different lanes. ‘s’ is the fraction of mass from the first phase (slow cars), u1f and u2f represent the free speeds of the (slow, fast respectively) traffic. Where as u1  and u2 are the speeds relative to each other.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic6.jpg" title="traffic eqn5"><img src="http://amarkm.files.wordpress.com/2007/10/traffic6.jpg?w=497" alt="traffic eqn5" /></a></p>
<p>K1(s) and K2(s) are monotonic functions which represent the vehicle interaction, the slow moving traffic cannot be affected by the fast moving traffic therefore K1(s)=1. However as the slow moving traffic becomes more congested then the fast moving cluster of traffic must decrease speed.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic7.jpg" title="traffic eqn6"><img src="http://amarkm.files.wordpress.com/2007/10/traffic7.jpg?w=497" alt="traffic eqn6" /></a></p>
<p>The polynomial speed density, <a href="http://amarkm.files.wordpress.com/2007/10/traffic8.jpg" title="traffic eqn7"></a><a href="http://amarkm.files.wordpress.com/2007/10/traffic8.jpg" title="traffic eqn7"><img src="http://amarkm.files.wordpress.com/2007/10/traffic8.jpg?w=497" alt="traffic eqn7" /></a>and the maximum global density is defined by <a href="http://amarkm.files.wordpress.com/2007/10/traffic9.jpg" title="traffic eqn8"><img src="http://amarkm.files.wordpress.com/2007/10/traffic9.jpg?w=497" alt="traffic eqn8" /></a>. This is the ck function seen by the generalized random walk process. </p>
<p><u>Leader Follower Model</u>:</p>
<p>The leader follower model is a fundamental interaction shown in microscopic traffic simulation models. It is a group of vehicles or a vehicles traveling in the same lane behind a faster moving car known as the leader. The vehicle is affected only by the vehicle directly ahead of it, the follower tries to decelerate or accelerate depending on the distance between the car in front of it or its speed. The interaction between the leader and followers acts as the stimulating response to the system.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic10.jpg" title="traffic eqn9"><img src="http://amarkm.files.wordpress.com/2007/10/traffic10.jpg?w=497" alt="traffic eqn9" /></a></p>
<p>‘t’ represents time, τ is the reaction time and Xn is the position of the nth car,  λ is the sensitivity coefficient which depends on parameters including the distance between cars and the speed if nth car. For λτ &gt; nπ the traffic is unstable (n = multiples of pi) and for  λτ ≤ nπ the system is stable.1</p>
<p><u>Reaction Time of Driver</u>:</p>
<p>The reaction time of a driver can be decomposed into mental processing time, movement time, and device response time. An expecting driver is classified as alert and aware of the possibility that braking will be necessary.  The estimate used is 0.7 second which is comprised of 0.5 seconds for perception and 0.2 seconds for movement, the time required to release the accelerator and to depress the brake pedal. However a more common used estimate for response time is 1.1 seconds. Standard reaction time for evening light the reaction time is increased by 20-25 ms. An unexpected driver is one who detects a common road signal such as a brake from the car ahead or from a traffic signal. The reaction time increases to 1.25 seconds. This is due to the increase in perception time to over a second with movement time still about 0.2 second.  A surprise driver encounters an unusual circumstance, such as a pedestrian or another car crossing the road in the near distance. There is extra time needed to interpret the event and to decide upon response. The standard reaction time is 1.5 seconds the perception time is 1.2 seconds while movement time increases to 0.3 seconds. The affect of age on response time can not be a factor since studies present conflicting arguments.</p>
<p><strong><u>Background</u></strong>:</p>
<p><u>First Order Systems</u>:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic11.jpg" title="traffic eqn10"><img src="http://amarkm.files.wordpress.com/2007/10/traffic11.jpg?w=497" alt="traffic eqn10" /></a></p>
<p>Pole &#8211; The first order system has a single pole at -a.  If the pole is on the negative real axis, then the system is stable.  If the pole is on the positive real axis, then the system is unstable. </p>
<p>Zero -The zeros of a first order system are the values of s which makes the numerator of the transfer function equal to zero.<br />
<u>Second Order Systems</u>:</p>
<p> <a href="http://amarkm.files.wordpress.com/2007/10/traffic12.jpg" title="traffic eqn11"><img src="http://amarkm.files.wordpress.com/2007/10/traffic12.jpg?w=497" alt="traffic eqn11" /></a></p>
<p>Natural Frequency &#8211; The natural frequency is the frequency at which the system would oscillate if there were no damping (ie. if ζ = 0).</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic121.jpg" title="traffic eqn12"></a><a href="http://amarkm.files.wordpress.com/2007/10/traffic13.jpg" title="traffic eqn12"><img src="http://amarkm.files.wordpress.com/2007/10/traffic13.jpg?w=497" alt="traffic eqn12" /></a>  <br />
 <br />
Damping Ratio – Is the ratio of the exponential decay frequency to the natural frequency. </p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic14.jpg" title="traffic eqn13"><img src="http://amarkm.files.wordpress.com/2007/10/traffic14.thumbnail.jpg?w=497" alt="traffic eqn13" /></a></p>
<p>Rise Time – Time required for the waveform to go from 0.1 of the final value to 0.9 of the final value.</p>
<p>Peak Time – Time required for the waveform to reach the first maximum peak</p>
<p>Settling Time – Is the time it takes for the amplitude of a decaying sinusoid to reach 0.02.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic15.jpg" title="traffic eqn14"><img src="http://amarkm.files.wordpress.com/2007/10/traffic15.jpg?w=497" alt="traffic eqn14" /></a></p>
<p>Percent Overshoot &#8211; The percent overshoot is the maximum fraction by which the response overshoots the steady state value expressed as a percentage.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic16.jpg" title="traffic eqn15"><img src="http://amarkm.files.wordpress.com/2007/10/traffic16.jpg?w=497" alt="traffic eqn15" /></a></p>
<p>Pole – There are two poles in a second order system -ζωn ± jωn  sqrt(1-ζ2.  When ζ &gt; 1, s1 and s2 are real and negative, distinct roots and when ζ = 1, s1 = s2 = &#8211; ωn repeated roots. If the poles are real, the system is overdamped.  When ζ &lt; 1, s1 and s2 are complex conjugates roots. If the poles are complex, the system is underdamped.  If the poles consist of only an imaginary part and no real part (ζωn = 0), the poles are imaginary.  If the poles are imaginary, the system is undamped.  If either pole has positive real component, the system is unstable.</p>
<p>Zero- The zeros of a second order system are the values of  &#8216;s&#8217; which make the numerator of the transfer function equal to zero.</p>
<p><strong><u>Problem Description</u></strong>:</p>
<p><u>Formulation</u>:</p>
<p>With the increasing amount of cars, traffic congestion has become an important issue, especially on highways. Several mathematical models like the car following model, the cellular automation model and the particle-hopping model have been developed to describe and subsequently, optimize traffic flow. However, a major hurdle in the path is the unpredictable nature of highway traffic, for example:</p>
<ul>
<li>No vehicle moves at a constant speed; an oscillatory behavior of speeds is seen</li>
<li>Possibility of abrupt changes in speed of any vehicle at any time, presumably the leader</li>
<li>Possibility of certain groups of vehicles moving slowly, i.e. the “gaper” block</li>
</ul>
<p>Such unexpected changes can act against the smooth running of a simulation describing highway traffic flow. Therefore, this project focused on solving these problems by making customary modifications to the car following model.</p>
<p><u>Approach to Solution</u>:<br />
The follow-the-leader model by Bardzimashvili for single lane unidirectional traffic was modified from its original simulation shown below:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic17.jpg" title="traffic diagram"></a><a href="http://amarkm.files.wordpress.com/2007/10/traffic17.jpg" title="traffic diagram"><img src="http://amarkm.files.wordpress.com/2007/10/traffic17.jpg?w=497" alt="traffic diagram" /></a></p>
<p>In order to compensate for the aforementioned issues with highway traffic, the following precautions were taken:</p>
<ul>
<li>Every vehicle will keep a user-decided relative distance from the vehicle it is following</li>
<li>Consequently, although redundant, no vehicles will pass each other</li>
<li>The reaction times of all vehicles will be in the “stable” range, described later on. It was found that a reaction time of 0.7s is assumed stable, which was applied to all vehicles</li>
</ul>
<p> The dynamics of highway traffic consist of multiple problems which must be considered as individual variables.</p>
<p>The following four models were comprised to evaluate the proposed conditions:<br />
1. <u>Relative Distance Model (RDM)</u>: A model wherein each vehicle keeps a relative distance from the vehicle it is following. Consequently, any deceleration in the leader would result in deceleration by the follower.<br />
2.  <u>Oscillatory Speeds Behavior Model (OSBM)</u>: A simulation built upon the RDM.  A sine wave was utilized to represent gradual changes in speed of the lead vehicle. <br />
3. <u>Instantaneous Deceleration Model (IDM)</u>: Also used the RDM as a foundation. The lead vehicle experiences an instantaneous change in velocity hence an instantaneous deceleration. All vehicles reach a slower speed steady state which induces congestion that is followed by a recovery period.<br />
4. <u>Gaper Block Model (GBM)</u>: A model built upon the RDM, but in this case, consists of two leaders with a considerable difference in speed. The faster leader undergoes the same procedure as in the IDM. Consequently congestion occurs. The slower leader approaches the lead group of vehicles, as the latter resumes to original speed, the gap widens and becomes constant at steady state.</p>
<p><u>Development of the Model</u>:</p>
<p>The leader-follower model outlined above relates the acceleration of a given car to the difference between the velocity of the car directly in front of the one in question.  From Bardzimashvilli the equation to describe the system is:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic18.jpg" title="traffic eqn16"><img src="http://amarkm.files.wordpress.com/2007/10/traffic18.jpg?w=497" alt="traffic eqn16" /></a></p>
<p>Using this representation λ represents a fixed value coefficient for the sensitivity of the driver to the changing conditions.  A higher value for λ would correspond to a more sensitive system in which a driver overcompensates leading to overshoot of the desired values.  The reaction time of a driver is represented by τ in output of the system.</p>
<p>This system requires that two properties be defined; λ and τ, which when combined will affect the stability of the traffic flow on a highway.  First the transfer function needs to be determined by taking the Laplace transfer of (Equ.6) treating the velocity of the forward car (x’n-1(t)) as an input and the velocity of the following car (x’n(t)) as an output.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic19.jpg" title="traffic eqn17"><img src="http://amarkm.files.wordpress.com/2007/10/traffic19.jpg?w=497" alt="traffic eqn17" /></a></p>
<p>Although the leader-follower model relates acceleration and velocity, the initial model does not include relative position and thus is only a first order function.  To find the poles of the system, the denominator is set equal to zero and solved using MATLAB (see Appendix B).<br />
 <br />
<a href="http://amarkm.files.wordpress.com/2007/10/traffic20.jpg" title="traffic eqn18"><img src="http://amarkm.files.wordpress.com/2007/10/traffic20.jpg?w=497" alt="traffic eqn18" /></a></p>
<p>As with any system, if a pole lies within the right hand plane of a pole-zero plot the system will exhibit instability.  To determine the appropriate values of λ and τ to ensure stability, reaction time was fixed at 0.25s increments from 0 to 2s and different values of λ were applied to (Equ.14).  Due to the nature of Lambert’s W function some poles were complex, unacceptable without its conjugate, so the pole was taken as a magnitude of the real and imaginary parts.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic21.jpg" title="traffic diagram2"><img src="http://amarkm.files.wordpress.com/2007/10/traffic21.jpg?w=497" alt="traffic diagram2" /></a></p>
<p>As evidenced in both Figure 2 and Figure 3, the increasing sensitivity of the system leads to greater instability even for reaction times as small as 0.6s.  From Figure 3 it is easier to determine a relationship between the two parameters since there is a point around τ*λ = 0.5 where most curves cross the horizontal axis.  Therefore the definition to ensure stability of the leader-follower model is determined to be:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic22.jpg" title="traffic eqn19"><img src="http://amarkm.files.wordpress.com/2007/10/traffic22.jpg?w=497" alt="traffic eqn19" /></a></p>
<p>Human reaction time, modeled by τ, is something that can be easily determined by empirical data.  Thus λ is chosen as a function of the other since it is a determined property inherent to the system.  Based on study of human reaction time and assuming ideal conditions, τ = 0.70s .  From (Equ.16) this would require that λ &lt; 0.714 for which a root locus is shown in Figure 4.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic23.jpg" title="traffic diagram3"><img src="http://amarkm.files.wordpress.com/2007/10/traffic23.jpg?w=497" alt="traffic diagram3" /></a></p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic24.jpg" title="traffic diagram4"><img src="http://amarkm.files.wordpress.com/2007/10/traffic24.jpg?w=497" alt="traffic diagram4" /></a></p>
<p><strong><u>Simulation Results</u></strong>:</p>
<p><u>Model A &#8211; Relative Distance Model (RDM)</u>:</p>
<p>This model takes the Simulink model from Bardzimashvili and was altered to include the distance between a car and the car directly in front of it in the feedback loop1.  This adjustment to the feedback loop allows the cars to get within a predetermined distance of the car in front of it before it reducing speed to avoid crashing. </p>
<p>The results of the simulation show what would be expected of a traffic situation with one lane and one lead car.  As shown in the graph of Speed vs. Time (see Figure 6), it can be seen that the lead car is set at its constant value and the following cars approach the speed of the lead car while maintaining a constant distance from each other. Table 2, below, reflects this nature by showing that the rise time for each subsequent car.  The system manifests that the secondary car will not reach the steady state until the car directly in front reaches the steady state.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic25.jpg" title="traffic diagram5"><img src="http://amarkm.files.wordpress.com/2007/10/traffic25.jpg?w=497" alt="traffic diagram5" /></a></p>
<p>The discontinuities are a result of the modification to the feedback loop.  The modification causes a deceleration if the distance between cars becomes closer than 5 meters.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic26.jpg" title="traffic diagram6"><img src="http://amarkm.files.wordpress.com/2007/10/traffic26.jpg?w=497" alt="traffic diagram6" /></a></p>
<p>As evidenced by Figure 7 and Table 3, the poles of the system are altered by changing the value of λ.  As the poles move farther from the origin, the settling time of the system, namely this car, decreases.  Unlike a second order system however, the rise time of the system also decreases since the slopes are related to the sensitivity of the system.  As drivers become more ‘sensitive’ they react more aggressively leading to steeper slopes and a faster response.</p>
<p><u>Model B &#8211; Oscillatory Speeds Behavior Model (OSBM)</u>:</p>
<p>This model is identical to the first model except that the lead car speed is a sine wave instead of a constant.  This model illustrates the oscillatory behavior of traffic which is a more realistic view of actual traffic.  The simulation shows that the following car speeds are also sinusoidal because the model makes them adjust their speed to stay behind the car in front.  It is also important to note that the relative distance between the cars is sinusoidal as well.  This effect can be seen in Figure 8 which shows the relative distance vs. time.  This can be explained by the reaction time of the people driving the cars.  If the following car had an instantaneous reaction the car in front, the relative distance would be the same.  Since this is not the case, the driver takes a certain amount of time to slow to the lead car’s speed thus resulting in a sinusoidal distance between cars.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic27.jpg" title="traffic diagram7"><img src="http://amarkm.files.wordpress.com/2007/10/traffic27.jpg?w=497" alt="traffic diagram7" /></a></p>
<p><u>Model C &#8211; Instantaneous Deceleration Model (IDM)</u>:</p>
<p>This model is also a slight modification of the first Simulink model.  It forces the lead car to instantaneously decelerate from a constant speed to a lower set speed after a steady state has been reached.  Then after a predetermined amount of time, instantaneously increases back to the original constant speed.  For this model to work correctly, it must use the same feedback modification which includes the limit on relative distance.  In theory this sudden drop in speed by the lead car will cause a sudden drop in relative distances with some cars over compensating (overshooting) before they reach a steady state (see Table 4. Percent Overshoot for IDM).  These theoretical results can be seen in the simulation plot of relative distance vs. time (see Figure 9).  The resulting velocity graph (see Figure 10) also shows how cars overshoot the desired speed after the sudden deceleration and eventually reach a steady state.  However, when the sudden increase occurs, the cars are less likely to overshoot because the system does not over reacts to the speed increase by the lead car.</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic28.jpg" title="traffic diagram8"><img src="http://amarkm.files.wordpress.com/2007/10/traffic28.jpg?w=497" alt="traffic diagram8" /></a></p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic29.jpg" title="traffic diagram9"><img src="http://amarkm.files.wordpress.com/2007/10/traffic29.jpg?w=497" alt="traffic diagram9" /></a></p>
<p>Just as with the first model, as the poles move from the origin, the settling time of the car decreases (see Figure 11 and Table 5).  The rise/fall time also decreases, but in the case of the congested area as the rise time decreases, the overshoot increases dramatically.  This is due to the increased sensitivity of the driver who has reached steady state and is disturbed thereby causing overcompensation in the deceleration.</p>
<p><u>Model D &#8211; Gaper Block Model (GBM)</u>:</p>
<p>This Simulink model is a modification of the previous IDM model.  This model takes the third to last car of the group and makes it a “leader.” The car now is affected that is to say that is no longer affected by the car in front of it and goes at whichever constant speed it chooses.  This model fixes the car to be much lower than the lead car. This exemplifies the effects of a slow moving car on a single lane road and illustrates how it compares to the traffic ahead.  A defining result of this model can be seen in the relative distance vs. time graph (see Figure 12).</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic30.jpg" title="traffic diagram10"><img src="http://amarkm.files.wordpress.com/2007/10/traffic30.jpg?w=497" alt="traffic diagram10" /></a></p>
<p>It can be seen that the last three cars (the constant slow car and its two followers) distance get increases further from the cars in front of them.  After 200 seconds the lead car instantaneously decelerates as in the previous model.  This brings the speed of the frontal cars to a slower speed which allows the following group of slower moving vehicles to gain distance on the first three cars.  However, since the front car eventually returns to its faster speed, the back three cars begin to fall farther behind again.</p>
<p><strong><u>Future Work</u></strong>:</p>
<p>Although the finished model does make use of the relative distance between cars to affect vehicle behavior, the current method has been derived from a programming perspective.  Instead of Boolean logic, it would be better to represent the relative distance feedback loop as a continuous system with its own gain independent of the velocity feedback system (see Figure 13).  This enhances the modeling of the system and a transfer function could be derived.  The transfer function could be used in the model to determine the sensitivity of the system which keeps it stable and if empirical data was applied for sensitivity, an optimum distance could be found.<br />
 <br />
<a href="http://amarkm.files.wordpress.com/2007/10/traffic31.jpg" title="traffic diagram11"><img src="http://amarkm.files.wordpress.com/2007/10/traffic31.jpg?w=497" alt="traffic diagram11" /></a></p>
<p>Additional work to the model itself could include direct control via a MATLAB m-file of the Simulink model.  By controlling the parameters from MATLAB, a more in-depth analysis can be performed automatically instead of manually altering values.</p>
<p>Other work would include making a congestion event continuous to better reflect real world conditions.  As it stands the model generates a discontinuity to force the lead car or posted speed limit to a lower value after a given position on the highway.  Although this is acceptable if the max velocity is treated as a speed limit, it is impractical if instead a car is dropping that fast.</p>
<p>To better simulate traffic conditions, additional work is needed to allow interaction between the cars.  A single lane representation with passing would prevent slowing of cars when compensating for change in speed.  This could then allow for the simulation of collisions; i.e. if relative distance becomes negative on a single lane road.  By stopping the two vehicles and requiring all remaining cars to change to a single lane model, the congestion simulation would better represent the two lane highways in the event of an accident.  Generating new vehicles and randomizing the initial velocities and positions of all vehicles involved would also move towards simulating real world conditions.  These may be better addressed by stochastic models such as a “random walk” with uniform random density or Poisson distributions.</p>
<p>The simulink models of the above discussed models are given below:</p>
<p><a href="http://amarkm.files.wordpress.com/2007/10/traffic32.jpg" title="Relative Distance Model (RDM)"><img src="http://amarkm.files.wordpress.com/2007/10/traffic32.thumbnail.jpg?w=497" alt="Relative Distance Model (RDM)" /></a>  <a href="http://amarkm.files.wordpress.com/2007/10/traffic33.jpg" title="Oscillatory Speeds Behavior Model (OSBM)"><img src="http://amarkm.files.wordpress.com/2007/10/traffic33.thumbnail.jpg?w=497" alt="Oscillatory Speeds Behavior Model (OSBM)" /></a>  <a href="http://amarkm.files.wordpress.com/2007/10/traffic34.jpg" title="Instantaneous Deceleration Model (IDM)"><img src="http://amarkm.files.wordpress.com/2007/10/traffic34.thumbnail.jpg?w=497" alt="Instantaneous Deceleration Model (IDM)" /></a>  <a href="http://amarkm.files.wordpress.com/2007/10/traffic35.jpg" title="Gaper Block Model (GBM)"><img src="http://amarkm.files.wordpress.com/2007/10/traffic35.thumbnail.jpg?w=497" alt="Gaper Block Model (GBM)" /></a></p>
<p>Please feel free to point out mistakes as well as comment.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amarkm.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amarkm.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amarkm.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amarkm.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amarkm.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amarkm.wordpress.com&amp;blog=1910486&amp;post=36&amp;subd=amarkm&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sharedaddy-dark sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://amarkm.wordpress.com/2006/04/30/traffic-flow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe4927cbac94de09632ddb3dd8e778a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AmAr</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic1.jpg" medium="image">
			<media:title type="html">traffic eqn1</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic2.jpg" medium="image">
			<media:title type="html">traffic eqn2</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic3.jpg" medium="image">
			<media:title type="html">traffic eqn3</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic4.jpg" medium="image">
			<media:title type="html">traffic eqn4</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic5.jpg" medium="image">
			<media:title type="html">traffic table</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic6.jpg" medium="image">
			<media:title type="html">traffic eqn5</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic7.jpg" medium="image">
			<media:title type="html">traffic eqn6</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic8.jpg" medium="image">
			<media:title type="html">traffic eqn7</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic9.jpg" medium="image">
			<media:title type="html">traffic eqn8</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic10.jpg" medium="image">
			<media:title type="html">traffic eqn9</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic11.jpg" medium="image">
			<media:title type="html">traffic eqn10</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic12.jpg" medium="image">
			<media:title type="html">traffic eqn11</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic13.jpg" medium="image">
			<media:title type="html">traffic eqn12</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic14.thumbnail.jpg" medium="image">
			<media:title type="html">traffic eqn13</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic15.jpg" medium="image">
			<media:title type="html">traffic eqn14</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic16.jpg" medium="image">
			<media:title type="html">traffic eqn15</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic17.jpg" medium="image">
			<media:title type="html">traffic diagram</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic18.jpg" medium="image">
			<media:title type="html">traffic eqn16</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic19.jpg" medium="image">
			<media:title type="html">traffic eqn17</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic20.jpg" medium="image">
			<media:title type="html">traffic eqn18</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic21.jpg" medium="image">
			<media:title type="html">traffic diagram2</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic22.jpg" medium="image">
			<media:title type="html">traffic eqn19</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic23.jpg" medium="image">
			<media:title type="html">traffic diagram3</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic24.jpg" medium="image">
			<media:title type="html">traffic diagram4</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic25.jpg" medium="image">
			<media:title type="html">traffic diagram5</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic26.jpg" medium="image">
			<media:title type="html">traffic diagram6</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic27.jpg" medium="image">
			<media:title type="html">traffic diagram7</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic28.jpg" medium="image">
			<media:title type="html">traffic diagram8</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic29.jpg" medium="image">
			<media:title type="html">traffic diagram9</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic30.jpg" medium="image">
			<media:title type="html">traffic diagram10</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic31.jpg" medium="image">
			<media:title type="html">traffic diagram11</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic32.thumbnail.jpg" medium="image">
			<media:title type="html">Relative Distance Model (RDM)</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic33.thumbnail.jpg" medium="image">
			<media:title type="html">Oscillatory Speeds Behavior Model (OSBM)</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic34.thumbnail.jpg" medium="image">
			<media:title type="html">Instantaneous Deceleration Model (IDM)</media:title>
		</media:content>

		<media:content url="http://amarkm.files.wordpress.com/2007/10/traffic35.thumbnail.jpg" medium="image">
			<media:title type="html">Gaper Block Model (GBM)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
