<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox where print preview displays the noscript content */
noscript {display:none;}
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

Also see AdvancedOptions
Upgrade TiddlyWiki to 1.2.39.
Installed new extensions for Firefox:
* FlashGot
* Add Bookmark Here 0.5.5

Actually, [[FlashGot's homepage|http://flashgot.net/]] said had been available. BTW, it's said that FlashGot works for Windows only.
I will need to do some demos of DynaMIT and MITSIMLab during my Beijing trip next week. Since I cannot count on the network connections there, I have to bring the demo files with me this time. Avoiding to take the lab's laptop (which is old and heavy), I need to run the demo from my own laptop.

I have [[VirtualBox|http://blogs.mit.edu/CS/blogs/wenyang/archive/2007/02/06/62966.aspx]] installed, and a working Ubuntu 6.06 running on this virtual machine. All I need to do is make DynaMIT, xdta, and MITSIMLab work on Ubuntu.

!! For xmitsim demo:
apt-get install subversion  # easy way to get the files from Subversion server
mkdir -p ~/view/data
cd ~/view/data
svn co svn+ssh://xxx@yyy.mit.edu/my_svn_path/mitsim_demos/BostonCAT/trunk .

I actually need pvm to run {{{smc}}}, but did not find it. So I skipped this for now, and change the {{{run_smc.sh}}} script to use {{{xmitsim}}} only.
apt-cache search pvm  #not found :(
!!! Installing pvm
(This part was updated on 12/11/2007)
* Found some reference online
** https://help.ubuntu.com/community/Repositories/Ubuntu
** http://packages.ubuntu.com/dapper/libs/libpvm3
* Edit the source file {{{/etc/apt/sources.list}}}: uncomment the two lines related to "universe".
* Go to the "Software Properties" in the system -> admin... menu, and check the two sources from universe. Then they are enable and we can apt-get them or find them from the GUI installer.
!!! Configuration for  pvm
* Need to the the {{{HOST}}} environment variable.
* Change {{{.pvm_host}}} and {{{run_smc.sh}}} accordingly

!! For DynaMIT demos

I haven't got time to put them on our svn server yet, so I have to work manually:
* Copy LA demo files:
scp -p xxx@yyy.mit.edu:LAdemo15_3to9am.20071210.tar.gz .
* Copy bin dir and auxiliary files:
scp -p xxx@yyy.mit.edu:bin_togo.tar.gz .
* Extract them and put them in the right place

!! Setting the environments 
* Edit {{{.bashrc}}}, add 
source ~/.environment.bash
source ~/.aliases_bash
* For {{{.environment.bash}}}, add 
export XKEYSYMDB=/usr/share/X11/XKeysymDB
export XENVIRONMENT=~/bin/ad/xmitsim.ad
export PATH=${PATH}:${HOME}/bin:${HOME}/bin/linux
# for Matlab Compiler Runtime
source ~/.environment.MCR.bash 
** The {{{XKEYSYMDB}}} setting is to fix error messages such as "Warning: translation table syntax error:" when I ran xmitsim and xdta; those errors, presumably, cause the windows don't take keyboard input. (Ref: http://ubuntuforums.org/archive/index.php/t-82087.html)
** In fact, after an update of my Ubuntu, some part of the X function are broken: keyboard input is not accepted and no matter what key I press, it causes the X to change resolution (rotating from the three available settings on my laptop: 640*480, 800*600, 1024*768). The solution to this happens to be the same as fixing the xmitsim problem above.  After some testing (booting as root in recovery mode, and run {{{startx}}} manually and log the error messages, I made changes to {{{/usr/bin/startx}}} and {{{/etc/init.d/gdm}}} by adding the following line
         export XKEYSYMDB=/usr/share/X11/XKeysymDB
** Frankly I don't like the idea of modifying those two files directly, but cannot find a cleaner way. I did try creating symbolic links as some online posts indicated, e.g., {{{/usr/lib/X11/XKeysym -> /usr/share/X11/XKeysymDB}}}, but it would not work.
** When inspecting the error messages from {{{startx}}}, I noticed {{{/etc/X11/xserver/SecurityPolicy}}} is referred to but did not exist. (Actually the directory {{{/etc/X11/xserver}}} does not exist.) However, I found this file at {{{/usr/share/doc/examples/}}}, and confirmed that it's the same as the one found in another machine in our lab. So I added a symbolic link to fix it, too. Hopefully this should not cause any issue.

* Edit {{{~/.environment.MCR.bash}}}
# Each export should be in one line. Reformatted to look cleaner.
# replace <mcr_root> and <ver> as necessary (check MCRInstaller.zip)
export XAPPLRESDIR=<mcr_root>/<ver>/X11/app-defaults

!! Check libraries
* Use {{{ldd}}} to check if the dynamic loaded libraries are presented.
* Some old x libraries are not; install them manually via {{{xdtaLib.tar.gz}}}. See [[Setup libraries for xdta without compiling the GUI_Libs]] for details.
Have been trying to install Linux on the FHWA machine for TReL.
There are bad blocks on the hard-disk and it gives errors each time.
To run smc on the new server, we need to install PVM.  After reading related [[web pages|http://www.csm.ornl.gov/pvm/]], I downloaded the [[source code for PVM version 3.4.5|http://www.netlib.org/pvm3/pvm3.4.5.tgz]] at http://www.netlib.org/pvm3/

Then I extracted those files, moved them to /usr/share/pvm3 (as where they were on haydn), and then built them.  One thing to remember is to set {{{PVM_ROOT}}} to the source directory (/usr/share/pvm3) before building or running.  Then I ran "make" and "make install" (the latter does not seem useful, anyway).  

For convenience, I put a file named "pvm" to "/usr/bin", with the following lines:
export PVM_ROOT
exec /usr/share/pvm3/lib/pvm "$@"

(Note added on 11/1/2007: Steps for running the big-dig demo is available in [[MITSIMLab Demo Step-by-step|MITSIMLab Demo Step-by-step]]. BTW, we may delete unnecessary entries from the {{{~/.pvm_hosts}}} file to avoid excessive waiting time. )

To run our classic CA/T (yes, it's for the "big dig") demo on the new machine, we need to copy  from haydn all the data files, including {{{~/.pvm_hosts}}}.  Since the original .pvm_hosts file does not have the new server's information, I added a line for the new host (assuming $HOST = XXXXXX)
XXXXXX        ep=$SIMLAB_Linux wd=$SIMLAB_DAT
and then we should make sure {{{SIMLAB_Linux}}} and {{{SIMLAB_DAT}}} are set properly. For simplicity I added the following lines to {{{~/.environment}}}, which is sourced by {{{~/.cshrc}}}
setenv SIMLAB_Linux /home/wenyang/bin/linux
setenv SIMLAB_DAT /home/wenyang/view/data
setenv SIMLAB_BIN_DIR /home/wenyang/bin

BTW, platoon.mitsim need to be modified to correct the path of the originally hard-coded O-D file.
TMC PFS Newsletter can be found at http://tmcpfs.ops.fhwa.dot.gov

Continue to work on IEE paper.

Help new RA on programming for extracting new OD file for truck.
Found the cure to a bug in my TiddlyWiki.
In my current version 1.2.37, if you click one of the tabs in TW, it will scroll to the top of the page. This is somewhat annoying and it was not like this in version 1.2.31. Comparison shows if we add {{{tab.setAttribute("href","javascript:;");}}} to function {{{config.macros.tabs.handler = function(place,macroName,params)}}}, then it will be ok. 

There are actually posts on [[Google Groups|http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/8fca424bff77ec1f/692aafca2b344496#692aafca2b344496]], saying that this is not a problem for [[Firefox]], and that it is related another bug in link, as A HREF is assigned to '#'. 

It is said that both problems will be fixed in the next release.

Add code to [[smiley macro|smiley]] to create an inline GIF of my name.
!! In the news:
* [[We Know What You Ought To Be Watching This Summer|http://online.wsj.com/public/article/SB118584111148282848.html]]
** "New Software Helps Web Sites Hone Their Recommendations;What Your Shoes Reveal"
** By Sarah Mcbride and Vauhini Vara, July 31, 2007; Page D1
* [[Global video boom, local underpinnings|http://www.boston.com/business/globe/articles/2007/07/11/global_video_boom_local_underpinnings/]]
** Cambridge firms vie for position
** By Robert Weisman, Globe Staff, July 11, 2007
* [[Click here for the upsell |http://money.cnn.com/magazines/business2/business2_archive/2007/07/01/100117056/]]
** Rethinking the online recommendation engine
** By [[Erick Schonfeld|mailto:talkback@business2.com;eschonfeld@business2.com]], Business 2.0 Magazine editor-at-large, July 1, 2007

!! Other useful references:
* [[ChoiceStream|http://www.choicestream.com/]]
Overflow (Underflow) observed in the NY case. The value of time is too small (too negative) for a float type to get meaningful result. The exponential of utility becomes zero and so is the logsum. Use double type can be helpful. Change the VOT parameters in behavior model file will also help.

Setup xdta for Henry's machine. The machine has so many weird problems (badblocks in HD, etc.) that it took us three days to install everything (Redhat 9 Linux, DynaMIT, xdta).
Almost finish coding Logger:
* Add {{{Logger}}} to {{{components}}} directory. Rename {{{*.cpp}}} to {{{*.cc}}} for convenience (also consistency with previous design).
* Update Makefile in DynaMIT and DynaMIT-P to include Logger library.
* Update paths in dtapath.mk 

Important changes:
* Move stuff in {{{CorbaFreeDynaMIT-etc}}} to {{{CorbaFreeDynaMIT/etc}}} to make the source directory somewhat "stand alone".
* The logger (and thus {{{DEBUG_MESSAGE}}} and {{{WARNING}}}) currently doesn't support standard manipulator such as std::endl, so we need to change endl to '\n' in some cases. However, a related manipulator dta::endl has been defined so we can use that as well. Note also that this new code is at dta namespace. 

* Add new loggers and macros for new purpose. Q: where to add? (To achieve minimal dependancy)
* Add flags to disable {{{DEBUG_MESSAGE}}} and {{{WARNING}}} at run time.
* New loggers for Urgent issues. Do we support pause/retry mechanism (similar to closedloop cases) ?

Next Meeting: 12/20, 3:30pm
After finally getting a distribution license, MIT ITS Lab put the the jRNE (version 1) online for free download at the [[ITS Lab website|http://mit.edu/its/jRNE.html]].  jRNE is the Java version of Road Network Editor that can be used to create, edit and view network files in the format used by MITSIMLab and DynaMIT. 

This version is perhaps the oldest one.  I have heard stories about its bugs, so I would strongly recommend users to backup his original file before editing it with jRNE.  From my personal experience, the file parser is quite inefficient (compared with the C++ parser we used in DynaMIT).  I have not got a chance to look at it in details, but I guess it does not use an internal ID system, and therefore cannot use containers that provide constant access time (unless it makes assumptions on the IDs).  Another issue with the parser is that it does not support all the comment styles the C++ parser would allow.  So it may not be able to open some network files that are perfectly acceptable for DynaMIT or MITSIM.  This could also imply that if the network files are originally created in other ways, it could also be dangerous to edit them with jRNE, especially when the IDs are not defined sequentially (from 0?) in the network.

We do have a newer version, though we are not allow to distribute it...yet.  Last week I a few hours on the source code and added the function of displaying node partitions, which was helpful for me to illustrate how the network partitioning algorithm works in my committee meeting.
New semester started last week. Still busy writing proposals.

Meanwhile, fixed quite a few bugs in DynaMIT. The recent one is the limitation on max node (user) ID. Someone coded it as "short" leading to a limit of 32767 in the historical OD file parser. Change it back to unsigned long increases the upper bound to (2^31-1).

The "infamous" lane assertion error in congested network results from a hidden en route path choice. The input "current path" should be return as a default choice in the face of numerical problems.

* Use [[valgrind|http://valgrind.org/]] to check memory problems.
valgrind --leak-check=yes ./DynaMIT dtaparam.dat
valgrind --tool=memcheck --leak-check=yes ./DynaMIT dtaparam.dat

With the help of {{{valgrind}}}, quite a few memory leaks have been identified and fixed. Some problems are actually originate not from DynaMIT itself but from {{{flex++}}}. The latest version of {{{flex++}}} is 2.5.31, which has some of the bugs fixed, can be found at http://sourceforge.net/projects/flex/ (was http://sourceforge.net/projects/lex/).
A lot of useful maps (of China and the world) on from website of Chinese State Bureau of Surveying and Mapping. Free to download at http://map.sbsm.gov.cn:8088/mcp/index.asp

* World Map 1:100M (size: 2712817 Bytes) 
** http://web.mit.edu/wenyang/www/WorldMap-100M.jpg
* Map of China (for Travel) 1:12M (size: 3274321 Bytes)
** http://web.mit.edu/wenyang/www/MapOfChina-12M.jpg
Output format for flow, speed, density data for segments corrisponding to user sensors location has been changed. Originally the first row (for sensor ID) has one less element because no time-stamp is needed. This is less convenient for post-processing (in Matlab). In order to process the old-version output files, I wrote a small utility, named as "add_header" to add a dummy output value ("0000") to the first row. 

It is now located at {{{~wenyang/FilesFromLA/Flow1113/Predict}}}. The usage of "add_header" is simple:
add_header [filename]
It will backup "filename" as "filename.bak", and add the dummy token "0000" to the beginning of the file "filename" itself and save it.

To modify all predicted flow data in the current directory, we can then use 
find . -name "i3d_flw_pred_*.out" -exec add_header {} \;
This is my first post. Hope this to be a good start!

<<tiddler "TiddlyWiki Resource">>
So far we are able to compile MITSIM on Redhat 7.3 only. The dependency was due to the compiler, however. (Actually, the main reason is that MITSIM was written before the C++ standard was born (in 1998), and thus its source code is neither standard-conformant nor acceptable for many modern compilers.)

My test today showed that, for new versions and distributions of GNU/Linux, it might still be able to compile if we use "old" compilers. Here is how.

* Download gcc/g++ 2.95.3
** Only need c/c++ related files: ''gcc-core-2.95.3.tar.gz'' and ''gcc-g++-2.95.3.tar.gz''
** Available at ftp://ftp.gnu.org/pub/gnu/gcc/gcc-2.95.3
* Install gcc 2.95.3
** ''Caution!'' We have a newer version of gcc already, and we may still want to use the original one as default. Read gcc [[FAQ|http://gcc.gnu.org/faq.html#multiple]] first! 
tar zxvf gcc-core-2.95.3.tar.gz
tar zxvf gcc-g++-2.95.3.tar.gz
cd gcc-2.95.3
md build
cd build
../configure --program-suffix=-2.95.3 --enable-languages=c,c++ --prefix=/usr/local/gcc2
# (actually, simply --program-suffix=-2.95.3  OR --prefix=/usr/local/gcc2 will work.)
make install
# (need ldconfig ?) 
** ''NB:'' For 64-bit machines, it's difficult. Try to configure with {{{--host=i686-pc-linux-gnu}}} or {{{--host=i386-gnu-linux}}} instead. Even so, there might be other issues.
../configure --program-suffix=-2.95.3 --enable-languages=c,c++ --host=i686-pc-linux-gnu
** I simply ignored all warnings... e.g.,
../../gcc/toplev.c:1179: warning: initialization from incompatible pointer type
* Change MITSIM compiling settings to use gcc 2.95
** Replace ''g++'' with ''/usr/local/gcc2/bin/g++'' in {{{linux.tmpl}}}
cd ~/view/simlab
emacs linux.tmpl & 
** The changed line looks like {{{CC = /usr/local/gcc2/bin/g++ -g -O2 }}}
** Also add the correct include paths, e.g.,
	-I/usr/local/gcc2/include/g++-3 \
	-I/usr/include/g++ \
	-I/usr/local/gcc/include \
	-I$(BASE_DIR)/include \
	-I/usr/local/include \
* Ready to build MITSIMLab
make clean
make depend_all
Managed to do a closed-loop demo for NY today.

DynaMIT demo scheduled at around 3:30 on 2/1.
[[MPICH2|http://www-unix.mcs.anl.gov/mpi/mpich2/]] is an implementation, by Argonne National Laboratory, of the [[Message-Passing Interface|http://www.mpi-forum.org]] (MPI). 
!! Installing MPICH2 on T
* Download [[mpich2-1.0.4p1.tar.gz|http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.4p1.tar.gz]] to {{{~/view}}} on machine T
* Install mpich2 on T. Use all default settings.
% cd ~/view/
% tar zxvf mpich2-1.0.4p1.tar.gz
% mkdir build_mpich2-1.0.4p1
% cd build_mpich2-1.0.4p1
% ../mpich2-1.0.4p1/configure |& tee configure.log
% make |& tee make.log
% su
# make install 2>&1 | tee install.log
# exit
** MPICH2 is, by default, installed to {{{/usr/local/bin}}}.
* Create {{{.mpd.conf}}}
% cd
% touch .mpd.conf
% chmod 600 .mpd.conf
% vi .mpd.conf
* Example of .mpd.conf
** Not sure which works, the document (mpich2-doc-install.pdf) uses ''secretword'', but the script mpd suggests ''MPD_SECRETWORD''.
* Bringing up a ring of one MPD on the local machine
% mpd &
% mpdtrace
% mpdallexit
* To run a non-MPI program using the daemon.
% mpd &
% mpiexec -n 1 /bin/hostname
% mpdallexit
* Need to ssh to other machine without password
** Accomplished by using agent forwarding on PuTTY when logging into T.
* Create {{{mpd.hosts}}}
** add the domain name for another machine O.
% emacs ~/mpd.hosts

So far everything looks ok. By at step 13 of the installer's guide, it fails. 
* Step 13: start deamons on hosts in mpd.hosts
% mpdboot -n 2 -f mpd.hosts
One of the reasons is we have not yet install MPICH2 to machine O.

!! Installing MPICH2 on O
* Get the binaries (56 files including some symbolic links) 
% cd /usr/local/bin
% tar zcvf ~/mpi_exec.tar.gz -N 10/17/2006 .
* Copy mpi_exec.tar.gz to O
* Put the binaries into the same dir
% su
# cp mpi_exec.tar.gz /usr/local/bin
# cd /usr/local/bin
# tar zxvf mpi_exec.tar.gz
# rm mpi_exec.tar.gz
* Alternatively, there's a better way to install mpich2 on O, if T and O are almost "equivalent": copy the  files to O and run ''make install'' again.
** on T
% cd  ~/view
% tar zcvf build_mpich2-1.0.4p1.tar.gz build_mpich2-1.0.4p1
% scp -p build_mpich2-1.0.4p1.tar.gz O:view
** on O
% cd ~/view
% tar zxvf build_mpich2-1.0.4p1.tar.gz
% cd build_mpich2-1.0.4p1
% su
# make install 2>&1 | tee install_orchestra.log
* Test mpd locally on O
% scp -p T.mit.edu:.mpd.conf .
% mpd &
% mpdtrace
% mpdallexit
Ok, done with installing on O.  Similarly, we can create a mpd.hosts on O, in which we add the domain name of T.

!! Test connection between the two machine T and O.
* This check the the connection between two machines (rsh or ssh)
% mpdcheck -f mpd.hosts
% mpdcheck -f mpd.hosts -ssh -v
** It succeeds in O but fails in T.
!!! Reason: firewall settings!
* Open ''Security Level Configuration'', in the ''Trusted Device'', notice that eth0 is checked on O but not on T.
* So we need to trust eth0 on T
% su
# system-config-securitylevel

!!Continue testing
* Start from step 13 on T:
% mpdboot -n 2 -f mpd.hosts
% mpdtrace
** Both T and O are displayed this time
* More tests
% mpdringtest
time for 1 loops = 0.00111293792725 seconds
% mpdringtest 100
time for 100 loops = 0.0505890846252 seconds
% mpdringtest 1000
time for 1000 loops = 0.500262975693 seconds
% mpiexec -n 2 hostname
% mpiexec -l -n 5 hostname
1: O.mit.edu
2: T.mit.edu
3: O.mit.edu
0: T.mit.edu
4: T.mit.edu
% cd view/build_mpich2-1.0.4p1/
% mpiexec -n 5 examples/cpi
After my X-Win32 is upgraded to version 8.0, the network view window of xdta looks like a mess. Today I found a solution: uncheck the ''Advance Window Caching'' on the Window Tab of X-Win32 Configuration dialogue.

I would rather not upgrading, because some behavior of the new version is weird. Version 8 was not stable when it was released; it looks as if we are doing beta testing for them. And since August we have been upgrading for five to six times, each of which the company claims they have fixed some bugs.  

Unfortunately, I have no choice: the license key for 6.0 from MIT was expired and the new key works only on new versions.
* Some statistics about Ashish's estimated historical OD for LA
** The ODs are classified into 4 groups in terms of the max demand throughout the day (from 3 to 23:45)
|! Group |! Number of OD in group |
| < 10 |660 |
| 10-50 |333 |
| 50-100 |74 |
| > 100 |62 |
|! Total |!1129 |
Surprisingly more than half of the OD pairs are smaller than 10 vehicles per 15-minute interval.
We may be able to remove (or combine) about half of the ODs.
DynaMIT (version of 0930) ran into problem again in LA yesterday (10/18), as timestamp 16500 (4:35am) in not available in the flow.dat.
Check flow.dat\{200510182358\}.dat to find out.

BTW, the flow.dat has no data for today (10/19) so far.

I'm uploading the new version and it will hopefully handle sensor data missing situation more robustly.
Last month I put an copy of my [[dissertation|PhD Thesis: Scalability of Dynamic Traffic Assignment]] online for electronic submission to the MIT libraries.

The thesis is prepared in LaTeX (compiled on both MikTeX and TexLive2008) and written in Emacs. Most original figures are generated by [[OpenOffice.org Draw|http://www.openoffice.org/product/draw.html]], while others are from MATLAB or Excel. One good thing about OpenOffice.org Draw is it can export figures to various format including those vector format such as eps, emf/wmf.

Other tools used:
* pdfcropper and pdftops, typically used to convert some figures (from Excel) to eps format.
* TortoiseSVN, mainly used for backup and track changes

Fix TiddlyWiki crash issues after upgrading to Firefox
* Need to use "var" to explicitly declare local variables
* Affected macros: smiley, listTagsMacro

Upgrade TiddlyWiki to v 2.0.3
The patch introduced by Rama ([[See yesterday's journal|1 November 2005]]) may actually bring some sort of unexpected overflow problems to MITSIM. The reason is that the unit of utility has been changed, leading to a significant increase of absolute value of the utility. Originally the unit is a ratio of travel time, i.e., (minute-of-this-path)/(minute-of-the-shortest-path). Now that the change is applied, the unit becomes minute, which may be much greater than 1, if the trip is long.

As MITSIM (and DynaMIT!) uses Logit models to calculte the route choice probabilities, it has to compute the exponential of utility. Since MITSIM and DynaMIT by default use //float// instead of //double// for internal representation of travel time, the output of ''exp'' function may easily exceed the limit of reprentation of //float//. 

In my test of a simple network, MITSIM with patch will suffer from this overflow problem if we set the coefficient to -10. On the other hand, MITSIM without patch will have a similar problem if the coefficient is -0.008.

Potential fix includes the following
* Try to use //double// instead of //float//.
* Check if the overflows occur, throw exceptions or issue warnings if problems are detected.
Adopted the latest version.

Currently some tiddlers are duplicated between this notebook (tiddlywiki_yw.htm) and the main homepage (index.html). Considering a better way to share and reuse them. (e.g., [[IncludePlugin|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]] looks like a good option.
Good news: IEE paper accepted. Pizza lunch today.

Code for sensor status checking completed, using the shortcut implementation: change weights only. Further test required.

Meeting today:
* Send paper to reviewers for feedback. (the original 3, and Costas)
* How to get online evaluation done

Next LA meeting: Monday, 1/9/2006, 3pm.
I found this article, "On the "Visualizing Cultures" Controversy and Its Implications", posted on the [[MIT CSSA forum|http://cssa.mit.edu/forum/]]. Maybe a little bit late, but might still worth reading. Here's the link:
or http://web.mit.edu/fnl/volume/185/cssa.html
Upload a new version of DynaMIT (Built on 10/19) to LA. This will hopefully work even if there are missing intervals in the sensor file.

Modify the source code to apply auto regressive process for first iteration of OD estimation. In this case, after the first iteration, the estimated OD will somehow reflect the latest information. This is particularly useful if the sensor data is not available for a certain interval, in which case we can do at most one iteration.
!! Preparation for DynaMIT
* Set VOT to 0, so that all paths have equal chance to be used.
* Set Debug Mode to 1, so that {{{path.out}}} has all paths (this file will be appended for each interval, so it will become very huge).
* Update demand, if necessary, to significantly greater than 0, to ensure all OD pairs have packets.
* Run DynaMIT for a few intervals, get {{{path.out}}}

!! Process path file
* Get path file {{{path_sorted_newindex.out}}} from {{{path.out}}}
 sortPath path.out 
* check if the file covers paths for all OD pairs
** Get the OD columns from the path file
 awk '{printf("%d\t%d\n", $3,$4);}' path_sorted_newindex.out > test1
 less test1  
** Remove the first two and the last row from {{{test1}}}, . e.g., if we find 5746 rows, 
 sed -n '3, 5745p' test1 > test2
 diff test1 test2
** Remove redundant rows
 sort test2 | uniq > test3
** Confirm that the number of rows in {{{test3}}} = the number of OD pairs in the demand file
* Create demand template
 demandTemplate path_sorted_newindex.out
* Add paths to DynaMIT demand file to get MITSIM demand file
 ~/Util/AddPathToDemand/addPathToDemand demand_template.out LA_dynamit/demand.dat
* Save new path/demand file to MITSIM dir
 mv demand_output.out LA_mitsim/demand_mitsim.dat
 mv path_sorted_newindex.out LA_mitsim/path_new_from_dynamit.dat
An interesting comment
Emacs is not the only choice of text editor in the Linux world. A number of other editors are usually included with Linux or UNIX installs. These other editors, especially vi (Visual Editor), are also extremely popular. Linux people are prone to have religious wars about which editor they prefer, but it probably makes sense to know more than one. Golfers have a lot of clubs in their bag because every shot is a little bit different.
!! Summary
I've put different versions of the MITSIMLab sources (all that I have access to) to T at
All users in the "mitsim_dev" group on T can have read/write access to it. 

!! What's in it?
The {{{trunk}}} in the repository is taken from the latest CVS version on H, which (I think) was last updated in 2004. So it's an old version without closed-loop or any new features we added ever since then. I believe the open-source version is probably this one.

I've created branches to reflect the current status of our development. There are four branches now.
%  svn list file:///megaspace/svnroot/mitsimlab/branches/
Those are, respectively, the latest closed-loop version (developed by myself), non-closed-loop version (also my version), some anonymous version with some effort to port to new compilers, and the VMS version (with the vehicle-stucking hacks) by Vaibhav.

I think we will continue to maintain two branches, i.e., the closed-loop and non-closed-loop one.  Eventually we will merge the {{{vms}}} branch back to {{{closedloop}}}, and the {{{nonclosedloop}}} branch back to {{{trunk}}}. 

What is missing here is Charisma's latest version. I do not know where it is yet. But I would expect her changes were based on the CVS version and could/should be merged to both closed-loop and non-closed-loop .

To checkout the latest closedloop version:
% svn co file:///megaspace/svnroot/mitsimlab/branches/closedloop . 
or (remotely)
% svn co svn+ssh://YOUR_USER_NAME@MY_DOMAIN/megaspace/svnroot/mitsimlab/branches/closedloop .

!! Tags
There are also a few "releases" of the code available here:
% svn list file:///megaspace/svnroot/mitsimlab/tags
These are similar to branches except that they're not supposed to be updated.  I use them as "snapshots" of the branches at certain point (that's why they are called "tags") so that we will be able to easily retrieve the exact version we used for some tasks.

Details of the tags/branches concept can be found in the free online book about [[Subversion|http://subversion.tigris.org]], [[Version Control with Subversion|http://svnbook.red-bean.com/nightly/en/svn.branchmerge.tags.html]]

!! Some log of commands
*Create mitsim-dev group
% su
# system-config-users &   
(add mitsim_dev group, add users to group)
# newgrp mitsim_dev
# mkdir mitsimlab
# chmod 775 mitsimlab/

* Create MITSIMLab repository after switching back to non-root user and changing default group to {{{mitsim_dev}}}
% newgrp mitsim_dev
% svnadmin create /megaspace/svnroot/mitsimlab
% untgz ../../simlab_cvs.tar.gz
% md mitsimlab
% md trunk
% md tags
% md branches
% mv simlab/ trunk/
% mv trunk/ tags/ branches/ mitsimlab/

* Import from last CVS version.
** use {{{bash}}} is somewhat more convenient here (auto completion)
$ svn import /home/wenyang/view/MITSIMLab/MITSIMLab-Src-Bak/simlab_cvs/mitsimlab file:///megaspace/svnroot/mitsimlab -m "First import: from the latest CVS version checked out on H.mit.edu by Yang Wen on 1/22/2008. This version might be outdated, since no one has commited anything to it for the past three years (to the best of my knowledge). It is a non-closed-loop version."


$ svn copy file:///megaspace/svnroot/mitsimlab/trunk file:///megaspace/svnroot/mitsimlab/branches/nonclosedloop -m "Copied from first imported version. This is the last CVS version, which does not have the closed-loop functionality. (This time we keep the 'simlab' dir."

Committed revision 5.

* Create a branch for rh80
$ svn copy file:///megaspace/svnroot/mitsimlab/trunk file:///megaspace/svnroot/mitsimlab/branches/port_to_rh80 -m "Copied from first imported version. This branch is created for simlab-rh80-src, a version with some effort to port MITSIMLab to Redhat Linux 8.0 (to be compiled by a newer compiler?)"

Committed revision 6.

$ svn co file:///megaspace/svnroot/mitsimlab/branches/port_to_rh80  .
$ svn del simlab/*
$ svn ci -m "Deleting all files to make the next step easier: we will simply copy files from /space2/wenyang/Backup/MITSIMLab-Src-Bak/simlab-rh80-src.tgz on H.mit.edu"
$ tar zxvf ~/view/MITSIMLab/MITSIMLab-Src-Bak/simlab-rh80-src.tgz
$ cd simlab/Tools/
$ rm \#Makefile# .#Makefile
$ cd ..
$ svn add *
$ svn ci -m "Source code copied from /space2/wenyang/Backup/MITSIMLab-Src-Bak/simlab-rh80-src.tgz on H"

Committed revision 8.

* Upgrade non-closed-loop version

$ svn co file:///megaspace/svnroot/mitsimlab/trunk/ .

(Copy files from ~/view/MITSIMLab/MITSIMLab-Src-Bak/simlab_non_CL.tgz)

$ svn add simlab/Version_fullYear.pl
$ svn switch file:///megaspace/svnroot/mitsimlab/branches/nonclosedloop
At revision 8.

$ svn ci -m "Non-closed-loop version modified a little bit for testing (around 9/2/2005). The incorrect build-year was fixed by a quick-and-dirty hack"

(Copy files from ~/view/MITSIMLab/MITSIMLab-Src-Bak/simlab_NonCL_patchedByYWandRama.tar.gz)

$ svn ci -m "Update simlab/TS/TS_FileManager.cc so that the non-closed-loop version can ignore the 'ClosedLoopGuidance' token in the master parameter file instead of creating an error and exiting. This is helpful when the master file is to be used on both closed-loop and non-CL scenarios."
Committed revision 10.

$ svn st Version.pl.original
$ svn del Version.pl
$ ln -s Version_fullYear.pl Version.pl
$ svn add Version.pl.original
$ svn ci -m "A temp version: Test removing Version.pl. Not for use"
$ svn add Version.pl
$ svn st
$ svn ci -m "Add the Version.pl back."

Committed revision 12.
** Tag as 20060405nonclosedloop
$ svn copy file:///megaspace/svnroot/mitsimlab/branches/nonclosedloop file:///megaspace/svnroot/mitsimlab/tags/20060405nonclosedloop -m "Tag the latest non-closed-loop version that I have access to. This version does not have latest models developed by Charisma Choudhury, nor does it have the fixes we have made for the closed-loop version after 2006. YW, 1/23/2008."

Committed revision 13.

* Handle closed-loop version
** Start with Dan's version
$ svn copy file:///megaspace/svnroot/mitsimlab/trunk file:///megaspace/svnroot/mitsimlab/branches/closedloop -m "Copied from first imported version (the last snapshot from CVS on H). This branch is created for the closed-loop version. I will add changes from Dan Florian in the next commit."

$ tar zxvf ../simlab-cloesedloop-dan.tgz
$ svn add simlab/Tools/closedLoopRunManager.cc
$ svn add simlab/Tools/closedLoopRunManager.h

$ svn switch file:///megaspace/svnroot/mitsimlab/branches/closedloop
$ svn info

$  svn ci -m "The first closed-loop version I have access to. It was received from Daniel George Florian, who worked on closed-loop for his Master thesis. (He graduated in 2004.) He added a few files (e.g., Tools/closedLoopRunManager.cc and .h) and made some other changes to handle the parsing of master parameter file and some closed-loop control logic. While MITSIMLab has several executables, only mitsim and xmitsim are used in this closed-loop version.  See Appendix A in his master thesis for closed-loop operating instructions. Note: This version can only be compiled on H (Redhat Linux 7.3). An error of CLK_TCK undeclared was found when I tried to compile it on trumpet. Perhaps the header files were not set up properly."
** Some updates
$ tar zxvf ../20041124simlab.tgz
$ svn di simlab/Tools/closedLoopRunManager.cc
$ svn ci -m "Closed-loop version with small changes to the unblock issue (a hack used by Dan Florian only for his master thesis)."
$ svn di -r14 simlab/Templates/DiskData.h
$ diff -r simlab/ ../simlab_cl_patched/simlab_cl/ |sed '/.svn/d' |grep Only


$ tar zxvf ../simlab_cl_patched/simlab_cl_pathched_ren.tgz

$  svn ci -m "Applied changes from simlab_cl_patched.tgz, created in November 2005. Major features include the following: write sensor output even if it has zero count; apply Rama's change in the calculation of route choice utility; add large file support for creating spt_i.tmp (time-dependent shortest-path file) that is bigger than 2 GB."

$ diff -r simlab/ ../simlab_CL_KG_merged-20060407/simlab_cl/ |sed '/.svn/d' |grep Only
$ diff -r simlab/ ../simlab_CL_KG_merged-20060407/simlab_cl/ |sed '/.svn/d' |grep 'Only in simlab' |sed 's/Only in/rm/' | sed 's/: /\//' > cl.sh
$ . cl.sh
$ diff -r simlab/ ../simlab_CL_KG_merged-20060407/simlab_cl/ |sed '/.svn/d' |grep 'Only in simlab'
$ diff -r simlab/ ../simlab_CL_KG_merged-20060407/simlab_cl/ |sed '/.svn/d' |grep 'Only'
$ rm cl.sh
$ tar zxvf ../simlab_CL_KG_merged-20060407/simlab_CL_KG_merged-20060407_ren.tgz

$ svn add simlab/Version_fullYear.pl
$ svn add simlab/Version.pl.original
$ svn add simlab/lib
$ svn add simlab/bin
$ svn add simlab/general.tmpl.KeepGuidance
$ svn add simlab/build_log_CL_KG_20060407.log
$ svn add simlab/readme.txt
$ svn add simlab/H.mit.edu.tmpl
$ svn add simlab/TS/Makefile.KeepGuidance
$ svn add simlab/Tools/Makefile.KeepGuidance
$ svn revert simlab/Version.pl
$ cp -a simlab/Version_fullYear.pl simlab/Version.pl
$ svn st

$ svn ci -m "Closed-loop version from simlab_CL_KG_merged-20060407.tar.gz. Changes were made to created a 'keep-guidance' version of mitsim/xmitsim, to facilitate the calibration of MITSIMLab for the NY (Lower Westchester County) network. Details are summarized in the readme.txt file located in the source directory."

Committed revision 18.

(... to handle symbolic link of Version.pl)

$ chmod -x simlab/general.tmpl
$ chmod -x simlab/host.tmpl simlab/linux.tmpl simlab/Makefile
$ svn del simlab/Version.pl
$ svn del simlab/build_log_CL_KG_20060407.log
$ svn ci -m "Temp Closed-loop version. Remove simlab/Version.pl from simlab_CL_KG_merged-20060407.tar.gz. (will add it back as a symbolic link to Version_fullYear.pl in the next commit"
$ cd simlab
$ ln -s Version_fullYear.pl Version.pl
$ svn add Version.pl
$ cd..
$ svn ci -m "Closed-loop version. Add simlab/Version.pl back as a symbolic link to Version_fullYear.pl"

(... MITSIMLab-CLKG-Src-20060421.tgz)

$ svn del simlab/bin
$ svn del simlab/lib
$ tar zxvf ../MITSIMLab-CLKG-Src-20060421/MITSIMLab-CLKG-Src-20060421_ren.tgz

$ svn ci -m "Closed-loop version from MITSIMLab-CLKG-Src-20060421.tgz. Changes are documented in simlab/ChangeLog.notes. The major change is avoiding hard-coded parameters for closed-loop (CL)."

Committed revision 21.
** Tag the closed-loop version we used
$ svn copy file:///megaspace/svnroot/mitsimlab/branches/closedloop file:///megaspace/svnroot/mitsimlab/tags/20060421closedloop_and_keepguidance -m "Closed loop version as of 4/21/2006. Last changed by Yang Wen. This version has been used for most studies done during 2006~2007, including the calibration for NY project (LWC network). This version compiles on H.mit.edu. But with some changes, it can also be compiled on T.mit.edu (as long as we have gcc/g++ 2 installed on T.)"

Committed revision 22.
** New changes to make it compile on T without modification
$ svn add T.mit.edu.tmpl
$ svn ci -m "Closed-loop version based on MITSIMLab-CLKG-Src-20060421.tgz, with additional changes to make it compile on both T and H. See simlab/ChangeLog.notes for more discussion."

* New branch for VMS
$ svn copy file:///megaspace/svnroot/mitsimlab/tags/20060421closedloop_and_keepguidance file:///megaspace/svnroot/mitsimlab/branches/vms -m "Create a branch for Vaibhav Rathi's VMS version from file:///megaspace/svnroot/mitsimlab/tags/20060421closedloop_and_keepguidance, which is the same as the closed-loop version as of 4/21/2006 (last changed by Yang Wen). Vaibhav (presumably) started from this version and add some functions for using Variable Message Signs to evaluate route guidances (generated from DynaMIT)."

Committed revision 24.

$ svn switch file:///megaspace/svnroot/mitsimlab/branches/vms
$ tar zxvf ../../simlab_vms.tar.gz
$ svn add simlab/compile_xmitsim.sh
$ svn add simlab/compile_vaibhav.sh
$ svn add simlab/Makefile_Vaibhav
$ svn st |grep ? | sed 's/?/rm/' > cl.sh
$ . cl.sh
$ svn di simlab/SMC/Makefile
$ svn di simlab/linux.tmpl

$ svn ci -m "VMS version by Vaibhav Rathi, who added some functions for using Variable Message Signs to evaluate route guidances (generated by DynaMIT). This version is the one he used for his master thesis. It also come with hacks to stop vehicle stucking except for segment 1926 (hardcoded for incident cases; check class TS_Vehicle for more details.). This version has too many manual hacks and thus is not recommended for general purpose runs. One needs to change the hard-coded hacks for different incidents scenarios. We may want to separat the hacks from the core function of VMS and merge this branch back to the closed-loop one (at file:///megaspace/svnroot/mitsimlab/branches/closedloop). "
** Tag it
$ svn copy file:///megaspace/svnroot/mitsimlab/branches/vms file:///megaspace/svnroot/mitsimlab/tags/20071213vms_version_by_vaibhav_with_hacks_on_seg1926 -m "Create a tag for Vaibhav Rathi's VMS version, same as revision 25."

Committed revision 26.
Athena clusters have many unused machines during the week of spring break. They seem to be good candidates for me to run my parallel simulation experiments. After some trial-and-error efforts, I managed to make my parallel DynaMIT run on Athena. If the results are good, I will be able to finish my case studies in time...
!! Setup
!!! Install MPI
* Download mpich2: mpich2-1.0.6p1.tar.gz
* Extract to ~/temp/mpich2-1.0.6p1
* Check document: README, etc.
* Configure, make, make install
./configure --prefix=/afs/athena.mit.edu/user/w/e/wenyang/bin |& tee c.txt
make |& tee m.txt
make install |& tee mi.txt
** Should have configured with {{{/mit/wenyang/local}}}... now it's installed in .../bin/bin...
!!! MPI configuration
* Edit {{{.cshrc.mine}}} to include {{{/mit/wenyang/bin/bin}}}
setenv PATH /mit/wenyang/bin/bin:${PATH}:/mit/wenyang/bin 
** Don't forget to {{{source .cshrc.mine}}}
* Create {{{.mpd.conf}}}, set {{{MPD_SECRETWORD}}}, 
** Similar to [[18 October 2006: Install MPICH2]]
!!! Start mpd (one tricky part)
* mpd.hosts would not work as described in [[18 October 2006: Install MPICH2]], because one can not {{{ssh}}} to machines in the Athena clusters. Fortunately, the README document provides a workaround.
* On first machine, start mpd and check its port:
mpd &
mpdtrace -l 
** On other machines, use the hostname and port from the first machine
mpd -h <hostname> -p <port> &
** Use {{{mpdtrace}}} to check.
!! Tests
* Scp files from C or T to Athena
** LA data: {{{20080324LA_final.tar.gz}}}
** NY data: {{{nyDynaMITto10.20080325_no_result.tar.bz2}}}
** DynaMIT and DynaMITmpi executables (~DynaMIT.0321pf, ~DynaMITmpi.0316s)
* Try a few runs, e.g.,
** Don't forget to check domain weight settings and incident settings.
mpiexec -n 4 `pwd`/DynaMITmpi.0316s dtaparam.dat.300_900.CL.e1p1.pwt_file
!! Issues
* Files could be overwritten by different processors (b/c we have shared disk in Athena)
* Shared disk might cause extra delays
* Disk quota...
!!! Workaround for shared disk access
* Write a script to run each process on different input directories
** Create directories (e.g., 1,2,3,4,...) for each process. Deploy the same set of input files in these dirs.
** Use {{{assign_dir_id.sh}}} to create a symbolic link for each dir (use the hostname). When we use new machines, just modify these symbolic links to reflect the new hosts.
cd $BASE
if [[ "$1" == "" ]]; then
    echo "Please input dir number (e.g., 1, 2, 3, or 4)"
    echo "Usage: "
    echo "$0 NUM"
    ln -sf $1 $HOSTNAME
** Use {{{run_mpi_any.sh}}} to wrap executables so that each process in MPI will work in a different dir.
echo pwd=`pwd`
$1 $2 $3 $4 $5 $6 $7 $8 $9
echo "FINISH $0"
My tech-blog (http://blogs.mit.edu/wenyang)  is (hopefully) temporarily down... The blog home (http://blogs.mit.edu/home.html) says: "The blog server is being rebuilt this week, the new code base will be firing by next weekend."
Updated [[About Me]] page. Previous [[tech-blog service|http://blogs.mit.edu/CS/Blogs/wenyang/]] was discontinued so I had to temporarily (or maybe longer?) save my stuff to http://ywen-tech.blogspot.com/
I tried to use [[Google AJAX Language API|http://googleajaxsearchapi.blogspot.com/2008/03/introducing-ajax-language-api-tools-for.html]] to see if it can translate Portuguese to English. If so then maybe it could benefit our MPP CityMotion projects.

I followed the example on the AJAX Search API Blog and made [[a test webpage|http://web.mit.edu/wenyang/www/test/translate.html]]. Unfortunately it seems to be just a primitive prototype. It cannot even recognize the simplest Portuguese words I know, such as "Obrigado", "Bom Dia". Translation for the other direction works, though. It outputs "Obrigado" as the Portuguese word of "Thank you".
Finished Grading 1.222 final exams. For the last week I spent so much time on this that I could hardly focus on my own work.
Have been fixing bugs and tracking the assignment-matrix-making code for a few days. 

* Behavior Model - {{{dtaBehaviorModels::getPreTripDecision}}} now using the following parameters:
 ascCDThm1 = -100 # was 1.95
 ascCDThm2 = -100 # was 2.1377
 ascCDThp1 = -100 # was 0.794
 ascCDThp2 = -100 # was 0.0221
The effect of -100 will make it almost impossible to switch pre-trip decision, to depart at other time intervals.

* Something weird for dtaPointerRWiterator.h
This file contains a template class with virtual functions. I was trying to remove the virtual modifier because it seems to me it is useless. However, the result change slightly. Moreover, removing one (unnecessary) semicolon results in slight change of output as well...

Rama asked me to look at the State3D issues of DynaMIT and see if I can quickly figure out the internal data structure. The LADOT would like to know it.
Yesterday's meeting:
* Status of sensors are necessary for correct estimation and prediction
** How to get them? Let LADOT writes. (New field? New file? "-1" trick?)
** Other verifying logic: reasonableness check?
** Program it in DynaMIT: adjust varcov (weights) on-the-fly.

* Skills in writing paper
** A paper should have a theme. (Not two or more.)
** The theme must tell the readers what kind of message we want to convey.

Next meeting: 12/6, 4pm.
Won the soccer game this morning. 2:0. We have only 7 players and the opponent have 9. <<smiley :-D>>

First snow of this winter in Cambridge! <<smiley :-|>>
Today I completed a course for CPR certification as part of the [[MASS CPR '08 program|http://ems.mit.edu/heartsafe]]. The curriculum includes 
* Adult/Child CPR with mask and choking, and 
* Adult/Child AED

I wish I will never have to use what I've learned today. But I still think the time I spent today worth it. As pointed out by our coach, who made the training really fun and enjoyable, in an emergency situation this skill could save someone's life.

Frankly, I have seen the AED signs on campus for many times, and I never know what they're used for until today. It seems indeed very simple to use.

Some details from my certificate from [[American Heart Association|http://www.americanheart.org/cpr]] Heartsaver AED Program: 
AHA Region: Massachusetts
Training Center: Clinical Training Center BMC
Training Site: Medical Resources Group
Instructor: Mark Forgues, M Ed, EMTP
Installed Firefox 1.5 finally, although I downloaded it almost immediately after its release. I don't want Flash right now, and thus have not installed that plugin. It seems faster, anyway.

Current Extensions:
* DOM Inspector 1.8
* All-in-One Gestures 0.17.4
* Tab Mix Plus

With these extentions, it has almost every major feature I like in MyIE2, except the super drag-n-drop action. (There is actually a "Super DragAndGo" extension, but it doesn't support Firefox 1.5, unfortunately.) 

More extensions to try:
* FlashGot
* Adblock
* Web Developer
Both bison++ and flex++ are used to compile DynaMIT (generating parsers & lexers). Making these tools available on Windows is the first step to port DynaMIT.
** get {{{bison++_1.21.11.orig.tar.gz}}}
cp -a  bison.1 bison++.yacc.1  (because no simbolic link is created)
cp -a bison++.exe bison.exe  (again, the simbolic link)
make install
** Need to define {{{YY_USE_CLASS}}} for this version! (Or modify bison.cc to define it!)

* flex++
** Latest flex++ at http://umn.dl.sourceforge.net/sourceforge/flex/flex-2.5.33.tar.bz2, but could not be compiled on my mingw.
** Get a pre-compiled flex++ 2.5.4a for Windows
** Problems for 2.5.4a
*** May need to add "-+" to command line option of flex++, to indicated that it is used for c++. (Define {{{LEXFLAGS = -+ }}} and add $(LEXFLAGS) to places where $(LEX) is called.)
*** Add "using namespace std;" and "#include <iosfwd>" to the generated lexer, and remove those forward declarations. 
*** Modify {{{FlexLexer.h}}} for std namespace issues.
Address is changed from http://blogs.mit.edu/wenyang to http://blogs.mit.edu/CS/Blogs/wenyang, and all previous comments are gone! :-(
After avoiding the problem of overflow (tested yesterday), we managed to show the impact of guidance in an link-added simple network.

Test on no-link-added simple network, works as fine!

Positive effect of guidance observed during tests on the simple network.

* Base case:
** All link use free-flow linktime, no guidance. Freeflow speed and speed limit are 50 for all links. One single OD: {0,3}; two paths: {0-1-3-5} and {0-2-4-5}. Path 2 is slightly shorter. Route choice fraction from the sensor.out shows about 1/3 drivers use path 1, 2/3 use path 2.

* Guidance-testing case:
** All input remains the same except that this time a new linktime table is used as guidance, and the closed-loop version of mitsim is used. The guidance table has an extreme condition where link 1 and link 3 (both on path 1) has almost infinity travel time. Route choice fraction becomes 0 for path 1 and 99.9% for path 2.

I think the result is promising. In order to use simultaneous estimation, there will be some technicle issues to resolve, though. One question is if we want to directly use the output linktime as guidance (or smooth it before applying)? Another is whether we need (and how) to adjust the timestamp of the guidance.

The tests have been done on both the original simple network and Rama's link-added network. Both show the same positive effect. It turns out the route choice works fine as long as the overflow problem is avoided.
Finally, found the bug of extra-packet-for-assignment-matrix. When using non-zero fmatrix, DynaMIT sometimes reports that there exists packets from 0 OD. This is because
* Demand disaggregation uses historical OD
* Historical OD becomes updated OD (departure time may changes, may have cancel trips, ...)
* In first iteration, dtaODEstimationAndPrediction uses AR process to obtain a new estimate, but difference of OD is not properly calculated. 
* Online disaggregation uses that difference to kill and clone packets. 

The solution is to set the difference to (estimated OD - historical OD). 

Same problem might also occured in similar situations (non-closedloop or planning), if AR degree is not zero.
I noticed some similarities among different crashes of DynaMIT, and finally found and fixed a bug that was the (hopefully only) cause of the crash. It's an out-of-range error for accessing array elements in the function {{{dtaSupplySegment* dtaSupplyLink::getNextSegment (dtaID segID)}}}.
According to the comments, the function was written by Michael D. Heiler, and this bug might have been there since 1997.
We lost in the semifinal of IM Soccer B+ League last night. Sigh. This season is over.

Tried jRNE today. In order to run it on my laptop, I had to install the Java runtime environment. Somewhat annoying, because (1) it takes up 100MB in my hard disk, which is almost full..., and (2) their version naming is odd: it says version 5 yet appears like 1.5.x

Anyway, the modified jRNE seems good, at least fully functional on the incident mode.
It's the last Sunday of October. Daylight savings ended at 1am. 
Rename this utility to "printPathTopo". 
* Summary: 
Read {{{__pathTopology.dat}}}, and write (using ostream << aGraph) as a human-readable format.
* Readme
  This program is a utility for DynaMIT. It is intented to interpret DynaMIT's path topology file into a human-readable format that can be better understood.

Current version build date: May 31 2006 14:11:36

         -- Yang WEN, first built on 5/25/2005

* Usage:
   ./printPathTopo [input_file_name] [output_file_name]
* Note: 
** Default input_file_name is {{{__pathTopology.dat}}}
** Default output file name is {{{output_modified.out}}}
* Source: printPathTopo.cc and Makefile, available at
* Usage: 
  printPathTopo [input_file_name] [output_file_name]
Update to TiddlyWiki v2.0.4
Upload new version of DynaMIT to LA

{{{DynaMIT_1230}}}: will be used starting from 1/5/2006

{{{DynaMIT_1229}}}: used from 12/31/2005 - 1/4/2006
Add new string format "compact" mode (dtaTsfCOMPACT and dtaTIsfCOMPACT) for better file name support. Modify //getTimeString// member functions in class dtaAbsTime and dtaTimeInterval accordingly.

To generate output of flow, speed, density data for segments corrisponding to user sensors location, and change i3d-file-writting functions (e.g., writeFlowBinaryFileForXdta).

Confusion of time-intervals used by i3d output functions remains. Two arguments are accepted for writeFlowBinaryFileForXdta: 1st is "estimate", 2nd is "Prediction". But 1st is always equal to the starting time of the 2nd, making it redundant and useless. Moreover, there will be conflicts in discriminating estimation and prediction, if the length of estimation interval is the same as that of the prediction interval.

There are three version of ~State3D.h file in DynaMIT related source directories. 
## components/~ImpedanceTables/~State3D.h
## include/~State3D.h
## xdta/Base/~State3D.h
Comparison shows, although the 1st is the one in-use, the 2nd and 3rd ones might actually be better. Compared with the first two, which have been ported to support gcc 3.3.2, the 3rd one by Qi Yang does not have as many obvious bugs. Thus we might want to merge the 3rd one with the 2nd and replace the 1st.
To finish the preliminary evaluation part of the IEE paper.

* Use off-line replication to retrieve estimation/prediction results. Compare them. 
* See if more iterations helps
* See if a better fmatrix helps
Check text output of flow, speed, and density. There are a few concerns.

Flow is a step function, as all data has to be multiply by a "scaling factor" which is 3600 divided by the number of seconds for each "update interval" (which is usually 60).
Density has many zeros in early morning. Not sure if it is correct.
Feeling a little bit tired of being called to load the gauss license manager every time our server reboots, so I spent a few minutes today to get it done automatically when the machine starts. Here are the steps:

* Read the instructions in the file {{{README.flex}}} at {{{/opt/gauss7/FLEXlm}}} to find out how to load the license manager.
* Create a script file in {{{/opt/gauss7/FLEXlm}}} to run the lmgrd
** Note that we assume a copy of the gauss license file is available at {{{/opt/gauss7/FLEXlm/gauss.lic}}}
% cat run_lmgrd.sh
if [ -f $GAUSS_LM_PATH/gauss.lic ]; then
    ./lmgrd -c gauss.lic -l /var/tmp/lmgrd.dl && echo 'run_lmgrd'
* Put the script in /etc (optional)
# cd /etc
# ln -s /opt/gauss7/FLEXlm/run_lmgrd.sh .
* Create a start-up script at {{{/etc/rc.d/init.d}}} (or {{{/etc/init.d}}})
** Note that "username" is an existing user for the server WITHOUT root privilege)
# cat start_gauss_lm
if [ -f /etc/run_lmgrd.sh ]; then
    su username -c /etc/run_lmgrd.sh && echo 'GAUSS_lmgrd'
* Link the start-up script to the directory for our runlevel
** By convention S** means a script for "Starting", and 90 is somewhat arbitrary. (The smaller this number, the earlier the script will be executed.)
# cd /etc/rc.d/rc5.d
# ln -s ../init.d/start_gauss_lm S90start_gauss_lm
Use DTA instead of DTEP. The name of "traffic estimation and prediction systems" does not convey the idea of DTA, behavior models, etc. It could be something as simple as a regression. So we decided not to use it.

For preliminary evaluation, no plots (except the calibration part) required. 

Next meeting: next Tuesday, 12/13, 4pm.
* Summary
A "upgraded" version of PrintPathTopo to get user ID instead of system ID from the path topology.
* Readme
  This program is a utility for DynaMIT. It is intented to interpret DynaMIT's path topology file into a human-readable format that can be better understood.
 This version uses network topology to provide link user ID for output. Therefore it needs to parse the DynaMIT parameter file and network file.  Users *must* gurantee that the input path topology file is consistent with the network file, i.e, the path topology file is in fact created from the network.
 Note also that a supply parameter file and a demand file may also be necessary to construct the network topology; these files are simply parsed and their contents are not relevant. Therefore we could make up simple input files, as long as it meets the parsers' requirements.

Current version build date: Jun  6 2006 14:31:56

         -- Yang WEN, first built on 6/6/2006
* Usage:
printPathTopoUserID [parameter_file_name] [input_pathtopo_file_name] [output_file_name]
* Note: 
** Default parameter_file_name is {{{dtaparam.dat}}}
** Default input_pathtopo_file_name is {{{__pathTopology.dat}}}
** Default output file name is {{{pathTopologyUserIDs.out}}}
** {{{parameter_file_name}}} is the same file used by DynaMIT. Input path topology file is expected to be located in the {{{InputDirectory}}}, which is specified in the DynaMIT parameter file.
*  Source: printPathTopoUserID.cc and Makefile, available at {{{CorbaFreeDynaMIT/Tools/PrintPathTopoUserID}}}
The new closed-loop (CL) version of MITSIMLab can now build both the original binaries and  a special branch of keep-guidance (KG) binaries.

It is a patched version based on the CL version used by Dan Florian. 

The KG option is originally designed for the calibration of NY project. It
picks up the guidance without deleting it, so that we can use the guidance
file to provide updated linktime information. This is normally used together
with a high percentage (100% or slightly less) of guided drivers.

* Large file support (break 2G limit).
* Utility function depends on absolute link time, not relative linktime. (by Rama)
* Support ~ClosedLoopGuidance field in the master file.
* Show the freeway bias when it is parsed from the parameter file
* [IMPORTANT!] The freeway bias is used in the same way as defined in the manual, i.e., freeway link time is divided by the bias.

Commands to build MITSIMLab:
$ make clean        # clean previous lib, obj, bin, and temp files
$ make depend_all
$ make              # compiles all "normal" binary: smc mitsim tms meso xsmc xmitsim xtms xmeso
$ make mitsim_kg    # compiles the mitsim with KG options
$ make xmitsim_kg   # compiles the xmitsim with KG options
$ make install      # installs normal binaries to ~/bin/$(OSTYPE)
$ make install_kg   # installs the KG binaries: mitsim_kg xmitsim_kg

Note: {{{general.tmpl.KeepGuidance}}}, {{{TS/Makefile.KeepGuidance}}}  and {{{Tools/Makefile.KeepGuidance}}} are created for KG option (to define macro ~MITSIM_KEEP_GUIDANCE). Some other files are also modified accordingly, including {{{Makefile, *.impl}}}.
Build {{{DynaMIT_1107}}} on guitar, with new feature of adding text output of flow, speed, and density. 

Unable to upload the file to LA, as their server might have some problems in telnet connection .

Update {{{simlab_cl/Tools/closedLoopRunManager.cc}}} and {{{simlab_cl/TS/TS_Engine.cc}}} to create mitsim_kg and xmitsim_kg, which do not remove the guidance once after it is picked up, simplifying the process of Anita's calibration.
|''Name:''|7-Zip |
|''Version:''|4.29 beta, 4.23 |
|''Source:''|http://www.7-zip.org/ |
|''Author:''|Igor Pavlov |
|''License:''|GNU LGPL |

7-Zip is a file archiver with high compression ratio.

Main Features:
* High compression ratio in new 7z format with LZMA compression 
* 7-Zip is free software distributed under the GNU LGPL 
* Supported formats: 
** Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR 
** Unpacking only: RAR, CAB, ARJ, LZH, CHM, Z, CPIO, RPM and DEB 
* For ZIP and GZIP formats 7-Zip provides compression ratio that is 2-10 % better than ratio provided by PKZip and WinZip 
* Self-extracting capability for 7z format 
* Integration with Windows Shell 
* Powerful File Manager 
* Powerful command line version 
* Plugin for FAR Manager 
* Localizations for 59 languages

See also 
* http://sourceforge.net/projects/sevenzip/
* http://sourceforge.net/projects/p7zip/
IEE paper submission confirmed. Reviewer not provided yet.
Upgrade to TiddlyWiki V 2.0.1

Some functions no longer work. For example, in macro displayDefaultTiddlers,
we need to change closeAllTiddlers() to story.closeAllTiddlers(); similarly, displayTiddlers becomes a member function of story.

Working on IEE paper.

NY project conf-call with Costas at 3pm. Create a list of tasks for the two new research assistants.
* Extract paths that do not contain parkways.
* Add new sensors to the network and create a new map of sensors.
* Plot the new sensor and compare with adjacent old sensors.

DynaMIT meeting at 4pm. Potential future work includes the following:
* Signal timing conversion to capacity changed (based on work by Zhili)
* Online calibration (based on work by Costas)
* Update off-line calibration
* Incident file format conversion?
* Portable GUI (xdta/jRNE)

Dialed to LA and check the situation. DynaMIT was slower than real-time as another process, "eggcups" had been eating up the CPU power. Kill it and everything becomes ok. Also modified the scripts for clean up jobs. For example, the following was added to kill DynaMIT process at the end of the day, if it is not finished by then:
ps -u USERNAME | awk '$4=="DynaMIT" {print "kill " $1 | "sh" }'
Setup the xdta for LA. 
/* xdta init file */
/* comments also begin with #, %, or // */


1 /space2/wenyang/test/LA_replication/temp/xi3d

[start] = 03:00:00
[predict] = 1800
[predictIter] = 2
[predictExec] = 7500 # not sure
[estim] = 300
[estim1] = 300 # irrelevant
[estimIter] = 2
[estimExec] = 900 # not sure

Next LA meeting: 1/19 (Thursday), 3:30pm
* Create "Tools" dir in the main source directory
* Based on {{{DynaMIT.cc}}}, remove unnecessary code, add new code
Add {{{Makefile}}}, and {{{DynaMIT_LCC.cc}}}
* Update {{{CorbaFreeDynaMIT/Makefile}}}
** Add new target: change the default target to "normal", which will not build tools. Target "tools" is designed for all subdir in Tools. Target "all" will build all.
* To build Tools (in this case only the {{{DynaMIT_LCC}}}), goto source code root dir, and type
./MakeDynaMIT3 tools
* To build all, including DynaMIT, DynaMIT_P and tools, 
./MakeDynaMIT3 all
NY project: give tasks to Vikrant and Varun.

For distributed systems (potential application to DynaMIT): Can we use SOAP instead of CORBA?
!! SED
* Convert MITSIM linktime file to matrix format
** Delete the first 9 rows (comments, and the '{'), and remove the '}' in the last row.
sed -e 1,9d -e 's/^}//' linktime.out > linktime.dat

* Extract demand vector from DynaMIT or MITSIM demand file
** Matlab code to call SED (I'm using GNU sed version 4.1.2):
cmd_line = ...
  ['sed -e "/{.*}/\!d; s/{[ \t]*[0-9]\+[ \t]\+[0-9]\+[ \t]\+\([.0-9]\+\).*}[ \t]*/\1/" '...
   starting_demand_file, ' > ', od_seed_file];
disp( cmd_line );  system( cmd_line );
% od_seed = load( od_seed_file );
** Comments: The actual code looks like the following. 
sed -e "/{.*}/\!d; s/{[ \t]*[0-9]\+[ \t]\+[0-9]\+[ \t]\+\([.0-9]\+\).*}[ \t]*/\1/" demand.dat > od_seed.dat
** The expression has two parts.
** The first part ({{{/{.*}/\!d}}}) keeps only lines with '{' and '}' and something in between. '\' is used to escape '!'.
** The second part is a regex-replace, which extracts the 3rd number in each line that match the pattern.
*** '+', '(', and ')' need to be escaped by '\'. However, whether we escape the '.' in {{{\([.0-9]\+\)}}} or not doesn't seem to have any impact on the output. 
!!! More fun with GNU Sed
* converts the output from Latent Gold batch-mode output file (*.lst) to a more comprehensible format (which is also Excel-friendly). Description: 
## This requires gsed 3.02.80 or higher ({{{\x0D}}} means {{{^M}}}; {{{s/\x0D//}}} converts the DOS format to Unix).
##  _Constants_ is a special case in which we wan to keep the line as-is.
## Intercept is another special case in which we want to copy this word to the next line.
## This version does not handle nominal variables properly.
## To use Cygwin SED on Windows, need to change the single-quotes to double-quotes.
## Some explanations about the sed commands
*** 'h': copy content of the pattern space to the hold space; 
*** 'x': exchange the pattern space and hold space 
*** 'G': append a newline and then content of the hold space to the pattern space
*** 'd': delete the pattern space and IMMEDIATELY start next cycle
# Final version: 
sed -e '/File name:/,/BIC(LL)\tNpar/{/Npar/N;p}' -e '/ = /,/AIC3 (based on LL)/{/Log-prior/d;/Log-posterior/d;/^Chi-squared Statistics/,/^\t\{6,\}/d;p}' -e '/^Profile/{n;n;p}' -e '1,/^Parameters/{/^Parameters/{x;p;x;p};d}; /^Importance/,$d;' "$*" | sed -e '/^_Constants_/p; /^[^\t ]\+\t\{2,\}/ {s/\t//g;s/\x0D$//;h;d}; /^\t[-\.0-9e]\+\t/{x;G;s/\n//}; /^Intercept\t/{s/Intercept//;p;s/^.*$/_Intercept_/;h;d}; /[^\t\x0D]\+/,/^[\t\x0D]\+$/!d; /^Model for Classes/, /^Covariates/{/^[\t\x0D]\+$/d}'

!! AWK
* Use awk to calculate the run time of DynaMIT supply
** Write a script {{{file supply_time.awk}}} as follows 
# use "awk -f supply_time.awk runtimeSupply.log" to run this
function test(str)
    if ( num >= 1 )
        if ( str == "setLastTimeInfoReceived" )
            printf( "No. %4d =\t%f\n", num, x );
            num += 1;
            x += $2;
        num = 1;
        x = $2;
END { printf( "No. %4d =\t%f\n", num, x );}
** {{{runtimeSupply.log}}} is a DynaMIT output file with two columns. For each row, the first item is a tag (description of the current task), and the second is the time (in seconds) used. This awk scripts adds all time between two "{{{setLastTimeInfoReceived}}}" tags and print it.
* Delete rows related to node 4102 in the {{{socioEco.dat}}} file for DynaMIT
** first two columns in this file is origin and destination
 awk '($2 != "4102" && $1 != "4102") { print $0 } ' socioEco.dat > socioEco.dat.1
** To make it more generic, save the following code as {{{cleanSocio.awk}}}
# use "awk -f cleanSocio.awk node=4102 socioEco.dat > socioEco.dat.1" to run
($1 != node && $2 != node) { print $0 }
| U+6E29 | 温 | &#28201; |
| U+9633 | 阳 | &#28451; |
| U+6768 | 杨 | &#26472; |
0xA0 (160) is "Non-break Space"
* Error message {{{/var/log/XFree86.0.log}}}
Could not init font path element unix/:7100, removing from list!
Fatal server error:
could not open default font 'fixed'
* Reason: disk space run out (at /) on H.mit.edu
* Solution: did some clean up. Realize root has a lot of mails from log watch
cd /var/spool/mail
mail -u root

It is powered by scripts.mit.edu. [[MediaWiki|http://www.mediawiki.org/]] is used.

* Connect from Athena via SSH:
athena% add scripts
athena% sshmic scripts
* Permission management
** Reference: http://www.mediawiki.org/wiki/Help:User_rights
One can change the default rights by editing the {{{$wgGroupPermissions}}} array in {{{LocalSettings.php}}} with the syntax
$wgGroupPermissions['group']['right'] = true /* or false */;
** Sample changes
 * Should editors be required to have a validated e-mail
 * address before being allowed to edit?

# Disable for everyone
$wgGroupPermissions['*']['edit']              = false;
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit']           = false;
# Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true;
<<tiddler YangWen>>
!! More about me
* <<slider mamSlider1 [[Research area]] 'Research Area' 'Click here to toggle the "Research focuses and interests"' >>
* <<slider mamSlider2 [[Work Experiences]] 'Work and other experiences' 'Click here to toggle the "Work and intern experiences"' >>
* Checkout my ...
**  [[Tech Blog|http://ywen-tech.blogspot.com/]] 
** [[TiddlyWiki notebook|tiddlywiki_yw.htm]] 
*** the file is about 500 KB, and may need a while to load for slow connections...
* HTML version of my [[resume|resume_yangwen_07.htm]] (looking for full-time position)

<<tiddler Education>>%/
!!!Find out more...
* [[Education]]
* [[Research interests|MyResearch]]
* [[Extracurricular activities|Hobbies]]
* <<slider myrSlider MyResearch 'My Research' 'Research interests'>>
* <<slider hobSlider Hobbies 'Hobbies' 'Extracurricular Activities'>>
C-x C-e                   (statement by statement)
M-x eval-region           (need to select region first)
M-x load-file ~/.emacs
M-x eval-buffer
* MIT Intramural Soccer B+ league Champions (2007, 2006)
* MIT Intramural Soccer B league Champions (2004)
* Refereed in CNASA Annual Badminton Tournament (2006) 
* ...
Details about [[Awards in Sports]].
This program is a utility to add path information to each OD pair of a DynaMIT's demand file and convert it into MITSIM's format. It parses the input demand_template file, which has the paths that each OD pair uses, extracts the paths, and then adds them to the another input, the current demand file, and finally saves it as the output file.

Demand template should have only one time interval. It can be created by another utility called 'demandTemplate'.

Current version build date: May 23 2006 18:50:06

         -- Yang WEN, first built on 5/23/2006
* Usage:
   addPathToDemand [demand_template_file] [current_demand_file] [output_demand_file]
* Note: 
** Default demand_template_file is demand_template.dat
** Default current_demand_file is demand_current.dat
** Default output_demand_file is demand_output.out
* Working directory: (on "T") ~/Util/AddPathToDemand/
Source: addPathToDemand.cc
Binary executable: addPathToDemand  (compiled with g++ 3.4.2)
* Example:
% ~/Util/AddPathToDemand/addPathToDemand demand_template.dat calibrated_demand_400_815.dat

demand_template_file:   demand_template.dat
current_demand_file:    calibrated_demand_400_815.dat
output_demand_file:     demand_output.out

Template file demand_template.dat closed.
662 lines parsed.
# of OD pairs: 655      # of non-redundant OD pairs: 655

Current demand file calibrated_demand_400_815.dat closed.
11853 lines parsed. 11790 demand lines found and converted.
0 unmatched OD pairs found in the current demand file.

Output file demand_output.out closed.

       === Done ===
Besides what have been described in the thesis of Daniel Florian, there is one more catch in the link travel time table. The number of periods (usually in minutes) in the linktime file should have 30 more minutes than the simulation interval of DynaMIT (usually specified in dtaparam.dat). 

For example, if DynaMIT runs for 60 minutes, say 4:00-5:00, then linktime input of MITSIM (e.g., linktime_basic.dat) should have data for 90 (=60+30) minutes. In particular, the "number of columns/periods" in header part should be 90. 
0 %4:00 start time
90 % NUM_OF_PERIODS is substituted by the number of periods in the simulation
60 % seconds per period
Then MITSIM should be able to simulate from 4:00 to 5:00. However, if we want to make use of the last guidance generated by DynaMIT (for 5:00-5:45, just before DynaMIT finishes), we should add 15 more minutes to the linktime input table of MITSIM, i.e., NUM_OF_PERIODS=105. Then the last guidance will be accepted by MITSIM before 5:05 (o/w MITSIM will pause to wait). 
Lots of programs in the Unix/Linux tend to follow the philosophy of "do one thing, do it well", and they are often designed to work together to do complicated jobs. Therefore, if we know what tools are available out there, we can break down the tasks into a few steps and use the most suitable tool for each of them. Usually, finding a right tool for the work in hand might well worth the time, if (that's a big if) you can easily find one and learn to use it quickly.

Some tools we use almost everyday: ls, cd, cp, mv, rm, pwd, find, grep, alias, locate, history, ... I am familiar with their common usage, at least for the basic ones. For those advanced cases, I know where to look for help quickly.

Of course there are also powerful tools in my arsenal, such as Sed, Awk, and Emacs. I can do a lot of things with them. But there is still times when some of the following (small) tools come in handy. Unfortunately, since they are not used as often, I tend to forget their usage and need to dig into the details of manual pages, which is less desirable. So I'll try to give some typical examples of how they can be used.

* tr - translate or delete characters
** Example: convert a back-slash to a slash.
$ tr  [\\\\] [/]   # this works in bash
\\some\path\       # enter the paths you want to translate
//some/path/       # this line is the output
* cut - remove sections from each line of files
** Example: pickup the 4th column of a file
cut -d " " -f 4 packets_count.txt
** Useful options: 
*** {{{-d, --delimiter=DELIM}}}  use DELIM instead of TAB for field delimiter
*** {{{-f, --fields=LIST}}} output  only these fields;  also print any line that contains no delimiter character, unless the -s option is specified.
*** {{{-b, --bytes=LIST}}} output only these bytes
*** {{{-c, --characters=LIST}}} output only these characters
* paste - merge lines of files
* wc - display a count of lines, words  and  characters  in  a file
* sort - sort lines of text files
* uniq - report or filter out repeated lines in a file
* tac - concatenate and print files in reverse

!!! Useful links
* http://www.linuxguide.it/linux_commands_line_en.htm
(To be continued)
(Updated 3/5/2008. See below)

DynaMIT generates the output of runtimeSupply.log file if dtaProfile is defined at its compilation. This file logs the time (in seconds) of each major functions executed in the function of {{{dtaSupply::simulateTraffic(...)}}}. For each run of this function, there is only one corresponding entry of {{{setLastTimeInfoReceived}}}. There could be multiple entries for others, however. Here is the first few lines excerpted:
setLastTimeInfoReceived 0
initializeNetwork 0
updateTraffic 0
advanceTraffic 0.34
reportTraffic 0.01
updateTraffic 0
updateGuidanceTableByDensity 0
advanceTraffic 0.78
reportTraffic 0.02

In order to calculate the total time spent on one single run of supply simulation, we need to aggregate the second column between two consecutive {{{setLastTimeInfoReceived}}}. Here is a awk script to do this job:
# script name: supply_time.awk
function test(str)
 if ( num >= 1 )
 if ( str == "setLastTimeInfoReceived" )
 print "No. " num " = " x;
 num += 1;
 x += $2;
 num = 1;
 x = $2;
END { print "No. " num " = " x;}
We can then run {{{awk -f supply_time.awk runtimeSupply.log}}} to get the result.

* Notes: (from comments for {{{void RunTime::start_time()}}}
> The value returned by clock() is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution. Because of this, the value returned will wrap around after accumulating only 2147 seconds of CPU time (about 36 minutes).

!! New updates during Feb 2008
* A more generic version: 
** summarize_runtime.awk
# example: "awk -v keyword=XXX -F "\t" -f summarize_runtime.awk temp/runtime_domain_0.log
function test()
    s += $2;
    if ($1 ~ keyword)
        print $0;
        t += $2;
        m += 1;
        if( $2 >v ) v=$2;
    if ( $2 > u ) u = $2;
END { print "total: ", s, "  max: ",u, "\tmatched: ", t, " (", m, "times)\tmatched max: ", v; }
** summarize_runtime.sh
if [ $# != 2 ]; then
    echo "This utility summarize how many rows match the input keyword in the DynaMIT runtime log file and add the time up."
    echo "It takes 2 parameters."
    echo "Usage: $0 [keyword] [filename]"
    awk -v keyword="$1" -F "\t" -f ~/bin/summarize_runtime.awk $2
This has been an annoying problem. When some of the remote X clients start, other X windows will be destroyed. For example, if I run Matlab-DynaMIT, when estimateOD starts, my original Emacs window will be screwed up. 

Solution: in X-Win32 Configuration, "Window" tab, check "Disable Remote Window Manager". 
!Academic-related Awards
!!Graduate Awards
* 2003 ''Thurber Graduate Fellowship'' of MIT
* 2003 Graduate with the Honor of ''Outstanding Graduate of Tsinghua University'' 
** awarded to 1 or 2 graduates in each department for overall achievement
* 2001 Tsinghua Scholarship of Outstanding Graduate
!!Underraduate Awards
* 2000 Awarded privilege to enter the graduate program at Computer Science and Technology Division, Dept. of Civil Engr., Tsinghua University (Admission exam waived)
* 2000 Graduate with the Honor of ''Outstanding Student of Tsinghua University''
* 1996~1999 Tsinghua Scholarship for Outstanding Student. First Prize for 3 times, Second Prize for 1 time
* 1999 Winner of Tsinghua Material Mechanics Competition, ranked in the 2nd place
* 1998 Winner of The 5th Structure Design Competition of Tsinghua University, the 9th place
* 1998 Passed the National Examination of Computer Software, obtained Rank Certificate of Computer Software Programmer
* 1996 Tsinghua Scholarship for freshman: Ranked ''No.1 in the National College Entrance Examination of China'' (among about 80 thousand students in Guangdong Province)
<<slider ahsSlider AwardsAtHighSchool 'More' 'Awards obtained during high school' >>
!Honors ...
* 2008~2009, MIT Intramural Soccer (A league) Champions: The Unbelievables
* 2007~2008, MIT Intramural Soccer (B+ league) Champions: The Unbelievables
* 2006~2007, MIT Intramural Soccer (B+ league) Champions: The Unbelievables  ([[See results|MIT IM Soccer 2006 Results]])
* 2004~2005, MIT Intramural Soccer (B+ league) Runners-up: [[The Unbelievables|http://web.mit.edu/tang/www/sports/socceru04/]]
* 2003~2004, MIT Intramural Soccer (B league) Champions: [[Tang-Soccer|http://web.mit.edu/tang/www/sports/soccer03/]]
* 1999-2000, Tsinghua University Football (Soccer, Group B) Championship Winner, Team of Dept. of Civil Engineering
* 2002, Champion and record-holder of Jianzi (a Chinese shuttlecock-kicking game) of Tsinghua University 
** (I forgot the final score, but it was about 200 kicks in 2 minutes)
!!Awarded when I was at Zhixin High School
* 1996 Zhixin Scholarship of Outstanding Student. Ranked 1st in the National College Entrance Examination of China (among about 80 thousand students in Guangdong Province)
* 1996 Awarded privilege to enter Tsinghua University, Zhongshan University, South China University of Tech., and Shantou University, all with Admission Exam waived
* 1995 Winner of ''National Olympic Mathematics Competition'' (National Mathematics Olympiad) of high-school students, First Prize
* 1995 Winner of National Olympic Physics Competition (National Physics Olympiad) of high-school students, Second prize
* 1994 Winner of National Olympic Mathematics Competition (National Mathematics Olympiad) of high-school students, Third Prize
* 1990~1994 Winner of some inter-city competitions, on Mathematics, Chemistry and Computer Programming, separately, altogether 7 times
* list the status
* Ban IP
* Ban
* Save settings to file. (Settings are lost after reboot.)
* Restore settings.  
# /sbin/iptables -L             
# /sbin/iptables -I RH-Firewall-1-INPUT 1 -s -j DROP
# /sbin/iptables -I INPUT 1 -s -j REJECT
# /sbin/iptables-save > ~/iptables-script
# /sbin/iptables-restore iptables-script
Task: change ''['' and '']'' to ''_'', and remove all '':''. 
Example: From {{{simSensorFlows[08:25:00,08:30:00]261.dat}}} to {{{simSensorFlows_082500-083000_261.dat}}}

* Do it in Emacs dired mode
* Comments:
# toggle marks to mark all files in current dir
# Regexp Rename
# Search pattern
# Replace pattern
Suppose functor //any_counter// has a member function //count()//, the following two segments of code are not equivalent.

int i = std::for_each( C.begin(), C.end(), any_counter() ).count();
any_counter counter;
std::for_each( C.begin(), C.end(), counter );
int i=counter.count();
The second one would not work as //for_each// accepts its arguments by value!
!!!Old News
<<listTags Blog modified '*' limit:15 reverse>>
The Correspondence of Thomas Carlyle and Ralph Waldo Emerson (1803-1882)

Thomas Carlyle (December 4, 1795 - February 5, 1881) was a Scottish essayist, satirist, and historian, whose work was hugely influential during the Victorian era. 

Ralph Waldo Emerson (May 25, 1803 – April 27, 1882) was a famous American author, poet, and philosopher. He was born in Boston, Massachusetts.

Works by Thomas Carlyle: 
* Sartor Resartus (1832) 
* The French Revolution, A History (1837)
| Agenda 2005 |c
|>|>|>|>|>|>| !January |!|>|>|>|>|>|>| !February |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |!|>|!| 1 | 2 | 3 | 4 |bgcolor(#DEDEAD): 5 |
|bgcolor(#DEDEAD): 2 | 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |!|bgcolor(#DEDEAD): 6 | 7 | 8 | 9 | 10 | 11 |bgcolor(#DEDEAD): 12 |
|bgcolor(#DEDEAD): 9 | 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |!|bgcolor(#DEDEAD): 13 | 14 | 15 | 16 | 17 | 18 |bgcolor(#DEDEAD): 19 |
|bgcolor(#DEDEAD): 16 | 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |!|bgcolor(#DEDEAD): 20 | 21 | 22 | 23 | 24 | 25 |bgcolor(#DEDEAD): 26 |
|bgcolor(#DEDEAD): 23 | 24 | 25 | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |!|bgcolor(#DEDEAD): 27 | 28 |>|>|>|>|!|
|bgcolor(#DEDEAD): 30 | 31 |>|>|>|>|!|!|>|>|>|>|>|>|>|!|
|>|>|>|>|>|>| !March |!|>|>|>|>|>|>| !April |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|!| 1 | 2 | 3 | 4 |bgcolor(#DEDEAD): 5 |!|>|>|>|>|!| 1 |bgcolor(#DEDEAD): 2 |
|bgcolor(#DEDEAD): 6 | 7 | 8 | 9 | 10 | 11 |bgcolor(#DEDEAD): 12 |!|bgcolor(#DEDEAD): 3 | 4 | 5 | 6 | 7 | 8 |bgcolor(#DEDEAD): 9 |
|bgcolor(#DEDEAD): 13 | 14 | 15 | 16 | 17 | 18 |bgcolor(#DEDEAD): 19 |!|bgcolor(#DEDEAD): 10 | 11 | 12 | 13 | 14 | 15 |bgcolor(#DEDEAD): 16 |
|bgcolor(#DEDEAD): 20 | 21 | 22 | 23 | 24 | 25 |bgcolor(#DEDEAD): 26 |!|bgcolor(#DEDEAD): 17 | 18 | 19 | 20 | 21 | 22 |bgcolor(#DEDEAD): 23 |
|bgcolor(#DEDEAD): 27 | 28 | 29 | 30 | 31 |>|!|!|bgcolor(#DEDEAD): 24 | 25 | 26 | 27 | 28 | 29 |bgcolor(#DEDEAD): 30 |
|>|>|>|>|>|>| !May |!|>|>|>|>|>|>| !June |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|bgcolor(#DEDEAD): 1 | 2 | 3 | 4 | 5 | 6 |bgcolor(#DEDEAD): 7 |!|>|>|!| 1 | 2 | 3 |bgcolor(#DEDEAD): 4 |
|bgcolor(#DEDEAD): 8 | 9 | 10 | 11 | 12 | 13 |bgcolor(#DEDEAD): 14 |!|bgcolor(#DEDEAD): 5 | 6 | 7 | 8 | 9 | 10 |bgcolor(#DEDEAD): 11 |
|bgcolor(#DEDEAD): 15 | 16 | 17 | 18 | 19 | 20 |bgcolor(#DEDEAD): 21 |!|bgcolor(#DEDEAD): 12 | 13 | 14 | 15 | 16 | 17 |bgcolor(#DEDEAD): 18 |
|bgcolor(#DEDEAD): 22 | 23 | 24 | 25 | 26 | 27 |bgcolor(#DEDEAD): 28 |!|bgcolor(#DEDEAD): 19 | 20 | 21 | 22 | 23 | 24 |bgcolor(#DEDEAD): 25 |
|bgcolor(#DEDEAD): 29 | 30 | 31 |>|>|>|!|!|bgcolor(#DEDEAD): 26 | 27 | 28 | 29 | 30 |>|!|
|>|>|>|>|>|>| !July |!|>|>|>|>|>|>| !August |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|>|>|!| 1 |bgcolor(#DEDEAD): 2 |!|!| 1 | 2 | 3 | 4 | 5 |bgcolor(#DEDEAD): 6 |
|bgcolor(#DEDEAD): 3 | @@color(#FDBD20):4@@ | 5 | 6 | 7 | 8 |bgcolor(#DEDEAD): 9 |!|bgcolor(#DEDEAD): 7 | 8 | 9 | 10 | 11 | 12 |bgcolor(#DEDEAD): 13 |
|bgcolor(#DEDEAD): 10 | 11 | 12 | 13 | 14 | 15 |bgcolor(#DEDEAD): 16 |!|bgcolor(#DEDEAD): 14 | 15 | 16 | 17 | 18 | 19 |bgcolor(#DEDEAD): 20 |
|bgcolor(#DEDEAD): 17 | 18 | 19 | 20 | 21 | 22 |bgcolor(#DEDEAD): 23 |!|bgcolor(#DEDEAD): 21 | 22 | 23 | 24 | 25 | 26 |bgcolor(#DEDEAD): 27 |
|bgcolor(#DEDEAD): 24 | 25 | 26 | 27 | 28 | 29 |bgcolor(#DEDEAD): 30 |!|bgcolor(#DEDEAD): 28 | 29 | 30 | 31 |>|>|!|
|bgcolor(#DEDEAD): 31 |>|>|>|>|>|!|!|>|>|>|>|>|>|>|!|
|>|>|>|>|>|>| !September |!|>|>|>|>|>|>| !October |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |!|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |
|bgcolor(#DEDEAD): 4 | 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |!|bgcolor(#DEDEAD): 2 | 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |
|bgcolor(#DEDEAD): 11 | 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |!|bgcolor(#DEDEAD): 9 | 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |
|bgcolor(#DEDEAD): 18 | 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |!|bgcolor(#DEDEAD): 16 | 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |
|bgcolor(#DEDEAD): 25 | 26 | 27 | 28 | 29 | 30 |!|!|bgcolor(#DEDEAD): 23 | 24 | 25 | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |
|>|>|>|>|>|>|!|!|bgcolor(#DEDEAD): 30 | 31 |>|>|>|>|!|
|>|>|>|>|>|>| !November |!|>|>|>|>|>|>| !December |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|!| 1 | 2 | 3 | 4 |bgcolor(#DEDEAD): 5 |!|>|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |
|bgcolor(#DEDEAD): 6 | 7 | 8 | 9 | 10 | 11 |bgcolor(#DEDEAD): 12 |!|bgcolor(#DEDEAD): 4 | 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |
|bgcolor(#DEDEAD): 13 | 14 | 15 | 16 | 17 | 18 |bgcolor(#DEDEAD): 19 |!|bgcolor(#DEDEAD): 11 | 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |
|bgcolor(#DEDEAD): 20 | 21 | 22 | 23 | 24 | 25 |bgcolor(#DEDEAD): 26 |!|bgcolor(#DEDEAD): 18 | 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |
|bgcolor(#DEDEAD): 27 | 28 | 29 | 30 |>|>|!|!|bgcolor(#DEDEAD): @@color(#FDBD20):25@@ | 26 | 27 | 28 | 29 | 30 |bgcolor(#DEDEAD): 31 |
| Agenda 2006 |c
|>|>|>|>|>|>| !January |!|>|>|>|>|>|>| !February |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|bgcolor(#DEDEAD): 1 | 2 | 3 | 4 | 5 | 6 |bgcolor(#DEDEAD): 7 |!|>|>|!| 1 | 2 | 3 |bgcolor(#DEDEAD): 4 |
|bgcolor(#DEDEAD): 8 | 9 | 10 | 11 | 12 | 13 |bgcolor(#DEDEAD): 14 |!|bgcolor(#DEDEAD): 5 | 6 | 7 | 8 | 9 | 10 |bgcolor(#DEDEAD): 11 |
|bgcolor(#DEDEAD): 15 | 16 | 17 | 18 | 19 | 20 |bgcolor(#DEDEAD): 21 |!|bgcolor(#DEDEAD): 12 | 13 | 14 | 15 | 16 | 17 |bgcolor(#DEDEAD): 18 |
|bgcolor(#DEDEAD): 22 | 23 | 24 | 25 | 26 | 27 |bgcolor(#DEDEAD): 28 |!|bgcolor(#DEDEAD): 19 | 20 | 21 | 22 | 23 | 24 |bgcolor(#DEDEAD): 25 |
|bgcolor(#DEDEAD): 29 | 30 | 31 |>|>|>|!|!|bgcolor(#DEDEAD): 26 | 27 | 28 |>|>|>|!|
|>|>|>|>|>|>| !March |!|>|>|>|>|>|>| !April |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|!| 1 | 2 | 3 |bgcolor(#DEDEAD): 4 |!|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |
|bgcolor(#DEDEAD): 5 | 6 | 7 | 8 | 9 | 10 |bgcolor(#DEDEAD): 11 |!|bgcolor(#DEDEAD): 2 | 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |
|bgcolor(#DEDEAD): 12 | 13 | 14 | 15 | 16 | 17 |bgcolor(#DEDEAD): 18 |!|bgcolor(#DEDEAD): 9 | 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |
|bgcolor(#DEDEAD): 19 | 20 | 21 | 22 | 23 | 24 |bgcolor(#DEDEAD): 25 |!|bgcolor(#DEDEAD): 16 | 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |
|bgcolor(#DEDEAD): 26 | 27 | 28 | 29 | 30 | 31 |!|!|bgcolor(#DEDEAD): 23 | 24 | 25 | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |
|>|>|>|>|>|>|!|!|bgcolor(#DEDEAD): 30 |>|>|>|>|>|!|
|>|>|>|>|>|>| !May |!|>|>|>|>|>|>| !June |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|!| 1 | 2 | 3 | 4 | 5 |bgcolor(#DEDEAD): 6 |!|>|>|>|!| 1 | 2 |bgcolor(#DEDEAD): 3 |
|bgcolor(#DEDEAD): 7 | 8 | 9 | 10 | 11 | 12 |bgcolor(#DEDEAD): 13 |!|bgcolor(#DEDEAD): 4 | 5 | 6 | 7 | 8 | 9 |bgcolor(#DEDEAD): 10 |
|bgcolor(#DEDEAD): 14 | 15 | 16 | 17 | 18 | 19 |bgcolor(#DEDEAD): 20 |!|bgcolor(#DEDEAD): 11 | 12 | 13 | 14 | 15 | 16 |bgcolor(#DEDEAD): 17 |
|bgcolor(#DEDEAD): 21 | 22 | 23 | 24 | 25 | 26 |bgcolor(#DEDEAD): 27 |!|bgcolor(#DEDEAD): 18 | 19 | 20 | 21 | 22 | 23 |bgcolor(#DEDEAD): 24 |
|bgcolor(#DEDEAD): 28 | 29 | 30 | 31 |>|>|!|!|bgcolor(#DEDEAD): 25 | 26 | 27 | 28 | 29 | 30 |!|
|>|>|>|>|>|>| !July |!|>|>|>|>|>|>| !August |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|>|>|>|!|bgcolor(#DEDEAD): 1 |!|>|!| 1 | 2 | 3 | 4 |bgcolor(#DEDEAD): 5 |
|bgcolor(#DEDEAD): 2 | 3 | 4 | 5 | 6 | 7 |bgcolor(#DEDEAD): 8 |!|bgcolor(#DEDEAD): 6 | 7 | 8 | 9 | 10 | 11 |bgcolor(#DEDEAD): 12 |
|bgcolor(#DEDEAD): 9 | 10 | 11 | 12 | 13 | 14 |bgcolor(#DEDEAD): 15 |!|bgcolor(#DEDEAD): 13 | 14 | 15 | 16 | 17 | 18 |bgcolor(#DEDEAD): 19 |
|bgcolor(#DEDEAD): 16 | 17 | 18 | 19 | 20 | 21 |bgcolor(#DEDEAD): 22 |!|bgcolor(#DEDEAD): 20 | 21 | 22 | 23 | 24 | 25 |bgcolor(#DEDEAD): 26 |
|bgcolor(#DEDEAD): 23 | 24 | 25 | 26 | 27 | 28 |bgcolor(#DEDEAD): 29 |!|bgcolor(#DEDEAD): 27 | 28 | 29 | 30 | 31 |>|!|
|bgcolor(#DEDEAD): 30 | 31 |>|>|>|>|!|!|>|>|>|>|>|>|>|!|
|>|>|>|>|>|>| !September |!|>|>|>|>|>|>| !October |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|>|>|!| 1 |bgcolor(#DEDEAD): 2 |!|bgcolor(#DEDEAD): 1 | 2 | 3 | 4 | 5 | 6 |bgcolor(#DEDEAD): 7 |
|bgcolor(#DEDEAD): 3 | 4 | 5 | 6 | 7 | 8 |bgcolor(#DEDEAD): 9 |!|bgcolor(#DEDEAD): 8 | 9 | 10 | 11 | 12 | 13 |bgcolor(#DEDEAD): 14 |
|bgcolor(#DEDEAD): 10 | 11 | 12 | 13 | 14 | 15 |bgcolor(#DEDEAD): 16 |!|bgcolor(#DEDEAD): 15 | 16 | 17 | 18 | 19 | 20 |bgcolor(#DEDEAD): 21 |
|bgcolor(#DEDEAD): 17 | 18 | 19 | 20 | 21 | 22 |bgcolor(#DEDEAD): 23 |!|bgcolor(#DEDEAD): 22 | 23 | 24 | 25 | 26 | 27 |bgcolor(#DEDEAD): 28 |
|bgcolor(#DEDEAD): 24 | 25 | 26 | 27 | 28 | 29 |bgcolor(#DEDEAD): 30 |!|bgcolor(#DEDEAD): 29 | 30 | 31 |>|>|>|!|
|>|>|>|>|>|>| !November |!|>|>|>|>|>|>| !December |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |!| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|>|>|!| 1 | 2 | 3 |bgcolor(#DEDEAD): 4 |!|>|>|>|>|!| 1 |bgcolor(#DEDEAD): 2 |
|bgcolor(#DEDEAD): 5 | 6 | 7 | 8 | 9 | 10 |bgcolor(#DEDEAD): 11 |!|bgcolor(#DEDEAD): 3 | 4 | 5 | 6 | 7 | 8 |bgcolor(#DEDEAD): 9 |
|bgcolor(#DEDEAD): 12 | 13 | 14 | 15 | 16 | 17 |bgcolor(#DEDEAD): 18 |!|bgcolor(#DEDEAD): 10 | 11 | 12 | 13 | 14 | 15 |bgcolor(#DEDEAD): 16 |
|bgcolor(#DEDEAD): 19 | 20 | 21 | 22 | 23 | 24 |bgcolor(#DEDEAD): 25 |!|bgcolor(#DEDEAD): 17 | 18 | 19 | 20 | 21 | 22 |bgcolor(#DEDEAD): 23 |
|bgcolor(#DEDEAD): 26 | 27 | 28 | 29 | 30 |>|!|!|bgcolor(#DEDEAD): 24 | 25 | 26 | 27 | 28 | 29 |bgcolor(#DEDEAD): 30 |
|>|>|>|>|>|>|!|!|bgcolor(#DEDEAD): 31 |>|>|>|>|>|!|
wxWidgets provides an easy-to-use API for writing GUI applications on multiple platforms (e.g., Windows/Unix/Mac). It is an open source C++ GUI framework, a product that has been used since 1992. Cross-platform GUI programming in C++,

* http://www.wxwidgets.org/
* http://wiki.wxwidgets.org/
* http://wxwidgets.org/docs.htm
* http://www.anthemion.co.uk/dialogblocks/
* http://www.codeproject.com/library/wxwidgets.asp
Modify {{{dvipdfmx.cfg}}} at {{{C:\CTeX\localtexmf\dvipdfm\config}}}, for my {{{MikTeX}}} on Windows. 
(Note that there is another copy {{{dvipdfmx.cfg}}} at {{{C:\CTeX\texmf\dvipdfm\config}}}.)

In ''about:config'', right click, new -> string, "general.useragent.override", add whatever you need, e.g.,
Googlebot/2.1 (+http://www.google.com/bot.html)
For more details, visit http://en.wikipedia.org/wiki/User_agent
Official description is available at the [[MIT-Portugal Transportation Research - Intelligent Transportation Systems (ITS)|http://www.mitportugal.org/trans/transportation-systems-research/intelligent-transportation-systems.html#citymotion]] web page.

CityMotion is a research project in the [[MIT-Portugal Program|http://www.mitportugal.org/index.php]]. It started in 2007. The participants include faculty members and PhD students from three Portugal universities (IST, FCTUC, and FEUP) as well as MIT. For the MIT side, the major participants are researches at the [[ITS Lab|http://its.mit.edu]] and the [[SENSEable City Lab|http://senseable.mit.edu]].

This project will focus on the development of a knowledge infrastructure, computational models, and user applications that allow access to real-time information about the state of transportation-related resources as well as predictions regarding their future state. While the overall system developed under this project is intended to function as a whole, it includes several different modules: 

# A computational infrastructure that is based on a Geographical Information System for acquiring and parsing data that describe the state of transportation-related resources (e.g. bus and train locations, cell phone traces, road sensors, GPS tracking, weather, emergency events, and census data); 
# Data fusion engine that combines the data to extract from it additional information including predictions; 
#	A web-based service that enables different applications to access the data collected.
#	A multi-modal, multi criteria route planning application that would exemplify the capabilities of the data fusion engine and providing support to the travelling decisions of the public. The application includes a nomadic user interface that allows interaction with the route-planning application. 
#	A geographical modeling and visualization module of city dynamics. This service provides models and visualizations of city scenarios relevant both for planners and services. 

The overall objectives are:

* //Data acquisition//: obtain and parse data that describe the state of transportation-related resources in a specific Portuguese city (to be defined), building a coherent spatial framework for data fusion.
* //Data fusion//: integrate the acquired data so that software applications can access specifically relevant data without prior knowledge of the data source or type, and in order to obtain additional information from the data such as predictions. 
* //Services//: a pilot service that exemplifies the usage potential of the data collected and of the data fusion engine providing a service to citizens for making public transportation more efficient and pleasant to use, and providing support for policy making; a geographical modeling and visualization module that will use the information produced by  the data fusion engine. 
Many nodes in the current NY network are nevered used. I don't know why they are there, but it might be a good idea to remove them and see the impact. Log of unused nodes from {{{xmitsim}}} screen output:
Error:: No link connected to node <11222>.
Error:: No link connected to node <11305>.
Error:: No link connected to node <11364>.

We have 1421 unused nodes that need to remove from the network file, which has 2246 nodes altogether. Sample:
[Nodes] : 2246
{ # {NodeID Type "Name"}
  {3858 1 "Node-3858"}
  {11222 2 "Node-11222"}
  {11305 0 "Node-11305"}
  #... many more ...

* Use regex to replace {{{Error:: No link connected to node <11222>.}}} into {{{  { 11222 9 "Node-11222"} }}}. As we don't know in advance the node type, use 9 here as a dummy value. Save the output as {{{unused_nodes_sub.log}}}.
* Extract the nodes data (2246 lines) from the network file, add a space between "{" and the node ID. Save the output as {{{ all_nodes_sub.log}}}.
* Sort the union of two files, using the second and third column as keys, and use "-r" to make sure entries from the {{{unused_nodes_sub.log}}} comes before their corresponding lines from the {{{ all_nodes_sub.log}}}. (Alternatively, we can use the "stable" option and put {{{unused_nodes_sub.log}}} as the first file. The output looks like
  { 11221 1 "Node-11221"}
  { 11222 9 "Node-11222"}
  { 11222 2 "Node-11222"}
  { 11257 1 "Node-11257"}
  { 11278 1 "Node-11278"}
* Remove any two consecutive lines if they have the same node ID

''Notes:'' The first two steps can be easily done in Emacs. The last two steps can be done using the following commands:
cat all_nodes_sub.log unused_nodes_sub.log | sort --key=2n,3n -r > union1
awk '($2 != xx) { print $0; xx=$2; }' union1 > temp1
awk '($3 != 9) { print $0; }' temp1 > output1

Then we can replace the node section of our original network file with content of file {{{output1}}}.
!View or Edit System Tiddlers
<<listTags systemTiddlers>>
!Check System Config
<<tag systemConfig>>
set visible-stats on
set bell-style visible

# Ignore case while completing
set completion-ignore-case on
# Make Bash 8bit clean
set meta-flag on
set convert-meta off
set output-meta on

# Use M-p M-n to search history, same as in tcsh

# "\e" is what the "ESC" key looks like to readline
"\ep": history-search-backward
"\en": history-search-forward
There might be many ways to do this in Linux (e.g., iconv). For windows, we can use ~MultiByteToWideChar:
int MultiByteToWideChar(
 UINT CodePage, // code page
 DWORD dwFlags, // character-type options
 LPCSTR lpMultiByteStr, // string to map
 int cbMultiByte, // number of bytes in string
 LPWSTR lpWideCharStr, // wide-character buffer
 int cchWideChar // size of buffer
An example: 
 // found is an iterator to a map<string, string>
 string value = found->second;
 const int MAX_WCHAR_LEN = 300;
 WCHAR *tmpWchar = new WCHAR[MAX_WCHAR_LEN] ;

 //utf8 to unicode, use -1 to indicate the correct length
 value.c_str(), -1, tmpWchar, MAX_WCHAR_LEN);
 this->listBox.InsertString(count, tmpWchar);
 delete tmpWchar;
I chose "Use Unicode Character Set" for project properties, and it worked.
|''Description:''|Support for cryptographic functions|
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};

//-- Crypto functions and associated conversion routines

// Crypto "namespace"
function Crypto() {}

// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
	var be = Array();
	var len = Math.floor(str.length/4);
	var i, j;
	for(i=0, j=0; i<len; i++, j+=4) {
		be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
	while (j<str.length) {
		be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
	return be;

// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
	var str = "";
	for(var i=0;i<be.length*32;i+=8)
		str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
	return str;

// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
	var hex = "0123456789ABCDEF";
	var str = "";
	for(var i=0;i<be.length*4;i++)
		str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
	return str;

// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
	return Crypto.be32sToHex(Crypto.sha1Str(str));

// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
	return Crypto.sha1(Crypto.strToBe32s(str),str.length);

// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
	// Add 32-bit integers, wrapping at 32 bits
	add32 = function(a,b)
		var lsw = (a&0xFFFF)+(b&0xFFFF);
		var msw = (a>>16)+(b>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	// Add five 32-bit integers, wrapping at 32 bits
	add32x5 = function(a,b,c,d,e)
		var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
		var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	// Bitwise rotate left a 32-bit integer by 1 bit
	rol32 = function(n)
		return (n>>>31)|(n<<1);

	var len = blen*8;
	// Append padding so length in bits is 448 mod 512
	x[len>>5] |= 0x80 << (24-len%32);
	// Append length
	x[((len+64>>9)<<4)+15] = len;
	var w = Array(80);

	var k1 = 0x5A827999;
	var k2 = 0x6ED9EBA1;
	var k3 = 0x8F1BBCDC;
	var k4 = 0xCA62C1D6;

	var h0 = 0x67452301;
	var h1 = 0xEFCDAB89;
	var h2 = 0x98BADCFE;
	var h3 = 0x10325476;
	var h4 = 0xC3D2E1F0;

	for(var i=0;i<x.length;i+=16) {
		var j,t;
		var a = h0;
		var b = h1;
		var c = h2;
		var d = h3;
		var e = h4;
		for(j = 0;j<16;j++) {
			w[j] = x[i+j];
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		for(j=16;j<20;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		for(j=20;j<40;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		for(j=40;j<60;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		for(j=60;j<80;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;

		h0 = add32(h0,a);
		h1 = add32(h1,b);
		h2 = add32(h2,c);
		h3 = add32(h3,d);
		h4 = add32(h4,e);
	return Array(h0,h1,h2,h3,h4);

|''Description:''|Support for deprecated functions removed from core|
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};

//-- Deprecated code

// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)

// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
	var lookaheadRegExp = new RegExp(this.lookahead,"mg");
	lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = lookaheadRegExp.exec(w.source);
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var text = lookaheadMatch[1];
			text = text.replace(/\n/g,"\r");
		w.nextMatch = lookaheadRegExp.lastIndex;

// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)

// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
	var i = this.indexOf(item);
	return i == -1 ? null : i;

// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
	return store.getLoader().internalizeTiddler(store,this,title,divRef);

// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
	return store.getSaver().externalizeTiddler(store,this);

// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
	return store.allTiddlersAsHtml();

// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)

// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)

// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)

// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;

// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");

I put an equation "//f(i,x)=P(i|x) f(x)//" in a slide and convert it to PDF. On windows it looks like the "|", which is a vertical line (and, the desired result); but on Linux it is slant (similar to "/").  

Not sure why, but maybe it depends on how the fonts are rendered.
For security reason, this is usually desirable. It's simple: modify {{{/etc/ssh/sshd_config}}} (tested on Redhat).  (Q: need to restart sshd to take effect?)
#PermitRootLogin yes
PermitRootLogin no

# Disable protocol 1
#Protocol 2,1
Protocol 2
!! Required files
!!! User-definable file-names
* dtaparam.dat
** Main input parameter file (details to be continued...)
** Determines the names and locations of some other input files, e.g.
InputDirectory  = "./"
OutputDirectory  =  "./output"
TmpDirectory  =  "./temp"
NetworkFile   = "best_dynamit.dat"
SupplyParamFile = "supplyparam.dat"
HistODFile    = "demand.dat"
HistTTFile    = "eqbm_linktime.dat"
SocioEcoFile  = "socioEco_0000_2400_all_WO_IV_M.dat"
BehParamFile  = "BehavioralParameters.dat"
IncidentFile  = "no_incident.dat"
//MitsimOdFile   = "demand.dat"
MitsimSensorsFile = "sensor.dat"
EquilibriumTTOutputFile = "eq_tt.out"
// PredefinedCoefFile (optional)
** Note: {{{MitsimOdFile}}} is no longer used.  Only {{{HistODFile}}} is relevant for demand file, although both are often set to the same values.

* SupplyParamFile (usually named as "supplyparam.dat")
** This files contains segment-specific input data for free flow speed, jam density, and speed-density parameters alpha and beta. The structure of the file is illustrated in the sample file below:
# Segments: // listed in increasing order
# {SegmentID freeFlowSpeed jamDensity alpha beta SegmentCapacity Vmin Kmin}
# freeFlowSpeed Units : miles/hour
# jamDensity Units : vehicles/lane-group . meter
# segmentCapacity Units : vehices/lane-group . second
# Vmin : miles/hour
# Kmin : vehicles/meter/lane
{ 0 37.28 0.15 3.733 1.907 0.5 5 0.012 }
{ 1 55  0.227 3.813 0.788  1.265 10  0.0163 }
** ''Question: is it per lane-group or per lane?''

* IncidentFile (usually named as "incident.dat", but the default name is "dtaIncident.dat")
** This file specifies the duration and severity of incidents. Each line in the file describes a single incident. Each incident is characterized by the ID (userID) of the affected segment, incident start time and end time (measured in seconds from midnight) and a capacity reduction factor.
** "Capacity Reduction" in the incident file is used to multiply lane groups (or segments) output capacity.  So this number should be considered as ''ratio of the remained capacity over the original one''
** When the incidents ends (i.e., the simulation clock reaches the end time of the incident), the capacity will be restored to the original value, and users need not do anything.
** Incidents are currently assumed to be located at the end of segments.
# All incidents must be written inside a pair of curly brackets "{ }"
# If several pairs of "{ }" brackets are presented, only the LAST one will be used.

# The first incident below starts at 6 AM and ends at 6:15 AM, 
# with capacity of segment 3 reduced to 40% 

# SegmentUserID  StartTime EndTime CapacityRatio (incident/normal)
3  21600  22500   0.4
4  18900  19832   0.3  # Segment 3, 5:15:00 AM - 5:30:32 AM, reduced to 30% 
# Comment styple: # or //, or /*...*/

!!! Currently hardcoded file-names
* varcov.dat
** Weights for sensors and OD pairs.  Technically it is the main diagonal of the inverse of the variance-covariance matrix.  In practice it is often obtained from calibration or empirical results.
** Each entry is a floating point number.  Altogether there are {{{nSensors + nODs}}} (number of sensors + number of OD pairs) entries (separated by blank spaces, TAB or '\n', etc.).  Sensor first, then OD.   Entries for sensors are ordered by appearance in network file, while those for ODs are ordered by appearance in demand file.

* fmatrix.dat
** Auto-regressive degree and coefficients for demand prediction.

!! Optional input files
* {{{__pathTopology.dat}}}
** Stores path topology.  DynaMIT will create this file if it is not presented.  If the network file is changed or modified,  it is usually necessary to let DynaMIT regenerate this file (by deleting it before running).  Creating this file is time-consuming, however.

* {{{__hovPaths.dat}}}

* vms.dat ?
* hov.dat

* dtaTripTravelTimeODs.dat

See also [[Dive into DynaMIT's output files]]
* networkID.lis
** Shows internal, system, and user ID for each node, link, and segment.
** Also shows the loader ID for each node (if it is a loader).
** For DynaMIT only. Not available in DynaMIT_P.
* od.lis
** Shows the user ID of Orig, Dest, and the OD pair ID.
* tmpNetwork.log
## Link user ID and internal ID; all segments in the link (user ID, internal ID, capacity); all lane-groups in the sgement (user ID, internal ID); all lanes in the lane-group (user ID, internal ID).
## For each segment, shows its user ID, internal ID, system ID, and parent link system ID.
## For each lane-group, shows user ID, internal ID, system ID, parent segment system ID, and capacity.
## For each lane, shows user ID, internal ID, system ID, number of next links, parent lane-group user ID, and parent lane-group system ID.
## For each sensor, shows user ID, internal ID, system ID, and parent segment system ID.
## For each node, shows user ID, internal ID, system ID, and signal type.
* connectivity.out
** For each OD pair, shows origin and destination (user ID) first, then for each downstream link of the origin, shows the number of paths to the destination (along with the link user ID). Also output the total number of paths for the current OD pair.
** If there is any OD pair that has no paths, show it at the end.
** For DynaMIT only. Not available in DynaMIT_P.
* path.out
** For each packet (in updating behavior), output the path (a sequence of links).

See also [[Dive into DynaMIT's input files]].
Because TiddlyWiki is a single HTML file, you've actually already downloaded the entire software just by viewing this site. If you want to be able to SaveChanges, you can save your own blank TiddlyWiki to your local drive by right clicking on [[this link|empty.html]] for my current version, or on [[here|http://www.tiddlywiki.com/empty.html]] for the latest version, and selecting 'Save link as...' or 'Save target as...'. You can choose where to save the file, and what to call it (but keep the .HTML extension).

Do ''not'' use the File/Save command in your browser to save TiddlyWiki, because of SaveUnpredictabilities.

Upgrade procedures can be found at http://www.tiddlywiki.com#HowToUpgrade
Don't forget to ''Unblock'' the script (NTFS only) once it is download, before trying to save changes.
-- ''Dy''namic ''N''etwork ''A''ssignment for ''M''anagement of ''I''nformation to ''T''ravelers

Quoting [[ITS Website|http://web.mit.edu/its/dynamit.html]]:

> DynaMIT is a state-of-the-art real-time computer system designed to effectively support the operation of an Advanced Traveler Information System (ATIS) and an Advanced Traffic Management Systems (ATMS) at a Traffic Management Center (TMC). Sponsored by the Federal Highway Administration (FHWA) with Oak Ridge National Laboratories (ORNL) as the program manager, DynaMIT was the result of several years of intense research and development at the Intelligent Transportation Systems Program, Massachusetts Institute of Technology.

In short, DynaMIT is a real-time traffic estimation and prediction system based on dynamic traffic assignment (DTA). Compared with other prediction systems that rely on statistical techniques, DTA based approach offers the advantage of being able to model driver behavior and response to guidance.
!! ~DynaMIT-R and ~DynaMIT-P
* DynaMIT-R and DynaMIT-P refer to the "real-time" version and "planning" version of DynaMIT, respectively.

!! ~DynaMITmpi
* This is (for now) the unofficial name for my parallel version of DynaMIT, using MPI for parallel processing. Initial evaluation of this version shows good results and is used as a prototype to prove the concept of Scalable Dynamic Traffic Assignment.
!! ~DynaMIT-E
* This refers to a general framework we developed for using DynaMIT to evaluate emergency evacuation plans. Details available in the TRB paper Balakrishna, Wen, Antoniou, and Ben-Akiva (2008). To be published on TRR.

!! Miscellaneous
* DynaMIT has been evaluated in several places in the US, including Irvine, CA, Hampton Roads, VA, [[Los Angeles, CA|DynaMIT at LA]], and [[Lower Westchester County, NY|http://maps.google.com/staticmap?center=41.012345,-73.750000&zoom=11&size=450x480&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=ABQIAAAABNKWrI_TvxNiBnyiHpL07BRsJji6Mdgnm2pkbtcvjpxdjPlvfhQTkTnKw_tI5AAazIZcLp4Lt8N71w]]. 
* I have a vague impression that DynaMIT has also been applied in Europe (Southampton, UK), Asia (Korea, Japan, and Malaysia),  and Africa (South Africa).  I need to confirm this with Rama and Costantinos, though.
* A [[flash demo|http://web.mit.edu/wenyang/www/DynaMIT_LA_new3.htm]] I made some time ago (2006?)
* [[Gif animation of xdta|DynaMIT and MITSIM Animations]], the "prehistoric" GUI for DynaMIT.
(Last updated: 2/1/2006)

* Use demo's account
# Login as {{{demo}}}
** Optional: {{{source .aliases.YW}}}
# {{{cd ~/TRBdemo/temp/irvineCP/input}}}
** Hint: The path is stored at {{{~/dynamit_demo_dir}}}.
# Open a new terminal, e.g., {{{xterm&}}}
# In the orginal one, run {{{./DynaMIT dtaparam.dat}}}
# Wait until the parse of socio-eco file finishes.
# In the new terminal, run {{{./startXdta.sh}}}, which will set the XENVIRONMENT and call {{{./xdta -f xdta.ini &}}}.

* LA demo (New!)
# Login as {{{demo}}}
# {{{cd ~/LAdemo}}}
# Open a new terminal, e.g., {{{xterm&}}}
# In the orginal one, run {{{./startDynaMIT.sh}}}
# Wait until the parse of socio-eco file finishes.
# In the new terminal, run {{{./startXdta.sh}}}, which will set the XENVIRONMENT and call {{{./xdta -f xdta.ini &}}}.

* Use costas's account
# Login as {{{costas}}} (or su...)
# {{{cd /home/costas/TRBdemo/temp/irvineCP/input}}}
# {{{export DISPLAY=haydn208:0}}}
# Open a new terminal, e.g., {{{xterm&}}}, and type {{{xhost +}}}
# Close the new terminal. Back to the original one, open a new one... {{{xterm&}}}
# In the orginal one, run {{{./DynaMIT dtaparam.dat}}}
# Wait until the parse of socio-eco file finishes.
# In the new terminal, run {{{./xdta -f xdta.ini &}}}
* DynaMIT: the downtown Los Angeles network.
[img[LA network in DynaMIT GUI (xdta)|http://web.mit.edu/wenyang/www/pics/DynaMITdemo.gif]]
* MITSIMLab: the Boston CA/T ("big-dig" project) network
[img[The CA/T ("big-dig") project in MITSIM GUI (xmitsim)|http://web.mit.edu/wenyang/www/pics/MITSIM_CAT.gif]]
!! Background
An on-line evaluation of DynaMIT was done in South Park area of downtown Los Angeles (Sep 2005 ~ Jan 2006).  In this case study, DynaMIT-R used both off-line (historical) and on-line (surveillance) data to estimate the state of the network (every 5 minutes) and predict the future travel time (up to 30 minutes ahead). 
!! Network
The network is shown [[here|http://web.mit.edu/wenyang/www/pics/LAmap4.jpg]] (from [[Google Maps|http://maps.google.com/maps?hl=en&ie=UTF8&om=1&z=14&ll=34.037796,-118.27486&spn=0.032291,0.086517&iwloc=A]])  in case you cannot see the below map (powered by [[Google Static Maps API|http://code.google.com/apis/maps/documentation/staticmaps/]]):
[img[The LA network|http://maps.google.com/staticmap?center=34.038934,-118.269024&zoom=14&size=512x512&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=ABQIAAAABNKWrI_TvxNiBnyiHpL07BRsJji6Mdgnm2pkbtcvjpxdjPlvfhQTkTnKw_tI5AAazIZcLp4Lt8N71w]]
* Characteristics for the South Park area
** Freeways
** Signalized arterials
** Staples Center, etc.
* Network attributes
** 243 nodes 
** 606 links 
** 1129 OD pairs
** 203 sensors
** ~80,000 vehicles (in 30-minute horizon)
!! Demo
A flash demo is available [[here|http://web.mit.edu/wenyang/www/DynaMIT_LA_new3.htm]].
(You may need an [[Adobe Flash Player|http://www.adobe.com/products/flashplayer]] to see this demo.)
!! Screenshot
A screenshot of the xdta (DynaMIT GUI) is shown below:
[img[LA network in DynaMIT GUI (xdta)|http://web.mit.edu/wenyang/www/pics/sc.png]]
* Animation 
** Displaying minute-by-minute predicted density for 5:15 ~ 5:45 AM, based on information available at 5:15 AM.
[img[LA network in DynaMIT GUI (xdta)|http://web.mit.edu/wenyang/www/pics/DynaMITdemo.gif]]

It refers to the real-time version of DynaMIT. (In contrast, the planning version of DynaMIT is usually referred to as DynaMIT-P.)

See [[DynaMIT at LA]] for its recent application in downtown Los Angeles.
* Test and validate domain-based parallel simulation
* Fine-tune parallel performance
* Find more machines to complete the case studies
* Finish thesis
* Use real-time travel-time data for OD estimation and/or model calibration.

!! Done
* Write code to generate input graph file from DynaMIT network
* Partition DynaMIT network
* Off-line partition training
* Adaptive load balancing
!! Not implemented because we now have better designs
!!! Display partition directly in jRNE
* --Convert sub-graph back to DynaMIT representation--
!!! Use dual representation to maintain consistency across boundaries
* --Choose segment in link as cutting point (add if necessary)--
* --Add pseudo-segment (shadow?) at cutting point from other domain--
!!! Sequential not necessary now
* --Convert global sequential simulation to domain-based sequential --
* --Test and validate domain-based sequential simulation--
* --Convert domain-based sequential simulation to parallel simulation--
!! Low priority
* Discuss and fix problems in supply simulation?
* Sparse AM output (makeMatlabFile for AM?)
** Need to give dimension for spase AM

This site has (hopefully) almost everything you need to know...

Other resources:

* [[Electronic Mail on Athena -- IMAP|http://web.mit.edu/olh/Email/index.html]]
* [[Spam Screening at MIT|http://web.mit.edu/ist/services/email/nospam/index.html]]
* [[Checking Your E-mail Quota|https://nic.mit.edu/postoffice/quota]] (Need [[MIT Personal Certificates|http://web.mit.edu/is/help/cert/]]) 
* [[Finding Out Your Post Office Server|http://web.mit.edu/ist/topics/email/query.html]]
* [[Mailing Lists|http://web.mit.edu/ist/services/email/mailinglists.html]]
* [[MIT Athena Moira list management web interface|https://ca.mit.edu/moira/index.jhtml]] (Need [[MIT Personal Certificates|http://web.mit.edu/is/help/cert/]]) 
* [[mailman.mit.edu Mailing Lists|http://mailman.mit.edu/mailman/listinfo/]]
* 06/2005 - Present, Massachusetts Institute of Technology, Cambridge, MA
** Ph. D candidate of CEE Systems Program. See [[My Research]] for details.
** Dissertation Topic: Scalability of Dynamic Traffic Assignment.
** Cumulative GPA: 5.0/5.0
** Relevant Courses: System Optimization, Software Engineering, Computer Algorithms in System Engineering, Advanced Demand Modeling, Discrete Choice Analysis, Modeling & Simulation, Database and Systems Integration Technologies, Web System Architecting, Microeconomics, Finance Theory, Operations Research, Transportation Economics
*** Details at [[List of courses|http://spreadsheets.google.com/pub?key=pInHVrxI0_hdN3dqkDo0LEw]]
* 08/2003 - 06/2005, Massachusetts Institute of Technology, Cambridge, MA
** Graduate student in Dept. of CEE. Major in Information Technology 
** Since 2005, IT program and the Transportation program have merged into a new doctoral program, the //Civil and Environmental Engineering Systems// program
* 09/2000 - 07/2003, Tsinghua University, Beijing, China
** M.S. in Civil Engineering. Major in Structure Engineering (Computer Science & Technology Division)
* 09/1996 – 07/2000, Tsinghua University, Beijing, China
** B.S. in Civil Engineering. Major in Structure Engineering
* tcsh
# Can be used in .cshrc
#set prompt = "\n%h<%M>%d %%"
#set prompt = "\n%h<%n@%m> %c %%"
# Previously used
set prompt="\n%B%{\033[31m%}%h<%n@%m %c %%%{\033[0m%}%b"
# Currently in used (two-line mode with full paths): 
set prompt="\n%B%{\033[32m%} %n@%m %{\033[33m%}%/\n%{\033[31m%}%h %%%{\033[0m%}%b"
* bash
# written in .bashrc
# PS1='[\u@\h \w]\$'
PS1="\[\033[1;31m\][\u@\h \W]\\$ \[\033[0m\]"
A very handy (and free!) tool to search and open files on Windows. The author is cygwin@newSMTH.  It is somewhat similar to the "locate" utility for Linux.  Unlike those desktop search software (such as GDS), this tool indices the file names only, not the contents. Although it is less powerful,  the advantage is huge: it uses much less resource and runs much faster.  With a good file/directory naming convention, it can quickly find what I want almost immediately. 

The new version is more customizable and more user-friendly (see below for the change log).  More details about this tool can be found at http://www.newsmth.net/bbscon.php?bid=99&id=853498
+ tool tip to see long names.
* only 2 chars is needed for a background search when typing.
! fixed a problem: the folders can't be end with a backslash in exclude list.

+ win98 support
+ multi selection support
+ multi selection context menu support
+ multi selection drag&drop support
* improve full path search speed.
* database format changed!
* rename executable file

Edited by Rusty Russell, Daniel Quinlan, Christopher Yeoh

This standard consists of a set of requirements and guidelines for file and directory placement under UNIX-like operating systems. 
[img[Get Firefox - The Browser, Reloaded.|http://sfx-images.mozilla.org/affiliates/Buttons/80x15/white_1.gif][http://www.spreadfirefox.com/?q=affiliates&id=160117&t=82]]
I have been thinking of making a list of recommended software for sometime. The plan is to summarize the name, license, category (what is it used for), availability (where to download), rating (level of satisfaction), and maybe a few more comments, etc.

I have realized it might take a long time to do this. So I would rather write a short piece each day. Anyway, here is a preliminary list.
* What are the differences between Free Software (FS), Open Source Software (OSS), and other (not that) similar concepts.

!!Frequently used...
* Hoekey. Define hotkeys. Free but not FS, not OSS. Small and handy. Green (use ini file only). 
* FileFinder (previously named as "Run.exe"). File name searching utility similar to "Locate" in Linux. Free but not FS, not OSS. Small. Green. Create a snapshot file.
* PuTTY. SSH and Telnet client. MIT licence (BSD). 
* Process Explorer.
* Emacs

!!Often ...
* [[7-Zip]]
* XnView. Graphics viewer (with batch editor, renamer)
* FileZilla. FTP, SFTP client.
* MyIE2.
* STerm.
* Notepad2
* PDFCreator

!! Occasionally ...
* Media Player Classic
* MPlayer
* TTplayer
* pdftk. PDF Toolkit. FS (GPL). Green (single file). http://www.pdfhacks.com/pdftk/

To be continue...
* Quoting from http://zh.wikipedia.org/wiki/GB_18030
> 全称为国家标准GB 18030-2000《信息交换用汉字编码字符集基本集的扩充》,是中华人民共和国现时最新的内码字集,与GB 2312-80与GBK兼容,包含所有GB 13000-93及Unicode 3.1字符。
* See also: http://en.wikipedia.org/wiki/GB18030
* Quoting from http://zh.wikipedia.org/wiki/GB_2312
> GB 2312或GB 2312-80是一个简体中文字符集的中国国家标准,全称为《信息交换用汉字编码字符集·基本集》
> 对于人名、古汉语等方面出现的罕用字,GB 2312不能处理,这导致了后来GBK及GB 18030汉字字符集的出现。
* See also: http://en.wikipedia.org/wiki/GB2312
* Bring up the network configuration GUI
sudo bash
* Remove machine name; choose DHCP
* Deactivate, and then Activate
* Use {{{/sbin/ifconfig}}} to check: an internal IP is obtained: 10.58.0.xxx
* Open browser, visit http://web.mit.edu
* Website redirected to registration page
* Enter information ...  (https://nic.mit.edu:444/bin/dynareg)

The article "The skew.org XML Tutorial" by Mike J Brown does a great job covering the encoding issue of XML. See http://skew.org/xml/tutorial/

Some basic concepts:

>//Grapheme// is an unit, expressed as some kind of mark, that conveys basic information essential to the language. Graphemes are __abstract__ concepts; the actual marks you see are //allographs//, or //glyphs//.
config.options.chkHttpReadOnly = true;
!Extracurricular Activities
* Sports
** Soccer (a.k.a. Football all over the world except America... Prefer playing as Mid-fielder) 
** Badminton
** [[JianZi|http://en.wikipedia.org/wiki/Jianzi]] (One of the traditional Chinese sports. I do not know how it is officially translated...maybe a Shuttlecock-kicking game?)
* Others
** Photographing 
** Music (Prefer classic, but like popular as well)
** Programming (Coding is fun)
** New software testing (Enjoy learning new ways to do my job better!)
* More than FUN: See [[prizes I won in sports|Awards in Sports]] <<smiley :-)>>

!! Recent activities
* Our Unbelievables won 4:3 in penalty kick in the IM Soccer A League 2008~2009 Finals on 12/13/2008, claiming championship title at first attempt
* Our Unbelievables won 4:2 in the IM Soccer B+ League 2007~2008 Finals on 5/17/2008, claiming championship title for the second straight season
* Weekly soccer practice
* Camping in Acadia National Park (9/8/2007)
* Cycling on the Golden Gate Bridge (6/26/2007)
* Paintball in [[Windham, NH|http://www.canobiepaintball.com]]
* Referee in CNASA CUP/MITCAST 2006 3rd Annual Badminton Tournament (9/3/2006)
* Kayaking at Essex River (8/13/2006)
The maintainance of DynaMIT is becoming more and more difficult, as this project become larger and larger, and has more and more people involved. The following parts in the [[Boost Library|http://www.boost.org]] may well fit into the development of DynaMIT, making it easier to maintain and, hopefully, more robust and efficient.

| ! Lib in Boost | ! Use in DynaMIT |
| Program_options |Configuration file management|
| Date_time |Time and Intervals|
| Conversion |cast between types|
| Serialization |File parsing, parameters analysis|
| Filesystem |File access|
| Random |Random numbers, distributions|
| Graph |Path topology|
| ~MultiArray |Use instead of "vector of vector"|
| Smart_ptr |Resource management|
| Timer |Real-time managment|

* Björn Karlsson, //Beyond the C++ Standard Library: An Introduction to Boost//, Upper Saddle River, NJ : Addison-Wesley, c2006. ~QA76.73.C153.K36 2005.
''Note'': This topic were originally posted on my tech blog during May 2005. It has been slightly modified to address the changes ever since. 
Using a utility named as ''REDISTMAIL'', it is possbile to re-sent emails in mit.edu mail box to another mail address, while keeping (hopefully) most mail header information unchanged. This is useful because the following:
* The MIT email quota is a little bit small for those who don't want to clean up their mails regularly. (It had been 250M for a while, and was increased to 512M this summer.) 
* We can use Gmail or whatever email accounts to backup and manage our email...

The following are the steps I used to send all the mails in a folder of my MIT mail to Gmail.

* ''WARNING'': Make sure you know what you are doing BEFORE trying anything. Read the referenced article (see below) first. 
(Assume '%' is the command prompt in Athena, and characters in ''bold'' face are the commands you have to input.) 
# % ''pine'' (followed by ENTER, of course...) 
# In pine interface, goto {{{Folder-Collection <OLD Mail MH> }}}
# Press ''A'' to add a new sub-folder, e.g., //Badminton// 
# Enter a folder you want to backup, in {{{Folder-Collection <MIT Mail>}}}, say //Badminton_mit//
# Press "'';''" and then ''A'' to select all mails (You might have to enable this command in pine SETUP) 
# Press ''A'' and then ''S'' to apply "SAVE" command to all the selected mails 
# Press //down-arrow// to switch folder to {{{<OLD Mail MH>}}}, and type //Badminton//, then press ENTER. Now all the messages in current folder (//Badminton_mit//) have been copied to the {{{<OLD Mail MH>.Badminton}}}, and by default these messages are also marked as "deleted" with a 'D'. 
# (Optional) If you don't want to delete all these messages, press ''A'' and then ''*'' to apply "FLAG" command, and then press //down-arrow// three times to select the "Deleted" entry, and press ''X'' twice to unmark all the delete-flags. 
# Quit pine. 
# Check the directory: {{{~/Mail/Badminton}}}, your mails should be there (files named as consecutive numbers). 
# % ''add consult'' (if you have not yet done so) 
# % ''redistmail xxxx@gmail.com /mit/your_athena_username/Mail/Badminton/''
It will pause appropriately when sending so as not to flood the mail hubs. So be patient if you have a long list of mails to send...
* ''redistmail'' is available at the "consult" locker. Its actual location is 
** There is another script in the same directory named as "redistmail-imap", which might possibly do similar thing for IMAP folders. Not tested, though.
* In [[pine|http://web.mit.edu/olh/Email/email.html#pine]], you can create ''mh folders''. 
* To forward future mails, use [[chpobox|http://web.mit.edu/olh/Email/email.html#forwarding]].
Reference (Provided by MIT IS&T Stock Answers): http://web.mit.edu/answers/mail/mail_redistmail.html
The "redistmail" program is designed to forward the contents of a single mail folder to the given address. This uses the mh "dist" command, so the headers will not be modified; a single Resent-To: line will be added. 
 athena% add consult
 athena% redistmail address@wherever.net foldername
Give the foldername as you would specify it to mh mail; i.e. inbox, or /var/tmp/mymail.
Flags: -h will display this help message.
 -n will cause redistmail to tell you what it would do, but not
 actually send any mail.
The redistmail process will use appropriate pauses when sending so as not to flood the mail hubs; please do not attempt to circumvent these pauses, lest the postmasters become cranky. 
Note that this only works with ''mh folders'', not RMAIL files or Netscape mail files or any other format. 
Last updated: 10/25/99
For the case of handling DynaMIT issues at LADOT, we need to transfer files via a dialup connection which supports only telnet. No SSH, no FTP. The only option we are aware of is to use Zmodem Protocol. HyperTerminal is the client we use.

Assume the connection has been set up.
To upload, choose "Transfer->Send File...", pick the file, use "Zmodem with Crash Recovery", and then press the "Send" button. 

To download, choose "Transfer->Receive File...", pick a local folder to hold the file, and again use "Zmodem with Crash Recovery". The tricky part is that we should now choose the "''Close''" button instead of the "Receive" button, otherwise we there is no way we can specify the target file name. Once we click the "Close" button, we can type the following in HyperTerminal:
sz -e filename
Now the transfer should start. The "-e" option tells the Zmodem program to "escape all control characters", which is said to be "absolutely necessary for a reliable file transfer". I had tried "sz filename", however, and it seemed to work as well.

If SSH is available, we can use //scp// or //sftp//. Lots of tools can do this. On Windows I will use //pscp// (a utility provided by PuTTY), or FileZilla.
For RedHat, SuSE and Debian:
The [[Protecting Content|http://web.mit.edu/ist/web/reference/web-resources/https.html]] page by MIT IS&T has almost everything you need to know.

* In the restricted directory, create an //.htaccess.mit// file listing the group(s) or list of people who should have access. For example, to allow all MIT certificate holders:
<limit GET>
require valid-user
* Change the access control listing to only allow access to people in the //.htaccess.mit// file. There is a script called //mitwebacls// you may use to change your access control listings automatically. 
## //cd// to the directory you wish to restrict 
## Type: 
add cwis 
mitwebacls . 
isoinfo -f -i  filename.iso 
* ''Note'': Articles in this topic were originally posted on my [[tech blog|http://blogs.mit.edu/wenyang]] during ''September 2004''. Things might have changed, and I will try to keep it up-to-date. 
!(1) Foreword
MIT provides for its community a powerful computing environment: Athena.

As a non-native speaker of English, sometimes I still feel it necessary to use Chinese characters -- to read mails (and reply), to surf the internet with a browser (or hang around the BBS), or to take notes -- when I use Athena.

Unfortunately, most Athena workstations, which use either Red Hat Linux or Sun OS (Solaris), have (by default) poor support for the use of Chinese characters. None of them provides a easy-to-use tool to setup an environment that enables the display and input of Chinese words.

As I myself am a novice of Linux, it is not easy for me to have a deep insight of this problem. Therefore I began to search a solution from the internet. I found a few potential tricks, then I tried them. Some of them work! Here is a brief summary:

* Most Athena workstations have a built-in Chinese font which has a limited supports of the GB2312 character set. Some programs (e.g. Mozilla) can make use of this font. But GB2312 is somewhat outdated, since many commonly used characters are missing in this national standard, which was firstly accepted in the year of 1980. 
* "The one editor", [[GNU Emacs|http://www.gnu.org/software/emacs/emacs.html]] with MULE (Multilingual Environment) can be config to provide a primitive (but good enough!) way to view and input Chinese characters. 
* By installing new fonts and do some configurations, we will be able to use the GBK (or even [[GB18030|http://en.wikipedia.org/wiki/GB18030]]) character set, both in console and in X environment. 
* We can install a Chinese input method for Linux, such as [[Fcitx|http://www.fcitx.org]], which works as good as, if not better than, the UNISPY (Zi Guang Pin Yin, 紫光拼音) in MS Windows.

!(2) Settings for Emacs to Display Chinese Characters
* ''Note'': GNU Emacs has several branches, corresponding to different versions. It is said that the unicode branch (version 22 or 23, not sure) can display Chinese characters without all these setting, as long as proper fonts are available. The version (currently 21.4) default to Athena, however, still need some configuration as described here. The setting I used was initially tested on version 21.3.
Usually, if you modify your Emacs config file (i.e., {{{~/.emacs}}} or {{{~/.emacs.el}}}) properly, you will be able to display the GB2312 character set, provided that your workstation has at least one Chinese font available. (If you are to check whether the system has provided Chinese fonts or not, try {{{fc-list}}} or {{{xfontsel}}}.)

The following Elisp commands will, at least in most cases, enable the display of Chinese characters (assuming GNU Emacs version 21.x is used):
(set-terminal-coding-system 'chinese-iso-8bit)
(set-keyboard-coding-system 'chinese-iso-8bit)
(set-language-environment 'Chinese-GB)
(setq locale-coding-system 'chinese-iso-8bit)
(setq current-language-environment "Chinese-GB")

If your system has fonts that support GBK or GB18030, you may think of using a package called "chinese-gbk" to let Emacs support GBK fonts. If so, instead of setting to language environment to {{{Chinese-GB}}}, you would probably need to set it to Chinese-gbk, by adding the following commands in your {{{.emacs}}} file:
(load "chinese-gbk") ; need to download and install corresponding elisp files
(set-keyboard-coding-system 'chinese-gbk)
(set-selection-coding-system 'chinese-gbk)
(set-keyboard-coding-system 'chinese-gbk)
(set-language-environment 'chinese-gbk)
(setq locale-coding-system 'chinese-gbk)
(setq current-language-environment "Chinese-GBK")
After changing {{{.emacs}}} file, you would need to let Emacs re-evaluate the settings to make it take effect. Either runs the command {{{eval-current-buffer}}} for your {{{.emacs}}} file, or close/kill your current Emacs and then run it again.

Try to open a text file with Chinese characters. If, instead of displaying the Chinese fonts properly, you see a bunch of "boxes", this means either your system does not have an Chinese font available, or your Emacs cannot find a proper fontset to display the characters. Try to specify a useful fontset for your Emacs. For example, in the Linux version of Athena, if {{{SimSun}}}(a true-type Simplified Chinese font) and {{{Ming}}} (a true-type Traditional Chinese font) are available, you can use:
(if (not (member '("-*-tahoma-normal-r-*-*-16-*-*-*-c-*-fontset-gbk"
 . "fontset-gbk") fontset-alias-alist))
 chinese-big5-1:-*-Ming(for ISO10646)-*-*-*-*-16-160-*-*-*-*-big5*-*,
 chinese-big5-2:-*-Ming(for ISO10646)-*-*-*-*-16-*-*-*-*-*-big5*-*" t)

(setq default-frame-alist
 '((font . "fontset-gbk"))
Here {{{"-*-tahoma-normal-r-*-*-16-*-*-*-c-*-fontset-gbk"}}} is just an arbitrary name for the fontset in question. 
For the X fonts information, check the [[Using X FONTS|http://web.mit.edu/answers/xwindows/xwindows_fonts.html]] from Athena Stock Answers. Some basic concepts are introduced here:
Most fonts have a really long 14-field name in the form:
(The backslash at the end of the first line means that the whole font name is actually one line, even though it can't be typed that way here.) Note that a hyphen, '-', is used as a field delimiter. In most cases only a subset of the fields should ever be specified explicitly, with the remaining fields wildcarded (e.g., using an asterisk, *). 

When you specify a font name you need include only the minimum information that is crucial to the application. You are not required to specify a font-specification fully -- you can leave off later hyphens and matching wildcards (just make sure the fields you include are in the correct position in the list). For example, the following two specifications identify fonts acceptably (the first identifies a 12pt Helvetica, the second a 14pt Courier Bold Oblique):
This general form is recommended:
To actually see different fonts and be able to tailor them, use the utility called "xfontsel". type:
xfontsel &
It is possible to preview a font by typing:
xfd -fn fontname &
For more information, type any or all of the following at the athena% prompt:
man xlsfonts
man xfontsel
man xfd
* Notes: 
** For more information about the various fields in X font names, see the [[X Font Name Fields|http://web.mit.edu/answers/xwindows/xwindows_font_fields.html]] stock answer.
** For setting Chinese environment for Linux, try to search some public forums e.g. [[linuxforum|http://www.linuxforum.net/forum/gpostlist.php?Cat=&Board=chinese]]
!(3) Settings for Emacs to Input Chinese Characters
Once your Emacs can display Chinese characters correctly, you can try to use the MULE (Multilingual Environment) for Emacs to input Chinese characters in Emacs. It can be done in two simple steps:
# Set languange environment to Chinese (GB or GBK). 
** Use menu: {{{Options->MULE->Set Language Environment->Chinese->Chinese-GB}}}
** Note: If you haven't set coding system correctly in your {{{.emacs}}} file, you might need to set it manually at this time.
# Toggle input method to a Chinese input method. (You can find it in the MULE menu, too.)

Alternatively, to make these two steps easier, you can write a elisp function in your {{{.emacs}}} file, and bind it to a hotkey, e.g., {{{Control-Space}}}.
(defun my-chinese-mode ()
 (set-language-environment 'Chinese-GB)
 ; or (set-language-environment 'Chinese-GBK)
 (set-input-method 'chinese-py-punct)
(global-set-key (kbd "C-SPC") 'my-chinese-mode)
Then when you press {{{Ctrl-Space}}} in your Emacs, it will switch to Chinese input method.

Note: You would probably feel the {{{chinese-py-punct}}} input method is quite naive, if you, like me, have been used to some "advanced" input methods such as Ziguang Pinyin. Anyway, it provides a simple way to input most frequently used Chinese characters, without installing other software in your system.
!!Other use of Emacs (BBS client, etc.)
Emacs has a built-in terminal-emulator, in which you can telnet to remote servers that support ANSI colors. "M-x ansi-term" will start a terminal-emulator in a new buffer. This is particularly useful and convenient, if you ever want to connect to a BBS in your Emacs. Of course you have to make sure your Emacs can display Chinese characters properly before you connect to a Chinese BBS site. If you want many ~BBS-specific features (such as anti-idle), however, you might turn to some "professional" telnet clients. AFAIK, [[Qterm|http://sourceforge.net/projects/qterm]] (http://qterm.sourceforge.net) is a good choice under Linux.

For more setting about Emacs, you might want to try the following resources (many other useful documents can be found online, try google!):
* [[SMTH BBS|http://smth.org]] [[Emacs board|http://emacs.board.newsmth.net/]]
* Emacs manual (press "C-h i" in your Emacs or type "info emacs" in your shell) 
* [[Athena online help for Emacs|http://web.mit.edu/olh/Emacs/index.html]]
* [[Emacs Wiki|http://www.emacswiki.org/]]
!(4) Install TrueType Fonts
If you have TrueType Chinese fonts, you can install them in Athena. Then you will be able to use them in your [[GNOME|http://www.gnome.org/]] desktop, or other [[X Window system|http://www.xfree86.org/]].

* Part of the method mentioned here comes from Athena online help consultant, while others come from various sources of internet. 
* This method might work with the Linux version of Athena only. Sun Solaris workstations usually have different settings.

Linux has several mechanisms to utilize TrueType fonts. Depending on how and where you want to use those fonts, you will need to do some or all of the following steps.

* First of all, of course, find some Chinese fonts. e.g., {{{SimSun.ttf}}}. 
** Unfortunately, sometimes even this turns out to be difficult, since we do not have a "official" Simplified Chinese font that is free to all. (Nonetheless, there is still hope. Check this out: [[文泉驿|http://wqy.sourceforge.net/]])
** The government of Hong Kong SAR, on the contrary, provides a version of Ming (for ISO 10646) Traditional Chinese font for free download. You can find it here, if the link is still valid. 
* If you're using them in [[gtk2|http://www.gtk.org/]] applications you only need to dump those fonts in {{{~/.fonts}}} as {{{GNOME2}}} uses {{{fontconfig}}} to deal with fonts. Changes take effect immediately. 
** One thing left to ensure: {{{~/.fonts}}} should be world-readable. To check, type
fs la ~/.fonts/ |grep anyuser
** In the output, if you find (and you would, probably): {{{system:anyuser l}}}, it means only the "list" permission is granted. You need to do:
fs sa ~/.fonts system:anyuser read
** You may execute {{{fs la ~/.fonts/ |grep anyuser}}} again to check the result. This time you should get:
system:anyuser rl
* To install these fonts for all applications, things are a bit more complicated. After doing the above settings, we need to do the following in your terminal: 
cd ~/.fonts
ttmkfdir -o fonts.dir
cp fonts.dir fonts.scale (or make a symbolic link)
** In some cases, we might need to modify the {{{fonts.dir}}} and {{{fonts.scale}}} manually. Under such circumstance, remember to __modify the number in the first line of fonts.dir to match the total number of records__.
** For {{{SimSun.ttf}}}, the {{{fonts.dir}}} created by {{{ttmkfdir}}} has a few lines that start with ":1:" (for {{{NSimsun}}}). They are prone to crashes. Remove those lines. 
** Another example for changing {{{fonts.dir}}} is listed as follows.
*** To use bold/italic SimSun fonts, add the following (32 lines total, so remember to modify the numbers in the first line of {{{fonts.dir}}}):
simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0
ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal-0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal-0-0-0-0-c-0-gb2312.1980-0
sw=1:bw=0.5:simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-iso8859-1
simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-gbk-0
ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal--0-0-0-0-c-0-gbk-0
simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-iso10646-1
ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-iso10646-1
ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-iso10646-1
ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-iso10646-1
ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-iso10646-1
ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-iso10646-1
ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-iso10646-1
ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal--0-0-0-0-c-0-iso10646-1
ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-iso10646-1
ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal-0-0-0-0-c-0-iso10646-1
simsun.ttf -misc-simsun-medium-r-normal-0-0-0-0-p-0-iso8859-15
*** Then we run the following:
xset fp+ ~/.fonts
xset fp rehash
** It's also a good idea to restart X environment after those settings, at least you might immediately find out whether it works or not... 
* The above effort should work for many programs, hopefully, but there are still exceptions (yes, it's not over yet). For example, for those using {{{XTT}}}, we still have to modify the {{{/etc/X11/XF86Config-4}}} or {{{/etc/X11/XF86Config}}} (depending on what the system actually uses). 
** Unfortunately, it's not always possible to do that, because on the public Athena workstations, those files are not in your locker; they are local files on the particular machine you are using. This means we need root permission to access these files. Even we know the root password (using {{{tellme root}}}) and modified those files, they are likely be changed back after we logout. To see which files and what to change, check the Linux forums, [[LinuxApp board at SMTH BBS|http://linuxapp.board.newsmth.net/]], or Google.

Having install {{{SimSun}}}, you will be able to display GBK fontset in your web browser or other program, such as [[fcitx Chinese input method|http://www.fcitx.org/]]. Emacs can also be configured to make use of GBK characters. (Find out [[how to do it|How to use Chinese characters in Athena (Part 1-3)]] here)
!(5) Install Chinese Input Method
* [[Fcitx|http://www.fcitx.org]] and [[SCIM|http://scim.freedesktop.org/]] are (what I believe) popular Chinese input methods for Linux. They are maintained actively and have been updated for several times since 2003. Therefore their features may have already been a little different from what I describe here. For latest news and detailed document, please refer to their homepage.
* You may also use online input methods, which can be used as long as you have proper fonts and do not require any installation. They are slower but convenient if you only use them occasionally.
** http://www.sevenforks.com/ime/index.html
** http://www.inputking.com/GB/index.php
** http://www.comrite.com/dict/ctoe.htm
** http://justinput.com/pinyin.htm
I did not manage to install an early version of SCIM in Athena. I have forgotten the exact reason, but I guess either it need to copy some files to a folder which I do not have write access right, or I have not configure it properly. The result was that after the installation I cannot bring up the input banner.

Then I turned to Fcitx. Through proper configuration, it can be installed to a local folder. And then by changing the language environment, I did make it run.

Installation of Fcitx is not difficult. Read the online documents for instructions on installation, download the source files, configure, compile (make), and install it to some place in your home direcotry (e.g., {{{~/fcitx}}}).

It's not suggested to use the RPM version directly, because we need root permission to install RPM.

After installing fcitx, we need to make some setting on the locale for it to run. I use the following script:
export XMODIFIERS=@im=fcitx 
fcitx & 
#exec wmaker 
#exec kde 
#exec gnome-session 
killall fcitx 
Save it as {{{cfcitx.sh}}}, add execute permission:
chmod u+x cfcitx.sh
Then we can use this script to run those programs in which we want to input Chinese characters. For example:
cfcitx gedit&
Here [[gedit|http://gedit.sourceforge.net/]] is an editor that supports UTF-8, which helps to display Chinese characters correctly.
Two summer session courses will be given by Professor Ben-Akiva through the MIT Professional Institute:
* 14.61s: Individual Choice Behavior:  Theory and Application of Discrete Choice Analysis (June 19-23, 2006)
* 1.10s: Modeling and Simulation of Transportation Networks (July 31 - August 4, 2006)

Reference: http://mit.edu/its/courseevent.html

!! Course description: 14.61s

The development of discrete choice models represents a significant advance in the analysis of individual choice behavior. Recent applications to predict changes in demand and market shares include such diverse areas as: choice of travel mode, coffee brand, telephone service, soft drinks and other foods, and choice of durables such as automobiles, air conditioners and houses. Discrete (or qualitative) choice analysis was initially developed by researchers in psychology, but has been extended to apply to choice problems in many fields. The most popular form of these analysis techniques, logit analysis, has recently received significant attention in marketing research and offers considerable promise as a new tool to guide product positioning, pricing, product concept testing, and many other areas of strategic and tactical interest.

This one-week program undertakes an in-depth study of discrete choice models and their applications. It provides participants with the practical tools necessary for applying new discrete choice techniques. By examining actual case studies of discrete choice methods students will be familiarized with problems of data collection, model formulation, testing, and forecasting and will gain hands-on application experience by applying commonly available software to estimate and test discrete choice models from real data bases. The course will emphasize applications of discrete choice methods to strategic and tactical marketing and to policy-related problems.

!! Course Description: 1.10s

Modeling and simulation methods are essential elements in the design, evaluation, and operation of transportation systems. Congestion problems in cities worldwide have prompted at all levels of government and industry a proliferation of interest in Intelligent Transportation Systems (ITS) that include advanced supply and demand management techniques. Such techniques include real-time traffic control measures, and real-time traveler information and guidance systems whose purpose is to assist travelers in making departure time, mode and route choice decisions.

Transportation researchers around the world have in recent years devoted their attention to developing models and methods for use in the design and operations of effective traffic management systems. This course draws heavily on the results of recent research and is sponsored by the Intelligent Transportation Systems Program at the Massachusetts Institute of Technology (MIT). The course instructors represent - in addition to MIT - Princeton University; Swiss Institute of Technology, Lausanne; University of Naples; University of Montreal; University of Massachusetts, Lowell; Volpe National Transportation Systems Center; University of Texas, Austin; Ohio State University; and Technical University of Crete.

The course lecturers have studied in depth all aspects of dynamic traffic management. They have developed both microscopic and mesoscopic simulation models along with dynamic simulation-assignment models with multiple user classes for ITS applications. Analytical dynamic traffic assignment models are also being developed and extensive research on computational aspects, such as shortest path computations, has been conducted. In addition, extensive research in estimation and prediction of origin to destination (O-D) flows has occurred throughout the past decade and several versions of a real-time O-D model have been developed. Travel choice models have been under development for the past two decades, with current emphasis on driver behavior in the presence of information and the use of multimedia tools for the collection of related choice data. Researchers are also addressing congestion pricing issues. Like other demand management schemes, congestion pricing and traveler information systems can be used to directly influence people's departure-time, route, mode, and destination choice, as well as their decision to travel.

Some of the products garnered from research projects at various universities and institutions are currently in a relatively mature state and can be utilized by practitioners in the field. Traffic simulation and dynamic traffic assignment techniques, for instance, have proven their usefulness both in managing traffic and in evaluating various management systems prior to bringing them on line.

This one-week program studies in depth a suite of traffic models and modeling methods and their application to designing, evaluating, and operating real-time traffic management systems. Participants learn about origin-destination estimation and prediction for real-time applications; dynamic traffic assignment methods; traffic flow models; traffic control and guidance systems; and off-line evaluation methods using traffic simulation. The program includes demonstration of existing software. Applications include both realistic and hypothetical situations.
* Obtain license file, save as {{{license.dat}}}
* Prepare installation directory and files. (login as root)
cd /opt
mkdir matlabR14  # this is the target dir for installation
cd matlabR14
mv /path/to/license.dat .  # move the license file to the install target dir
* Insert cd1
mount /media/cdrecorder/         # or other path/to/cdrom
/media/cdrecorder/install &
* Then installer starts. Then click ''OK,  Yes, OK, OK'' to confirm installation, accept license agreement, confirm matlab root dir, and confirm license file. 
* Choose what component to install. (for platform, use Linux (x86_64) or Linux (x86), according to what we are actually using.
* Check "Create symbolic links ...".
* Click "OK" to begin installation.
* Might need to switch CD
eject             # then remove CD1, insert CD2
mount /media/cdrecorder/
* When installation finished, click "Exit".

!! License Management and Trouble-shooting
* To start license manager: (Don't do this as root) 
cd /opt/matlabR14/etc
* Check screen output message, then check log file (by default, at  {{{/var/tmp/lm_TMW.log}}})
!!! Port conflict
* {{{gauss}}} uses the same license manager {{{FLEXlm}}}, so we might have some conflicts running the two license manager at the same time. The Matlab ''Installation Guide for UNIX'' has a section {{{Running MATLAB with Other FLEXlm Applications}}} (page 2-13) with detailed information. There are two ways to solve this problem: 
** Sharing a single license manager. This is what Rama has been using. Check [[License management for Matlab and Gauss at ITS Lab]] for more information.
** Run separate license managers. It looks simple, so I use this one, and it seems to work fine. The key is to use a different TCP port number on the SERVER line in each license file. For example, if gauss uses port 27000, then we can use 27003 for matlab:
SERVER hostname INTERNET=18.xx.x.xxx 27003
!!! Host ID problem
* Might encounter problems in the Host ID, if you find the following in the log file:
SERVER line says INTERNET=18.xx.x.xxx, hostid is INTERNET=
* If there is such a hostid problem, we need to edit {{{/etc/hosts}}} and add the first line (change the ip address and "hostname" to your actual values). 
** We need to have root permission to edit this hosts file.
** Actually in the second line "hostname.mit.edu   hostname" should be removed as well. 
** ''NB:'' we should check the license manager of {{{gauss}}} and see if this setting is in conflict with the requirement for {{{gauss}}}.
18.xx.x.xxx hostname.mit.edu   hostname   hostname.mit.edu   hostname   localhost.localdomain   localhost
* Re-run {{{lmstart}}} and check the log file again to make sure everything is ok now. 
** ''NB:'' the log file is APPENDED. So you always want to go to the end of the file to find the latest messages.
!! Configuration for restarting license manager at boot-time
* Log in as root
* Create links if they do not already exist; copy boot script file. (The destination could be different for different distributions of Linux. See the ''Installation Guide for UNIX'' for details.)
ln -s $MATLAB/etc/lmboot /etc/lmboot_TMW
ln -s $MATLAB/etc/lmdown /etc/lmdown_TMW
cp $MATLAB/etc/rc.lm.linux /etc/rc.d/init.d/flexlm
* Edit the copy of boot script file {{{flexlm}}}, replacing {{{username}}} with a valid user name other than root. 
* Look in {{{/etc/inittab}}} for the default run level. Found {{{id:5:initdefault:}}}.
* Create a link in the {{{rc}}} dir associated with the default run level.
cd /etc/rc.d/rc5.d/
ln -s ../init.d/flexlm S90flexlm

# ''Installation Guide for UNIX'' comes with your installation disks. But you can also find it online (by google), e.g., http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/ins_unix.pdf

!! Changing license
(updated 8/7/2008)
Each year the license need to be renewed. When new license is available, we need to update the license.dat file at the {{{etc}}} folder under your root dir for matlab, e.g., {{{/opt/matlabR14/etc}}}. Afterwards, we need to restart the license manager to activate the new license.
/etc/lmdown_TMW                  # or /etc/rc.d/rc5.d/S90flexlm stop
/etc/rc.d/rc5.d/S90flexlm start
One can check the log file (by default, {{{/var/tmp/lm_TMW.log}}}) to verify if it works.
* Create a tar file from the original machine (better be root): 
cd /opt
tar zcvf ~/gauss7.tar.gz  gauss7/
* Copy the {{{gauss7.tar.gz}}} to new machine. Extract it to {{{/opt}}}.
* Obtain the license file, put it somewhere, say {{{/opt/licenses/gauss.lic}}}
* Try to start license manager as common user (see [[here|5 September 2007: Start gauss license manager at boot time]] for how to automatically start the license manager at boot time)
cd /opt/gauss7/FLEXlm
./lmgrd -c /opt/licenses/ 
* If it complains about the host name, we might need to edit {{{/etc/hosts}}}, and use a new terminal window to test again. One example of the "hosts" file:
{{{  XXX.mit.edu XXX localhost.localdomain localhost
An object-based scripting programming language that is best known for its use in websites.
See also: 
* http://en.wikipedia.org/wiki/JavaScript
* Tutorial: http://www.w3schools.com/js/
<meta name="description" content="Wiki-based notebook of Yang Wen">
<meta name="keywords" content="Yang, Wen, wenyang, CEE, Civil, MIT, ITS Lab, Yang WEN, wenyang00, warmsun">
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Date:''|Jul 21, 2006|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|

// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};

	name: "legacyStrikeByChar",
	match: "==",
	termRegExp: /(==)/mg,
	element: "strike",
	handler: config.formatterHelpers.createElementAndWikify

} //# end of "install only once"
Researchers at UVA have been claiming that the Matlab-estimation version of DynaMIT does not work properly. They said DynaMIT will return all-zero estimation. I know there is something wrong with the way they use the matlab program, e.g., the environment is not set properly.

Today when I was asked to take a look, I found that the reason was in the input file (varcov.dat).

I also got zero output initially even though the program estimateOD actually worked fine as it should. Then I looked at the screen output and noticed something weird immediately: It said there were 229 sensors and 523 ODs, so the total number of equations should be 752. However, the varcov file in used had only 750 items. Clearly, the number of entries in varcov file was not enough! That's why the matlab script complained "Index exceeds matrix dimensions". It was so obvious, yet it obstructed them for about a month. They should have looked at the log output or at least sent it to us earlier.

It's interesting to note that in the same directory, there is a file called varcov.dat.modified, which actually has 752 items. I tried using that one, and it appeared to work perfectly.

Had I used a more restrictive input validation design, the problem might actually be easier to identify. The simplest way is to raise an exception when the input files have problems. However, in the online real-time case, having an exception and quiting DynaMIT is not that friendly, as DynaMIT is supposed to run continuously. So maybe the best way is to generate a log of "extremely important warnings" so that users can know what's wrong. For the real-time case, failure to obtain sensors counts may also be recorded in this log.
We had a situation of missing sensor output in the ''sensor.out'', and I had assumed that it's because mitsim did not output the sensor info if the sensor count was 0. That has been confirmed and fixed on 10/28/2005.

* Look into where this problem originated
** The origin of output: ~TS_Engine
TS_Engine::simulationLoop() {
 if (chosenOutput(OUTPUT_SENSOR_READINGS)) { // "_READINGS" added by Angus)
 tsNetwork->writeSensorReadings(0); //IEM(Jun15) 0 is default intervaltype
** ~TS_Network
void TS_Network::writeSensorReadings(int intervalType) {
 for (register int i = 0; i < nSensors(intervalType); i ++) {
 //IEM(Jun19) Use correct output file for this type of sensor
 sensor(intervalType, i)->write(theFileManager->osSensor(intervalType));
** sensor(intervalType, i)?
 class TS_Network : public DrawableRoadNetwork
 class DrawableRoadNetwork : public RoadNetwork
 class RoadNetwork
 vector< RN_Sensor *> sensors_;
 RN_Sensor* sensor(int i) { return sensors_[i]; }
 RN_Sensor* sensor(int intervalType, int i) { return
 sensorsOfType_[intervalType][i]; } //IEM(May2)
** ~RN_Sensor::write(...)
class RN_Sensor : public CodedObject
 virtual void write(ostream &os) { }

class DRN_Sensor : public RN_Sensor

class TC_Sensor : public DRN_Sensor
 virtual void write(ostream &os);
* Finally, fix at {{{./TC/TC_Sensor.cc}}}
 //--- commented by YW 10/28/2005 ---
 // if (!opt || count_ <= 0) return;
 //--- changed to (output even if 0 counts)
 if (!opt || count_ < 0) return;
!!! IMPORTANT: For new machines, there's a simple but effective way. It works if there is no port conflict, in which case we can start two license managers at the same time. 
* Note: For old machines, we might need to change the port section of the license file.
* For "port conflict", check out the materials in [[Installing MATLAB on Linux: step by step]].
# check previous processes, if presented, kill them
ps -ef | grep lmgrd
# Remove temp files, if any, created by previous processes
ls -alF /var/tmp
rm /var/tmp/lm_TMW.log
# start gauss license manager
/opt/gauss7/FLEXlm/lmgrd -c /opt/licenses/
# start matlab license manager
cd /opt/matlabR14/etc

!!! The following part describes how to use one single license manager for two software at the same time. It may no longer be necessary. Use the simple way (above) if possible.

* Normal location of license files: {{{/opt/licenses/*.lic}}}
* Host ID (MAC address without ":") should match
* Two header lines should be added to LIC files (change host name and ID as necessary). An example of the first two lines in {{{matlab_license.lic}}}:
SERVER "T".mit.edu 0014220bfaXX
DAEMON MLM /opt/matlabR14/etc/lm_matlab
* Make sure {{{matlab_license.lic}}} is all readable (chmod +r).
* If installing new version of matlab
** Backup original 
** Make a copy of the new license file to {{{/opt/<matlabR14>/etc}}} (where {{{<matlabR14>}}} is the target directory for installation
** Install from CD. Use {{{eject}}} to open CDROM for changing disks
* Kill all process of {{{lmgrd, atechlm, MLM, lm_matlab}}} 
** Use {{{ps -ef|grep XXX}}} to check
** {{{kill -s SIGKILL}}} to remove all active/dead processes, if necessary
* Restart lmgrd: (do not do it as root?)
** {{{/opt/<gauss>/FLEXlm/lmgrd -c <licenses_dir>}}}
** Check screen output message, and/or check log file (by default, at {{{/var/tmp/lm_TMW.log}}}).  If a previous run of lmgrd is by a different user, then we might need to clean up related files under {{{/var/tmp/}}}, because those files were created by another user and are therefore not writable by the new one.

* Reference: http://web.mit.edu/rama/www/prog.htm

Notes: If gauss and matlab are both installed, and the license manager is configured to run for matlab only (/etc/rc.d/init.d/flexlm presented), then we have to kill related processes and start {{{lmgrd}}} manually as described in the last two steps. This is true for haydn...
During today's meeting with Henry, Moshe asked us if we knew how many lines DynaMIT's source code had. I said "tens of thousands". Rama said more than that, could be "hundreds of thousands". 

Here is a shell script to calculate the total number of lines:
find . -name "*.[chy]*" -exec wc {} \; | gawk '{x += $1} END {print x}'

It's 139955 for CorbaFreeDynaMIT, or 207703, adding xdta and MatlabEstimateOD.
* AddPathToDemand
Click here to see the list of macro enabled: <<tag systemConfig>>
// listtags tagname * or # or nothing
// adding parameters to limit number of items (limit:number)
// adding parameters to reverse order (reverse)
// YW 2/2/2006: declare variables to avoid crash in Firefox

version.extensions.listTags = {major: 0, minor: 1, revision: 0};
config.macros.listTags = { text: "" };
config.macros.listTags.handler = function(place,macroName,params)
{ var limit=0;
 var reverse; 
 for(var t=0; t<params.length; t++) {
 var type = params[t].split(":")[0].toLowerCase();
 if (type == "limit")
 limit = parseInt(params[t].split(":")[1]);
 if (type == "reverse")
 reverse= true;
 reverse = false;
 var tagged = store.getTaggedTiddlers(params[0],params[1]); //Second parameter is field to sort by (eg, title, modified, modifier or text)

var string = "";
if (limit==0) limit = tagged.length; else limit=(limit>tagged.length) ? tagged.length : limit;

 if (reverse==true) {
for(var r=tagged.length-1;r>=(tagged.length-limit)&&r>=0;r--) {
 if(params[2]) string = string + params[2] + " ";
 string = string + "[[" + tagged[r].title + "]]\n";
 } else {
for(var r=0;r<limit;r++) {
 if(params[2]) string = string + params[2] + " ";
 string = string + "[[" + tagged[r].title + "]]\n";

wikify(string, place, null, null);
!! Sent on 10/31/2007
*  CEE: #1913-23xx (the last one). Remove the biggest one. Others kept. Last ID becomes 2301.
{{{2301 Oct 31 Kris Kipp                           (59K) [Cee-grads] Research Analyst/Engineering job announcement}}}
* Clean up ListAnime, Reuse, Trash as well

!! Sent on 4/16/2007
*  CEE: #1272-1912 (the last one). Remove the biggest one. Others kept. Last ID becomes 1911.
{{{1912 Apr 16 Martin N. Milkovits                (3367) CTL Distinguished Speaker Series - Friday, April 20, 2007}}}
!! Sent on 6/19/2006
*  CEE: #1334-1502 (the last one). Remove the biggest ones (at least 98K) and some others. Others kept. Last ID becomes 1271.
{{{Jun 16 Charla Rudisill                    (8306) [Cee-grads] Internship announcement}}}
* Reuse: all, deleted (not labeled).

!! Sent on 4/19/2006
* Reuse: #1-38, all, deleted (not labeled).
* INBOX: #1-108, moved to Inbox05.
(Total mails @gmail: 5042, you are currently using 362 MB (13%) of your 2716 MB.)

!! Sent on 4/17/2006
* Reuse: #1-57, all, deleted (not labeled).
* INBOX: some recent big mails. Deleted.

!! Sent on 4/12/2006
* Reuse: #1-277, all, deleted (not labeled).
* INBOX: some recent big mails. Deleted.
(Total mails @gmail: 4905, "You are currently using 355 MB (13%) of your 2713 MB".)

!! Sent on 3/31/2006
* sent-mail: some recent big mails. Deleted.
* CSSA: #92-923 (the last one). Kept. Del big mails (>10k). Last ID is 834.
{{{834 Mar 31 freeride_cssa@yahoo.com             (2600) The Freeride schedule of this weekend}}}

!! Sent on 3/22/2006 
* INBOX: #1-100, moved to Inbox05.
* sent-mail: some recent big mails. Deleted.
* Reuse: #1-276, all, deleted (not labeled).
* ListAnime: #1-10, all, deleted (not labeled)
* Badminton: #1-14, all, deleted 
* Soccer: #1-82, all, deleted
* CEE: #1183-1350 (the last one). Remove the biggest 17 ones (at least 100K). Others kept. Last ID becomes 1333.
{{{1333 Mar 22 Sheila Anderson                     (10K) [Cee-grads] tomorrow's EFM seminar}}}
* CSSA: #663-919 (the last one). Kept. Last ID is 919
{{{919 Mar 22 Dazhi Liu                           (7227) [CHN2004] Free Seminar on Immigration Laws -- Friday 6pm,     1-190...}}}

(Total mails @gmail: 4679, "You are currently using 326 MB (12%) of your 2706 MB".)

!! Sent on 1/4/2006 
* sent-mail: 10 big messages. Deleted.

!! Sent on 1/3/2006 
The quota is stll 448M, 88% of 512M. Once it reaches 90%, there will be annoying warning messages each time you open the IMAP box.
(Total mails @gmail: 3942, "You are currently using 227 MB (8%) of your 2680 MB".)
* Badminton: #1-12, delete all but the last
* Reuse: #1-6, all, deleted (not labeled)
* ListAnime: #1-3, all, deleted (not labeled)
* Soccer: #793-874, delete all.
* CEE: #1151-1215 (the last one). Remove the biggest 33 ones (at least 100K). Others kept. Last ID becomes 1182.
{{{1182 Dec 29 Cynthia Stewart (88K) [Cee-grads] Job Opportunities with MIT's Poverty Action Lab}}}
* webmail-sent: all since May 22 (only 2 new msg). Kept.
{{{28 Nov 9 To: Jie Zheng (7152) Re: from Jie}}}
* INBOX: #1-400, move most to Inbox05, delete some.
* sent-mail: #101-200. #184 failed to sent. (attachment) Kept.
* sent-mail: #477-486. Deleted.
* sent-mail: #851-869. Deleted.

!! Sent on 11/11/2005 
(Total mails @gmail: 3488)
* Soccer: #584-792, 209 altogether.
{{{792 Nov 11 Rory Monaghan (3587) Re: One more chance....}}}
* ListAnime: #1-29, all, deleted (not labeled)
* Badminton: #1-53, delete all but the last
* Reuse: #1-42, all, deleted (not labeled)
* Trash: all but the BNL one with attachment, deleted (Labeled as Junk)
* CEE: #934-1150 (the last one). All kept.
{{{1150 Nov 10 Peter Shanahan (3733) [Cee-grads] Field trip to Lynn Wastewater Treatment Plant}}}

!! Sent on 5/22/2005
* webmail-sent: All. Kept.
* sent-mail: #2-100. #1 failed to sent. Don't know why.
{{{100 Aug 18 To: Yang Wen (677) 8/17 ITS meeting outline}}}

!! Sent on 5/12/2005
(a few attachments, such as *.rar, are unable to sent; the attachments are deleted.)
* CEE:
{{{989 May 11 Tara Walor (8491) [Cee-grads] F'05 Sloan Course Bidding Guidelines}}}
{{{681 May 11 Miao Ye (4896) [CHN 2003] Career Panel Discussion: CSSA Memebers Experience}}}
* Badminton, ListAnime: All, deleted
* Soccer:
{{{583 May 5 Xiaowei He (1740) Friday 8:00pm-10:00pm Practice on Turf}}}
* Inbox03-04: All. Kept.
* Bracket list taken from http://www.bracketmaker.com/tlist.cfm?tid=182627
* MIT Intramural Soccer official website at http://web.mit.edu/athletics/www/intramurals/soccer/index.html
!! B+ League
[img[B+ League Playoffs Bracket List, 2006|http://web.mit.edu/wenyang/www/pics/20061119_IM Soccer B+ League.png]]
!! B League
[img[B League Playoffs Bracket List, 2006|http://web.mit.edu/wenyang/www/pics/20061119_IM Soccer B League.png]]
* In one of the Quarterfinals,  the Dragons lost to the Jokers, who evetually won the Championship of B League.
[img[MIT Logo|http://web.mit.edu/graphicidentity/interface/mit-redgrey-footer3.gif]] [img[MIT Seal|http://web.mit.edu/graphicidentity/img/seal/seal_red_sm.gif]]

* http://web.mit.edu/graphicidentity/logo/forweb.html
* http://web.mit.edu/graphicidentity/logo/forprint.html


!!Stationery Template
* http://web.mit.edu/graphicidentity/stationery/templates.html
* Order online: http://web.mit.edu/graphicidentity/stationery/order.html
* PowerPoint Template: http://web.mit.edu/graphicidentity/stationery/powerpoint.html

See also:
* Color: http://web.mit.edu/graphicidentity/colors/index.html
* Business paper: http://web.mit.edu/ecat/minutemanpress/
* Symbol: http://web.mit.edu/graphicidentity/symbols/index.html
* Build Boost on "G" and "T" 
** success on "T"; partly (failed 12) success on guitar; unable to compile on haydn.

* NY Conf Meeting
** Need to confirm my idea of using closed-loop functionality
** How to validate:
### Not using "guidance", check counts based on free-flow.
### Use "guidance" of extreme linktime conditions, check counts again.
### If counts changed significantly, may have impact on route choice.
** New Data to be processed by new RA's
** UROP Description (2nd Draft)

* Apply some fix-to-mitsim to the closed-loop version
** Change made by Rama:
void RN_Node::routeSwitchingModel(RN_Vehicle* pv, OD_Cell* od) {
// util[i] = exp(beta * cost / smallest + alpha * pp->cf());
 util[i] = exp(beta * cost + alpha * pp->cf());
This means the beta is coefficient for the link time (freeway bias applied), not the ratio of linktime by shortest-path linktime.
* Closed-loop version:
| ! diff | !simlab-cloesedloop-dan.tgz | !simlab_cl_patched.tgz | !simlab_CL_KeepGuidance.tar.gz |
| >2G spt_i.tmp | No |>| Yes (see general.tmpl for -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)  |
| Output 0-flow sensor data | No |>| Yes (TC_Sensor.cc) |
| Utility function | beta * cost / smallest |>| beta * cost (RN_Node.cc) |
| Keep guidance |>| No | Yes (closedLoopRunManager.cc, TS_Engine.cc) |
** Other changes on version.pl, etc.

* Non closed-loop
** {{{simlab_non_CL.tgz}}} has the patch for large file, 0-flow sensor, utility function.
** {{{simlab_NonCL_patchedByYWandRama}}} (latest version) has all of the above, plus some testing codes for state dump (incomplete) and a work-around (to be re-compiled) to ignore the ~ClosedLoopGuidance field (showing some msg, but not issuing an error). 

* Non-CL versions support RHD & LHD, while CL only supports LHD. (Use of {{{theNetwork->drivingDirection()}}})
* Non-CL has a quick-n-dirty fix of bug (for crashing in the presence of congested loaders) in 
{{{int TS_Vehicle::checkForLookAheadLC(vector <int> & _connectedLanes)}}}.
* Non-CL has a fix in response to signals. ({{{void TS_Vehicle::responseToEnrouteMsg(unsigned int state)}}}).
* Non-CL has a fix in milage in {{{void TS_Vehicle::move()}}} by cfc. The latest version of CL-KG will apply it soon. (to be re-compiled)
MITSIMLab is an open-source simulation laboratory developed by the MIT Intelligent Transportation Systems (ITS) Lab. It has been used heavily by both researchers and private consultants for conducting detailed transportation systems analyses for Boston's "Big Dig" project, and other large networks such as Des Moines, the Lincoln Tunnel (NYC) and Stockholm.

MITSIMLab has been developed in C++ on the Linux operating system. It can be download at http://mit.edu/its/MITSIMLabOS.html

See also: http://mit.edu/its/mitsimlab.html
Discussion board for MITSIMLab on Yahoo! Groups: http://groups.yahoo.com/group/MITSIMLab/ 

* [[Gif animation of MITSIMLab|DynaMIT and MITSIM Animations]].
!! Old method
The following were steps for showing the demo of the Central Artery/Tunnel network (Boston "Big Dig" project) on our lab's machine H.
# Login as toledo (Hint: David Beckham)
# cd ~toledo/view/data/RM
# rm -fr /tmp/pvm*
# pvm ~/.pvm_hosts
# Press "Ctrl-c"  
# smc -m platoon &
!! New and better approach
On 10/30/2007 I have put those files (two directories: ''RM'' and ''Common'') to the svn server on our machine T as {{{$SVNROOT}}}/mitsim_demos/BostonCAT. Now we can check them out in {{{~/view/data}}} and have all files for the demo.  Even better, I have made a script {{{run_smc.sh}}} to gracefully handle the pvm-related issues. Now running the demo could be as simple as 
See {{{readme.txt}}} in the ''RM'' directory for details of the usage and other improvements.
* Use floating car (probe vehicles) data to calibrate micro-scopic simulation models
!! Done
* --VMS--
* --Closed-loop validation with DynaMIT--
~~Goto~~ [[Homepage|index.html]]
<<displayDefaultTiddlers 'Start Page'>>
[[About Me]]
[[Research|My Research]]
^^[[Edit MainMenu|MainMenu]]^^
<<newJournal "DD MMM YYYY" Blog>>
<<tag Athena>>
^^[[Edit Configurations|Configurations]]^^
^^TiddlyWiki V<<version>>^^
^^What is TiddlyWiki?^^
^^This page is best viewed with [[Firefox]]^^
[img[ |http://counter.mit.edu/tally]]
* Use {{{diary}}} to LOG commands. Example:
my_script_name = 'run_compare_with_mitsim_PCU2';
current_run_character = 'best0731_cl_local_pred' 
log_name = [my_script_name, '_',  current_run_character, '-',date]
diary([log_name, '.log']);   % start logging
% Do something ...
% When Finished:
disp(['Saving ', my_script_name, '-finished-', date, '.mat']);
save([my_script_name, '-finished-', date]); % save variables to file
diary off;     % logging ended
* Change text font size in figures
label_font_size = 12;
axis_font_size = 12;
title( title_text , 'FontSize', label_font_size );
xlabel( XlabelPattern, 'FontSize', label_font_size );
ylabel( YlabelPattern, 'FontSize', label_font_size );
set(gca, 'FontSize', axis_font_size);
* Set figure location and size 
** The actual size might be bigger because of margin, etc. (affects {{{saveas}}})
set(gcf, 'Position', [x_lower_left, y_lower_left, width, height]);
* Save the current figure
% SaveFigFormat can be 'png', 'eps', etc.
saveas( gcf, savefilename, SaveFigFormat);
* Dynamic number of entries in Legend
% we can add entries manually ...
Legends = strvcat('Observed', 'Estimation'); 
% or add them by loop ...
for id=1:max_step_to_plot
  current_legend = [int2str(id), '-step'];
  Legends = strvcat( Legends, current_legend );
% Now we can draw the legend
legend(Legends, 'Location', 'NorthWest');
% If max_step_to_plot == 2, then this is equivallent to 
%legend('Observed', 'Estimation', '1-step', '2-step', 'Location', 'NorthWest');
* Set axis tick labels. 
** Example: change Interval ID (0, 1, 2,...) to time stamp (HHMM)
xtick = 0:intervals_per_hour/2:number_of_intervals;
xticklabel = mod( second_init + xtick * second_interval_length, 86400 );
HH = floor(xticklabel / 3600);
MM = floor((xticklabel - HH*3600) / 60 )';
HH = HH';
xticklabel = [];
for id=1:length(HH),
  xticklabel = [xticklabel; sprintf('%02d%02d', HH(id),MM(id))];
set(gca,'XTick', 0:intervals_per_hour/2:number_of_intervals);
set(gca,'XTickLabel', xticklabel);
!!! Calculating statistics for evaluation of calibration
{{{Yo}}} or {{{y_true}}} is the vector of observed or true value; {{{Ys}}} or {{{y_hat}}} is the vector of simulated or estimated values.
* RMSN (formula used by Ashok and Contantinos):  normalized root mean square error
function r = RMSN1(y_true, y_hat)
y_true = y_true(:); n = length(y_true);
y_diff = y_true-y_hat(:);
r = sqrt(y_diff'*y_diff*n) / sum(y_true);
* RMSPE: root mean square percent error
function r = RMSPE(y_true, y_hat)
y_true = y_true(:); n = length(y_true);
y_diff_p = (y_true-y_hat(:)) ./ y_true;
r = sqrt(y_diff_p'*y_diff_p / n);
* RMSE: root mean square error
function r = RMSE(Yo, Ys)
Yo=Yo(:); Ys=Ys(:); N = length(Yo);
r = sqrt(sum((Ys-Yo).^2)/ N);
* MPE: mean percent error
function r = MPE(y_true, y_hat)
% Equation 7.7 in PhD Thesis of Tomer Toledo (page 158)
y_true = y_true(:); n = length(y_true);
y_diff_p = (y_hat(:)-y_true) ./ y_true;
r = sum(y_diff_p) / n;
* MEN: mean error normalized
function r = MEN(Yo, Ys)
Yo=Yo(:); Ys=Ys(:); N = length(Yo);
r = sum(Ys-Yo)/ sum(Yo);
* Theil' U
function r = TheilsU(Yo, Ys)
% Equation 7.8 in PhD Thesis of Tomer Toledo (page 159)
Yo=Yo(:);  Ys=Ys(:); N = length(Yo);
r=sqrt(1/N*sum((Ys-Yo).^2)) / (sqrt(1/N*sum(Ys.^2)) + sqrt(1/N*sum(Yo.^2)));
* Theil' U^^M^^
function r = TheilsUm(Yo, Ys)
% Equation 7.9 in PhD Thesis of Tomer Toledo (page 159)
Yo=Yo(:); Ys=Ys(:); N = length(Yo);
r = ((mean(Ys) - mean(Yo)).^2) / (1/N*sum((Ys-Yo).^2));
* Theil' U^^S^^
function r = TheilsUs(Yo, Ys)
% Equation 7.10 in PhD Thesis of Tomer Toledo (page 159)
Yo=Yo(:); Ys=Ys(:); N = length(Yo);
r = ((std(Ys) - std(Yo)).^2) / (1/N*sum((Ys-Yo).^2));
* Summary: 
ExtractSensorLink finds the segment and link for each sensor. Its original name was "TestDynaMIT", located under {{{~/Temp/DynaMIT/CodeToExtractSensorLinkInfo}}} on haydn.
* Readme
  This program is a utility for DynaMIT. It is intented to extract sensors' location (segments and links) information from DynaMIT's network topology. The (user) ID of link on which a sensor is located is obtained; such information is necessary for calculating analytical assignment matrix from link travel time table.
  The most important input to this problem includes the DynaMIT parameter file (e.g., dtaparam.dat) and the network file. However, a supply parameter file and a demand file are also necessary to construct the network topology; these files are simply parsed and their contents are not relevant. Therefore we could make up simple input files, as long as it meets the parsers' requirements.

Current version build date: Jun  1 2006 00:49:22

         -- Yang WEN, first built on 9/12/2005
* Usage:
   extractSensorLink [parameter_file_name] [output_file_name]
* Note: 
** Default parameter_file_name is dtaparam.dat
** Default output file name is sensor_link.out
* Source: extractSensorLink.cc and Makefile, available at  {{{CorbaFreeDynaMIT/Tools/ExtractSensorLink}}}

* Use {{{fdisk /dev/hda}}} to print partition info (find out which one to mount, and if it is NTFS).
* Check kernel version: {{{uname -r}}} 
* Download corresponding packages like {{{kernel-ntfs-2.4.18-14.i686.rpm}}} or {{{kernel-module-ntfs-2.6.9-1.667-2.1.20-0.rr.3.3.i586.rpm}}} from http://www.linux-ntfs.org
* Install the package, and mount the partition.
rpm -ivh kernel-ntfs-2.4.18-14.i686.rpm
(or rpm -Uvh kernel-ntfs-2.4.18-14.i686.rpm, might be safer)
mkdir /mnt/c
mount -t ntfs /dev/hda1 /mnt/c
mount -t smbfs // /mnt/windows -o=atsacops 
(you are then prompted for a password)

The file locking error has been fixed. Rama figured out that the owner of /mnt/windows was set to root, but it should be atsac, otherwise DynaMIT cannot create/modified files properly. So we did the following to fix the problem:

# su as root
# umount /mnt/windows
# fix the typo in /etc/fstab (memtioned by Scott): change "atscaops" to "atsacops"
# mount -a (prompted for password)

!! Intelligent Transportation Systems Lab, MIT,	02/2004 - present
Selected Publications: [[see here|Publication]]
Follow the link for research done at [[Intelligent Transportation Systems Lab|http://its.mit.edu]].
Screenshots of the tools we use are available at [[DynaMIT and MITSIM Animations]]
* ''Scalability of Dynamic Traffic Assignment systems'' ([[Dissertation|PhD Thesis: Scalability of Dynamic Traffic Assignment]])
** Enhanced the DynaMIT system, a Dynamic Traffic Assignment (DTA) system for real-time traffic estimation and prediction, written in C++.  
*** Identified major bottlenecks through profiling studies.  
*** Developed more efficient algorithms.  
*** Implemented new O-D estimation algorithm (50+ times faster). 
*** Redesigned and implemented several core modules resulting in 10+ times overall performance boost.
** Designed adaptive load-balancing algorithms for parallel simulation in DTA systems
** Developed the parallel computing version of DynaMIT, using Message Passing Interface ([[MPI|http://www.mpi-forum.org/]]) library.
* ''Data fusion for intelligent transportation systems'' (on-going)
** Developed models to use real-time travel time data for traffic estimation and prediction.
*** Designed architectures to use cell phone data and floating car (GPS-equipped taxi fleet) data for travel demand estimation
*** Case study: CityMotion, data fusion and a multi-modal, multi criteria, predictive, stochastic, route-planning application.
* ''Application of on-line (real-time) DTA systems''
** Designed on-line DTA system architecture. 
** Developed functionalities & interfaces for on-line operations. 
** Deployed DynaMIT at Los Angeles Department of Transportation ([[LADOT|http://trafficinfo.lacity.org/]]). Integrated it with LADOT’s traffic surveillance and control system. See [[here|http://web.mit.edu/wenyang/www/tiddlywiki_yw.htm#%5B%5BDynaMIT%20at%20LA%5D%5D]] for details.<<smiley ;-)>>
* ''Calibration of traffic simulation models''
** Implemented algorithms in Matlab to calibrate parameters in demand & supply models of traffic simulation on large-scale networks.  
*** Assignment-matrix based algorithms
*** Simultaneous Perturbation Stochastic Approximation (SPSA)
** Performed quantitative analysis on traffic assignment models.
* ''Evaluation of traffic management strategies and route guidance''
** Setup the closed-loop system for evaluation
*** DynaMIT is used to generate predictive route guidance and simulate traffic management strategies
*** MITSIMLab is used as a laboratory or test-bed for the real world.
** Case studies 
*** [[Boston emergency evacuation planning|http://web.mit.edu/wenyang/www/pics/boston_evac_density.png]]
*** Variable Message Signs (VMS) evaluation in [[Lower Westchester County, NY|http://maps.google.com/staticmap?center=41.012345,-73.750000&zoom=11&size=450x480&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=ABQIAAAABNKWrI_TvxNiBnyiHpL07BRsJji6Mdgnm2pkbtcvjpxdjPlvfhQTkTnKw_tI5AAazIZcLp4Lt8N71w]]

!! Computer Engineering & Application Lab, Dept. of Civil Engr., Tsinghua University,	2000 - 2003
* Developed algorithms for modeling real-time interactive simulation of structures.
<<slider ahsSlider PreviousResearch 'More' 'Research done at Tsinghua University' >>

* In Chinese, the meaning of my name is "warm sun".
* In case your brower cannot display Chinese fonts, here is a GIF version: <<smiley WEN>><<smiley YANG>>
A powerful tabbed browser based on the Internet Explorer browser engine, with user-friendly features such as fully-customizable mouse-gesture commands, extended drag-and-drop (to search selected words with the default search engine or open a link in new tab), and various plugins.

In the threat of lawsuits, MyIE2 has been renamed as Maxthon since the end of 2004.

See also: 
* http://www.maxthon.com/
* http://www.myie2.com/ (will be redirected to Maxthon's new home)
* Log in to your MySQL database, i.e.,
% mysql -u root -p -D my_db
* Select your database, i.e.,
  use my_database;
* List the databases managed by the server:
* Display the CREATE DATABASE statement for a database:
* List the tables in the current database or in a given database:
      Note that SHOW TABLES doesn't show TEMPORARY tables.
* Display the CREATE TABLE statement for a table:
* Display information about columns or indexes in a table:
  SHOW INDEX FROM tbl_name;
      The DESCRIBE tbl_name and EXPLAIN tbl_name statements are synonymous with SHOW COLUMNS FROM tbl_name.
* Display descriptive information about tables in the current database or in a given database:
Several forms of the SHOW statement take a LIKE 'pattern' clause allowing a pattern to be given that limits the scope of the output. MySQL interprets 'pattern' as an SQL pattern that may include the '%' and '_' wildcard characters. For example, this statement displays the names of tables in the current database that begin with 'geo':
To match a literal instance of a wildcard character in a LIKE pattern, precede it with a backslash. Generally, this is done to match a literal '_', which occurs frequently in database, table, and column names.

The mysqlshow command provides some of the same information as the SHOW statement, which allows you to get database and table information at your command prompt:

* List databases managed by the server:
      % mysqlshow
* List tables in a database:
      % mysqlshow db_name
* Display information about columns in a table:
      % mysqlshow db_name tbl_name
* Display information about indexes in a table:
      % mysqlshow --keys db_name tbl_name
* Display descriptive information about tables in a database:
      % mysqlshow --status db_name
The mysqldump client program allows you to see the structure of your tables in the form of a CREATE TABLE statement (much like SHOW CREATE TABLE). When using mysqldump to review table structure, be sure to invoke it with the {{{--no-data}}} option so that you don't get swamped with your table's data!
% mysqldump --no-data db_name [tbl_name] ...
If you list only the database name without any table names, mysqldump displays the structure for all tables in the database. Otherwise it shows information for the named tables.

For both mysqlshow and mysqldump, you can specify the usual connection parameter options, such as {{{--host}}}, {{{--user}}}, or {{{--password}}}.

It's sometimes useful to be able to tell from within an application whether a given table exists. You can use SHOW TABLES to find out (but remember that SHOW TABLES does not list TEMPORARY tables):
SHOW TABLES LIKE 'tbl_name';
SHOW TABLES FROM db_name LIKE 'tbl_name';
If the SHOW TABLES statement lists information for the table, it exists. It's also possible to determine table existence, even for TEMPORARY tables, with either of the following statements:
SELECT COUNT(*) FROM tbl_name;
SELECT * FROM tbl_name WHERE 0;
Reference: http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/
*Compiling a Stand-Alone Application
mcc -m mymfunction.m
This creates a stand-alone executable named {{{mymfunction.exe}}} on Windows and {{{mymfunction}}} on UNIX from the M-file {{{mymfunction}}}.
* Compiling a Shared Library
mcc -l mymfunction.m
This creates a shared library named {{{mymfunction.dll}}} on Windows and {{{mymfunction.so}}} on UNIX. Note: The extension for a shared library on HP-UX is .sl and on Mac OS X is .dylib, so this shared library is named mymfunction.sl on HP-UX and mymfunction.dylib on Mac OS X. 
* Stand-Alone Application That Calls a Library
** To create a stand-alone (driver) application from a user-written source file named {{{mydrivercode}}} that calls the above library {{{mymfunction}}}, use the command
      mbuild mydrivercode.c mymfunction.lib              (On Windows)
      mbuild mydrivercode.c mymfunction.so               (On UNIX)

To test components on your development machine, make sure you have your path set properly. The following sections show how to set the path for each supported platform. ''Note'': {{{<matlabroot>}}} refers to the complete path where MATLAB is installed on your machine. 

* Windows: Add the following directory to your system PATH environment variable.
* UNIX: Add the following platform-specific directories to your dynamic library path.
** Note: For readability, the following commands appear on separate lines, but you must enter each setenv command on ''one'' line. 
** Linux (assuming csh/tcsh is used)
      setenv LD_LIBRARY_PATH
      setenv XAPPLRESDIR <matlabroot>/X11/app-defaults
*** If bash is used, use {{{export LD_LIBRARY_PATH=XXX}}} syntax instead.
*** You probably want to add these lines to your login start-up scripts (e.g., {{{.cshrc}}} or {{{.bashrc}}}). Otherwise you have to manually source them each time you open new terminal -- chances are you often forget to do so, and then your programs will fail to run.

These steps describe how to distribute a stand-alone application. (UNIX)
* Generate the MATLAB Component Runtime (MCR) library archive on the development machine. You only need to do this step once per platform. To generate the MCR library archive, run
This places the {{{MCRInstaller}}} archive {{{MCRInstaller.zip}}} in the {{{<matlabroot>/toolbox/compiler/deploy/<arch>}}} directory.
** Alternatively, to build the {{{MCRInstaller}}} archive as filename in the path directory, you can use
            buildmcr(path, filename);
** To return the full path to the file zipfile, use
            zipfile = buildmcr(path, filename);
** To build the {{{MCRInstaller}}} archive in the current directory, use
            zipfile = buildmcr('.');
* Gather and package the following files and distribute them to the deployment machine.
| Component |Description |
| {{{MCRInstaller.zip}}} |MATLAB Component Runtime library archive; platform-dependent file that must correspond to the end-user's platform |
| {{{unzip}}} |Utility to unzip {{{MCRInstaller.zip}}} (optional). The target machine must have an unzip utility installed. |
| {{{magicsquare.ctf}}} |Component Technology File archive; platform-dependent file that must correspond to the end-user's platform |
| {{{magicsquare}}} |Application |

* Deployment instruction can be found in [[Steps for setting up Matlab-DynaMIT on UVA]]
<div class='header' macro='gradient vert #993333 #333333'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
Target size: 2-by-2 inches
# Get a raw image
## Take a photo with my own digital camera (on a tripod).
## Crop and make sure the scale and position of the face meets the requirement.
# The obtain photo is not ready to use, since the background is not white enough, and there is shadow on the image (due to insufficient lighting). So we need to edit it.
## Open it with a photo editor, e.g., GIMP.
## Select background (use "quick mask"/zoom-in to fine-tune the selection)
## Increase brightness and contrast, if necessary, or simply fill background with white.
## Remove the shadow in similar ways.
# Output to a 6x4 inches paper
## Resize the figure to 600x600 pixels, save a copy (make sure it's 300 DPI).
## Select all, copy (to clipboard)
## Create a new image of 1800x1200. Paste the 600x600 one as new layer. The image will be put in the center.
## Offset the layer by (-600, -301) to move the pasted image to the top-left corner.
## Duplicate the layer, and offset it to the right (600,0). 
## Do it again, to complete the top row.
## Merge down layers, and then duplicate it, offset it to get the bottom row.
## Save it, and ready to print.

* Alternatively, use convert from ImageMagick to build the 6x4 photo:
convert pic1.jpg -page +600+0 pic2.jpg -page +1200+0 pic3.jpg -mosaic row.jpg
convert row.jpg row.jpg -append output.jpg
(defended on September 26, 2008)

!! Abstract

This research develops a systematic approach to analyze the computational performance of Dynamic Traffic Assignment (DTA) models and provides solution techniques to improve their scalability for on-line applications for large-scale networks.

DTA models for real-time use provide short-term predictions of network status and generate route guidance for travelers. The computational performance of such systems is a critical concern. Existing methodologies, which have limited capabilities for on-line large-scale applications, use single-processor configurations that are less scalable, and rely primarily on trade-offs that sacrifice accuracy for improved computational efficiency.

In the proposed scalable methodology, algorithmic analyses are first used to identify the system bottlenecks for large-scale problems. Our analyses show that the computation time of DTA systems for a given time interval depends largely on a small set of parameters. Important parameters include the number of origin-destination (OD) pairs, the number of sensors, the number of vehicles, the size of the network, and the number of time-steps used by the simulator. Then scalable approaches are developed to solve the bottlenecks. A constraint generalized least-squares solution enabling efficient use of the sparse-matrix property is applied to the dynamic OD estimation, replacing the Kalman-Filter solution or other full-matrix algorithms. Parallel simulation with an adaptive network decomposition framework is proposed to achieve better load-balancing and improved efficiency. A synchronization-feedback mechanism is designed to ensure the consistency of traffic dynamics across processors while keeping communication overheads minimal.

The proposed methodology is implemented in DynaMIT, a state-of-the-art DTA system. Profiling studies are used to validate the algorithmic analysis of the system bottlenecks. The new system is evaluated on two real-world networks under various scenarios. Empirical results of the case studies show that the proposed OD estimation algorithm is insensitive to an increase in the number of OD pairs or sensors, and the computation time is reduced from minutes to a few seconds. The parallel simulation is found to maintain accurate output as compared to the sequential simulation, and with adaptive load-balancing, it considerably speeds up the network models even under non-recurrent incident scenarios. The results demonstrate the practical nature of the methodology and its scalability to large-scale real-world problems.

!! Thesis Supervisor: 
Moshe E. ~Ben-Akiva, Edmund K. Turner Professor of Civil and Environmental Engineering

!! Full text

Quoting from [[Specifications for Thesis Preparation 2008-2009|http://libraries.mit.edu/archives/thesis-specs/]] by the MIT Libraries:
Additionally, the student is authorized to post electronic versions of the student's own thesis, in whole or in part, on the World Wide Web. Any further publication of the thesis in whole or in part shall be made only with the authorization of the Technology Licensing Office, in consultation with the head of the department or course in which the student was registered when the thesis was accepted.
A electronic copy of the dissertation can be found here: [[Yang Wen: Scalability of Dynamic Traffic Assignment|http://web.mit.edu/wenyang/www/wen_phdthesis.pdf]]. &copy; Massachusetts Institute of Technology. All rights reserved.
* Photos of places I recently visited: [[picasaweb|http://picasaweb.google.com/wenyang00]]
* NY network
[img[NY network: Lower Westchester County|http://maps.google.com/staticmap?center=41.012345,-73.750000&zoom=11&size=450x480&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=ABQIAAAABNKWrI_TvxNiBnyiHpL07BRsJji6Mdgnm2pkbtcvjpxdjPlvfhQTkTnKw_tI5AAazIZcLp4Lt8N71w]]
* Fireworks
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0049-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0057-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0058-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0060-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0063-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0065-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0142-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0174-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0175-R320.JPG]]
[img[Boston Fireworks, July 4th, 2006|http://web.mit.edu/wenyang/www/pics/fireworks/DSCN0176-R320.JPG]]
* 1000 island lake
[img[Yang, July 2006|http://web.mit.edu/wenyang/www/pics/20060626wy@HeartIsland_320.jpg]]
* 11/2001 – 07/2003, Project Chief Developer, Tsinghua University
** Research on 3D modeling of complicated building structures, focused on express modeling and Virtual Reality real-time interactive simulation for complicated structures.
** Research on CAD Neutral Model, the XML based presentation of construction information
** Provided automatic detection of interferences within the structural system and conflicts among the designs of different specialties. 
* 09/2000 – 10/2001, Research Assistant and Project Participant, Tsinghua University 
** Research on Scheme for Disaster Prevention and Reduction in TEDA, work for application of NNSF supported project Modeling and Disaster Prevention of Earthquake Induced Fires.
* 02/2000 – 06/2000, Research Assistant, Tsinghua University 
** Research on Crack Control System for ~Early-Age Concrete.
** Develop the 4D Modeling ~Sub-System in the Crack Control System for Concrete.
* 11/1999 – 03/2000, Student Research Training Program, Tsinghua University 
** Develop an Information Management System for Petroleum Geophysical Exploration based on GeoMedia GIS system.
|''Name:''|PuTTY |
|''Version:''|beta 0.58 |
|''Source:''|http://www.chiark.greenend.org.uk/~sgtatham/putty/ |
|''Author:''|Simon Tatham, et al. |
|''License:''|MIT licence (Like BSD, also compatible with GNU GPL) |

Full set of tools:
* PuTTY (the Telnet and SSH client itself) 
* PSCP (an SCP client, i.e. command-line secure file copy) 
* PSFTP (an SFTP client, i.e. general file transfer sessions much like FTP) 
* PuTTYtel (a Telnet-only client) 
* Plink (a command-line interface to the PuTTY back ends) 
* Pageant (an SSH authentication agent for PuTTY, PSCP and Plink) 
* PuTTYgen (an RSA and DSA key generation utility). 

* No installation required. Copy and use.
* Use Windows Registry to save user data. There are also un-official builds that can use *.ini files instead.
!!Selected Publications (refereed)

!!! Refereed journals
* ''Yang Wen'', {{{Ramachandran Balakrishna}}}, {{{Moshe Ben-Akiva}}}, and {{{Scott Smith}}} (2006). 'Online deployment of dynamic traffic assignment: architecture and run-time management', //IEE Proceedings Intelligent Transport Systems// ''153''(1): 76-84. 

** Important note for the [[IEE Proceedings ITS|http://www.iee.org/Publish/Journals/ProfJourn/Proc/ITS/]] journal, quoting from their website:
Following the merger on March 31st 2006 between the IEE (Institution of Electrical Engineers) and the IIE (The Institution of Incorporated Engineers) to form the Institution of Engineering and Technology, with effect from 2007, the IEE Proceedings suite of journals will change name to reflect the fact that they are now published by the Institution of Engineering and Technology. IEE Proceedings Intelligent Transport Systems will be published as IET Intelligent Transport Systems from 2007 onwards, starting at Volume 1, Issue 1. The new Print ISSN and Online ISSN for this new title are as follows:
    * Print ISSN: 1751-956X
    * Online ISSN: 1751-9578

* {{{Moshe Ben-Akiva}}}, {{{Jon Bottom}}}, {{{Song Gao}}}, {{{Haris N. Koutsopoulos}}}, and ''Yang Wen'' (2007). 'Towards disaggregate dynamic travel forecasting models', //Tsinghua Science and Technology//, ''12''(2): 115-130.  ([[ISSN 1007-0214|http://qhxb.lib.tsinghua.edu.cn/eng/]] 01/14. April 2007) 

* {{{Ramachandran Balakrishna}}}, {{{Constantinos Antoniou}}}, {{{Moshe Ben-Akiva}}}, {{{Haris N. Koutsopoulos}}} and ''Yang Wen'' (2007). 'Calibration of Microscopic Traffic Simulation Models: Methods and Application', //Transportation Research Record, journal of the Transportation Research Board//, No. 1999: 198-207. ([[Traffic Flow Theory 2007|https://commerce.metapress.com/content/96jm3543127p7562/resource-secured/?target=fulltext.pdf&sid=tyngqb5514zdms55wwad1555&sh=trb.metapress.com]])

* {{{Ramachandran Balakrishna}}}, ''Yang Wen'', {{{Constantinos Antoniou}}}, and {{{Moshe Ben-Akiva}}} (2008). 'Transportation Network Simulation for Emergency Management'. Accepted for publication in //Transportation Research Record, journal of the Transportation Research Board//. 

!!! Refereed conferences/proceedings/presentations
{{{Ramachandran Balakrishna}}}, {{{Moshe Ben-Akiva}}}, ''Yang Wen'' (2006). 
'Observability in estimating time dependent origin-destination flows from traffic counts', in proceeding of the first International Symposium on Dynamic Traffic Assignment ([[DTA 2006|http://www.its.leeds.ac.uk/dta2006]]): 205-214. June 21-23, 2006, University of Leeds.

{{{Daniel Florian}}}, {{{Ramachandran Balakrishna}}}, {{{Moshe Ben-Akiva}}}, ''Yang Wen'' (2006). 
'Evaluation of on-line dynamic traffic assignment using micro-simulation', International Symposium of Transport Simulation 2006 ([[ISTS06|http://ists06.epfl.ch]]), September 4-6, 2006, Ecole Polytechnique Fédérale de Lausanne, Switzerland. [CD-ROM]

{{{Ramachandran Balakrishna}}}, {{{Constantinos Antoniou}}}, {{{Moshe Ben-Akiva}}}, {{{Haris N. Koutsopoulos}}} and ''Yang Wen'' (2007). 'Calibration of Microscopic Traffic Simulation Models: Methods and Application'. Presented at the 86th annual meeting of the Transportation Research Board.  

''Yang Wen'', {{{Ramachandran Balakrishna}}}, {{{Moshe Ben-Akiva}}}, and {{{Scott Smith}}} (2007). 
'Online deployment of dynamic traffic assignment: evaluation and lessons', //11th World Conference on Transport Research// ([[WCTR 2007|http://www.uctc.net/wctrs/]]), June 24-28, 2007, University of California, Berkeley

{{{Ramachandran Balakrishna}}}, ''Yang Wen'', {{{Constantinos Antoniou}}}, and {{{Moshe Ben-Akiva}}} (2008). 'Transportation Network Simulation for Emergency Management'. Presented at the 87th annual meeting of the Transportation Research Board, and submitted for publication in Transportation Research Record. January 13-17, 2008, Washington, D.C. [DVD-ROM]

{{{Vaibhav Rathi}}}, {{{Constantinos Antoniou}}}, ''Yang Wen'', {{{Moshe Ben-Akiva}}}, and {{{Maggie Cusack}}} (2008). 'Assessment of the Impact of Dynamic Prediction-Based Route Guidance using a simulation-based, closed-loop framework'. Presented at the 87th annual meeting of the Transportation Research Board. January 13-17, 2008, Washington, D.C. [DVD-ROM]

''Yang Wen'', {{{Ramachandran Balakrishna}}}, {{{Moshe Ben-Akiva}}}, and {{{Scott Smith}}} (2007). 
'Online deployment of dynamic traffic assignment: evaluation and lessons', Presented at the 87th annual meeting of the Transportation Research Board. January 13-17, 2008, Washington, D.C. [DVD-ROM]

{{{Vaibhav Rathi}}}, {{{Constantinos Antoniou}}}, {{{Moshe Ben-Akiva}}},  and ''Yang Wen''. 'Optimal Variable Message Sign location identification using genetic algorithms'. Presentated at the 10th International Conference on Application of Advanced Technologies in Transportation ([[AATT 2008|http://www.civil.ntua.gr/aatt/aatt.htm]]), May 27- 31, 2008, Athens, Greece.

!!! Selected non-refereed papers
{{{Ramachandran Balakrishna}}}, {{{Constantinos Antoniou}}}, {{{Haris N. Koutsopoulos}}}, ''Yang Wen'', and {{{Moshe Ben-Akiva}}}. 'Calibrating Speed-Density Functions for Mesoscopic Traffic Simulation', Presented at the Symposium on the Fundamental Diagram: 75 years ([["Greenshields75" Symposium|http://guest.cvent.com/EVENTS/Info/Summary.aspx?e=7ba6438e-5aec-4f4e-a6e3-256b02817e10]]), July 8-10, 2008, Woods Hole, MA.

!! Working papers

''Yang Wen'' and {{{Moshe Ben-Akiva}}}. Scalable Dynamic Traffic Assignment.  (Working paper for TRB 2009)

See also: [[Talks and Presentations]], [[Reports and Manuals]], and [[Review of papers]]
* http://www.python.org
* [[Python Tutorial|http://docs.python.org/tut/tut.html]]
* [[Instant Python|http://www.idi.ntnu.no/~mlh/different.html]]
* [[Python for science|http://starship.python.net/crew/hinsen/]]
| Integer |0, 100, 314, 32768, -1, -99 |
| Real |0., 3.142, -3.05e23, 1e-4 (must contain a dot or an exponent) |
| Complex |1j, -2.3j, 4+5j (the last one is a sum) |
| Addition |6+7, 8.+9, 1+0j |
| Subtraction |1-3, 5.-7, 9j-11.3 |
| Multiplication |4*3, 2*1.41, 1j*3j |
| Division |1/5 (//=0//), 1./5. (//=0.2//), 5/3j |
| Power |2.5**4, 3j**2, 2**-0.5 |

* Variables don't have types, no need to declare them
* Assignment is done by the = operator. Equality is tested by the {{{==}}} operator. 
* Blocks are indicated through indentation
 x,y,z = 1,2,3
 first, second = second, first
 a = b = 123

 if x < 6 or (x > 11 and x < 24):
 print "Bad x."

 if x < 6 or 11 < x < 24:
 print "Bad x."

 for i in range(1, 4): #[1, 2, 3]
 print "This is iteration number", i 

 x = 10
 while x >= 0:
 print "counting down..."
 x = x-1
We connected the old CSSA server to a new (actually, an even older) monitor, but could not get X to work. 

So we used {{{Ctrl+Alt+F1}}} to switch to console, login, get root access, and confirm that /etc/X11/XF86Config might have wrong settings for our monitor. So what we do is 
redhat-config-xfree86 --reconfig
It re-detected the settings, and updated the XF86Config file.
X works fine after reboot...

* Goto https://nic.mit.edu/cgi-bin/rhnreg to activate your account
* Wait for an email from MIT RedHat Network Support <rhn-support@MIT...>
* Log in as root on the system you're configuring for RHN service
* Do the following to setup the initial access to the RHN service for software update:
wget -O activate https://rhnsat.mit.edu/rhn/activate
csh ./activate
up2date -u
* Check the following web pages for automatic update configurations
** http://itinfo.mit.edu/article?id=7780
** http://web.mit.edu/software/linux.html

!! LA Project
''Y. Wen'', R. Balakrishna, A. Gupta, M. Ben-Akiva and S. Smith (2006) "Deployment of DynaMIT in the City of Los Angeles." Submitted to the Federal Highway Administration, Office of Operations Research and Development.

!! NY Project

C. Antoniou, ''Y. Wen'', V. Rathi,  S. Diwan, and S. Hasan (2007) "Development of ITS analysis tools for Lower Westchester County: Technical memorandum on the assessment of the impact of dynamic prediction-based route guidance using a simulation-based, closed loop framework for the Lower Westchester County". To be submitted to New York State Department of Transportation.

C. Antoniou, ''Y. Wen'', V. Vaze, and V. Rathi (2006) "Development of ITS analysis tools for Lower Westchester County: Technical memorandum on the calibration and validation of DynaMIT in closed loop with MITSIMLab for the Lower Westchester County network". Submitted to New York State Department of Transportation.

C. Antoniou, ''Y. Wen'', V. Ramanujam, and V. Vaze (2006) "Development of ITS analysis tools for Lower Westchester County: Technical memorandum on the calibration of MITSIMLab for the Lower Westchester County network". Submitted to New York State Department of Transportation.
(click [[here|My Research]] for more details): 
** Primary focuses: 
*** Intelligent Transportation Systems
*** Real-time traffic estimation and prediction
*** Data fusion and traffic modeling with new sources of data
*** On-line dynamic traffic assignment systems.
** Other interests and experiences: 
*** Evacuation planning
*** Calibration of traffic simulation models
*** Large-scale stochastic system optimization
*** Statistical modeling for personalized recommendation engine. 
*** Advanced demand modeling
!! Conferences Refereed
* A regular paper for IEEE [[ITSC 2007|http://www.ewh.ieee.org/tc/its/itsc2007/]] International Conferences on Intelligent Transportation Systems (Sept. 30 - Oct. 3, 2007, Seattle, Washington, USA)
** Contact: Constantinos Antoniou
** Review submitted on June 14, 2007.

* A regular paper for IEEE [[ITSC 2006|https://its.papercept.net/conferences/index.html#ITSC2006]] International Conferences on Intelligent Transportation Systems (September 17-20, 2006, Toronto, Canada)
** Associate editor: Werner Kraus Jr.
** Review submitted on April 21, 2006.
You can save changes if you're using Firefox, Internet Explorer or Safari
# if you're using Internet Explorer on Windows XP you might run into [[ServicePack2Problems|http://www.tiddlywiki.com#ServicePack2Problems]]
# right click on [[this link|tiddlywiki_empty.html]] and select 'Save link as...' or 'Save target as...'
** do ''not'' try to use the File/Save command in your browser because of SaveUnpredictabilities.
** choose where to save the file, and what to call it (but keep the .HTML extension)
# open the newly downloaded file in your browser
# click the 'options' button on the right to set your username
# edit, create and delete the tiddlers you want
** you can change the [[SpecialTiddlers|http://www.tiddlywiki.com#SpecialTiddlers]] to change the SiteTitle and MainMenu etc.
# click the 'save changes' button on the right to save your changes
# TiddlyWiki will make a backup copy of the existing file, and then replace it with the new version
Quoting [[SaveUnpredictabilities|http://www.tiddlywiki.com#SaveUnpredictabilities]] from www.tiddlywiki.com:

> Several people have reported problems with reusing TiddlyWiki when they have used the File/Save command of their browser to save it. The issue is that some browsers (notably FireFox) don't save the text of the HTML file exactly as it appears on the server, but rather save a snapshot of the current state of the page. In the case of a highly dynamic page like TiddlyWiki, this leads to all sorts of peculiarness...
> TiddlyWiki now displays a warning if it thinks that it has been saved wrongly.
set autolist # auto list completion
set color    # enables color display
set colorcat # enable colorful NLS messages
set visiblebell # no beep
set complete=enhance # enable case insensitive completion
umask 022 # deny some access rights for others, allowing others to read
set OsName=`uname -s`
#bindkey ^? delete-char
setenv PATH ${PATH}:${HOME}/bin/linux
set watch= (1 any any)   # watch login/logout every 1 min

Ref: http://tcshrc.sourceforge.net/docs/c128.html
As it seemed there is no easy way to build GUI_Libs on our lab's machine "O", I decided to manually copy every library that is needed by xdta.

Here's a list to things I tried:
(1) on {{{guitar}}} (our own machine with the GUI_Libs, I ran {{{ldd xdta}}} to get a list of all dynamic libraries needed by xdta.
(2) check corresponding locations on "O" for those libraries.
(3) it turned out that all missing files were under {{{/usr/local/lib/}}}
(4) copy all files under {{{/usr/local/lib}}} to "O":
-rw-r--r-- 2 root root 191320 Jul 28 15:33 libComboBox.a
-rw-r--r-- 2 root root 273530 Jul 28 15:33 libSciPlot.a
-rwxr-xr-x 2 root root 656 Jul 28 15:32 libXbae.la*
lrwxrwxrwx 2 root root 16 Jul 28 15:32 libXbae.so -> libXbae.so.4.0.8*
lrwxrwxrwx 2 root root 16 Jul 28 15:32 libXbae.so.4 -> libXbae.so.4.0.8*
-rwxr-xr-x 2 root root 1202736 Jul 28 15:32 libXbae.so.4.0.8*
(5) su as root, change the owner and group of the copied files to {{{root}}}
(6) as root, edit {{{/etc/ld.so.conf}}}, add the path {{{/usr/local/lib}}} (the original file is backuped as {{{ld.so.conf~}}}
(7) as root, run {{{ldconfig}}}

Then the xdta can be run using the following procedures:
(a) Run DynaMIT as usual: open an xterm window, {{{cd ~demo/LA_replication/}}}, {{{./DynaMIT dtaparam.dat}}}
(b) open another xterm window, {{{cd ~demo/LA_replication/}}}, {{{./startXdta.sh}}}
(c) click the "playback mode" button on xdta's interface to view results.

The same library (source code can be found in GUI_Libs.tar) is required to run {{{xmitsim}}}.
    a personal web notebook
Wiki of Yang Wen
<<smiley :-)>>
<<smiley :-(>>
<<smiley ;-)>>
<<smiley :-|>>
<<smiley :-D>>
<<smiley WEN>><<smiley YANG>>
|''Description:''|Sparklines macro|
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};

//-- Sparklines

config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
	var data = [];
	var min = 0;
	var max = 0;
	var v;
	for(var t=0; t<params.length; t++) {
		v = parseInt(params[t]);
		if(v < min)
			min = v;
		if(v > max)
			max = v;
	if(data.length < 1)
	var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
	box.title = data.join(",");
	var w = box.offsetWidth;
	var h = box.offsetHeight;
	box.style.paddingRight = (data.length * 2 - w) + "px";
	box.style.position = "relative";
	for(var d=0; d<data.length; d++) {
		var tick = document.createElement("img");
		tick.border = 0;
		tick.className = "sparktick";
		tick.style.position = "absolute";
		tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
		tick.style.left = d*2 + "px";
		tick.style.width = "2px";
		v = Math.floor(((data[d] - min)/(max-min)) * h);
		tick.style.top = (h-v) + "px";
		tick.style.height = v + "px";

Setup matlab-compiled code on UVA's 64 bit machine. (Done on 10/18/2005)

They have set it up so that remote access is possible only from my computer
and haydn.

login: XXX
passwd: same as the atsac login at LA.

I used ~CorbaFreeDynaMIT-Merged-Ported-Src-20050930.tgz at that time, but the latest one is ~CorbaFreeDynaMIT-Merged-Ported-Src-20051024.tgz.

* Transfer (scp) source code to there machine, and make DynaMIT
% mv CorbaFreeDynaMIT bakCorbaFreeDynaMIT-0920
% tar zxvf CorbaFreeDynaMIT-Merged-Ported-Src-20050930.tgz
% cd CorbaFreeDynaMIT
% ./MakeDynaMIT

* Setup Matlab runtime and environment
scp the following two files first:
** {{{/space2/wenyang/MCRInstaller.zip}}} (Size: 109552323)
** {{{.environment.MCR}}}
% unzip MCRInstaller.zip
% ls
% md MCR
% mv v72/ MCR
For .environment.MCR, replace "/space2/wenyang" by the correct path. As UVA use bash instead of tcsh, we need to change "setenv XX XXX" to "export XX=XXX" as well. Source this file and use "set|grep LD_LIBRARY_PATH" to check the environment.
% source ~/.environment.MCR
Note: we have to make sure the environment is set properly before running the code generated by Matlab Compiler. It may be a good idea to add this statement to the start-up script.

* Resolve library issues
** cp estimateOD and estimateOD.ctf to target directory (where the input files are located, ~testAM3 in this case.)
** Test the run of estimateOD and check the output
% ./estimateOD
./estimateOD: error while loading shared libraries: libstdc++.so.6: 
cannot open shared object file: No such file or directory
% locate libstdc++.so
% ln -fs /usr/lib/libstdc++.so.5 libstdc++.so.6
Note: if we create the same symbolic once at /usr/lib/ and then it should work for whatever directory. (I can't did this as I am not root).
** Test it again.
% ./estimateOD
./estimateOD: /home/mit/MCR/v72/runtime/glnx86/../../sys/os/glnx86/libgcc_s.so.1:
version `GCC_3.3' not found (required by libstdc++.so.6)
% cd ~/MCR/v72/sys/os/glnx86/
% less README.libstdc++
% locate libgcc_s.so
% mv libgcc_s.so.1 libgcc_s.so.1.bak

This time it should work (complaining input file not available).

* Run DynaMIT
** Do some clean-up jobs. For example, we might need to remove {{{__pathTopology.dat}}} first, for the 64bit machine has a larger number for ~dtaBADID.
% ~/CorbaFreeDynaMIT/DynaMIT/DynaMIT dtaparam.dat
.tiddlyLink {color: [[MyFavoriteLinkColor]];}
.tiddlyLink:hover { background: [[MyFavoriteLinkColor]]; color: #fff; }
.externalLink { color: [[MyFavoriteLinkColor]];}
.externalLink:hover { background: [[MyFavoriteLinkColor]]; color: #fff;}

 .button { color: #996633;}
 .button:hover { color: #cf6; background: [[MyFavoriteLinkColor]]; }

{ color: #fff;
 background: #666666;
 clear: right;

.headerForeground a { font-weight: normal; color: #666666; }
.header { background: #333; border-bottom: 2px solid #ffbf00;}

.title { color: #996633; }

.tabSelected, .tabContents { color: #000; }


/* PageTemplate: "<div class='header' macro='gradient vert #993333 #333'> */
Basic usage:
* Specify an ''action'' (can be txt file or php ...)
** Tips: change ''cgiemail'' to ''cgiecho'' for testing.
* Add input controls, make sure the ''name'' of each is exactly the same as that in the abc.txt. 
** [required-username] will be used in abc.txt
** ''required'' means this field cannot be left empty
<input type="hidden" 
 value="<!--#echo var="SSL_CLIENT_CN"-->">
* Add a ''submit'' type input control. (We may also add a ''reset'' type)
<input type="submit" value="Submit" name="Submit">
<input name="clearall" type="reset" id="clearall" value="Clear All">

* Complete example? Use ''mkcmtform'' - make a WWW comment form
** Usage: http://web.mit.edu/cwis/docs/mkcmtform-man.html
add cwis
mkcmtform [ emailaddress [ basefilename ] ]
* Resource available at MIT:
** Information Services & Technology Quickstart: http://web.mit.edu/surveys/quickstart/
** ~CGIemail: http://web.mit.edu/ist/web/reference/web-resources/cgiemail.html
** Forms: http://web.mit.edu/ist/web/reference/create/faq/forms.html
** Protecting Content: http://web.mit.edu/ist/web/reference/web-resources/https.html
{{{Moshe Ben-Akiva}}}, ''Yang Wen'', {{{Charisma Choudhury}}},  {{{Jorge Lopes}}}, and {{{Tiago Fernandes}}}. "Data fusion with DynaMIT".  MIT-Portugal Research Workshop: Transportation Systems Focus Area. [[Instituto Superior Técnico|http://www.ist.utl.pt/]], Lisbon, Portugal, July 11 -- 15, 2008  ([[MPP Research Workshop July 2008|http://www.mitportugal.org/component/option,com_events/Itemid,30/agid,45/day,14/month,07/task,view_detail/year,2008/]])

''Yang Wen'' and {{{Moshe Ben-Akiva}}}. "Scalable Dynamic Traffic Assignment".  Workshop on Traffic Modeling: Traffic Behavior and Simulation - University of Technology, Graz, Austria, June 30, 2008 -- July 2, 2008. ([[Traffic Simulation Workshop 2008|http://portal.tugraz.at/portal/page?_pageid=75,3468695&_dad=portal&_schema=PORTAL]])

''Y. Wen'' (2008) "Scalable Dynamic Traffic Assignment -- Enhancing computational performance of DTA systems". Fourth Transportation Engineering Research Symposium of Institute of Transportation Engineers Massachusetts Chapter (MAITE) and ITS/Mass, [[Boston University|http://www.bu.edu/maps/index.php?search=photonics&campus=all&sbuttton=Search]], 22 February 2008.

''Y. Wen'' (2007c) "Scalability in Dynamic Traffic Assignment Systems". Guest lecture, Tsinghua University, Beijing, China, December 21, 2007.

''Y. Wen'' (2007b) "DynaMIT Demand Models". Research seminar, Beijing Transportation Research Center, Beijing, China, December 19, 2007.

''Y. Wen'' (2007a) "DynaMIT Architecture and Data Requirements". Research seminar, Beijing Transportation Research Center, Beijing, China, December 19, 2007.

{{{V. Ramanujam}}}, {{{V. Vaze}}}, ''Y. Wen'' (2007) "Application of multi-class vehicles counts in the calibration of micro-simulation models". Third Annual Transportation Student Research Symposium of Institute of Transportation Engineers Massachusetts Chapter (MAITE) and ITS/Mass, [[Radisson Hotel|http://www.radisson.com/bostonma]] ([[200 Stuart Street, Boston, MA, 02116|http://maps.google.com/maps?f=q&hl=en&q=200+Stuart+Street,+Boston,+Ma]]), Boston, 9 February.

''Y. Wen'' (2006) "Online Deployment of Dynamic Traffic Assignment". Second Transportation Engineering Research Symposium of Institute of Transportation Engineers Massachusetts Chapter (MAITE) and ITS/Mass, Northeastern University, 10 February.

''Y. Wen'' (2005) "Simulation-Based Evaluation of Advanced Traveler Information Services". 
First Transportation Engineering Research Symposium of Institute of Transportation Engineers Massachusetts Chapter (MAITE) and ITS/Mass, Massachusetts Institute Technology, 18 February.
* TeX -> dvi
    latex ... 
    bibtex file_name_without_extension
    latex ... (this time bibliography items are included)
    latex ... (one more time to resolve the cross references)
** We might need to run bibtex to generate bibliography (aux file need, so run latex first!).
** Prefer using Emacs AucTeX package.

* dvi -> ps
    dvips -Ppdf -t "Letter" filename.dvi
** Use dvips, -t to specify paper size.
** {{{-Ppdf}}} might not be necessary in some cases, but it is recommended (e.g., it uses vector fonts).

* ps -> pdf
** In Windows, we can also use {{{gsview}}}, menu, convert ...
    ps2pdf14 filename.ps
** {{{ps2pdf14}}} uses PDF version 1.4.  Someone claims that it is good because it "gives us the nice screen fonts (and smaller files)". If it is not present, try {{{ps2pdf13}}} or {{{ps2pdf}}} instead. 

* dvi -> pdf
** Use {{{dvipdfm}}}  or {{{dvipdfmx}}} to convert DVI directly to PDF may have better result than ~DVI->PS->PDF, such as preserve text search ability. Options include “-c” to gnore color specials (for B&W printing), “-o filename”  to set output file name, “-p papersize” to set papersize (letter, legal, ledger, tabloid, a4, or a3, default is [letter]).  
** {{{dvipdfmx}}} actually has one more advantage w.r.t. the ligatures: while both can display proper ligatures (special fonts for "ff", "fi"),  it still recognizes them as normal letters, thus providing better searching experiences (e.g., search "traffic" in the PDF generated by {{{dvipdfm}}} may not give full results).
*** Note also that the ligatures problem is related to the fonts (e.g., cmr). Sometimes choosing another font (e.g, {{{\usepackage{times} }}}) works, too.
    dvipdfm  filename
** In linux, try
    dvipdf [ options ] input.dvi [ output.pdf ] ...

* TeX -> pdf
**  {{{pdflatex}}} does not use EPS figures. We can, however, convert EPS to PDF first, by using {{{epstopdf}}} or other approaches. 
    pdflatex filename.tex
!! Teaching Assistant for the following courses:
* Spring 2007. [[1.202/ESD.212  Demand Modeling|http://stellar.mit.edu/S/course/1/sp07/1.202/index.html]]
** Give weekly recitations; grade case-studies, problem sets, and the exams; revise course slides.
* July 31 - August 4, 2006. 1.10s Modeling and Simulation of Transportation Networks
** Give software demos; answer questions; revise course slides.
* June 19 - 23, 2006.  14.61s Individual Choice Behavior: Theory and Application of Discrete Choice Analysis
** Give software demos; assist the Lab sections; revise course slides
* Fall 2005, [[1.222J/ESD.202J Transportation Demand and Economics|http://stellar.mit.edu/S/course/1/fa05/1.222J/]]
** Give recitations; grade homeworks and the final exam.
* August 1 - 5, 2005. 1.10s Modeling and Simulation of Transportation Networks
** Give software demos; answer basic questions; prepare some slides.
* June 20 - 24, 2005.  14.61s Individual Choice Behavior: Theory and Application of Discrete Choice Analysis to Consumer Demand and Market Share
** Give software demos; answer questions in the Lab sections. 
* August 2 - 6, 2004. 1.10s Modeling and Simulation for Intelligent Transportation Systems

Notes: More about  [[ITS Summer courses]].
!!Athena related topics
<<listTags Athena modified '*' reverse>>
!! Recent news
<<listTags Blog modified '*' reverse>>
/%<<listTags Blog modified '*' reverse limit:5>>%/ /% there is a bug for the above code, if limit:N is used with reverse, we should show the last N posts, but here it give the first N. %/
This site is a JavaScript based Wiki. If you want the plain text version, please go to http://web.mit.edu/wenyang/www/text/
TiddlyWiki: a reusable non-linear personal web notebook, published by Jeremy Ruston at Osmosoft under a BSD Open Source License. See http://www.tiddlywiki.com/

Some resources:
* [[TiddlyWiki Home|http://www.tiddlywiki.com/]]
* http://www.tiddlywiki.org
* [[Tutorial|http://www.blogjones.com/TiddlyWikiTutorial.html#EasyToEdit]]
* [[zRenard's site|http://www.zrenard.com/tiddlywiki/tiddlywiki.html]]
* [[TiddlyWiki Tips|http://tiddlywikitips.com/]]

More resource on TW:
* http://www.tiddlyforge.net/
* http://tiddlywikiguides.org/index.php?title=TiddlyWiki_FAQ
* http://groups.google.com/group/TiddlyWiki

Resource on JavaScript and others:
* http://www.w3schools.com/js/default.asp
* http://www.math.union.edu/~dpvc/jsMath/
* Use {{{g++ -static}}} to link {{{libstdc++.a}}} instead of {{{libstdc++.so}}}.
* Use {{{strip}}} to remove symbols. This will reduce the target binary to about 1/10 of the original size! But the down side is some diagnosis tasks cannot be done, such as {{{gprof}}}.

A test to show the power of new compilers:
* On guitar, original binary built with gcc 3.3.2 takes 7~8 minutes to run one hour simulation (3am-4am) using 12 5-minute OD intervals, 2 estimation iterations and 2 prediction iterations. 
* New binary built on "T" with gcc 3.4.2, linked with static {{{libstdc++.a}}} (so that it works on guitar), takes about 5~6 minutes only.
* Link with {{{libstdc++.a}}} causes an increase of 1M in file size. But this size (14M, before strip) is still smaller than the one on guitar (22M).

There is difference on output/i3d.spd (yet others including all text output files are fine).
What need to (can be) done?

* Input Preparation
** Network Editor(jRNE, xdta)
** dtaparam.dat generator (GUI) (and also validater)
* Run-time Management
** Cron job viewer (editor)
** Archive and clean-up options (what to save, what to process, what to delete)
** Report generator (errors, warnings, run-time, abnormal input/output)
** Incident editor (based on jRNE?)
** Sensor status manager? (shown on xdta?)
* Historical Data Management
** Historical data viewer
** Historical data builder

<<tabs tabsClass DynaMIT "DynaMIT Todo List" DynaMITTodoList MITSIMLab "MITSIMLab Todo List" MITSIMLabTodoList>>
A scalable font technology, in contrast to bitmap type font. See http://en.wikipedia.org/wiki/Truetype for more.
A lossless, variable-length character encoding for Unicode.
See http://en.wikipedia.org/wiki/UTF-8 for more details.
Not having [[Firefox]] installed, we may still use Gecko engine to render web pages, using some extention based on Internet Explorer. In MyIE2 (which has been renamed as Maxthon), check the menu {{{File -> New -> Use Gecko Engine}}} before openning TW (or any other web pages). 

It seems to have notable improvement on the animation scripts of TW.

Other problems (particular to IE), such as the fail-to-extract-permaview bug, still remain.
(Originally posted on 26 January 2007)

!! Install Subversion 
* Download [[subversion-1.4.3.tar.bz2|http://subversion.tigris.org/downloads/subversion-1.4.3.tar.bz2]] and [[subversion-deps-1.4.3.tar.bz2|http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.bz2]]
* Install: remove previous version; build new version.
$ tar jxvf subversion-1.4.3.tar.bz2
$ tar jxvf subversion-deps-1.4.3.tar.bz2
$ cd subversion-1.4.3
* Follow the instructions from the INSTALL file
# rm -f /usr/local/lib/libsvn*
# rm -f /usr/local/lib/libapr*
# rm -f /usr/local/lib/libexpat*
# rm -f /usr/local/lib/libneon*
$ sh ./autogen.sh
$ ./configure  |& tee 20070126configure.log   (using tcsh)
$ make  |& tee 20070126make.log
# make install   2>&1 | tee 20070126make_install.log  (using bash)
** Some warning message from configure:
You don't seem to have Berkeley DB version 4.0.14 or newer installed and linked to APR-UTIL.  We have created Makefiles which will build without the Berkeley DB back-end; your repositories will use FSFS as the default back-end.
!! Create repository
* Create a repository in a different hard disk from the usual one I work with.
# mkdir /megaspace/svnroot
# cd /megaspace/svnroot
# mkdir repository_yw
# chown MY_USER_NAME repository_yw/
$ svnadmin create /megaspace/svnroot/repository_yw
!! Import DynaMIT source code
$ cd ~/Trash
$ mkdir DTA
$ cd DTA
$ mkdir trunk
$ mkdir tags
$ mkdir branches
$ cp -a ~/CorbaFreeDynaMIT-SA-Src-20070118-tmp2.tgz trunk/
$ cd trunk
$ tar zxvf CorbaFreeDynaMIT-SA-Src-20070118-tmp2.tgz
$ rm CorbaFreeDynaMIT-SA-Src-20070118-tmp2.tgz
$ bash
$ find . -name "CVS" | xargs rm -fr
// and after cleanning up some mess...
$ svn import /home/MY_USER_NAME/Trash/DTA file:///megaspace/svnroot/repository_yw/DTA -m "First Import"
Adding         /home/MY_USER_NAME/Trash/DTA/trunk/CorbaFreeDynaMIT/Requirement.txt
Adding         /home/MY_USER_NAME/Trash/DTA/branches
Adding         /home/MY_USER_NAME/Trash/DTA/tags

Committed revision 1.
!! Checkout new working copy
$ bash
$ cd
$ svn checkout file:///megaspace/svnroot/repository_yw/DTA/trunk DTA
A    DTA/CorbaFreeDynaMIT/etc/dta.mk
A    DTA/CorbaFreeDynaMIT/Makefile
A    DTA/CorbaFreeDynaMIT/MakeDynaMIT64
A    DTA/CorbaFreeDynaMIT/Requirement.txt
Checked out revision 1.
!!! Checkout remotely via svn+ssh
$ cd
$ svn co svn+ssh://username@server.mit.edu/megaspace/svnroot/my_repository/DTA/ DTA
!! References:
* http://subversion.tigris.org/
* [[Version Control with Subversion|http://svnbook.red-bean.com]]
* [[Subversion Cheat Sheet|http://www.abbeyworkshop.com/howto/misc/svn01/]]
chkconfig  provides  a  simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories.

Example: use {{{apachectl start}}} to start httpd in RHEL 4. (to be continue...)
!! Note (5/6/2008): 
Last week I took a look at the {{{jRNE}}} source code and realized that {{{xdta.ini}}} file used here seems to have some unusual requirements, compared with what we are using for {{{xdta}}}.  Perhaps it is more appropriate to call it {{{jdta.ini}}} file. 

It appreas to me from the source code that a "format" section is needed. It can be "Binary" or "ASCII". The former uses DynaMIT output xi3d.***, while the latter uses files converted from the convState3D.linux program.

The source code also indicates only the following fields are recognized: "[network]", "[state3d]", "[format]", "[start]", "[estim]", and "[predict]".  Everything else will be ignored by the parser.

As suggested by Costas, we may refer to the {{{jRNE}}} program as {{{jDTA}}} (when we use it to show minute-by-minute outputs.

!! Original post (7/17/2006):
We can use jRNE instead of xdta to show the minute-by-minute result (estimation & prediction) of a previous DynaMIT run, without restarting DynaMIT again. Below are the steps.
* Make sure we run the jRNE  with sufficient memory (e.g., 1GB)
/usr/java/jre1.5.0_06/bin/java -Xmx100m -jar ~/bin/jRNE.jar &
* Load Previous DynaMIT-R output in jRNE
** Make sure network file has correct format: remove the comments from the sensor portion of the network file (both those in a separate line, as well as those in the end of a line, those starting with '#').
* Convert flw/spd/dsy xi3d file to text format
convState3D.linux convState3D xi3d.{flw|spd|dsy}
* specify .ini file to use ASCII format, e.g., {{{xdtaText.ini}}}



[start]       = 04:00:00
[predict]     = 1800
[predictIter] = 1
[predictExec] = 900
[estim]       = 900
[estim1]      = 900
[estimIter]   = 1
[estimExec]   = 900
Cool stuff by Peter Jipsen: 

See also
jsMath Home: http://www.math.union.edu/~dpvc/jsMath/welcome.html
* Preparation
  $ cd /path/to/src
  $ gtags
  $ ls G*
* Less
$ export LESSGLOBALTAGS=global
$ less -t func1
$ less -TGTAGS -t func1
$ less -TGRTAGS -t func1     # go to the referenced point of func1
** If a number of objects are located, {{{less}}} goes to the first tag. You can go to next tag by typing ''t'' and back by typing ''T''.
** From {{{less}}} session, you can use {{{:t}}} command to locate new symbol.
* Emacs
** put {{{gtags.el}}} to load path first.
(autoload 'gtags-mode "gtags" "" t)

* http://www.gnu.org/software/global/manual/global.html
My testing site: http://web.mit.edu/wenyang/www/gmap/

* Sign up: http://maps.google.com/apis/maps/
* Document: http://maps.google.com/apis/maps/documentation/
This site is my (temporary?) homepage. It is actually a JavaScript based Wiki, which I also use as some sort of blog and online notebook.
Some observation based on the debug message of DynaMIT on LA network.
* Demand file
** Two block of demand, one for 3am, the other for 3:15am.
** The first block of demand is assumed to be loaded from 3:00 to 3:15.
10800 0 4.0
 { 93 159 6 }
 { 93 160 4 }
 { 93 163 80 }
11700 0 4.0
 { 93 159 0 }
 { 93 160 0 }
 { 93 163 13 }
* Parameter file (dtaparam.dat)
StartSimulation = 03:00:00
StopSimulation = 03:30:00
OdInterval = 5 // in minutes 
* Result
** DynaMIT will use 5-minute OD interval, as indicated by dtaparam.dat
** Demand from the first block is still assumed to be aggregated in 15-minutes.
** Demand loaded for 3:00-3:05 (and 3:05-3:10, 3:10-3:15) is calculated as one-third of the one indicated by demand file:
(93, 159): 6 * 4.0 * (5/60) = 2.0 
(93, 160): 4 * 4.0 * (5/60) = 1.3 
(93, 163): 80 * 4.0 * (5/60) = 26.7
* Comments
** 4.0 is the scale (the third parameter in the time-stamp line)
** The numbers in the demand block (6, 4, 80) are ''hourly flows'', so the actual demand should be scale by 5/60 (5 minute vs. 1 hour)
** Actual demands loaded are integers. Fractions will be trunctated, using floor(num+0.5) or int(num+0.5)
* ''Science Intern'' @ [[ChoiceStream Inc.|http://www.choicestream.com/]], Summer 2007.
Developed latent-class models for personalized recommendation engine, resulting over 200% improvement. Bonus awarded for using [[Stata|http://www.stata.com/]] to develop a streamlined tool to automate the latent-class model estimation and output processing, reducing human process time to 5%.

* Other experiences
** [[Teaching Assistant|Teaching]] for four MIT courses
*** Demand modeling (2007)
*** Transportation Demand and Economics (2005)
*** Individual Choice Behavior (2005~2006)
*** Modeling and Simulation of Transportation Networks (2004~2006)
** Leadership: Vice-president of MIT Chinese Student & Scholar Association (600+ members), 2006~2007
*** Organized large events including the Mid-Autumn Harbor Cruise (400+ attendees) and the Chinese New Year Performance Show (900+ attendees).

See also [[Activities in Sports]], [[Hobbies]].
My name is [[Yang Wen|My name in Chinese]] . 

I graduated from MIT in 2008 and received a Ph.D. degree in Civil and Environmental Engineering Systems (Feb 2009).  Currently I am a senior member of technical staff at Oracle focusing on collaboration technologies.  I remain a research affiliate of the [[MIT ITS Lab|http://its.mit.edu]] led by Prof. [[Moshe Ben-Akiva|http://cee.mit.edu/ben-akiva]]. 

Most of the stuff you will find in this place are likely to be somewhat out-dated... yes I have been lazy on updating the page @_@

For my professional expertise and experience please check out my [[LinkedIn profile|http://www.linkedin.com/in/wenyang]]

Email: {{{ wenyang [AT] mit [DOT] edu }}}
// use <<displayDefaultTiddlers 'Home Page'>>
// <<displayDefaultTiddlers>>
// YangWen 1/8/2006: update for TW 2.0
// change closeAllTiddlers() to story.closeAllTiddlers(); 
// same to displayTiddlers(null,start,1,null,null);

version.extensions.displayDefaultTiddlers = {major: 0, minor: 1, revision: 0, date:new Date(2005,8,23)};
config.macros.displayDefaultTiddlers = {label: "default tiddlers", prompt: "Display default tiddlers"};
config.macros.displayDefaultTiddlers .handler = function(place,macroName,params) {
 var displayDefaultTiddlersFunc = function () {
 var start = store.getTiddlerText("DefaultTiddlers");
 if (params[0]==null) {
 } else {
* Common usage (to create a cd image for both Linux and Windows):
mkisofs -iso-level 4 -J -R -V label -o ok.iso /some/dir
* Explanation:
-iso-level level 
      Level 4 officially does not exists but mkisofs maps it to ISO-9660:1999 which
       is ISO-9660 version 2.
-J    Generate  Joliet  directory records in addition to regular iso9660 file names. 
-R    Generate SUSP and RR records using the Rock Ridge protocol to further describe
       the files on the iso9660 filesystem.
-V volid
      Specifies the volume ID (volume name or label) to be written into the master
       block.  There is space on the disc for 32 characters of information.
** With level 4, an enhanced volume descriptor with version number and file structure version number set to 2 is emitted. There may be more than 8 levels of directory nesting, there is no need for a file to contain a dot and the dot has no more special meaning, file names do not have version numbers, the maximum length for files and directory is raised to 207. If Rock Ridge is used, the maximum ISO-9660 name length is reduced to 197.

** Note: to make a iso file from a CD, there's an easy way:
  cp /dev/cdrom xxxx.iso
pdftk original.pdf input_pw foo output new.pdf owner_pw bar allow printing
//Smiley Samples:
//<<smiley :-)>>
//<<smiley :-(>>
//<<smiley ;-)>>
//<<smiley :-|>>
//<<smiley :-D>>
//here's how they behave inside <<smiley :-)>> some text.
//a few more to come!

version.extensions.smileyMacro = {major: 0, minor: 1, revision: 0, date: new Date(2005,7,20)};
//Author: Alan Hecht
config.macros.smiley = {}
config.macros.smiley.handler = function(place,macroName,params)
 var palette = ["transparent","#000000","#1a1507","#352e18","#464646","#666666","#a3141e","#b06b63","#cc9900","#dd9030","#dddddd","#e89d00","#edc32a","#f3cb3c","#fdf201","#fdf526","#ff3149","#ffac00","#ffbf06","#ffc846","#ffcc66","#ffd758","#ffdd01","#ffea7b","#ffed55","#ffffff"];
 var data = params;
 var imageMap = null;
 if(data[0] == ":-)" || data[0] == ":)")

 imageMap = "aaaaabbbbbaaaaaaaabdtyyvtdbaaaaabnyxxxxxujbaaabmyyffyffuujbaadyyyeeyeetttdabppppddyddpmmlbbwoooooooowsrlbbwwpooooowwmrlbbwwboooowwwbllbbwwwboooowbrllbacwwwbbbbbrllcaablswwwwsrrlibaaablsssrrllibaaaaabcrrlllcbaaaaaaaabbbbbaaaaa";
 else if(data[0] == ":-(" || data[0] == ":(")
 imageMap = "aaaaabbbbbaaaaaaaabdtyyvtdbaaaaabnyxxxxxujbaaabmyyyyyyyuujbaadyyyeeyeetttdabppppddyddpmmlbbwoooooooowsrlbbwwpooooowwmrlbbwwoooooowwrllbbwwwwbbbbbsrllbacwwbwwwwsbllcaablswwwwsrrlibaaablsssrrllibaaaaabcrrlllcbaaaaaaaabbbbbaaaaa";
 else if(data[0] == ";-)" || data[0] == ";)")
 imageMap = "aaaaabbbbbaaaaaaaabdtyyvtdbaaaaabnyxxxxxujbaaabmyyxxxxxuujbaadyyyxxxeetttdabppphddyddpmmlbbwoooooooowsrlbbwwpooooowwmrlbbwwboooowwwbllbbwwwboooowbrllbacwwwbbbbbrllcaablswwwwsrrlibaaablsssrrllibaaaaabcrrlllcbaaaaaaaabbbbbaaaaa";
 else if(data[0] == ":-|" || data[0] == ":|")
 imageMap = "aaaaabbbbbaaaaaaaabdtyyvtdbaaaaabnyxxxxxujbaaabmyyffyffuujbaadyyyeeyeetttdabppppddyddpmmlbbwoooooooowsrlbbwwpooooowwmrlbbwwoooooowwrllbbwwwwbbbbbsrllbacwwwwwwwsrllcaablswwwwsrrlibaaablsssrrllibaaaaabcrrlllcbaaaaaaaabbbbbaaaaa";
 else if(data[0] == ":-D" || data[0] == ":D")
 imageMap = "aaaaabbbbbaaaaaaaabdtyyvtdbaaaaabnyxxxxxujbaaabmyyeeyeeuujbaadyyyeeyeetttdabppppyyyyypmmlbbwbbbbbbbbbbblbbwbkzzzzzzzkbwbbwbfzzzzzzzfbwbbwbkzzzzzzzkbwbacwbkzzzzzkblcaablsbkzzzkblibaaablsbbbbblibaaaaabcrrlllcbaaaaaaaabbbbbaaaaa";
 else if(data[0] == "WEN")
 imageMap = "abaaaabbbbbbbaaaabbaabaaaaabaaaaabaabaaaaabaabaaaaabbbbbbbaaabbaaabaaaaabaaaabaaabaaaaabaaaaaababbbbbbbaaaaabaaaaaaaaaaaaabaabbbbbbbbbabbbaabaababaabaaabaabaababaabaaabaabaababaabaaabaabaababaabaaababbbbbbbbbbbaabaaaaaaaaaaaa";
 else if(data[0] == "YANG")
 imageMap = "abbbbbaabbbbbbaabaaabaabaaaabaabaabaaabaaaabaabaabaaabaaaabaababaaaabaaaabaabaabaaabaaaabaabaabaaabbbbbbaabaaabaabaaaabaabaaabaabaaaabaabaaabaabaaaabaabbabaaabaaaabaababaaaabaaaabaabaaaaaabaaaabaabaaaaaabbbbbbaabaaaaaabaaaaba";
 createTiddlyElement(place,"span",null,"errorNoSuchMacro","unknown smiley");
 var box = createTiddlyElement(place,"span",null,"smiley",String.fromCharCode(160));
 box.style.position = "relative";
 box.style.width = "15px";
 box.style.height = "15px";
 box.style.marginLeft = "1px";
 box.style.marginRight = "1px";
 box.style.paddingRight = "12px";
 box.style.verticalAlign = "top";

 //now divide into 15x15 grid and create each pixel
 // rows
var r,c; // YW 2/2/2006: avoid crash in Firefox
 for(r=0; r<15; r++)
 // columns
 for(c=0; c<15; c++)
 //create each pixel with the correct background
 var pix = document.createElement("img");
 pix.className = "smileyPixel";
 pix.style.position = "absolute";
 pix.border = 0;
 pix.style.top = r + "px";
 pix.style.left = c + "px";
 pix.style.width = "1px";
 pix.style.height = "1px";
 pix.style.backgroundColor = palette[imageMap.charCodeAt((r*15)+c)-97];
 pix.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";