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
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></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 excludeLists'></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>>
<<importTiddlers>>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
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]]
<!--{{{-->
<div class='header' role='banner' 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>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea' role='main'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/*{{{*/
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]];}

.tabSelected {color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	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]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#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]];}

.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]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#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 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}

.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:0 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 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

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

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

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding: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 0;}
.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 0 0 0.5em;}
.tab {margin:0 0 0 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 0 14em;}

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

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

.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:0 0.25em; padding:0 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:0 3px 0 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 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}

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

.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;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding: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;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></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>
<!--}}}-->
The SIMILAR API suite was built while considering the best compromise possible between:
*The +++^34em^*@[efficiency]
Efficiency is here meant in the context of computing: 
*Efficiency in memory usage;
*Efficiency in computations number;
*Efficiency in time.
=== of the simulations;
*The best practices in +++^34em^*@[Knowledge engineering]
Perform the following operations with the least effort as possible:
*Model revision;
*Model extension;
*Model reuse.
===, in the context of simulations;
*The best practices in +++^34em^*@[Software engineering]
Here in the context of simulation:
*Separate the generic simulation algorithms with the domain-dependent model;
*Use software engineering tools facilitating the construction of the binaries.
===, in the context of simulations;
This led to a layered architecture separating the API suite in six different API, distributed between two kernels: the ''micro-kernel'' and the ''extended-kernel''.

{{bigemphasisblock{
Note that these two APIs are compatible: you can write a part of your model using the micro-kernel and the rest using the extended kernel (or conversely)!
}}}
!The micro-kernel
[>img(45%,)[images/structure_microKernel.png]]
The ''micro kernel'' of SIMILAR defines the core classes of the SIMILAR API. It provides the minimal implementation of these concepts and leaves the implementation of the simulations opened to many optimizations. Thus, this kernel is appropriate for developers wishing to ''tune the low level implementation of the simulation''.

The micro kernel of SIMILAR is characterized by three components:
*The [[API of the micro kernel|./microKernel/index.html]], containing the java classes of that kernel.
*The [[common libraries|./microKernel/commonLibs/index.html]] of the micro kernel, containing generic implementations of simulation algorithms and results exporting features.
*The [[examples|./microKernel/examples/index.html]] illustrating the use of the micro kernel and the common libraries to design simulations.
!The extended-kernel
[>img(45%,)[images/structure_extendedKernel.png]]
The ''extended kernel'' of SIMILAR defines the modular classes of the SIMILAR API. It provides a highly customizable structure to the elements of SIMILAR, where changes can be made even at runtime: agents are even capable of +++^34em^*@[introspection]
Agent are aware of the nature of their behavior and can base their reasoning on this information.
=== and +++^34em^*@[intercession]Agents are able to change dynamically their own behavior, //i.e.// adding, removing or modifying elements inside its perception, memory revision or decision process.
===. Thus, this kernel is appropriate for developers wishing to ''create modular and easy to modify simulations''.

The extended kernel of SIMILAR is characterized by three components:
*The [[API of the extended kernel|./extendedKernel/index.html]], containing the java classes of that kernel.
*The [[extended libraries|./extendedKernel/extendedLibs/index.html]] of the extended kernel, containing generic implementations of simulation algorithms and results exporting features.
*The [[examples|./microKernel/extendedKernel/index.html]] illustrating the use of the micro-kernel, the common libraries, the extended kernel and the extended libraries to design simulations.
/***
|''Name:''|BackstageSidebarPlugin|
|''Description:''|Adds a "new tiddler" option to the backstage|
|''Author''|Yoann Kubera|
|''CodeRepository:''|n/a |
|''Version:''|0.1|
|''Comments:''| |
|''License''|None |

***/


//{{{
if(!version.extensions.BackstageNewtiddlerPlugin) {
version.extensions.BackstageNewtiddlerPlugin= {installed:true};
config.tasks.newTiddler = {
        text: 'new tiddler',
        tooltip: config.macros.newTiddler.prompt,
        action: function(){
                var e=createTiddlyElement(document.body,'span');
                e.style.display='none';
                wikify("<<newTiddler>>",e);
                e.getElementsByTagName('a')[0].onclick( );
                document.body.removeChild(e);
        }
}
config.backstageTasks.push("newTiddler");
} //# end of 'install only once'
//}}}
/***
|''Name:''|BackstageSidebarPlugin|
|''Description:''|Moves the sidebar to the backstage, as suggested at http://www.tiddlywiki.org/wiki/Dev:Backstage#Customization|
|''Author''|JonathanLister|
|''CodeRepository:''|n/a |
|''Version:''|0.1|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License''|[[BSD License|http://www.opensource.org/licenses/bsd-license.php]] |
|''~CoreVersion:''|2.4|

***/

//{{{
if(!version.extensions.BackstageSidebarPlugin) {
version.extensions.BackstageSidebarPlugin = {installed:true};

config.tasks.sidebar = {
	text: "sidebar",
	tooltip: "sidebar options",
	content: "<<tiddler SideBarOptions>><<tiddler SideBarTabs>>"
};
config.backstageTasks.push("sidebar");

config.macros.BackstageSidebarPlugin = {
	tiddler:tiddler
};

config.macros.BackstageSidebarPlugin.init = function() {
	var tiddler = this.tiddler;
	setStylesheet(store.getTiddlerText(tiddler.title+'##Stylesheet'),'BackstageSidebarPlugin');
};

} //# end of 'install only once'
//}}}

/***
!Stylesheet
#sidebar {
	display:none;
}
!(end of Stylesheet)
***/
If you are new to SIMILAR and IRM4MLS, the beginner's guide contains useful information about the theory behind SIMILAR and the decomposition of this API suite

Your starting point in this guide depends on how knowledgeable you are about SIMILAR<html><sup>1</sup></html>. Do not hesistate to skip one step if you are already familiar with it.
<html><sub>[1: ... and on your tolerance to mathematical notations.]</sub></html>
!Theory
[<img[images/beginnersGuideSummary1.png]]
The SIMILAR suite is a multi-agent based simulation API relying on the SIMILAR meta-model. This model uses ''Influence/Reaction principle'' and is strongly inspired from the ''Influence/Reaction principle for Multiagent based Simulations'' (IRM4S) and ''Influence/Reaction Model for Multi-Level Simulations'' (IRM4MLS) models.

Since SIMILAR is based on many theoretical concepts from these theories, we highly recommend new users to read these papers.

{{linkbigbtn center{[[Get the papers|Bibliography]]}}}
!Architecture
[<img[images/beginnersGuideSummary2.png]]
The SIMILAR API suite was built while considering the best compromise possible between +++^34em^*@[<strong>simulation efficiency</strong>]Efficiency is here meant in the context of computing: 
*Efficiency in memory usage;
*Efficiency in computations number;
*Efficiency in time.
===, +++^34em^*@[<strong>knowledge engineering best practices</strong>]
Perform the following operations with the least effort as possible:
*Model revision;
*Model extension;
*Model reuse.
=== and +++^34em^*@[<strong>software engineering best practices</strong>]
Here in the context of simulation:
*Separate the generic simulation algorithms with the domain-dependent model;
*Use software engineering tools facilitating the build of the binaries.
===. This lead to a layered architecture separating the API suite in six different API, distributed between two kernels.

In the end, the only API necessary to build simulations using SIMILAR is the [[API of the micro-kernel|./microKernel/index.html]]. Yet, we highly recommend to take into consideration the various tools provided by the other APIs. These tools will greatly facilitate your task as a simulation designer.

{{linkbigbtn center{[[More about the SIMILAR architecture|API suite Architecture]]}}}
!Simulation structure
[<img[images/beginnersGuideSummary4.png]]
SIMILAR is designed to have a highly customizable architecture, while making the structure of a simulation as explicit as possible. It distinguishes explicitly elements that are often left to the developers and embedded into the code of the simulations.

This part of the documentation presents the general organisation of a simulation using SIMILAR. It describes the ''software decomposition of a simulation'' and the ''role of each element of the decomposition'' in the simulation.

{{linkbigbtn center{[[Structure of a simulation in SIMILAR|General structure]]}}}
!Design help
[<img[images/beginnersGuideSummary3.png]]
The documentation of each kernel of SIMILAR embeds information helping the design of simulations:
*A ''simulation design methodology'', telling how to incrementally build a simulation;
*Runnable ''examples'' showing how some simulations can be implemented;
*''Learning tools'', including:
**Tools focusing on the comprehension of the mechanisms underlying SIMILAR;
**Examples showing how to solve specific simulation problems.

{{linkbigbtn{[[Micro-kernel|./microKernel/index.html]]}}} {{linkbigbtn{[[Extd. kernel|./extendedKernel/index.html]]}}}
The SIMILAR API suite is based on various theories that are not fully described in this documentation. More information can be found in the following documents:
*The //SImulations with MultI-Level Agents and Reactions// (''SIMILAR'') theory +++?[<span class="docsmallbtn">Documents</span>]
{{docsection{
!Available documents
Paper focusing on the formalized model of SIMILAR:
<<<
[>img(50px,)[images/pdf.png][./files/similar.pdf]] ''On time and consistency in multi-level agent-based simulations''<br/>G. Morvan, Y. Kubera.,<br/>//arXiv:1703.02399//, 2017
<<<
}}}
===

*The //Influence/Reaction Model for Multi-Level Simulations// (''IRM4MLS'') theory +++?[<span class="docsmallbtn">Documents</span>]
{{docsection{
!Available documents
Paper focusing on the formalized model of IRM4MLS:
<<<
[>img(50px,)[images/pdf.png][./files/morvan10irm4mls.pdf]] ''IRM4MLS: The Influence Reaction Model for MultiLevel Simulation''<br/>G. Morvan, A. Veremme, D. Dupont,<br/>//Multi-Agent-Based Simulation XI,// LNAI 6532, pages 16–27. Springer, 2011
<<<
Paper focusing on the formalized model of IRM4S, IRM4MLS and on a simulation example using IRM4MLS (multi-level game of life):
<<<
[>img(50px,)[images/pdf.png][./files/morvan12irm4mls.pdf]] ''Multi-level agent-based modeling with the Influence Reaction principle''<br/>G. Morvan, D. Jolly,<br/>//CoRR, abs/1204.0634//, 2012
<<<
}}}
===

*The //Influence/Reaction principle for Multiagent based Simulations// (''IRM4S'') theory +++?[<span class="docsmallbtn">Documents</span>]
{{docsection{
!Available documents
Short paper describing the main notations and features of the IRM4S model:
<<<
[>img(50px,)[images/pdf.png][./files/michel07irm4sShort.pdf]] ''The IRM4S Model: The Influence/Reaction Principle for Multi-Agent Based Simulation''<br/>F. Michel<br/>//Proceedings of AAMAS'07//, Honolulu, Hawai’i, USA, May 14–18 2007
<<<
}}}
===

*The //Influence/Reaction model// theory +++?[<span class="docsmallbtn">Documents</span>]
{{docsection{
!Available documents
Paper focusing on the formalized model of the Influence/Reaction principle:
<<<
[>img(50px,)[images/pdf.png][./files/ferber96ir.pdf]] ''Influences and Reaction : a Model of Situated Multiagent Systems''<br/>J. Ferber, JP. Müller<br/>//Proceedings of the Second International Conference on Multiagent Systems//, 1996
<<<
}}}
===
/*{{{*/
config.options.txtUserName='Designer';
config.options.chkSaveBackups=false;
config.options.chkDisableWikiLinks=true;
config.options.chkSinglePageMode=true;
config.options.chkHideTabsBarWhenSingleTab=true;
/*}}}*/
[[Home]]
/***
|Name|DisableWikiLinksPlugin|
|Source|http://www.TiddlyTools.com/#DisableWikiLinksPlugin|
|Version|1.6.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|selectively disable TiddlyWiki's automatic ~WikiWord linking behavior|
This plugin allows you to disable TiddlyWiki's automatic ~WikiWord linking behavior, so that WikiWords embedded in tiddler content will be rendered as regular text, instead of being automatically converted to tiddler links.  To create a tiddler link when automatic linking is disabled, you must enclose the link text within {{{[[...]]}}}.
!!!!!Usage
<<<
You can block automatic WikiWord linking behavior for any specific tiddler by ''tagging it with<<tag excludeWikiWords>>'' (see configuration below) or, check a plugin option to disable automatic WikiWord links to non-existing tiddler titles, while still linking WikiWords that correspond to existing tiddlers titles or shadow tiddler titles.  You can also block specific selected WikiWords from being automatically linked by listing them in [[DisableWikiLinksList]] (see configuration below), separated by whitespace.  This tiddler is optional and, when present, causes the listed words to always be excluded, even if automatic linking of other WikiWords is being permitted.  

Note: WikiWords contained in default ''shadow'' tiddlers will be automatically linked unless you select an additional checkbox option lets you disable these automatic links as well, though this is not recommended, since it can make it more difficult to access some TiddlyWiki standard default content (such as AdvancedOptions or SideBarTabs)
<<<
!!!!!Configuration
<<<
<<option chkDisableWikiLinks>> Disable ALL automatic WikiWord tiddler links
<<option chkAllowLinksFromShadowTiddlers>> ... except for WikiWords //contained in// shadow tiddlers
<<option chkDisableNonExistingWikiLinks>> Disable automatic WikiWord links for non-existing tiddlers
Disable automatic WikiWord links for words listed in: <<option txtDisableWikiLinksList>>
Disable automatic WikiWord links for tiddlers tagged with: <<option txtDisableWikiLinksTag>>
<<<
!!!!!Revisions
<<<
2008.07.22 [1.6.0] hijack tiddler changed() method to filter disabled wiki words from internal links[] array (so they won't appear in the missing tiddlers list)
2007.06.09 [1.5.0] added configurable txtDisableWikiLinksTag (default value: "excludeWikiWords") to allows selective disabling of automatic WikiWord links for any tiddler tagged with that value.
2006.12.31 [1.4.0] in formatter, test for chkDisableNonExistingWikiLinks
2006.12.09 [1.3.0] in formatter, test for excluded wiki words specified in DisableWikiLinksList
2006.12.09 [1.2.2] fix logic in autoLinkWikiWords() (was allowing links TO shadow tiddlers, even when chkDisableWikiLinks is TRUE).  
2006.12.09 [1.2.1] revised logic for handling links in shadow content
2006.12.08 [1.2.0] added hijack of Tiddler.prototype.autoLinkWikiWords so regular (non-bracketed) WikiWords won't be added to the missing list
2006.05.24 [1.1.0] added option to NOT bypass automatic wikiword links when displaying default shadow content (default is to auto-link shadow content)
2006.02.05 [1.0.1] wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.09 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.DisableWikiLinksPlugin= {major: 1, minor: 6, revision: 0, date: new Date(2008,7,22)};

if (config.options.chkDisableNonExistingWikiLinks==undefined) config.options.chkDisableNonExistingWikiLinks= false;
if (config.options.chkDisableWikiLinks==undefined) config.options.chkDisableWikiLinks=false;
if (config.options.txtDisableWikiLinksList==undefined) config.options.txtDisableWikiLinksList="DisableWikiLinksList";
if (config.options.chkAllowLinksFromShadowTiddlers==undefined) config.options.chkAllowLinksFromShadowTiddlers=true;
if (config.options.txtDisableWikiLinksTag==undefined) config.options.txtDisableWikiLinksTag="excludeWikiWords";

// find the formatter for wikiLink and replace handler with 'pass-thru' rendering
initDisableWikiLinksFormatter();
function initDisableWikiLinksFormatter() {
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="wikiLink"; i++);
	config.formatters[i].coreHandler=config.formatters[i].handler;
	config.formatters[i].handler=function(w) {
		// supress any leading "~" (if present)
		var skip=(w.matchText.substr(0,1)==config.textPrimitives.unWikiLink)?1:0;
		var title=w.matchText.substr(skip);
		var exists=store.tiddlerExists(title);
		var inShadow=w.tiddler && store.isShadowTiddler(w.tiddler.title);
		// check for excluded Tiddler
		if (w.tiddler && w.tiddler.isTagged(config.options.txtDisableWikiLinksTag))
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// check for specific excluded wiki words
		var t=store.getTiddlerText(config.options.txtDisableWikiLinksList);
		if (t && t.length && t.indexOf(w.matchText)!=-1)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// if not disabling links from shadows (default setting)
		if (config.options.chkAllowLinksFromShadowTiddlers && inShadow)
			return this.coreHandler(w);
		// check for non-existing non-shadow tiddler
		if (config.options.chkDisableNonExistingWikiLinks && !exists)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
		// if not enabled, just do standard WikiWord link formatting
		if (!config.options.chkDisableWikiLinks)
			return this.coreHandler(w);
		// just return text without linking
		w.outputText(w.output,w.matchStart+skip,w.nextMatch)
	}
}

Tiddler.prototype.coreAutoLinkWikiWords = Tiddler.prototype.autoLinkWikiWords;
Tiddler.prototype.autoLinkWikiWords = function()
{
	// if all automatic links are not disabled, just return results from core function
	if (!config.options.chkDisableWikiLinks)
		return this.coreAutoLinkWikiWords.apply(this,arguments);
	return false;
}

Tiddler.prototype.disableWikiLinks_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
	this.disableWikiLinks_changed.apply(this,arguments);
	// remove excluded wiki words from links array
	var t=store.getTiddlerText(config.options.txtDisableWikiLinksList,"").readBracketedList();
	if (t.length) for (var i=0; i<t.length; i++)
		if (this.links.contains(t[i]))
			this.links.splice(this.links.indexOf(t[i]),1);
};
//}}}
The SIMIAR API suite is a java API whose purpose is to support the implementation of multi-agent-based simulations using the formerly named IRM4MLS meta-model. Its present documentation contains the following features:

!!Beginner's guide
[<img(25%,)[images/newcomer.png]]
If you are new to SIMILAR and IRM4MLS, the ''beginner's guide'' contains useful information about the theory behind SIMILAR and the decomposition of this API suite.

{{linkbigbtn center{[[Go to the beginner's guide|Beginners guide]]}}}

!!Javadoc API
[<img(25%,)[images/javadoc.png]]
The javadoc API of the whole SIMILAR API suite.

{{linkbigbtn center{[[Go to the javadoc API|./api/index.html]]}}}

!!Micro kernel
[<img(25%,)[images/structure_microKernel.png]]
The documentation of a [[micro kernel|./microKernel/index.html]], advised for users who wish to ''tune the efficiency'' of the simulation at the cost of ''significant manual implementations''. It comes with:
*Common libraries facilitating the design of simulations
*Examples illustrating the usage and the mechanisms of the micro-kernel

{{linkbigbtn center {[[Micro-kernel documentation|./microKernel/index.html]]<script>place.lastChild.target="_self";</script>}}}

!!Extended kernel
[<img(25%,)[images/structure_extendedKernel.png]]
The documentation of an [[extended kernel|./extendedKernel/index.html]], advised for users who wish to create ''modular and easy to modify'' simulations. It comes with:
*Extended libraries facilitating the design of simulations
*Examples illustrating the usage and the mechanisms of the extended-kernel

{{linkbigbtn center {[[Extended-kernel documentation|./extendedKernel/index.html]]<script>place.lastChild.target="_self";</script>}}}
/***
|''Name:''|DropDownMenuPlugin|
|''Description:''|Create dropdown menus from unordered lists|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#DropDownMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|11/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|

!!Usage:
* create a two-level unordered list using wiki syntax, and place {{{<<dropMenu>>}}} on the line after it.
* to create a vertical menu use {{{<<dropMenu vertical>>}}} instead.
* to assign custom classes to the list, just pass them as parameters to the macro {{{<<dropMenu className1 className2 className3>>}}}

!!Features:
*Supports just a single level of drop-downs, as anything more usually provides a poor experience for the user.
* Very light weight, about 1.5kb of JavaScript and 4kb of CSS.
* Comes with two built in css 'themes', the default horizontal and vertical. 

!!Customizing:
* to customize the appearance of the menu's, you can either add a custom class as described above or, you can edit the CSS via the StyleSheetDropDownMenu shadow tiddler.

!!Examples:
* [[DropDownMenuDemo]]

***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.dropMenu={

	dropdownchar: "\u25bc",

	handler : function(place,macroName,params,wikifier,paramString,tiddler){
		list = findRelated(place.lastChild,"UL","tagName","previousSibling");
		if (!list)
			return;
		addClass(list,"suckerfish");
		if (params.length){
			addClass(list,paramString);
		}
		this.fixLinks(list);
	},
	
	fixLinks : function(el){
		var els = el.getElementsByTagName("li");
		for(var i = 0; i < els.length; i++) {
			if(els[i].getElementsByTagName("ul").length>0){
				var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
				if(!link){
					var ih = els[i].firstChild.data;
					els[i].removeChild(els[i].firstChild);
					var d = createTiddlyElement(null,"a",null,null,ih+this.dropdownchar,{href:"javascript:;"});
					els[i].insertBefore(d,els[i].firstChild);
				}
				else{
					link.firstChild.data = link.firstChild.data + this.dropdownchar;
					removeClass(link,"tiddlyLinkNonExisting");
				}
			}
			els[i].onmouseover = function() {
				addClass(this, "sfhover");
			};
			els[i].onmouseout = function() {
				removeClass(this, "sfhover");
			};
		}
	}	
};

config.shadowTiddlers["StyleSheetDropDownMenuPlugin"] = 
	 "/*{{{*/\n"+
	 "/***** LAYOUT STYLES -  DO NOT EDIT! *****/\n"+
	 "ul.suckerfish, ul.suckerfish ul {\n"+
	 "	margin: 0;\n"+
	 "	padding: 0;\n"+
	 "	list-style: none;\n"+
	 "	line-height:1.4em;\n"+
	 "}\n\n"+
	 "ul.suckerfish  li {\n"+
	 "	display: inline-block; \n"+
	 "	display: block;\n"+
	 "	float: left; \n"+
	 "}\n\n"+
	 "ul.suckerfish li ul {\n"+
	 "	position: absolute;\n"+
	 "	left: -999em;\n"+
	 "}\n\n"+
	 "ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul {\n"+
	 "	left: auto;\n"+
	 "}\n\n"+
	 "ul.suckerfish ul li {\n"+
	 "	float: none;\n"+
	 "	border-right: 0;\n"+
	 "	border-left:0;\n"+
	 "}\n\n"+
	 "ul.suckerfish a, ul.suckerfish a:hover {\n"+
	 "	display: block;\n"+
	 "}\n\n"+
	 "ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}\n"+
	 "/**** END LAYOUT STYLES *****/\n"+
	 "\n\n"+
	 "/**** COLORS AND APPEARANCE - DEFAULT *****/\n"+
	 "ul.suckerfish li a {\n"+
	 "	padding: 0.5em 1.5em;\n"+
	 "	color: #FFF;\n"+
	 "	background: #0066aa;\n"+
	 "	border-bottom: 0;\n"+
	 "	font-weight:bold;\n"+
	 "}\n\n"+
	 "ul.suckerfish li:hover a, ul.suckerfish li.sfhover a{\n"+
	 "	background: #00558F;\n"+
	 "}\n\n"+
	 "ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a{\n"+
	 "	color: #000;\n"+
	 "	background: #eff3fa;\n"+
	 "	border-top:1px solid #FFF;\n"+
	 "}\n\n"+
	 "ul.suckerfish ul li a:hover {\n"+
	 "	background: #e0e8f5;\n"+
	 "}\n\n"+
	 "ul.suckerfish li a{\n"+
	 "	width:9em;\n"+
	 "}\n\n"+
	 "ul.suckerfish ul li a, ul.suckerfish ul li a:hover{\n"+
	 "	display:inline-block;\n"+
	 "	width:9em;\n"+
	 "}\n\n"+
	 "ul.suckerfish li {\n"+
	 "	border-left: 1px solid #00558F;\n"+
	 "}\n"+
	 "/***** END COLORS AND APPEARANCE - DEFAULT *****/\n"+
	 "\n\n"+
	 "/***** LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
	 "ul.suckerfish.vertical li{\n"+
	 "	width:10em;\n"+
	 "	border-left: 0px solid #00558f;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a {\n"+
	 "	border-left: 0.8em solid #00558f;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a,  ul.suckerfish.vertical li.sfhover a:hover{\n"+
	 "	width:8em;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical {\n"+
	 "	width:10em; text-align:left;\n"+
	 "	float:left;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li a {\n"+
	 "	padding: 0.5em 1em 0.5em 1em;\n"+
	 "	border-top:1px solid  #fff;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical, ul.suckerfish.vertical ul {\n"+
	 "	line-height:1.4em;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul { \n"+
	 "	margin: -2.4em 0 0 10.9em;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a {\n"+
	 "	border: 0px solid #FFF;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{\n"+
	 "	padding-right:1.1em;\n"+
	 "}\n\n"+
	 "ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li {\n"+
	 "	border-bottom:1px solid  #fff;\n"+
	 "}\n\n"+
	 "/***** END LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
	 "/*}}}*/";
store.addNotification("StyleSheetDropDownMenuPlugin",refreshStyles);
//!END-PLUGIN-CODE
// %/
SIMILAR is designed to have a highly customizable architecture, while making the structure of a simulation as explicit as possible. It distinguishes explicitly elements that are often left to the developers and embedded into the code of the simulations:
*The [[concepts of SIMILAR|Structure - Concepts mapping]] are embodied as concrete classes;
*The [[simulation model|Structure - Simulation model]] defines the declarative part of the simulation (the description of the simulated phenomenon);
*The [[simulation engine|Structure - Simulation engine]] defines the procedural part of the simulation (the generic algorithms running simulations);
*The [[observation probes|Structure - Probe]] define simulation data exportation routines in various formats.

[img(100%,)[images/similarArchitectureIllustration.png]]
{{center caption{General architecture of a simulation in SIMILAR}}}
[[StyleSheetCustomization]]

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>>

*Documentation inline test  +++?[<span class="docsmallbtn ">Documentation</span>]{{docsection{
This is the content of the documentation.
!A title inside the documentation
Another text.
{{javadoctitle{Javadoc:}}}
{{javadocsection{
A javadoc !
}}} 
}}}
===

*Implementation inline test +++?[<span class="implsmallbtn">Implementation</span>]{{implsection{
This is the content of an implementation.
!A title inside the implementation
Another text
{{{
A source code.
}}}
}}}
===

*Example inline test +++?[<span class="exsmallbtn">Example</span>]{{exsection{
This is the content of an example.
!A title inside the example
Another text
}}} 
===

+++?[<span class="docbigbtn ">Documentation</span>]{{docsection{
This is the content of the documentation.
!A title inside the documentation
Another text.
{{javadoctitle{Javadoc:}}}
{{javadocsection{
A javadoc !
}}} 
}}}
===

+++?[<span class="implbigbtn">Implementation</span>]{{implsection{
This is the content of an implementation.
!A title inside the implementation
Another text
{{{
A source code.
}}}
}}}
===

+++?[<span class="exbigbtn">Example</span>]{{exsection{
This is the content of an example.
!A title inside the example
Another text
}}} 
===


A normal paragraph having a word with a +++^34em^*@[tooltip]
The text of the tooltip.
===.

{{bigemphasisblock{
A block putting a big emphasis on a text.
}}}

+++?*[<span class="docbigbtn" style="width:100px;">Test 1</span>]{{docsection{
Tabulation content 1.
}}}
=== +++?*[<span class="docbigbtn" style="width:100px;">Test 2</span>]{{docsection{
Tabulation content 2.
}}}
===

[<img(10%,)[file:///C:/Users/yoakubera/Desktop/similarDoc/images/completeStructure.png]]
{{linkbigbtn center{[[Big link button | MainMenu]]}}}

The simulation of complex system often requires knowledge coming from different sources to obtain relevant results. These sources can either be persons from different application fields, or different viewpoints on the same phenomenon.
		
Yet, regular multi-agent based simulation meta models lack the structure to manage the aggregation of such systems: their representation of the agents, the environment and the temporal dynamics of the system is designed to support a single viewpoint.
		
The +++^34em^*@[<strong>SIMILAR</strong>]''SIMILAR'' stands for: //''SI''mulations with ''M''ult''I''-''L''evel ''A''gents and ''R''eactions//.
=== approach is designed to deal with this issue. This approach relies on a a multi-level, influence-reaction and agent-based knowledge representation, more fitting to multiple viewpoints. The approach includes a generic and modular formal model, a methodology and a simulation API preserving the structure of the formal model. Owing to these properties, the design of the above-mentioned simulations is supported during the whole simulation process, is more robust to model revisions and relies on a structure fit to represent the intrinsic complexity of the simulated phenomena. 

{{linkbigbtn center{[[Documentation content]]}}}
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2011.09.03 [1.2.3] bypass addStretchHandlers() if no '+' suffix is used (i.e., not resizable)
2010.07.24 [1.2.2] moved tip/dragtip text to config.formatterHelpers.imageSize object to enable customization
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 3, date: new Date(2011,9,3)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
	this.lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var floatLeft=lookaheadMatch[1];
		var floatRight=lookaheadMatch[2];
		var width=lookaheadMatch[3];
		var height=lookaheadMatch[4];
		var tooltip=lookaheadMatch[5];
		var src=lookaheadMatch[6];
		var link=lookaheadMatch[7];

		// Simple bracketted link
		var e = w.output;
		if(link) { // LINKED IMAGE
			if (config.formatterHelpers.isExternalLink(link)) {
				if (config.macros.attach && config.macros.attach.isAttachment(link)) {
					// see [[AttachFilePluginFormatters]]
					e = createExternalLink(w.output,link);
					e.href=config.macros.attach.getAttachment(link);
					e.title = config.macros.attach.linkTooltip + link;
				} else
					e = createExternalLink(w.output,link);
			} else 
				e = createTiddlyLink(w.output,link,false,null,w.isStatic);
			addClass(e,"imageLink");
		}

		var img = createTiddlyElement(e,"img");
		if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
		if(width||height) {
			var x=width.trim(); var y=height.trim();
			var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
			var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
			if (x.substr(0,2)=="{{")
				{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			if (y.substr(0,2)=="{{")
				{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			img.style.width=x.trim(); img.style.height=y.trim();
			if (stretchW||stretchH) config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
		}
		if(tooltip) img.title = tooltip;

		// GET IMAGE SOURCE
		if (config.macros.attach && config.macros.attach.isAttachment(src))
			src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
		else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
			if (config.browser.isIE || config.browser.isSafari) {
				img.onerror=(function(){
					this.src=config.formatterHelpers.resolvePath(this.src,false);
					return false;
				});
			} else
				src=config.formatterHelpers.resolvePath(src,true);
		}
		img.src=src;
		w.nextMatch = this.lookaheadRegExp.lastIndex;
	}
}

config.formatterHelpers.imageSize={
	tip: 'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size',
	dragtip: 'DRAG=stretch/shrink, '
}

config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
	e.title=((stretchW||stretchH)?this.imageSize.dragtip:'')+this.imageSize.tip;
	e.statusMsg='width=%0, height=%1';
	e.style.cursor='move';
	e.originalW=e.style.width;
	e.originalH=e.style.height;
	e.minW=Math.max(e.offsetWidth/20,10);
	e.minH=Math.max(e.offsetHeight/20,10);
	e.stretchW=stretchW;
	e.stretchH=stretchH;
	e.onmousedown=function(ev) { var ev=ev||window.event;
		this.sizing=true;
		this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
		this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
		this.startW=this.offsetWidth;
		this.startH=this.offsetHeight;
		return false;
	};
	e.onmousemove=function(ev) { var ev=ev||window.event;
		if (this.sizing) {
			var s=this.style;
			var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
			var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
			var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
			var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
			if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
			if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
			clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
		}
		return false;
	};
	e.onmouseup=function(ev) { var ev=ev||window.event;
		if (ev.shiftKey) { this.style.width=this.style.height=''; }
		if (ev.ctrlKey)  { this.style.width=this.originalW; this.style.height=this.originalH; }
		this.sizing=false;
		clearMessage();
		return false;
	};
	e.onmouseout=function(ev) { var ev=ev||window.event;
		this.sizing=false;
		clearMessage();
		return false;
	};
}
//}}}
To compile and execute code using the SIMILAR API suite, the following instructions have to be used. Note that the following instructions include +++^34em^*@[all the libraries]
The mentionned jar file points to all the libraries of SIMILAR:
*The micro-kernel
**The common-libs
**The micro-kernel examples
*The extended-kernel
**The extended-libs
**The extended-kernel examples
=== of the API suite at once:

+++?[<span class="docbigbtn">Javac / Java commands</span>]
{{docsection{
The ''"similar-distribution-0.2.3.jar"'' file from the ''"similarLib"'' directory has to be included in the classpath:
{{{
javac -classpath similarLib/similar-distribution-0.2.3.jar ...
}}}
{{{
java -cp similarLib/similar-distribution-0.2.3.jar ...
}}}
Note that these command lines work only if the "''similarLib''" directory also contains the jar files of the libraries of the SIMILAR API suite.
}}} ===


+++?[<span class="docbigbtn">Apache Maven</span>]
{{docsection{
{{{
<dependency>
  <groupId>fr.univ_artois.lgi2a</groupId>
  <artifactId>similar-distribution</artifactId>
  <version>0.2.3</version>
</dependency>
}}}
}}} ===


+++?[<span class="docbigbtn">Apache Buildr</span>]
{{docsection{
{{{
'fr.univ_artois.lgi2a:similar-distribution:jar:0.2.3'
}}}
}}} ===


+++?[<span class="docbigbtn">Apache Ant</span>]
{{docsection{
{{{
<dependency org="fr.univ_artois.lgi2a" name="similar-distribution" rev="0.2.3">
  <artifact name="similar-distribution" type="jar" />
</dependency>
}}}
}}} ===


+++?[<span class="docbigbtn">Groovy Grape</span>]
{{docsection{
{{{
@Grapes(
@Grab(group='fr.univ_artois.lgi2a', module='similar-distribution', version='0.2.3')
)
}}}
}}} ===


+++?[<span class="docbigbtn">Grails</span>]
{{docsection{
{{{
compile 'fr.univ_artois.lgi2a:similar-distribution:0.2.3'
}}}
}}} ===


+++?[<span class="docbigbtn">Leiningen</span>]
{{docsection{
{{{
[fr.univ_artois.lgi2a/similar-distribution "0.2.3"]
}}}
}}} ===


+++?[<span class="docbigbtn">SBT</span>]
{{docsection{
{{{
libraryDependencies += "fr.univ_artois.lgi2a" %% "similar-distribution" % "0.2.3"
}}}
}}} ===
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2010.12.15 1.9.6 allow (but ignore) type="..." syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 1.0.0 initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 6, date: new Date(2010,12,15)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: type=\\\"[^\\\"]*\\\")?(?: src=\\\"([^\\\"]*)\\\")?(?: label=\\\"([^\\\"]*)\\\")?(?: title=\\\"([^\\\"]*)\\\")?(?: key=\\\"([^\\\"]*)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
	handler: 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 src=lookaheadMatch[1];
			var label=lookaheadMatch[2];
			var tip=lookaheadMatch[3];
			var key=lookaheadMatch[4];
			var show=lookaheadMatch[5];
			var code=lookaheadMatch[6];
			if (src) { // external script library
				var script = document.createElement("script"); script.src = src;
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (code) { // inline code
				if (show) // display source in tiddler
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (label) { // create 'onclick' command link
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
					var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
					link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
					link.tiddler=w.tiddler;
					link.onclick=function(){
						this.bufferedHTML="";
						try{ var r=eval(this.code);
							if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
								var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
							if(this.bufferedHTML.length)
								s.innerHTML=this.bufferedHTML;
							if((typeof(r)==="string")&&r.length) {
								wikify(r,s,null,this.tiddler);
								return false;
							} else return r!==undefined?r:false;
						} catch(e){alert(e.description||e.toString());return false;}
					};
					link.setAttribute("title",tip||"");
					var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
					URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
					URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
					link.setAttribute("href",URIcode);
					link.style.cursor="pointer";
					if (key) link.accessKey=key.substr(0,1); // single character only
				}
				else { // run script immediately
					var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
					var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
					try	 { var out=eval(c); }
					catch(e) { out=e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
				}
			}
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} )
//}}}

// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
	if(limit > 0) text = text.substr(0,limit);
	var wikifier = new Wikifier(text,formatter,null,tiddler);
	return wikifier.wikifyPlain();
}
//}}}

// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
/***
|Name|InlineJavascriptPluginInfo|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for InlineJavascriptPlugin|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Usage
<<<
This plugin adds wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be recognized as embedded javascript code.  When a tiddler is rendered, the plugin automatically invokes any embedded scripts, which can be used to construct and return dynamically-generated output that is inserted into the tiddler content.
{{{
<script type="..." src="..." label="..." title="..." key="..." show>
	/* javascript code goes here... */
</script>
}}}
All parameters are //optional//.    When the ''show'' keyword is used, the plugin will also include the script source code in the output that it displays in the tiddler.  This is helpful when creating examples for documentation purposes (such as used in this tiddler!)

__''Deferred execution from an 'onClick' link''__
<script label="click here" title="mouseover tooltip text" key="X" show>
	/* javascript code goes here... */
	alert('you clicked on the link!');
</script>
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.  You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text, and a {{{key="X"}}} parameter to specify an //access key// (which must be a //single// letter or numeric digit only).

__''Loading scripts from external source files''__
<script src="URL" show>
	/* optional javascript code goes here... */
</script>You can also load javascript directly from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}).  This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins.  The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.

In addition to loading the javascript from the external file, you can also use this feature to invoke javascript code contained within the {{{<script>...</script>}}} markers.  This code is invoked //after// the external script file has been processed, and can make immediate use of the functions and/or global variables defined by the external script file.
>Note: To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that is rendered as soon as your TiddlyWiki document is opened, such as MainMenu.  For example: put your {{{<script src="..."></script>}}} syntax into a separate 'library' tiddler (e.g., LoadScripts), and then add {{{<<tiddler LoadScripts>>}}} to MainMenu so that the library is loaded before any other tiddlers that rely upon the functions it defines. 
>
>Normally, loading external javascript in this way does not produce any direct output, and should not have any impact on the appearance of your MainMenu.  However, if your LoadScripts tiddler contains notes or other visible content, you can suppress this output by using 'inline CSS' in the MainMenu, like this: {{{@@display:none;<<tiddler LoadScripts>>@@}}}
<<<
!!!!!Creating dynamic tiddler content and accessing the ~TiddlyWiki DOM
<<<
An important difference between TiddlyWiki inline scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document: in a typical web document, you use the {{{document.write()}}} (or {{{document.writeln()}}}) function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.

However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and instead will //completely replace the entire ~TiddlyWiki document in your browser window (which is clearly not a good thing!)//.  In order to allow scripts to use {{{document.write()}}}, the plugin automatically converts and buffers all HTML output so it can be safely inserted into your tiddler content, immediately following the script.

''Note that {{{document.write()}}} can only be used to output "pure HTML" syntax.  To produce //wiki-formatted// output, your script should instead return a text value containing the desired wiki-syntax content'', which will then be automatically rendered immediately following the script.  If returning a text value is not sufficient for your needs, the plugin also provides an automatically-defined variable, 'place', that gives the script code ''direct access to the //containing DOM element//'' into which the tiddler output is being rendered.  You can use this variable to ''perform direct DOM manipulations'' that can, for example:
* generate wiki-formatted output using {{{wikify("...content...",place)}}}
* vary the script's actions based upon the DOM element in which it is embedded
* access 'tiddler-relative' DOM information using {{{story.findContainingTiddler(place)}}}
Note:
''When using an 'onclick' script, the 'place' element actually refers to the onclick //link text// itself, instead of the containing DOM element.''  This permits you to directly reference or modify the link text to reflect any 'stateful' conditions that might set by the script.  To refer to the containing DOM element from within an 'onclick' script, you can use "place.parentNode" instead.
<<<
!!!!!Instant "bookmarklets"
<<<
You can also use an 'onclick' link to define a "bookmarklet": a small piece of javascript that can be ''invoked directly from the browser without having to be defined within the current document.''  This allows you to create 'stand-alone' commands that can be applied to virtually ANY TiddlyWiki document... even remotely-hosted documents that have been written by others!!  To create a bookmarklet, simply define an 'onclick' script and then grab the resulting link text and drag-and-drop it onto your browser's toolbar (or right-click and use the 'bookmark this link' command to add it to the browser's menu).

Notes:
*When writing scripts intended for use as bookmarklets, due to the ~URI-encoding required by the browser, ''you cannot not use ANY double-quotes (") within the bookmarklet script code.''
*All comments embedded in the bookmarklet script must ''use the fully-delimited {{{/* ... */}}} comment syntax,'' rather than the shorter {{{//}}} comment syntax.
*Most importantly, because bookmarklets are invoked directly from the browser interface and are not embedded within the TiddlyWiki document, there is NO containing 'place' DOM element surrounding the script.  As a result, ''you cannot use a bookmarklet to generate dynamic output in your document,''  and using {{{document.write()}}} or returning wiki-syntax text or making reference to the 'place' DOM element will halt the script and report a "Reference Error" when that bookmarklet is invoked.  
Please see [[InstantBookmarklets]] for many examples of 'onclick' scripts that can also be used as bookmarklets.
<<<
!!!!!Special reserved function name
<<<
The plugin 'wraps' all inline javascript code inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler.  To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.
<<<
!!!!!$(...) 'shorthand' function
<<<
As described by Dustin Diaz [[here|http://www.dustindiaz.com/top-ten-javascript/]], the plugin defines a 'shorthand' function that allows you to write:
{{{
$(id)
}}}
in place of the normal standard javascript syntax:
{{{
document.getElementById(id)
}}}
This function is provided merely as a convenience for javascript coders that may be familiar with this abbreviation, in order to allow them to save a few bytes when writing their own inline script code.
<<<
!!!!!Examples
<<<
simple dynamic output:
><script show>
	document.write("The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
	if (!window.story) window.story=window;
	var title=story.findContainingTiddler(place).getAttribute("tiddler");
	var size=store.getTiddlerText(title).length;
	return title+" is using "+size+" bytes";
</script>
dynamic output from an 'onclick' script, using {{{document.write()}}} and/or {{{return "..."}}}
><script label="click here" show>
	document.write("<br>The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
creating an 'onclick' button/link that accesses the link text AND the containing tiddler:
><script label="click here" title="clicking this link will show an 'alert' box" key="H" show>
	if (!window.story) window.story=window;
	var txt=place.firstChild.data;
	var tid=story.findContainingTiddler(place).getAttribute('tiddler');
	alert('Hello World!\nlinktext='+txt+'\ntiddler='+tid);
</script>
dynamically setting onclick link text based on stateful information:
>{{block{
{{{
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.previousSibling.innerHTML=on?"disable":"enable";
</script>
}}}
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.innerHTML=on?"enable":"disable";
</script>
}}}
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function inlineJavascriptDemo() { alert('Hello from demo.js!!') } }}}
>>{{{displayMessage('InlineJavascriptPlugin: demo.js has been loaded');}}}
>note: When using this example on your local system, you will need to download the external script file from the above URL and install it into the same directory as your document.
>
><script src="demo.js" show>
	return "inlineJavascriptDemo() function has been defined"
</script>
><script label="click to invoke inlineJavascriptDemo()" key="D" show>
	inlineJavascriptDemo();
</script>
<<<
!!!!!Revisions
<<<
2010.12.15 1.9.6 allow (but ignore) type="..." syntax
2009.04.11 1.9.5 pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 1.9.4 in $(), handle leading '#' on ID for compatibility with JQuery syntax
2008.06.11 1.9.3 added $(...) function as 'shorthand' for document.getElementById()
2008.03.03 1.9.2 corrected fallback declaration of wikifyPlainText() (fixes Safari "parse error")
2008.02.23 1.9.1 in onclick function, use string instead of array for 'bufferedHTML' (fixes IE errors)
2008.02.21 1.9.0 output from 'onclick' scripts (return value or document.write() calls) are now buffered and rendered into into a span following the script.  Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed).  Thanks to Xavier Verges for suggestion and preliminary code.
2008.02.14 1.8.1 added backward-compatibility for use of wikifyPlainText() in TW2.1.3 and earlier
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 1.8.0 added support for key="X" syntax to specify custom access key definitions
2007.12.15 1.7.0 autogenerate URI encoded HREF on links for onclick scripts.  Drag links to browser toolbar to create bookmarklets.  IMPORTANT NOTE: place is NOT defined when scripts are used as bookmarklets.  In addition, double-quotes will cause syntax errors.  Thanks to PaulReiber for debugging and brainstorming.
2007.11.26 1.6.2 when converting "document.write()" function calls in inline code, allow whitespace between "write" and "(" so that "document.write ( foobar )" is properly converted.
2007.11.16 1.6.1 when rendering "onclick scripts", pass label text through wikifyPlainText() to parse any embedded wiki-syntax to enable use of HTML entities or even TW macros to generate dynamic label text.
2007.02.19 1.6.0 added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
2006.10.16 1.5.2 add newline before closing '}' in 'function out_' wrapper.  Fixes error caused when last line of script is a comment.
2006.06.01 1.5.1 when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
2006.04.19 1.5.0 added 'show' parameter to force display of javascript source code in tiddler output
2006.01.05 1.4.0 added support 'onclick' scripts.  When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked.  'place' value is set to match the clicked button/link element.
2005.12.13 1.3.1 when catching eval error in IE, e.description contains the error text, instead of e.toString().  Fixed error reporting so IE shows the correct response text.  Based on a suggestion by UdoBorkowski
2005.11.09 1.3.0 for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content.  Based on a suggestion by BradleyMeck
2005.11.08 1.2.0 handle loading of javascript from an external URL via src="..." syntax
2005.11.08 1.1.0 pass 'place' param into scripts to provide direct DOM access 
2005.11.08 1.0.0 initial release
<<<
''[[General|Home]]''
----
*[[Index|Documentation content]]
*[[Team]]
*[[Project licence]]
''[[Beginners guide]]''
----
*[[Theory|Bibliography]]
*[[Architecture|API suite Architecture]]
''[[Structure of a simulation|General structure]]''
----
*[[Concepts mapping|Structure - Concepts mapping]]
*[[Simulation model|Structure - Simulation model]]
**[[Time model|Structure - Simulation model - Time model]]
**[[Reaction model|Structure - Simulation model - Reaction model]]
*[[Simulation engine|Structure - Simulation engine]]
*[[Probe|Structure - Probe]]
''Kernels documentation''
----
*[[Javadoc API|./api/index.html]]
*[[Micro-kernel|./microKernel/index.html]]<script>place.lastChild.target="_self";</script> 
*[[Extended-kernel|./extendedKernel/index.html]]<script>place.lastChild.target="_self";</script>
''Maven documentation''
----
*[[Project dependencies]]
*[[Include this library]]
/***
|''Name:''|MathJaxPlugin|
|''Description:''|Enable LaTeX formulas for TiddlyWiki|
|''Version:''|1.0.1|
|''Date:''|Feb 11, 2012|
|''Source:''|http://www.guyrutenberg.com/2011/06/25/latex-for-tiddlywiki-a-mathjax-plugin|
|''Author:''|Guy Rutenberg|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.5.0|
 
!! Changelog
!!! 1.0.1 Feb 11, 2012
* Fixed interoperability with TiddlerBarPlugin
!! How to Use
Currently the plugin supports the following delemiters:
* """\(""".."""\)""" - Inline equations
* """$$""".."""$$""" - Displayed equations
* """\[""".."""\]""" - Displayed equations
!! Demo
This is an inline equation \(P(E)   = {n \choose k} p^k (1-p)^{ n-k}\) and this is a displayed equation:
\[J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m + \alpha + 1)}{\left({\frac{x}{2}}\right)}^{2 m + \alpha}\]
This is another displayed equation $$e=mc^2$$
!! Code
***/
//{{{
config.extensions.MathJax = {
  mathJaxScript : "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
  // uncomment the following line if you want to access MathJax using SSL
  // mathJaxScript : "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
  displayTiddler: function(TiddlerName) {
    config.extensions.MathJax.displayTiddler_old.apply(this, arguments);
    MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
  }
};
 
jQuery.getScript(config.extensions.MathJax.mathJaxScript, function(){
    MathJax.Hub.Config({
      extensions: ["tex2jax.js"],
      "HTML-CSS": { scale: 100 }
    });
 
    MathJax.Hub.Startup.onload();
    config.extensions.MathJax.displayTiddler_old = story.displayTiddler;
    story.displayTiddler = config.extensions.MathJax.displayTiddler;
});
 
config.formatters.push({
	name: "mathJaxFormula",
	match: "\\\\\\[|\\$\\$|\\\\\\(",
	//lookaheadRegExp: /(?:\\\[|\$\$)((?:.|\n)*?)(?:\\\]|$$)/mg,
	handler: function(w)
	{
		switch(w.matchText) {
		case "\\[": // displayed equations
			this.lookaheadRegExp = /\\\[((?:.|\n)*?)(\\\])/mg;
			break;
		case "$$": // inline equations
			this.lookaheadRegExp = /\$\$((?:.|\n)*?)(\$\$)/mg;
			break;
		case "\\(": // inline equations
			this.lookaheadRegExp = /\\\(((?:.|\n)*?)(\\\))/mg;
			break;
		default:
			break;
		}
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			createTiddlyElement(w.output,"span",null,null,lookaheadMatch[0]);
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
});
//}}}
/***
|Name|NestedSlidersPlugin2|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class).  In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release.  Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 9, date: new Date(2008,11,15)};

// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
	config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE

// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
	background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");

// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

config.formatters.push( {
	name: "nestedSliders",
	match: "\\n?\\+{3}",
	terminator: "\\s*\\={3}\\n?",
	lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\?)?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
	handler: function(w)
		{
			lookaheadRegExp = new RegExp(this.lookahead,"mg");
			lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = lookaheadRegExp.exec(w.source)
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
			{
				var defopen=lookaheadMatch[1];
				var cookiename=lookaheadMatch[2];
				var special=lookaheadMatch[3];
				var header=lookaheadMatch[4];
				var panelwidth=lookaheadMatch[5];
				var transient=lookaheadMatch[6];
				var hover=lookaheadMatch[7];
				var buttonClass=lookaheadMatch[8];
				var label=lookaheadMatch[9];
				var openlabel=lookaheadMatch[10];
				var panelID=lookaheadMatch[11];
				var blockquote=lookaheadMatch[12];
				var deferred=lookaheadMatch[13];

				// location for rendering button and panel
				var place=w.output;

				// default to closed, no cookie, no accesskey, no alternate text/tip
				var show="none"; var cookie=""; var key="";
				var closedtext=">"; var closedtip="";
				var openedtext="<"; var openedtip="";

				// extra "+", default to open
				if (defopen) show="block";

				// cookie, use saved open/closed state
				if (cookiename) {
					cookie=cookiename.trim().slice(1,-1);
					cookie="chkSlider"+cookie;
					if (config.options[cookie]==undefined)
						{ config.options[cookie] = (show=="block") }
					show=config.options[cookie]?"block":"none";
				}

				// parse label/tooltip/accesskey: [label=X|tooltip]
				if (label) {
					var parts=label.trim().slice(1,-1).split("|");
					closedtext=parts.shift();
					if (closedtext.substr(closedtext.length-2,1)=="=")	
						{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
					openedtext=closedtext;
					if (parts.length) closedtip=openedtip=parts.join("|");
					else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
				} else {
					buttonClass='expandbutton';
				}

				// parse alternate label/tooltip: [label|tooltip]
				if (openlabel) {
					var parts=openlabel.trim().slice(1,-1).split("|");
					openedtext=parts.shift();
					if (parts.length) openedtip=parts.join("|");
					else openedtip="hide "+openedtext;
				}

				var title=show=='block'?openedtext:closedtext;
				var tooltip=show=='block'?openedtip:closedtip;

				// create the button
				if (header) { // use "Hn" header format instead of button/link
					var lvl=(header.length>5)?5:header.length;
					var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
					btn.onclick=onClickNestedSlider;
					btn.setAttribute("href","javascript:;");
					btn.setAttribute("title",tooltip);
				} else if(special) {
					var btn = createTiddlyElement(createTiddlyElement(place,"a",null,null,null),"a",null,buttonClass,title);
					btn.onclick=onClickNestedSlider;
					btn.setAttribute("href","javascript:;");
					btn.setAttribute("title",tooltip);
				} else {
					var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
				}
				btn.innerHTML=title; // enables use of HTML entities in label

				// set extra button attributes
				btn.setAttribute("closedtext",closedtext);
				btn.setAttribute("closedtip",closedtip);
				btn.setAttribute("openedtext",openedtext);
				btn.setAttribute("openedtip",openedtip);
				btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
				btn.defOpen=defopen!=null; // save default open/closed state (boolean)
				btn.keyparam=key; // save the access key letter ("" if none)
				if (key.length) {
					btn.setAttribute("accessKey",key); // init access key
					btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
				}
				btn.setAttribute("hover",hover?"true":"false");
				btn.onmouseover=function(ev) {
					// optional 'open on hover' handling
					if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
						document.onclick.call(document,ev); // close transients
						onClickNestedSlider(ev); // open this slider
					}
					// mouseover on button aligns floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
				}

				// create slider panel
				var panelClass=panelwidth?"floatingPanel":"sliderPanel";
				if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
				var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
				panel.button = btn; // so the slider panel know which button it belongs to
				btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
				panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
				panel.setAttribute("transient",transient=="*"?"true":"false");
				panel.style.display = show;
				panel.style.width=panel.defaultPanelWidth;
				panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
					{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }

				// render slider (or defer until shown) 
				w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
				if ((show=="block")||!deferred) {
					// render now if panel is supposed to be shown or NOT deferred rendering
					w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
					// align floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
				}
				else {
					var src = w.source.substr(w.nextMatch);
					var endpos=findMatchingDelimiter(src,"+++","===");
					panel.setAttribute("raw",src.substr(0,endpos));
					panel.setAttribute("blockquote",blockquote?"true":"false");
					panel.setAttribute("rendered","false");
					w.nextMatch += endpos+3;
					if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
				}
			}
		}
	}
)

function findMatchingDelimiter(src,starttext,endtext) {
	var startpos = 0;
	var endpos = src.indexOf(endtext);
	// check for nested delimiters
	while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
		// count number of nested 'starts'
		var startcount=0;
		var temp = src.substring(startpos,endpos-1);
		var pos=temp.indexOf(starttext);
		while (pos!=-1)  { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
		// set up to check for additional 'starts' after adjusting endpos
		startpos=endpos+endtext.length;
		// find endpos for corresponding number of matching 'ends'
		while (startcount && endpos!=-1) {
			endpos = src.indexOf(endtext,endpos+endtext.length);
			startcount--;
		}
	}
	return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
	if (!theTarget) return false;
	var theSlider = theTarget.sliderPanel;
	var isOpen = theSlider.style.display!="none";

	// if SHIFT-CLICK, dock panel first (see [[MoveablePanelPlugin]])
	if (e.shiftKey && config.macros.moveablePanel) config.macros.moveablePanel.dock(theSlider,e);

	// toggle label
	theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
	// toggle tooltip
	theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));

	// deferred rendering (if needed)
	if (theSlider.getAttribute("rendered")=="false") {
		var place=theSlider;
		if (theSlider.getAttribute("blockquote")=="true")
			place=createTiddlyElement(place,"blockquote");
		wikify(theSlider.getAttribute("raw"),place);
		theSlider.setAttribute("rendered","true");
	}

	// show/hide the slider
	if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
		anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
	else
		theSlider.style.display = isOpen ? "none" : "block";

	// reset to default width (might have been changed via plugin code)
	theSlider.style.width=theSlider.defaultPanelWidth;

	// align floater panel position with target button
	if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);

	// if showing panel, set focus to first 'focus-able' element in panel
	if (theSlider.style.display!="none") {
		var ctrls=theSlider.getElementsByTagName("*");
		for (var c=0; c<ctrls.length; c++) {
			var t=ctrls[c].tagName.toLowerCase();
			if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
				{ try{ ctrls[c].focus(); } catch(err){;} break; }
		}
	}
	var cookie=theTarget.sliderCookie;
	if (cookie && cookie.length) {
		config.options[cookie]=!isOpen;
		if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
		else window.removeCookie(cookie); // remove cookie if slider is in default display state
	}

	// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
	// prevent clicks *within* a slider button from being processed by browser
	// but allow plain click to bubble up to page background (to close transients, if any)
	if (e.shiftKey || theTarget!=resolveTarget(e))
		{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
	Popup.remove(); // close open popup (if any)
	return false;
}
//}}}
//{{{
// click in document background closes transient panels 
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);

	if (document.nestedSliders_savedOnClick)
		var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
	// if click was inside a popup... leave transient panels alone
	var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
	if (p) return retval;
	// if click was inside transient panel (or something contained by a transient panel), leave it alone
	var p=target; while (p) {
		if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
		p=p.parentNode;
	}
	if (p) return retval;
	// otherwise, find and close all transient panels...
	var all=document.all?document.all:document.getElementsByTagName("DIV");
	for (var i=0; i<all.length; i++) {
		 // if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
		if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
		// otherwise, if the panel is currently visible, close it by clicking it's button
		if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
		if (!hasClass(all[i],"floatingPanel")&&!hasClass(all[i],"sliderPanel")) all[i].style.display="none";
	}
	return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
	if (hasClass(panel,"floatingPanel") && !hasClass(panel,"undocked")) {
		// see [[MoveablePanelPlugin]] for use of 'undocked'
		var rightEdge=document.body.offsetWidth-1;
		var panelWidth=panel.offsetWidth;
		var left=0;
		var top=btn.offsetHeight; 
		if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
			left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
			if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
		}
		if (place.style.position!="relative") {
			var left=findPosX(btn);
			var top=findPosY(btn)+btn.offsetHeight;
			var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
			if (p) { left-=findPosX(p); top-=findPosY(p); }
			if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
			if (left<0) left=0;
		}
		panel.style.left=left+"px"; panel.style.top=top+"px";
	}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
	{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }

// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
	Morpher.prototype.coreStop = Morpher.prototype.stop;
	Morpher.prototype.stop = function() {
		this.coreStop.apply(this,arguments);
		var e=this.element;
		if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
			// adjust panel overflow and position after animation
			e.style.overflow = "visible";
			if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
		}
	};
}
//}}}
/***
|Name|NestedSlidersPluginInfo|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|documentation for NestedSlidersPlugin|
This plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content.
!!!!!Usage
<<<
//{{{
++++(cookiename)!!!!!^width^*@{{class{[label=key|tooltip][altlabel|alttooltip]}}}#panelID:>...
content goes here
===
//}}}
* ''"""+++""" (or """++++""") and """==="""''<br>marks the start and end of the slider definition, respectively.  When the extra {{{+}}} is used, the slider will be open when initially displayed.
* ''"""(cookiename)"""''<br>saves the slider opened/closed state, and restores this state whenever the slider is re-rendered.
* ''"""! through !!!!!"""''<br>displays the slider label using a formatted headline (Hn) style instead of a button/link style
* ''"""^width^ (or just ^)"""''<br>makes the slider 'float' on top of other content rather than shifting that content downward.  'width' must be a valid CSS value (e.g., "30em", "180px", "50%", etc.).  If omitted, the default width is "auto" (i.e., fit to content)
* ''"""*"""''<br>denotes "transient display": when a click occurs elsewhere in the document, the slider/floating panel will be automatically closed.  This is useful for creating 'pulldown menus' that automatically go away after they are used.  //Note: using SHIFT-click on a slider label will open/close that slider without triggering the automatic closing of any transient slider panels that are currently displayed, permitting ''temporary'' display of several transient panels at once.//
* ''"""@"""''<br>denotes "open on hover": the slider/floating panel will be automatically opened as soon as the mouse moves over the slider label, without requiring a click.
* ''"""{{class{[label=key|tooltip][altlabel|alttooltip]}}}"""''<br>uses label/tooltip/accesskey.  """{{class{...}}}""", """=key""", """|tooltip""" and """[altlabel|alttooltip]""" are optional.  'class' is any valid CSS class name, used to style the slider label text.  'key' must be a ''single letter only''.  altlabel/alttooltip specify alternative label/tooltip for use when slider/floating panel is displayed.  //Note: you can use HTML syntax within the label text to include HTML entities (e.g., {{{&raquo;}}} (&raquo;) or {{{&#x25ba;}}} (&#x25ba;), or even embedded images (e.g., {{{<img src="images/eric3.gif">}}}).//
* ''"""#panelID:"""''<br>defines a unique DOM element ID that is assigned to the panel element used to display the slider content.  This ID can then be used later to reposition the panel using the {{{<<DOM move id>>}}} macro (see [[DOMTweaksPlugin]]), or to access/modify the panel element through use of {{{document.getElementById(...)}}}) javascript code in a plugin or inline script.
* ''""">"""''<br>automatically adds blockquote formatting to slider content
* ''"""..."""''<br>defers rendering of closed sliders until the first time they are opened.
Notes:
*You can 'nest' sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created.
*Deferred rendering (...) can be used to offset processing overhead until actually needed. However, this may produce unexpected results in some cases.  Use with care.
* To make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the 'start slider' or preceding the 'end slider' sequences are automatically supressed so that excess whitespace is eliminated from the output.
<<<
!!!!!Examples
<<<
simple in-line slider: 
{{{
+++content===
}}}
+++content===
----
use a custom label and tooltip: 
{{{
+++[label|tooltip]content===
}}}
+++[label|tooltip]content===
----
content automatically blockquoted: 
{{{
+++>content===
}}}
+++>content===
----
all options (except cookie) //(default open, heading, sized floater, transient, open on hover, class, label/tooltip/key, blockquoted, deferred)//
{{{
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
   content
===
}}}
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
   content
===
----
complex nesting example:
{{{
+++[get info...=I|click for information or press Alt-I]
	put some general information here,
	plus a floating panel with more specific info:
	+++^10em^[view details...|click for details]
		put some detail here, which could in turn contain a transient panel,
		perhaps with a +++^25em^*[glossary definition]explaining technical terms===
	===
===
}}}
+++[get info...=I|click for information or press Alt-I]
	put some general information here,
	plus a floating panel with more specific info:
	+++^10em^[view details...|click for details]
		put some detail here, which could in turn contain a transient panel,
		perhaps with a +++^25em^*[glossary definition]explaining technical terms===
	===
===
----
embedded image as slider button
{{{
+++[<img src=images/eric3.gif>|click me!]>
	{{big{OUCH!}}}
===
}}}
+++[<img src=images/eric3.gif>|click me!]>
	{{big{OUCH!}}}
===
<<<
!!!!!Revisions
<<<
2008.11.15 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class).  In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
2008.11.13 2.4.8 in document.onclick(), if transient panel is not a sliderPanel or floatingPanel, hide it via CSS
2008.10.05 2.4.7 in onClickNestedSlider(), added try/catch around focus() call to prevent IE error if input field being focused on is currently not visible.
2008.09.07 2.4.6 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons, use call() method when invoking document.onclick function (avoids error in IE)
2008.06.07 2.4.4 changed default for chkFloatingSlidersAnimate to FALSE to avoid clipping problem on some browsers (IE).  Updated Morpher hijack (again) to adjust regular sliderPanel styles as well as floatingPanel styles.
2008.05.07 2.4.3 updated Morpher hijack to adjust floatingPanel styles after animation without affecting other animated elements (i.e. popups).  Also, updated adjustSliderPos() to account for scrollwidth and use core findWindowWidth().
2008.04.02 2.4.2 in onClickNestedSlider, handle clicks on elements contained //within// slider buttons (e.g., when using HTML to display an image as a slider button).
2008.04.01 2.4.1 open on hover also triggers document.onclick to close other transient sliders
2008.04.01 2.4.0 re-introduced 'open on hover' feature using "@" symbol
2008.03.26 2.3.5 in document.onclick(), if click is in popup, don't dismiss transient panel (if any)
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 2.3.4 added hijack for Animator.prototype.startAnimating().  Previously, the plugin code simply set the overflow to "visible" after animation.  This code tweak corrects handling of elements that were styled with overflow=hidden/auto/scroll before animation by saving the overflow style and then restoring it after animation has completed.
2007.12.17 2.3.3 use hasClass() instead of direct comparison to test for "floatingPanel" class.  Allows floating panels to have additional classes assigned to them (i.e., by AnimationEffectsPlugin).
2007.11.14 2.3.2 in onClickNestedSlider(), prevent SHIFT-click events from opening a new, empty browser window by setting "cancelBubble=true" and calling "stopPropagation()".  Note: SHIFT-click is still processed as a normal click (i.e., it toggles the slider panel display).  Also, using SHIFT-click will prevent 'transient' sliders from being automatically closed when another slider is opened, allowing you to *temporarily* display several transient sliders at once.
2007.07.26 2.3.1 in document.onclick(), propagate return value from hijacked core click handler to consume OR bubble up click as needed.  Fixes "IE click disease", whereby nearly every mouse click causes a page transition.
2007.07.20 2.3.0 added syntax for setting panel ID (#panelID:).  This allows individual slider panels to be repositioned within tiddler content simply by giving them a unique ID and then moving them to the desired location using the {{{<<DOM move id>>}}} macro.
2007.07.19 2.2.0 added syntax for alttext and alttip (button label and tooltip to be displayed when panel is open)
2007.07.14 2.1.2 corrected use of 'transient' attribute in IE to prevent (non-recursive) infinite loop
2007.07.12 2.1.0 replaced use of "*" for 'open/close on rollover' (which didn't work too well).  "*" now indicates 'transient' panels that are automatically closed if a click occurs somewhere else in the document.  This permits use of nested sliders to create nested "pulldown menus" that automatically disappear after interaction with them has been completed.  Also, in onClickNestedSlider(), use "theTarget.sliderCookie", instead of "this.sliderCookie" to correct cookie state tracking when automatically dismissing transient panels.
2007.06.10 2.0.5 add check to ensure that window.adjustSliderPanel() is defined before calling it (prevents error on shutdown when mouse event handlers are still defined)
2007.05.31 2.0.4 add handling to invoke adjustSliderPanel() for onmouseover events on slider button and panel.  This allows the panel position to be re-synced when the button position shifts due to changes in unrelated content above it on the page.  (thanks to Harsha for bug report)
2007.03.30 2.0.3 added chkFloatingSlidersAnimate (default to FALSE), so that slider animation can be disabled independent of the overall document animation setting (avoids strange rendering and focus problems in floating panels)
2007.03.01 2.0.2 for TW2.2+, hijack Morpher.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2007.03.01 2.0.1 in hijack for Slider.prototype.stop, use apply() to pass params to core function
2006.07.28 2.0.0 added custom class syntax around label/tip/key syntax: {{{{{classname{[label=key|tip]}}}}}}
2006.07.25 1.9.3 when parsing slider, save default open/closed state in button element, then in onClickNestedSlider(), if slider state matches saved default, instead of saving cookie, delete it.  Significantly reduces the 'cookie overhead' when default slider states are used.
2006.06.29 1.9.2 in onClickNestedSlider(), when setting focus to first control, skip over type="hidden"
2006.06.22 1.9.1 added panel.defaultPanelWidth to save requested panel width, even after resizing has changed the style value
2006.05.11 1.9.0 added optional '^width^' syntax for floating sliders and '=key' syntax for setting an access key on a slider label
2006.05.09 1.8.0 in onClickNestedSlider(), when showing panel, set focus to first child input/textarea/select element
2006.04.24 1.7.8 in adjustSliderPos(), if floating panel is contained inside another floating panel, subtract offset of containing panel to find correct position
2006.02.16 1.7.7 corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie
2006.02.15 1.7.6 in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)
2006.02.04 1.7.5 add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2006.01.18 1.7.4 only define adjustSliderPos() function if it has not already been provided by another plugin.  This lets other plugins 'hijack' the function even when they are loaded first.
2006.01.16 1.7.3 added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels.  While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels.  Short-term workaround is to only adjust the position for 'top-level' floaters.
2006.01.16 1.7.2 added button property to slider panel elements so that slider panel can tell which button it belongs to.  Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2006.01.14 1.7.1 added optional "^" syntax for floating panels.  Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.
2006.01.14 1.7.0 added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)
2006.01.03 1.6.2 When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element.  (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)
2005.12.15 1.6.1 added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders
removed checkbox option for 'global' application of lazy sliders
2005.11.25 1.6.0 added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)
2005.11.21 1.5.1 revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability.  Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.
2005.11.20 1.5.0 added (cookiename) syntax for optional tracking and restoring of slider open/close state
2005.11.11 1.4.0 added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style
2005.11.07 1.3.0 removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines
2005.11.05 1.2.1 changed name to NestedSlidersPlugin
2005.11.04 1.2.0 added alternative character-mode syntax {{{(((}}} and {{{)))}}}
tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax
2005.11.03 1.1.1 fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used.  code cleanup, added documentation
2005.11.03 1.1.0 changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}.  changed name to EasySlidersPlugin
2005.11.03 1.0.0 initial public release
<<<
<!--{{{-->
<div id='header' class='header'>

<div class='headerShadow'>
<span class='searchBar' macro='search'></span>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div id='topMenu' refresh='content'></div>
</div>

<div id='displayArea'>
<div id='leftMenu' refresh='content' tiddler='MainMenu'></div>
<div id='messageArea'></div>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
This part of the documentation was generated with Maven.
!Project Dependencies
The following is a list of dependencies for this project. These dependencies are required to compile and use the application.

+++?[<span class="morebigbtn">Compile scope</span>]
{{moresection{
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
|!GroupId |!ArtifactId |!Version |!Type |!License |
|fr.univ_artois.lgi2a |similar-microKernel |<<similarversion>> |jar |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
|fr.univ_artois.lgi2a |similar-microKernel-commonLibs |<<similarversion>> |jar |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
|fr.univ_artois.lgi2a |similar-extendedKernel |<<similarversion>> |jar |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
|fr.univ_artois.lgi2a |similar-extendedKernel-extendedLibs |<<similarversion>> |jar |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}}
===


+++?[<span class="morebigbtn">Test scope</span>]
{{moresection{
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
|!GroupId |!ArtifactId |!Version |!Type |!License |
|junit |[[junit|http://junit.org/]] |4.11 |jar |[[Common Public License Version 1.0|http://opensource.org/licenses/cpl1.0.txt]] |
|org.hamcrest |hamcrest-all |1.3 |jar |[[New BSD License|http://opensource.org/licenses/bsd-license.php]] |
}}}
===

!Project Transitive Dependencies
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

+++?[<span class="morebigbtn">Test scope</span>]
{{moresection{
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
|!GroupId |!ArtifactId |!Version |!Type |!License |
|org.hamcrest |hamcrest-core |1.3 |jar |[[New BSD License|http://opensource.org/licenses/bsd-license.php]] |
}}} ===

!Project Dependency Tree
*fr.univ_artois.lgi2a:similar-distribution:jar:<<similarversion>> +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!SIMILAR - Binary distribution|
|''Description:'' |Builds the binary release of the SIMILAR API suite. |
|''Project License:'' |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}} ===

**fr.univ_artois.lgi2a:similar-microKernel:jar:<<similarversion>> (compile) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!SIMILAR - Micro kernel|
|''Description:'' |A micro kernel containing the minimal specification of SIMILAR, supporting the design of efficient simulations. |
|''Project License:'' |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}} ===

**fr.univ_artois.lgi2a:similar-microKernel-commonLibs:jar:<<similarversion>> (compile) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!SIMILAR - Common libs|
|''Description:'' |The common libraries of the minimal kernel, containing generic implementations of simulation algorithms and results exporting features. |
|''Project License:'' |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}} ===

**fr.univ_artois.lgi2a:similar-extendedKernel:jar:<<similarversion>> (compile) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!SIMILAR - Extended kernel|
|''Description:'' |An extended kernel containing the modular and highly customizable specifications of SIMILAR, supporting the design of maintainable et evolutive simulations. |
|''Project License:'' |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}} ===

**fr.univ_artois.lgi2a:similar-extendedKernel-extendedLibs:jar:<<similarversion>> (compile) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!SIMILAR - Extended libs|
|''Description:'' |The extended libraries of the extended kernel, containing generic implementations of simulation algorithms and results exporting features. |
|''Project License:'' |[[CeCILL-B Free Software License Agreement|http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt]] |
}}} ===

**org.hamcrest:hamcrest-all:jar:1.3 (test) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!Hamcrest All |
|''Description:'' |A self-contained hamcrest jar containing all of the sub-modules in a single artifact. |
|''Project License:'' |[[New BSD License|http://opensource.org/licenses/bsd-license.php]] |
}}} ===

**junit:junit:jar:4.11 (test) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!JUnit |
|''Description:'' |JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java. |
|''Project License:'' |[[Common Public License Version 1.0|http://opensource.org/licenses/cpl1.0.txt]] |
}}} ===

***org.hamcrest:hamcrest-core:jar:1.3 (test) +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
|>|!Hamcrest Core |
|''Description:'' |This is the core API of hamcrest matcher framework to be used by third-party framework providers. This includes the a foundation set of matcher implementations for common operations. |
|''Project License:'' |[[New BSD License|http://opensource.org/licenses/bsd-license.php]] |
}}} ===

!Licenses
''New BSD License:'' Hamcrest All, Hamcrest Core

''Common Public License Version 1.0:'' JUnit

''CeCILL-B Free Software License Agreement:'' SIMILAR - Binary distribution, SIMILAR - Micro kernel, SIMILAR - Common libs, SIMILAR - Extended kernel, SIMILAR - Extended libs
This software is governed by the CeCILL-B license under French law and abiding by the rules of distribution of free software.  You can  use, modify and/ or redistribute the software under the terms of the CeCILL-B license as circulated by CEA, CNRS and INRIA at the following URL http://www.cecill.info. 

As a counterpart to the access to the source code and  rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty  and the software's author,  the holder of the economic rights,  and the successive licensors  have only  limited liability. 

In this respect, the user's attention is drawn to the risks associated with loading,  using,  modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean  that it is complicated to manipulate,  and  that  also therefore means  that it is reserved for developers  and  experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and,  more generally, to use and operate it in the same conditions as regards security. 

The fact that you are presently reading this means that you have had knowledge of the CeCILL-B license and that you accept its terms.

!CeCILL-B Free Software License Agreement

<<<
<html><object width='100%' height="500" type='text/plain' data='files/licence.txt' border='0' ></object></html>
<<<
/***
|''Name:''|SimilarVersionPlugin|
|''Description:''|Provides a macro printing the version of SIMILAR in a tiddler |
|''Author''|Yoann Kubera|
|''CodeRepository:''|n/a |
|''Version:''|0.1|
|''Comments:''| |
|''License''|None |

***/
//{{{
config.macros.similarversion = {};

/*
 * Displays the version of SIMILAR in a tiddler, using the <<similarversion>> command.
 */
config.macros.similarversion.handler = function (place,macroName,params,wikifier,paramString,tiddler){ 
	wikify( '0.2.6', place );
}

//}}}
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Revision History
!!v0.2.0 (2008-08-18)
* initial release
!!v0.3.0 (2008-08-19)
* added Open All button (renders Classic Search option obsolete)
* sorting by relevance (title matches before content matches)
!!v0.4.0 (2008-08-26)
* added tag matching
!To Do
* tag matching optional
* animations for container creation and removal
* when clicking on search results, do not scroll to the respective tiddler (optional)
* use template for search results
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };

if(!config.extensions) { config.extensions = {}; }

config.extensions.SimpleSearchPlugin = {
	heading: "Search Results",
	containerId: "searchResults",
	btnCloseLabel: "close",
	btnCloseTooltip: "dismiss search results",
	btnCloseId: "search_close",
	btnOpenLabel: "Open all",
	btnOpenTooltip: "open all search results",
	btnOpenId: "search_open",

	displayResults: function(matches, query) {
		story.refreshAllTiddlers(true); // update highlighting within story tiddlers
		var el = document.getElementById(this.containerId);
		query = '"""' + query + '"""'; // prevent WikiLinks
		if(el) {
			removeChildren(el);
		} else { //# fallback: use displayArea as parent
			var container = document.getElementById("displayArea");
			el = document.createElement("div");
			el.id = this.containerId;
			el = container.insertBefore(el, container.firstChild);
		}
		var msg = "!" + this.heading + "\n";
		if(matches.length > 0) {
			msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
			this.results = [];
			for(var i = 0 ; i < matches.length; i++) {
				this.results.push(matches[i].title);
				msg += "* [[" + matches[i].title + "]]\n";
			}
		} else {
			msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
		}
		createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
		wikify(msg, el);
		if(matches.length > 0) { // XXX: redundant!?
			createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
		}
	},

	closeResults: function() {
		var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
		removeNode(el);
		config.extensions.SimpleSearchPlugin.results = null;
		highlightHack = null;
	},

	openAll: function(ev) {
		story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
		return false;
	}
};

config.shadowTiddlers.StyleSheetSimpleSearch = "/*{{{*/\n" +
	"#" + config.extensions.SimpleSearchPlugin.containerId + " {\n" +
	"\toverflow: auto;\n" +
	"\tpadding: 5px 1em 10px;\n" +
	"\tbackground-color: [[ColorPalette::TertiaryPale]];\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.containerId + " h1 {\n" +
	"\tmargin-top: 0;\n" +
	"\tborder: none;\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.containerId + " ul {\n" +
	"\tmargin: 0.5em;\n" +
	"\tpadding-left: 1.5em;\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.containerId + " .button {\n" +
	"\tdisplay: block;\n" +
	"\tborder-color: [[ColorPalette::TertiaryDark]];\n" +
	"\tpadding: 5px;\n" +
	"\tbackground-color: [[ColorPalette::TertiaryLight]];\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.containerId + " .button:hover {\n" +
	"\tborder-color: [[ColorPalette::SecondaryMid]];\n" +
	"\tbackground-color: [[ColorPalette::SecondaryLight]];\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.btnCloseId + " {\n" +
	"\tfloat: right;\n" +
	"\tmargin: -5px -1em 5px 5px;\n" +
	"}\n\n" +
	"#" + config.extensions.SimpleSearchPlugin.btnOpenId + " {\n" +
	"\tfloat: left;\n" +
	"\tmargin-top: 5px;\n" +
	"}\n" +
	"/*}}}*/";
store.addNotification("StyleSheetSimpleSearch", refreshStyles);

// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
	highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
	var matches = store.search(highlightHack, null, "excludeSearch");
	var q = useRegExp ? "/" : "'";
	config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};

// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
	var candidates = this.reverseLookup("tags", excludeTag, !!match);
	var primary = [];
	var secondary = [];
	var tertiary = [];
	for(var t = 0; t < candidates.length; t++) {
		if(candidates[t].title.search(searchRegExp) != -1) {
			primary.push(candidates[t]);
		} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
			secondary.push(candidates[t]);
		} else if(candidates[t].text.search(searchRegExp) != -1) {
			tertiary.push(candidates[t]);
		}
	}
	var results = primary.concat(secondary).concat(tertiary);
	if(sortField) {
		results.sort(function(a, b) {
			return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
		});
	}
	return results;
};

} //# end of "install only once"
//}}}
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.7|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Show tiddlers one at a time with automatic permalink, or always open tiddlers at top/bottom of page.|
This plugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one tiddler displayed at a time.
!!!!!Documentation
>see [[SinglePageModePluginInfo]]
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}.
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2010.11.30 2.9.7 use story.getTiddler()
2008.10.17 2.9.6 changed chkSinglePageAutoScroll default to false
| Please see [[SinglePageModePluginInfo]] for previous revision details |
2005.08.15 1.0.0 Initial Release.  Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts.
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageModePlugin= {major: 2, minor: 9, revision: 7, date: new Date(2010,11,30)};
//}}}
//{{{
config.paramifiers.SPM = { onstart: function(v) {
	config.options.chkSinglePageMode=eval(v);
	if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
		config.lastURL = window.location.hash;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
} };
//}}}
//{{{
if (config.options.chkSinglePageMode==undefined)
	config.options.chkSinglePageMode=false;
if (config.options.chkSinglePagePermalink==undefined)
	config.options.chkSinglePagePermalink=true;
if (config.options.chkSinglePageKeepFoldedTiddlers==undefined)
	config.options.chkSinglePageKeepFoldedTiddlers=false;
if (config.options.chkSinglePageKeepEditedTiddlers==undefined)
	config.options.chkSinglePageKeepEditedTiddlers=false;
if (config.options.chkTopOfPageMode==undefined)
	config.options.chkTopOfPageMode=false;
if (config.options.chkBottomOfPageMode==undefined)
	config.options.chkBottomOfPageMode=false;
if (config.options.chkSinglePageAutoScroll==undefined)
	config.options.chkSinglePageAutoScroll=false;
//}}}
//{{{
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
	if (!config.options.chkSinglePageMode)
		{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
	if (config.lastURL == window.location.hash) return; // no change in hash
	var tids=decodeURIComponent(window.location.hash.substr(1)).readBracketedList();
	if (tids.length==1) // permalink (single tiddler in URL)
		story.displayTiddler(null,tids[0]);
	else { // restore permaview or default view
		config.lastURL = window.location.hash;
		if (!tids.length) tids=store.getTiddlerText("DefaultTiddlers").readBracketedList();
		story.closeAllTiddlers();
		story.displayTiddlers(null,tids);
	}
}


if (Story.prototype.SPM_coreDisplayTiddler==undefined)
	Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
	var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
	var tiddlerElem=story.getTiddler(title); // ==null unless tiddler is already displayed
	var opt=config.options;
	var single=opt.chkSinglePageMode && !startingUp;
	var top=opt.chkTopOfPageMode && !startingUp;
	var bottom=opt.chkBottomOfPageMode && !startingUp;
	if (single) {
		story.forEachTiddler(function(tid,elem) {
			// skip current tiddler and, optionally, tiddlers that are folded.
			if (	tid==title
				|| (opt.chkSinglePageKeepFoldedTiddlers && elem.getAttribute("folded")=="true"))
				return;
			// if a tiddler is being edited, ask before closing
			if (elem.getAttribute("dirty")=="true") {
				if (opt.chkSinglePageKeepEditedTiddlers) return;
				// if tiddler to be displayed is already shown, then leave active tiddler editor as is
				// (occurs when switching between view and edit modes)
				if (tiddlerElem) return;
				// otherwise, ask for permission
				var msg="'"+tid+"' is currently being edited.\n\n";
				msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
				if (!confirm(msg)) return; else story.saveTiddler(tid);
			}
			story.closeTiddler(tid);
		});
	}
	else if (top)
		arguments[0]=null;
	else if (bottom)
		arguments[0]="bottom";
	if (single && opt.chkSinglePagePermalink && !config.browser.isSafari) {
		window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitleText") + " - " + title;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
	if (tiddlerElem && tiddlerElem.getAttribute("dirty")=="true") { // editing... move tiddler without re-rendering
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		if (!isTopTiddler && (single || top))
			tiddlerElem.parentNode.insertBefore(tiddlerElem,tiddlerElem.parentNode.firstChild);
		else if (bottom)
			tiddlerElem.parentNode.insertBefore(tiddlerElem,null);
		else this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	} else
		this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	var tiddlerElem=story.getTiddler(title);
	if (tiddlerElem&&opt.chkSinglePageAutoScroll) {
		// scroll to top of page or top of tiddler
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		var yPos=isTopTiddler?0:ensureVisible(tiddlerElem);
		// if animating, defer scroll until after animation completes
		var delay=opt.chkAnimate?config.animDuration+10:0;
		setTimeout("window.scrollTo(0,"+yPos+")",delay); 
	}
}

if (Story.prototype.SPM_coreDisplayTiddlers==undefined)
	Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function() {
	// suspend single/top/bottom modes when showing multiple tiddlers
	var opt=config.options;
	var saveSPM=opt.chkSinglePageMode; opt.chkSinglePageMode=false;
	var saveTPM=opt.chkTopOfPageMode; opt.chkTopOfPageMode=false;
	var saveBPM=opt.chkBottomOfPageMode; opt.chkBottomOfPageMode=false;
	this.SPM_coreDisplayTiddlers.apply(this,arguments);
	opt.chkBottomOfPageMode=saveBPM;
	opt.chkTopOfPageMode=saveTPM;
	opt.chkSinglePageMode=saveSPM;
}
//}}}
/***
|Name|SinglePageModePluginInfo|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for SinglePageModePlugin|
Normally, as you click on the links in TiddlyWiki, more and more tiddlers are displayed on the page. The order of this tiddler display depends upon when and where you have clicked. Some people like this non-linear method of reading the document, while others have reported that when many tiddlers have been opened, it can get somewhat confusing.  SinglePageModePlugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one item displayed at a time.
!!!!!Usage
<<<
When the plugin is enabled, only one tiddler will be displayed at a time and the browser window's titlebar is updated to include the current tiddler title.  The browser's location URL is also updated with a 'permalink' for the current tiddler so that it is easier to create a browser 'bookmark' for the current tiddler.  Alternatively, even when displaying multiple tiddlers //is// permitted, you can still reduce the potential for confusion by forcing  tiddlers to always open at the top (or bottom) of the page instead of being displayed following the tiddler containing the link that was clicked.
<<<
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* {{block{
The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}. You can also use {{{SPM:expression}}}, where 'expression' is any javascript statement that evaluates to true or false.  This allows you to create hard-coded links in other documents that can selectively enable/disable the use of this option based on various programmatic conditions, such as the current username. For example, using
&nbsp;&nbsp;&nbsp;{{{#SPM:config.options.txtUserName!="SomeName"}}}
enables 'one tiddler at a time' display for all users //other than// "~SomeName")}}}
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2008.10.17 2.9.6 changed chkSinglePageAutoScroll default to false
2008.06.12 2.9.5 corrected 'scroll to top of page' logic in auto-scroll handling
2008.06.11 2.9.4 added chkSinglePageKeepEditedTiddlers option
2008.06.05 2.9.3 in displayTiddler(), bypass single/top/bottom mode handling if startingUp.  Allows multiple tiddlers to be displayed during startup processing (e.g., #story:DefaultTiddlers), even if single/top/bottom mode is enabled.
2008.04.18 2.9.2 in displayTiddler() and checkLastURL(), handling for Unicode in tiddler titles (remove explicit conversion between Unicode and UTF, as this is apparently done automatically by encode/decodeURIComponent, resulting in double-encoding!
2008.04.08 2.9.1 don't automatically add options to AdvancedOptions shadow tiddler
2008.04.02 2.9.0 in displayTiddler(), when single-page mode is in use and a tiddler is being edited, ask for permission to save-and-close that tiddler, instead of just leaving it open.
2008.03.29 2.8.3 in displayTiddler(), get title from tiddler object (if needed).  Fixes errors caused when calling function passes a tiddler *object* instead of a tiddler *title*
2008.03.14 2.8.2 in displayTiddler(), if editing specified tiddler, just move it to top/bottom of story *without* re-rendering (prevents discard of partial edits).
2008.03.06 2.8.1 in paramifier handler, start 'checkURL' timer if chkSinglePageMode is enabled
2008.03.06 2.8.0 added option, {{{config.options.chkSinglePageKeepFoldedTiddlers}}}, so folded tiddlers won't be closed when using single-page mode.  Also, in checkURL(), if hash is a ''permaview'' (e.g., "#foo bar baz"), then display multiple tiddlers rather than attempting to display "foo bar baz" as a single tiddler
2008.03.05 2.7.0 added support for "SPM:" URL paramifier
2008.03.01 2.6.0 in hijack of displayTiddler(), added 'title' argument to closeAllTiddlers() so that target tiddler isn't closed-and-reopened if it was already displayed.  Also, added config.options.chkSinglePageAutoScrolloption to bypass automatic 'scroll into view' logic (note: core still does it's own ensureVisible() handling)
2007.12.22 2.5.3 in checkLastURL(), use decodeURIComponent() instead of decodeURI so that tiddler titles with commas (and/or other punctuation) are correctly handled.
2007.10.26 2.5.2 documentation cleanup
2007.10.08 2.5.1 in displayTiddler(), when using single-page or top-of-page mode, scrollTo(0,0) to ensure that page header is in view.
2007.09.13 2.5.0 for TPM/BPM modes, don't force tiddler to redisplay if already shown.  Allows transition between view/edit or collapsed/view templates, without repositioning displayed tiddler.
2007.09.12 2.4.0 added option to disable automatic permalink feature.  Also, Safari is now excluded from permalinking action to avoid bug where tiddlers don't display after hash is updated.
2007.03.03 2.3.1 fix typo when adding BPM option to AdvancedOptions (prevented checkbox from appearing)
2007.03.03 2.3.0 added support for BottomOfPageMode (BPM) based on request from DaveGarbutt
2007.02.06 2.2.3 in Story.prototype.displayTiddler(), use convertUnicodeToUTF8() for correct I18N string handling when creating URL hash string from tiddler title (based on bug report from BidiX)
2007.01.08 2.2.2 use apply() to invoke hijacked core functions
2006.07.04 2.2.1 in hijack for displayTiddlers(), suspend TPM as well as SPM so that DefaultTiddlers displays in the correct order.
2006.06.01 2.2.0 added chkTopOfPageMode (TPM) handling
2006.02.04 2.1.1 moved global variable declarations to config.* to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2005.12.27 2.1.0 hijack displayTiddlers() so that SPM can be suspended during startup while displaying the DefaultTiddlers (or #hash list).  Also, corrected initialization for undefined SPM flag to "false", so default behavior is to display multiple tiddlers
2005.12.27 2.0.0 Update for TW2.0
2005.11.24 1.1.2 When the back and forward buttons are used, the page now changes to match the URL.  Based on code added by Clint Checketts
2005.10.14 1.1.1 permalink creation now calls encodeTiddlyLink() to handle tiddler titles with spaces in them
2005.10.14 1.1.0 added automatic setting of window title and location bar ('auto-permalink').  feature suggestion by David Dickens.
2005.10.09 1.0.1 combined documentation and code in a single tiddler
2005.08.15 1.0.0 Initial Release
<<<
Documentation~~(v <<similarversion>>)~~
[img(50%,)[SIMILAR API suite|images/similarLogo.png]] [>img[images/structure_thumb.png]]
Similar API suite
The SIMILAR API suite was designed to provide a direct ''bijection between the theoretical concepts'' developed in SIMILAR ''and their implementation''. This bijection facilitates the comprehension of the code and embodies the proof that the benefits of the SIMILAR meta-model are not purely theoretical.

The following arrays describe the correspondence between the theoretical concepts of SIMILAR and their implementation. Note that this list is not exhaustive and focuses on the core concepts of SIMILAR. See the documentation of the various classes of the micro-kernel and extended-kernel to have a better insight on the correspondance between the theory and this implementation.
!!Simulation-related elements:
<<tiddler [[Structure - Concepts mapping - Simulation]]>>
!!Level-related elements:
<<tiddler [[Structure - Concepts mapping - Level]]>>
!!Environment-related elements:
<<tiddler [[Structure - Concepts mapping - Environment]]>>
!!Agent-related elements
<<tiddler [[Structure - Concepts mapping - Agent]]>>
!!Influence-related elements:
<<tiddler [[Structure - Concepts mapping - Influence]]>>
!!Time-related elements:
<<tiddler [[Structure - Concepts mapping - Time]]>>
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|Agent | {{className{[[IAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/IAgent4Engine.html]]}}} |Implemented as an instance of the interface. |
|Global state of an agent| {{className{[[IGlobalState|api/fr/lgi2a/similar/microkernel/agents/IGlobalState.html]]}}} |Implemented as an instance of the interface. |
|Public local state of an agent| {{className{[[ILocalStateOfAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/ILocalStateOfAgent4Engine.html]]}}} |Implemented as an instance of the interface. |
|Private local state of an agent| {{className{[[ILocalStateOfAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/ILocalStateOfAgent4Engine.html]]}}} |Implemented as an instance of the interface. |
|Perceived data of an agent| {{className{[[IPerceivedData|api/fr/lgi2a/similar/microkernel/agents/IPerceivedData.html]]}}} |Implemented as an instance of the interface. |
|Perception process of an agent from a level | {{className{[[IAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/IAgent4Engine.html]]}}} |Implementation of the {{methodName{perceive(...)}}} method of the interface. |
|Global state revision process of an agent | {{className{[[IAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/IAgent4Engine.html]]}}} |Implementation of the {{methodName{reviseGlobalState(...)}}} method of the interface. |
|Decision process of an agent from a level | {{className{[[IAgent4Engine|api/fr/lgi2a/similar/microkernel/agents/IAgent4Engine.html]]}}} |Implementation of the {{methodName{decide(...)}}} method of the interface. |
{{caption{Link between the theory of SIMILAR and Classes/Interfaces or other software elements of the micro-kernel (agents)}}}
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|Environment | {{className{[[IEnvironment4Engine|api/fr/lgi2a/similar/microkernel/environment/IEnvironment4Engine.html]]}}} |Implemented as an instance of the interface. |
|Public local state of the environment | {{className{[[ILocalStateOfEnvironment|api/fr/lgi2a/similar/microkernel/environment/ILocalStateOfEnvironment.html]]}}} |Implemented as an instance of the interface. |
|Private local state of the environment | {{className{[[ILocalStateOfEnvironment|api/fr/lgi2a/similar/microkernel/environment/ILocalStateOfEnvironment.html]]}}} |Implemented as an instance of the interface. |
|Natural action process of the environment from a level. | {{className{[[IEnvironment4Engine|api/fr/lgi2a/similar/microkernel/environment/IEnvironment4Engine.html]]}}} |Implementation of the {{methodName{natural(...)}}} method of the interface. |
{{caption{Link between the theory of SIMILAR and Classes/Interfaces or other software elements of the micro-kernel (environment)}}}
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|An influence produced by the decisions of the agents or the natural action of the environment | {{className{[[IInfluence|api/fr/lgi2a/similar/microkernel/influences/IInfluence.html]]}}} |Implemented as an instance of the interface. |
|A set of influences produced by the decisions of the agents or the natural action of the environment | {{className{[[InfluencesMap|api/fr/lgi2a/similar/microkernel/influences/InfluencesMap.html]]}}} |Implemented as an instance of the class. |
|System influences (generic influences) | {{className{[[SystemInfluence|api/fr/lgi2a/similar/microkernel/influences/SystemInfluence.html]]}}} |Implemented as sub-classes of the interface. |
|Regular influences (simulation-dependent influences) | {{className{[[RegularInfluence|api/fr/lgi2a/similar/microkernel/influences/RegularInfluence.html]]}}} |Implemented as sub-classes of the interface. |
{{caption{Link between the theory of SIMILAR and Classes/Interfaces or other software elements of the micro-kernel (influences)}}}
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|Level | {{className{[[ILevel|api/fr/lgi2a/similar/microkernel/levels/ILevel.html]]}}} |Implemented as an instance of the interface. |
|Perception relation graph of the simulation | {{className{[[ILevel|api/fr/lgi2a/similar/microkernel/levels/ILevel.html]]}}} |The out neighborhood of a level in the perception relation graph is returned by a call to the {{methodName{getPerceptibleLevels()}}} method of the interface. |
|Influence relation graph of the simulation | {{className{[[ILevel|api/fr/lgi2a/similar/microkernel/levels/ILevel.html]]}}} |The out neighborhood of a level in the influence relation graph is returned by a call to the {{methodName{getInfluenceableLevels()}}} method of the interface. |
|Public local dynamic state of the simulation | {{className{[[IPublicDynamicStateMap|api/fr/lgi2a/similar/microkernel/dynamicstate/IPublicDynamicStateMap.html]]}}} |Implemented as an instance of the interface. |
|Public local dynamic state of a level | {{className{[[IPublicLocalDynamicState|api/fr/lgi2a/similar/microkernel/dynamicstate/IPublicLocalDynamicState.html]]}}} |Implemented as an instance of the interface. |
|Consistent dynamic state of a level | {{className{[[ConsistentPublicLocalDynamicState|api/fr/lgi2a/similar/microkernel/dynamicstate/ConsistentPublicLocalDynamicState.html]]}}} |Implemented as an instance of the class. |
|Transitory dynamic state of a level | {{className{[[TransitoryPublicLocalDynamicState|api/fr/lgi2a/similar/microkernel/dynamicstate/TransitoryPublicLocalDynamicState.html]]}}} |Implemented as an instance of the class. |
|Reaction process of a level | {{className{[[ILevel|api/fr/lgi2a/similar/microkernel/levels/ILevel.html]]}}} |Implementation of the {{methodName{makeRegularReaction(...)}}} and {{methodName{makeSystemReaction(...)}}} methods of the interface. |
{{caption{Link between the theory of SIMILAR and Classes/Interfaces or other software elements of the micro-kernel (levels)}}}
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|A model of a simulation | {{className{[[ISimulationModel|api/fr/lgi2a/similar/microkernel/ISimulationModel.html]]}}} |Implemented as a sub-class of this interface. |
|An engine running a simulation | {{className{[[ISimulationEngine|api/fr/lgi2a/similar/microkernel/ISimulationEngine.html]]}}} |Implemented as a sub-class of this interface. |
|A probe observing the execution of a simulation | {{className{[[IProbe|api/fr/lgi2a/similar/microkernel/IProbe.html]]}}} |Implemented as a sub-class of this interface. |
{{caption{Link between the general decomposition of a simulation and the classes of the API suite.}}}
|!Name in SIMILAR |!Mapping as a class/interface |!Location in the class/interface |
|Time stamp | {{className{[[SimulationTimeStamp|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html]]}}} |Implemented as an instance of the class. |
|Time evolution model of a level | {{className{[[ITimeModel|api/fr/lgi2a/similar/microkernel/levels/ITimeModel.html]]}}} |Implemented as the {{methodName{getNextTime(...)}}} method in a sub-class of this interface. Note that the {{className{[[ILevel|api/fr/lgi2a/similar/microkernel/levels/ILevel.html]]}}} interface extends this interface. |
|Initial time stamp | {{className{[[ISimulationModel|api/fr/lgi2a/similar/microkernel/ISimulationModel.html]]}}} |Implemented as the return value of the {{methodName{getInitialTime( )}}} method of the interface. |
|Final time stamp | {{className{[[ISimulationModel|api/fr/lgi2a/similar/microkernel/ISimulationModel.html]]}}} |Implemented as the {{argumentName{currentTime}}} parameter of the {{methodName{isFinalTimeOrAfter(...)}}} method of the interface when this method returns {{{true}}}. |
{{caption{Link between the theory of SIMILAR and Classes/Interfaces or other software elements of the micro-kernel (time)}}}
[>img(45%,)[images/similarArchitectureIllustration4.png]]
The observation and the exploitation of a simulation is managed using ''observation probes''. Probes are autonomous software elements that listen to the evolution of the simulation. They are usually exporting simulation data/results in various formats, so that users can exploit or visualize them.

Considering a observation probe as a top-class abstraction allows to easily change the nature of the data being exported without having to change the simulation model itself.

+++?[<span class="exbigbtn">Examples</span>]
{{exsection{
The probes that can be defined for a simulation include:
!Graph/graphical charts
Charts displaying the evolution of a value of a public local state or any agregated values:
{{center{[img(50%,)[images/probeExample2.png]]}}}
!Data files exportation
Storing the evolution of values of the public local states or any agregated values into files:
{{center{[img(60%,)[images/probeExample3.png]]}}}
!Simulation overall progress
For instance displaying the current time stamp of the simulation:
{{center{[img[images/probeExample4.png]]}}}
!Simulation-dependent GUIs
For instance a probe displaying an aerial view on the road traffic:
{{center{[img(98%,)[images/probeExample.png][images/probeExample.png]]}}}
}}}
===

!Probes and simulation execution
Since the state of the simulation is not always consistent (especially during the computation of the reaction), the probes do not decide by themselves when to observe the simulation. Instead, they wait for the notification by the simulation engine that the state of the simulation is fit to be observed.

The probes observe the simulation:
*After the initialization, but before the execution of the simulation; +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
__''Observed data:''__ The initial and consistent state of the simulation.
}}}
===

*When the simulation reaches an +++^34em^*@[half-consistent state]
Right after the reaction of at least one level.
===; +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
__''Observed data:''__ The dynmaic state of the simulation in a half-consistent state.
}}}
===

*After the final time stamp of the simulation; +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
__''Observed data:''__ The final consistent state of the simulation.
}}}
===

Since simulations do not always execute peacefully, probes also have to manage the case when the simulation fails because of an error. Moreover, since some probes might use external resources, they also have to be notified when a new simulation is about to start or has ended. Consequently, probes are also notified when:
*A new simulations has been started with the simulation engine; +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
__''Observed data:''__ Nothing.
This call is dedicated to operations like the creation and opening of a new log file, the reinitialization and display of a GUI, //etc.//
}}}
===

*A simulation ends because of an error. +++?[<span class="moresmallbtn">More...</span>]
{{moresection{
__''Observed data:''__ The error that caused the simulation to fail.
}}}
===

{{center{[img[images/simulationEngine_probes.png]]}}}
[>img(45%,)[images/similarArchitectureIllustration2.png]]
In SIMILAR, the notion of simulation model is separated from the notion of simulation engine to separate the declarative knowledge of the simulation from the procedural knowledge of the simulation.

A ''simulation engine'' assembles the execution-related information of a simulation. It defines how time is moved, when to ask the agents to perceive, memorize or decide, when the environment produces its natural action or when the reaction is performed. It is also responsible for the notification of the half-consistent states to the porbes and for the reaction to the [[system influences|Structure - Simulation model - Reaction model]]. This knowledge is ''domain independent''.

The separation between model and engine facilitates the optimization of simulations: the most appropriate execution mode can be chosen depending on the simulation. Indeed, a simulation engine can be implemented using different inner mechanisms to manage the execution of a simulation. For instance:
*Performing all the operations in sequence;
*Performing the operations (when it is possible) in parallel using threads; +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
Perform the decision of each agent in a different thread.
}}} ===

*Performing the operations (when it is possible) in parallel using threads and GPGPU. +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
Perform the decision of each agent in a different computation unit of the GPU.
}}} ===

!Procedural knowledge of the simulation
The simulation engine has different roles in the simulation:
*Manage the value of the dynamic state of the simulation;
*Move the simulation through time +++
Call when it is appropriate:
**The perception, memorization, decision phases of the agents;
**The natural phase of the environment;
**The reaction phase of the levels;
===

*Ensure that the time-related constraints of the model remain valid; +++
{{moresection{
[[This paper|./files/morvan10irm4mls.pdf]] describes the time constraints that the perception, memorization, natural, decision and reaction phases of the simulation have to verify;
}}}
===

*Ensure that the observation probes are updated appropriately; +++
{{moresection{
Refer to the page dedicated to the [[observation probes|Structure - Probe]].
}}}
===

*Provide a reaction to the system influences of any simulation. +++
{{moresection{
Refer to the page dedicated to the [[reaction model|Structure - Simulation model - Reaction model]].
}}}
===
[>img(45%,)[images/similarArchitectureIllustration3.png]]
In SIMILAR, the notion of simulation model is separated from the notion of simulation engine to separate the declarative knowledge of the simulation from the procedural knowledge of the simulation.

A ''simulation model'' assembles the simulation-case specific knowledge. It contains the definition of the levels, the agents, the natural action of the environment and the reaction of each level. This ''knowledge is domain specific''.

The separation between model and engine //facilitates the specification of simulations//, since the execution mechanisms of the behavior of agents, of the natural action of the environment and the reaction of the levels are managed automatically. In addition, it provides a //better support for simulation evolution and revision//.
!Declarative knowledge of the simulation model
The simulation model has different roles in SIMILAR: the ''description of the model'' itself (the agents, the environment, the levels and the influences) but also the ''description of the initial state'' of the simulation<html><sup>1</sup></html>:
*Define the influences that can be sent to each level of the simulation +++
*Create a unique identifier for each type of influence;
*Identify the level(s) to which the influence can be sent;
*Identify the +++^34em^*@[information to embed in the influence]The information that are necessary to manage the influence in the reaction===

===

*Define the environment of the simulation +++
*Define the public local states of the environment +++
*Define one public local state per level of the simulation
*Identify the information contained in each of these public local states
===

*Define the natural action of the environment +++
*Define a natural action for each level of the simulation
*The natural action from a level \(l\) models the process used by the environment to generate influences from \(l\). These influences can be aimed at any level in the +++^34em^*@[out neighborhood of l]
The levels that can be influenced by \(l\).
=== (influence relation graph).
===

===

*Define the agents of the simulation +++
*Define the +++^34em^*@[category]
A class, type, nature or any other unique value used during the reaction to identify which kind of agent it models.
=== of the agent;
*Define the global memory state of the agent +++
*Define the information that have to be contained in the global memory state;
*Define the initial information contained in the global memory state;
===

*Define the public local states of the agent +++
*Define a public local state for each level where the agent lies;
*Model the information contained in each public local state;
*Define the initial information contained in each public local state;
===

*Define the +++^34em^*@[perceived data]
An +++^34em^*@[interpretation]
For instance, if an agent bases its decision on the density of agents in a gird, the perceived data of the agent should be a grid of densities rather than the grid of agents itself.
=== of the raw data contained in the public local state of the simulation. This interpretation (and the global memory state of the agent) are the only information used in the decision process of the agent to determine what to.

=== of the agent +++
*Embed the information required by the decisions of an agent from a level \(l\) in a perceived data model
*Specify a perceived data model for each level where the agent lies
*Use in a perceived data model only the information lying in the levels that +++^34em^*@[can be perceived from l]
The levels lying in the out neighborhood of \(l\) in the perception relation graph.
===

===

*Define the perception process of the agents +++
*Specify a perception process for each level \(l\) where the agent lies
*Determine how the agent uses the +++^34em^*@[public dynamic state of the simulation]
To be more precise, the public local state of the levels that can be perceived from \(l\).
=== to generate the perceived data.
===

*Define the memory revision process of the agent +++
*Define how the agent uses the former value of its global memory state and the +++^34em^*@[lastly perceived data]
The last data that were perceived by the agent from each level where it lies.
=== to build the new value of its global memory state

===

*Define the decision process of the agent +++
*Specify a decision process for each level \(l\) where the agent lies
*Define how the agent uses its global memory state and the perceived data from \(l\) to generate influences into the +++^34em^*@[influenceable levels]
The levels belonging to the out neighborhood of \(l\) in the influence relation graph.
=== from \(l\).
===

===

*Define the levels of the simulation +++
*Create a unique +++^34em^*@[identifier]
A unique value used during the reaction to identify the levels.
=== for each level \(l\) of the simulation;
*Identify the levels that +++^34em^*@[can be perceived]
The levels lying in the out neighborhood of \(l\) in the perception relation graph.
=== from \(l\);
*Identify the levels that +++^34em^*@[can be influenced]
The levels lying in the out neighborhood of \(l\) in the influence relation graph.
=== by \(l\);
*Define the +++^34em^*@[time model]
Usually the ordered set of time stamps when the level is consistent in the simulation, or at least a deterministic criterion telling how to obtain the next consistent time following a consistent time.
=== of the level;
*Define the reaction process of the level +++
*Define how the level interprets the influences that were aimed at it to +++^34em^*@[update its public dynamic state]
Update the public local state of the environment in the level \(l\), or the public local state in \(l\) of the agents lying in \(l\).
===

*Define which influence +++^34em^*@[persist after reaction]
Influences persist if the action they represent has not finished after the reaction.
=== and which influences are consumed by the reaction;
===

===

*Define the initial setting of the simulation +++
*Create the levels of the simulation;
*Create the environment of the simulation +++
*Create an instance of the model of the environment;
*Initialize the public local state of the environment for each level of the simulation;
===

*Create the initial agents of the simulation;
*Create the initial influences of the simulation;
===

!SIMILAR Vs. IRM4MLS/IRM4S
SIMILAR differs from [[IRM4MLS|Bibliography]] and [[IRM4S|Bibliography]] mainly because of two concepts:
*The model of the reaction used in the levels;
*The time evolution model of the simulation.
We do not intend to describe formally these differences in this documentation. Yet, we consider that these points are important enough to bring some clarifications.

{{center{ {{linkbigbtn {[[About the time model|Structure - Simulation model - Time model]]}}} {{linkbigbtn {[[About the reaction model|Structure - Simulation model - Reaction model]]}}} }}}

<html><sub>1: The order of this presentation is not necessarily the order of the specification.</sub></html>
In the [[IRM4MLS|Bibliography]] and [[IRM4S|Bibliography]] approaches, the reaction is considered as domain-dependent. As a consequence, the users are doomed to manually re-write the reaction every time, even though the reaction to some specific influences remains the same no matter the simulation.

In SIMILAR, we consider that a simulation has to manage two kinds of influences:
*''Regular influences'', modeling the influences that are domain-dependent;
*''System influences'', modeling the influences that are independent from the application field.
Since the reaction to the system influence is domain independent, users shouldn't have to write it. Therefore, ''the reaction process'' is different in SIMILAR compared to [[IRM4MLS|Bibliography]] and [[IRM4S|Bibliography]].
!System influences in SIMILAR
<<tiddler [[Structure - Simulation model - Reaction model - System influences]]>>
!Reaction process in SIMILAR
<<tiddler [[Structure - Simulation model - Reaction model - Process]]>>
Before presenting the general algorithm itself, we would like to draw attention on three important problems in the reaction:
#The //reaction to a system influence// can //produce other influences// +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
When an agent is added to the simulation, its public local state has to appear in each level of the simulation. Threfore, the reaction to the ''"add new agent"'' influence produces one or more ''"add agent to the level l"'' influences.
}}} ===

#The //addition/removal of an agent to a level// might //require// the //modification of the environment// +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
In a level where agents have //(x,y)// coordinates, the public local state of the environment can define a grid of agents to provide a fast access to the agents using their coordinates. In such a case, each time an agent is added to the level, it has to be added to the appropriate cell of the grid. The same goes for the removal of the agent.
}}}===

#The //reaction to a regular influence// might //create// new agents///delete// existing agents +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
For instance, in a shooting simulation, a //"person"// agent being hit by a bullet might die in some specific circumstances. In such a case, the person agent is removed from the simulation (and might be replaced by a //"corpse"// agent).
}}}===

!!A process more complex than expected
Because of the combination of these three problems, the ''reaction process is more complex'' than expected:
*The first problem induces that the reaction to system influences has to be a loop;
*The second problem induces that each time a system influence is processed, the user must have the opportunity to perform actions;
*The last problem induces that during the reaction to regular influences, the user might create system influences that have to be processed right away.
Consequently, the reaction of the levels has to rely on the following algorithm. Note that this algorithm assumes that a reaction can be computed in more than one level at the same time<html><sup>1</sup></html>:

+++?[<span class="implbigbtn">See the algorithm</span>]
{{implsection {
We consider that \(L_r\) is the set of levels that are reacting at the same time
#As long as there are unprocessed system influences aimed at a level from \(L_r\)
##\(\forall{} l \in L_r :\)
###React to the unprocessed system influences of \(l\)
###If the reaction generated new system influences, tag the ones aimed at levels from \(L_r\) as unprocessed
#\(\forall{} l \in L_r :\)
##Ask the level \(l\) to perform a user-defined reaction to the system influences aimed at \(l\) that were processed in 1).
#\(\forall{} l \in L_r :\)
##Perform the user-defined reaction to the regular reactions aimed at \(l\)
###If the reaction generated new system influences, tag the ones aimed at levels from \(L_r\) as unprocessed
#As long as there are unprocessed system influences aimed at a level from \(L_r\)
##\(\forall{} l \in L_r :\)
###React to the unprocessed system influences of \(l\)
###If the reaction generated new system influences, tag the ones aimed at levels from \(L_r\) as unprocessed
#\(\forall{} l \in L_r :\)
##Ask the level \(l\) to perform a user-defined reaction to the system influences aimed at \(l\) that were processed in 4).
}}}===

<html><sub>1: This can happen especially when two levels are consistent at the same time stamp.</sub></html>
In the current implementation of SIMILAR, the system influences are:
*The //addition of an agent to the simulation//. <<tiddler [[Structure - Simulation model - Reaction model - System influences - Add agent to simulation]]>>
*The //removal of an agent from the simulation//. <<tiddler [[Structure - Simulation model - Reaction model - System influences - Remove agent from simulation]]>>
*The //addition of an agent to a level//. <<tiddler [[Structure - Simulation model - Reaction model - System influences - Add agent to level]]>>
*The //removal of an agent from a level//. <<tiddler [[Structure - Simulation model - Reaction model - System influences - Remove agent from level]]>>
+++?[<span class="docsmallbtn">Documentation</span>]
{{docsection{
As its name implies, this influence requests the addition of an agent to a specific level. This influence can be used in various contexts:
*In //the behavior of the agents//, if their decisions lead to the apparition of an agent in a level;
*In //the initial state of the simulation//, if the agent has to appear in a level during the first reaction of that level;
*In //a reaction//, if an agent has to be added to a level in reaction to another influence.
!!System reaction
The reaction to this influence consists in:
#Adding the public local state and the private local state defined in the influence to the state of the agent;
#Adding this new public local state of the agent to the public local dynamic state of that level.
!!Important notices
*The level at which the influence is aimed has to be the level where the public local state appears.
}}} === +++?[<span class="implsmallbtn">Implementation</span>]
{{implsection{
This influence is modeled in SIMILAR as an instance of the {{className{[[SystemInfluenceAddAgentToLevel|api/fr/lgi2a/similar/microkernel/influences/system/SystemInfluenceAddAgentToLevel.html]]}}} class.
}}} === +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
In this example, we consider that:
*There is a level which identifier is //"Earth"//;
*An agent "agt" has to be added to the //"Earth"// level;
*The //"newPublicLocalState"// public local state is owned by "agt" and is not already in the public local dynamic state of the //"Earth"// level.
*The //"newPrivateLocalState"// private local state is owned by "agt".

This example illustrates the apparition in the //"Earth"// level of the //"agt"// agent, during the next reaction of the //"Earth"// level. Note that in this example, the values {{{transitoryStateLowerBound }}} and {{{transitoryStateUpperBound}}} specify the bounds ]t,t+dt~~l~~[ of the transitory state during which the influence was produced.
!!Code
{{{
SimulationTimeStamp transitoryStateLowerBound = ...;
SimulationTimeStamp transitoryStateUpperBound = ...;
ILocalStateOfAgent newPublicLocalState = ...;
ILocalStateOfAgent newPrivateLocalState = ...;
SystemInfluenceAddAgentToLevel influence = new SystemInfluenceAddAgentToLevel(
	transitoryStateLowerBound, 
	transitoryStateUpperBound, 
	newPublicLocalState, 
	newPrivateLocalState
);
}}}
}}} ===
+++?[<span class="docsmallbtn">Documentation</span>]
{{docsection{
As its name implies, this influence requests the addition of an agent to the simulation. This influence can be used in various contexts:
*In //the behavior of the agents//, if their decisions lead to the creation of new agents;
*In the //initial state of the simulation//, if the agent has to be added during the first reaction of a level;
*In //a reaction//, if an agent has to be added in reaction to another influence.
Since this influence is tagged as system, a generic system reaction has to be defined for that influence.
!!System reaction
The reaction to this influence consists in:
#Adding the agent to the list of agents currently lying in the simulation;
#Requesting the addition of the public local state of the agent to their corresponding levels;
!!Important notices
*The level to which the influence is aimed determines when the agent is added to the simulation.
*The public local state of the agent appears immediatly in the levels that were computing a reaction;
*The apparition of the public local state of the agent in the other levels is delayed to their next reaction.
}}} === +++?[<span class="implsmallbtn">Implementation</span>]
{{implsection{
This influence is modeled in SIMILAR as an instance of the {{className{[[SystemInfluenceAddAgent|api/fr/lgi2a/similar/microkernel/influences/system/SystemInfluenceAddAgent.html]]}}} class. 
}}} === +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
In this example, we consider that:
*There is a level which identifier is //"Earth"//;
*An agent was created and stored in the variable named //"agentToAdd"//;
*This agent owns a public and a private local state for a non-empty set of levels;
*The agent addition influence is aimed at the //"Earth"// level.

This example illustrates the addition of the //"agentToAdd"// agent to the simulation during the next reaction of the //"Earth"// level. As a reaction to this influence, the agent will be added in all the levels where the agent owns a public and a private local state. Note that in this example, the values {{{transitoryStateLowerBound }}} and {{{transitoryStateUpperBound}}} specify the bounds ]t,t+dt~~l~~[ of the transitory state during which the influence was produced.
!!Code
{{{
SimulationTimeStamp transitoryStateLowerBound = ...;
SimulationTimeStamp transitoryStateUpperBound = ...;
IAgent4Engine agentToAdd = ...;
LevelIdentifier levelId = new LevelIdentifier( "Earth" );
SystemInfluenceAddAgent influence = new SystemInfluenceAddAgent(
	levelId, 
	transitoryStateLowerBound, 
	transitoryStateUpperBound, 
	agentToAdd
);
}}}
}}} ===
+++?[<span class="docsmallbtn">Documentation</span>]
{{docsection{
As its name implies, this influence requests the removal of an agent from a specific level. This influence can be used in various contexts:
*In //the behavior of the agents//, if their decisions lead to the disparition of an agent from a level;
*In //the initial state of the simulation//, if the agent has to disappear from a level during the first reaction of that level;
*In //a reaction//, if an agent has to be removed from a level in reaction to another influence.
!!System reaction
The reaction to this influence consists in:
#Removing the public local state of the agent from the public local dynamic state of that level;
#Removing the public and private local state of the agent defined for that level from the state of the agent.
!!Important notices
*The level at which the influence is aimed has to be the level where the public local state lies;
*If the agent still lies in other levels, the agent still has a behavior in those levels.
}}} === +++?[<span class="implsmallbtn">Implementation</span>]
{{implsection{
This influence is modeled in SIMILAR as an instance of the {{className{[[SystemInfluenceRemoveAgentFromLevel|api/fr/lgi2a/similar/microkernel/influences/system/SystemInfluenceRemoveAgentFromLevel.html]]}}} class.
}}} === +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
In this example, we consider that:
*There is a level which identifier is //"Earth"//;
*An agent owns a public local state for the level //"Earth"//, stored in the variable named //"stateToRemove"//;
*The //"stateToRemove"// public local state is in the public local dynamic state of the //"Earth"// level.
!!Example 1
This example illustrates the removal from the //"Earth"// level of the agent owning the //"stateToRemove"// public local state, during the next reaction of the //"Earth"// level.
{{{
SimulationTimeStamp transitoryStateLowerBound = ...;
SimulationTimeStamp transitoryStateUpperBound = ...;
ILocalStateOfAgent4Engine publicLocalStateOfRemovedAgent = ...;
SystemInfluenceRemoveAgentFromLevel influence = new SystemInfluenceRemoveAgentFromLevel(
	transitoryStateLowerBound, 
	transitoryStateUpperBound, 
	publicLocalStateOfRemovedAgent
);
}}}
!!Example 1
This example illustrates the removal from the //"Earth"// level of the agent //"agtToRemove"//, during the next reaction of the //"Earth"// level.
{{{
SimulationTimeStamp transitoryStateLowerBound = ...;
SimulationTimeStamp transitoryStateUpperBound = ...;
LevelIdentifier levelId = new LevelIdentifier( "Earth" );
IAgent4Engine agtToRemove = ...;
SystemInfluenceRemoveAgentFromLevel influence = new SystemInfluenceRemoveAgentFromLevel(
	transitoryStateLowerBound, 
	transitoryStateUpperBound, 
	agtToRemove,
	levelId
);
}}}
}}} ===
+++?[<span class="docsmallbtn">Documentation</span>]
{{docsection{
As its name implies, this influence requests the removal of an agent from the simulation. This influence can be used in various contexts:
*In //the behavior of the agents//, if their decisions lead to the destruction of an existing agent;
*In //the initial state of the simulation//, if the agent has to be removed during the first reaction of a level;
*In //a reaction//, if the agent has to be removed in reaction to another influence.

Since this influence is tagged as system, a generic system reaction has to be defined for that influence.
!!System reaction
The reaction to this influence consists in:
*Removing the agent from the list of agents currently lying in the simulation;
*Requesting the removal of the public local state of the agent from their corresponding levels;
!!Important notices
*This influence takes as an argument a public local state since this is the only part of an agent that can be perceived by the other agents;
*The level to which the influence is aimed determines when the agent is removed from the simulation.
*The public local state of the agent disappears immediatly in the levels that were computing a reaction;
*The disparition of the public local state of the agent in the other levels is delayed to their next reaction.
}}} === +++?[<span class="implsmallbtn">Implementation</span>]
{{implsection{
This influence is modeled in SIMILAR as an instance of the {{className{[[SystemInfluenceRemoveAgent|api/fr/lgi2a/similar/microkernel/influences/system/SystemInfluenceRemoveAgent.html]]}}} class.
}}} === +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
In this example, we consider that:
*There is a level which identifier is //"Earth"//;
*An agent has a public local state stored in a local variable named //"stateOfRemovedAgent"//;
*The agent removal influence is aimed at the //"Earth"// level.

This example illustrates the removal from the simulation of the agent owning the //"stateOfRemovedAgent"// public local state, during the next reaction of the //"Earth"// level.
!!Code
{{{
SimulationTimeStamp transitoryStateLowerBound = ...;
SimulationTimeStamp transitoryStateUpperBound = ...;
LevelIdentifier levelId = new LevelIdentifier( "Earth" );
ILocalStateOfAgent4Engine publicLocalStateOfRemovedAgent = ...;
SystemInfluenceRemoveAgent influence = new SystemInfluenceRemoveAgent(
	levelId,
	transitoryStateLowerBound, 
	transitoryStateUpperBound, 
	publicLocalStateOfRemovedAgent
);
}}}
}}} ===
Managing explicitly the time in a simulation is not necessarily an easy task. Indeed, a simulation often relies on the notion of //"time step"// whereas simulated phenomena rely on notions like hours/minutes/seconds, seasons or years. In SIMILAR, we define the ''time model'' as the mean to clarify and handle this problem.
!Regular model of time
In reality, time is often seen as a +++^34em^*@[<strong>continuous</strong>]
If we take two different time values, it is always possible to find a thrid time value between them.
=== flow. As a consequence, the properties of the phenomenon (//e.g.// a temperature, a number of subjects, a blood pressure) can be observed at almost any time. On the opposite, multi-agent based simulations (and more generally computer simulations) operate using a +++^34^*@[<strong>discretization</strong>]
The simulation "jumps" from a state to the other and have no intermediary states in between.
===  of time<html><sup>1</sup></html>.

[img(98%,)[images/generalTimeModel.png]]
{{center caption{Illustration of the difference between real time and a simulation time model}}}
+++?[<span class="morebigbtn">Read more...</span>] {{moresection{
First of all, a simulation is defined only for a specific subset of real time, called ''definition domain'' of the simulation. The evolution of the simulated phenomenon out of this domain is considered as not relevant: the simulation stays still during this period<html><sup>2</sup></html>. 

Then, the state of the simulation is defined only for a discrete subset of the definition domain of the simulation. This discrete subset contains elements called ''time stamps''. 
!!Transitory state
Since the state of the simulation is defined only at each time stamp, the behavior of the agents, of the environment and the evolution of the dynamic state of the simulation occurs between two time stamps. To make our speach clearer, we use the following terminology:
*The dynamic state of the simulation is in a ''consistent state'' at each time stamp;
*The dynamic state of the simulation is in a ''transitory state'' between two consecutive time stamps.
[img(98%,)[images/generalTimeModel2.png]]
{{center caption{Illustration of the concepts of consistent and transitory states}}}

<html><sub>1: Even in continuous time models like discrete time event models.</sub></html>
<html><sub>2: Since the simulation stays still, the state of the phenomenon can be observed anytime. This is the reason why the time is seen as continuous out of the definition domain of the simulation.</sub></html>
}}} ===
!Multi-level model of time
In multi-level simulations, the management of time is even more complex, since ''each level'' evolves using its ''own time model''. Indeed, levels are not necessarily moving through time synchronously: for instance, there might be a phase shift between their evolution or they can move at different paces, //etc.//

[img(98%,)[images/multiLevelTimeModel.png]]
{{center caption{Illustration of a multi-level simulation time model}}}
+++?[<span class="morebigbtn">Read more...</span>] {{moresection{
!!Transitory states in multi-level simulations
In the context of multi-level simulations, the terminology has to be extented. Indeed, each level has its own time model. Therefore, strictly speaking, the consistent/transitory terminology applies to levels:
*The dynamic state of a ''level is in a consistent state at'' each time stamp of its model;
*The dynamic state of a ''level is in a transitory state between'' two consecutive time stamp of its model.
On the scale of the simulation, the terminology has to be extended since a simulation can contain a level in a transitory state and another in a consistent state:
*The dynamic state of the ''simulation is in a consistent state'' if ''all the levels'' are in a ''consistent state'';
*The dynamic state of the ''simulation is in a transitory state'' if ''all the levels'' are in a ''transitory state'';
*The dynamic state of the ''simulation is in a half-consistent state'' if at least ''one level'' is in a ''consitent state''.
}}} ===
!Time model issues
Managing a time model raises the following problems:
#Agents perception occurs during the transitory states, where the dynamic state of the simulation is undefined;
#An agent lying in a level might have to perceive data from a level in the middle of a transitory state; +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
For example, in the image, even if an agent located in the level //"3"// perceives right during the time stamp //"1"//, the level //"2"// is in the middle of a transitory state. Therefore, we do not know exactly what information are being perceived by the agent.
}}} ===

#The mapping between time stamps and real time moments is not necessary in some simulations. +++?[<span class="exsmallbtn">Example</span>]
{{exsection{
For instance, Mitchell Resnick<html><sup>3</sup></html> reproduced the construction of piles of wood by termites agents without referring to real time.
<html><sub>3: In his book <em>"Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds"</em>, Resnick M., MIT press, 1997</sub></html>
}}} ===

In SIMILAR, these issues are dealt by two means:
*An extension of the formal model of [[IRM4MLS|Bibliography]], introducing the concept of ''state disambiguation'';
*A simplification of the ''model of the time stamps''.
{{center{ {{linkbigbtn{[[State disambiguation|Structure - Simulation model - Time model - State disambiguation]]}}} {{linkbigbtn{[[Time stamps model|Structure - Simulation model - Time model - Time stamps model]]}}} }}}
The principles underlying the disambiguation of transitory states of a simulation are currently a working topic of SIMILAR. To avoid creating a documentation that will likely become obsolete quite quickly, this part has yet to be documented.

{{center{[img(95%,)[images/workInProgress.png]]}}}
In multi-level simulations, levels are not necessarily moving through time synchronously: there might be a phase shift between their evolution, they can move at different paces, etc.

[img(98%,)[images/multiLevelTimeModel.png]]
{{center caption{Illustration of a multi-level simulation time model}}}
To manage the execution flow of the simulation, a simulation engine does not need qualitative information about time (for instance the duration between two consecutive time stamps). Indeed, all the half-consistent times and transitory phases of a simulation can be identified by considering the ''relative location of the time stamps''.

The real time ellapsing between two time stamps is necessary in simulations where the evolution of the state of the agents is tighly bound with time. For instance in a road traffic simulation where the position of the agents depends on their speed. Many simulations do not need such information. For instance, Mitchell Resnick<html><sup>1</sup></html> reproduced the construction of piles of wood by termites agents without this notion.

<html><sub>1: See the book <i>"Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds"</i>, Resnick M., MIT press, 1997</sub></html>
!Possible time stamp models
Based on the previous observations, two different models can be envisioned for time stamps:
*An ''absolute positioning model'', where the real time ellapsing between two time stamps is ''known'';
*A ''relative positioning model'', where the real time ellapsing between two time stamps is ''unknown''.
Using an absolute positioning model preserves qualitative data about time and is far more accurate. Yet:
*It makes the design of simulations using a simple time representation +++^34em^*@[<strong>more complex than necessary</strong>;]
For instance the usage in java of {{{BigDecimal}}} values is incompatible with simple artihmetic operations like //"+"//. Only methods like {{{bigDecimal1.add( bigDecimal2 )}}} can be used to perform computations.
===

*It is either +++^34em^*@[<strong>prone to errors</strong>]
For instance the usage of imprecise {{{double}}} values to model the absolute position of the time stamp can cause simulation biases.
=== or +++^34em^*@[<strong>memory consuming</strong>]
The memory usage of an arbitrary precision value is far greater than the positive integer values used for relative positioning.
===.
On the opposite, using a relative positioning model loses precision to focus on the mechanics of the simulation engine. Since the number of time stamps of a simulation is +++^34em^*@[numerable]
Otherwise, the simulation would never stop.
===, time stamps can be modeled as integers in that model. This has many benefits:
*It saves memory space;
*It prevents many errors due to the precision loss;
*Arithmetic operation are easy to declare.
{{bigemphasisblock{
SIMILAR relies on the relative positioning model of time stamps.
}}}
This representation is sufficient to model the evolution of time in the simulation engine. If the time ellapsed between two time stamps is necessary, then the user will have to define a ''time conversion model''.
!Time stamp model in SIMILAR
In SIMILAR, the time stamps are characterized by:
*Time stamps have a unique identifier modeled as a long number;
*Time stamps are ordered using their identifiers.
+++?[<span class="docbigbtn">Documentation</span>]
{{docsection{
A time stamp is an instance of the {{className{[[SimulationTimeStamp|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html]]}}} class.
!!Construction
A time stamp can be built using three different approaches:
#Constructing the instance using a {{{long}}} value; {{doclink{[[Method API|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html#SimulationTimeStamp(long)]]}}}
#Constructing the instance as a copy of another time stamp; {{doclink{[[Method API|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html#SimulationTimeStamp(fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp)]]}}}
#Constructing the instance relatively to the {{fieldName{identifier}}} of another time stamp; {{doclink{[[Method API|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html#SimulationTimeStamp(fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp, int)]]}}}
!!Usage
A time stamp is used in three different contexts:
*When the identifier of the time stamp has be known; {{doclink{[[Method API|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html#getIdentifier()]]}}}
*When two time stamps have to be compared; +++?[<span class="docsmallbtn">Documentation</span>]
{{docsubsection{
The {{className{[[SimulationTimeStamp|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html]]}}} class implements the {{className{Comparable}}} interface. Its comparison method returns the difference between the identifier of the time stamps.
}}}
===

*When the evenness of two time stamps has to be checked. +++?[<span class="docsmallbtn">Documentation</span>]
{{docsubsection{
The {{className{[[SimulationTimeStamp|api/fr/lgi2a/similar/microkernel/SimulationTimeStamp.html]]}}} class redefines the {{methodName{equals(...)}}} and {{methodName{hashCode()}}} methods to check the evenness of two objects.
}}}
===

}}}
===
/*{{{*/
/*Haemoglobin Theme for TiddlyWiki*/
/*Design and CSS by Saq Imtiaz*/
/*Version 1.0*/
/*}}}*/
/*{{{*/
#leftMenu {position:relative; float:left; display:inline;margin:0 0.5em 0 0.5em;}
#displayArea{margin:0.5em 0.5em 2em 0.5em;}
#tiddlerDisplay, #tiddlersBar {margin-left:17em;}
#tiddlerDisplay {margin-left:17em;}





#sidebarTabs {font-family:arial,helvetica;}

body
{background:#fefefe;}

#contentWrapper {
	font-family: Verdana, Arial, Tahoma, Sans-Serif;
	color: #555555;
margin:1.9em auto 1em ; width:1024px;}

#header {background:#fefefe;}

.headerShadow {	padding: 1.4em 0em 0.5em 1em; }

.siteTitle {
			font-family: 'Trebuchet MS' sans-serif;
			font-weight: bold;
			font-size: 36px;
			color: #BF2323;
			background-color: #FFF;
}

.siteSubtitle {
	font-size: 1.0em;
        display: block;
        margin: .5em 3em; color: #999;
}

.clearAll {clear:both;}
.tagClear {clear:none;}
#sidebar {position:relative; float:right; display:inline; right:0;}

a{
color:#BF2323;
text-decoration: none; font-weight:normal;
}

a:hover{
color:#BF2323;
background-color: #fefefe;
border-bottom:1px solid #BF2323;
}

.viewer .button, .editorFooter .button{
color: #555;
border: 1px solid #BF2323;
}

.viewer .button:hover,
.editorFooter .button:hover{
color: #fff;
background: #BF2323;
border-color: #BF2323;
}

.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#9F1313;border-color:#9F1313;}

#topMenu br {display:none;}

#topMenu {padding:0.45em 1em; background:#BF2323;}

#topMenu a, #topMenu .tiddlyLink, #topMenu .button {color:#f1f1f1; padding:0.3em 0.45em; margin:0 4px;font-size:120%;font-weight:normal;font-variant: small-caps; border:none; background:#BF2323; text-decoration:none; }

#topMenu a:hover, #topMenu .tiddlyLink:hover, #topMenu .button:hover, #topMenu .button:active, #topMenu .highlight {color:#fff;text-decoration:none; background:#9F1313; }

.title {color:#BF2323; border-bottom:1px solid#BF2323; }
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#999;}

.toolbar {font-size:85%;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#333; background:transparent;border:1px solid #fff;}

.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#333; background:transparent;border:1px solid #fff;}

    *  html .viewer pre {

margin-left: 0em;
}

    * html .editor textarea, * html .editor input {

width: 98%;
}


.tabSelected{color:#fefefe; background:#999;}



 .tabSelected, .tabSelected:hover {
 color: #555;
 background: #fefefe;
 border: solid 1px #ccc;

}

#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#999;}

 .tabUnselected {
 color: #999;
 background: #eee;
 border: solid 1px #ccc;

}

.tabUnselected:hover {text-decoration:none; border:1px solid #ccc;}

#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}

#sidebarOptions .sliderPanel {
	background: #eee; border:1px solid#ccc;
	font-size: .9em;
}

#sidebarOptions .sliderPanel input {border:1px solid #999;}
#sidebarOptions .sliderPanel .txtOptionInput {border:1px solid #999;width:9em;}

#sidebarOptions .sliderPanel a {font-weight:normal; color:#555;background-color: #eee; border-bottom:1px dotted #333;}


#sidebarOptions .sliderPanel a:hover {
color:#111;
background-color: #eee;
border:none;
border-bottom:1px dotted #111;
}

.tabContents {background:#fefefe;}




.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}

.selected .tagging, .selected .tagged {
background-color: #f7f7f7;
border: 1px solid #ccc;
}

.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}

.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #666;
}

.tagging .button, .tagged .button {
color:#ccc;
}
.selected .tagging .button, .selected .tagged .button {
color:#aaa;
}

.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}

.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#333;
}

.popup {
background: #BF2323;
border: 1px solid #BF2323;
}

.popup li.disabled {
color: #000;
}

.popup li a, .popup li a:visited {
color: #eee;
border: none;
}

.popup li a:hover {
background: #bf1717;
color: #fff;
border: none;
}



   #messageArea {

border: 4px solid #BF2323;
background: #fefefe;
color: #555;
font-size:90%;
}

   #messageArea a:hover { background:#f5f5f5; border:none;}


   #messageArea .button{
color: #666;
border: 1px solid #BF2323;
}

   #messageArea .button:hover {
color: #fff;
background: #BF2323;
border-color: #BF2323;
}

   #contentFooter {background:#BF2323; color:#DF7D7D; clear: both; padding: 0.5em 1em; }


#contentFooter a {
color: #DF7D7D;
border-bottom: 1px dotted #DF7D7D; font-weight:normal;text-decoration:none;
}



#contentFooter a:hover {
color: #FFFFFF;
background-color:transparent;
border-bottom: 1px dotted #fff; text-decoration:none;
}




.searchBar {float:right;font-size: 1.0em;position:relative; margin-top:1.3em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fefefe;color:#4F4B45;}
.searchBar input {			
                        background-color: #fefefe;
			color: #999999;
			border: 1px solid #CCC;		margin-right:3px;
}

.tiddler {padding-bottom:10px;}

.viewer blockquote {
border-left: 5px solid #BF2323;
}

.viewer table, .viewer td {
border: 1px solid #BF2323;
}

.viewer th, thead td {
background: #BF2323;
border: 1px solid #BF2323;
color: #fff;
}
.viewer pre {
	border: 1px solid #ccc;
	background: #f5f5f5;
}

.viewer code {
color: #111; background:#f5f5f5;
}

.viewer hr {
border-top: dashed 1px #555;
}

.editor input {
border: 1px solid #888; margin-top:5px;
}

.editor textarea {
border: 1px solid #888;
}

h1,h2,h3,h4,h5 { color: #BF2323; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
/*}}}*/
[[StyleSheetCustomization]]
[[StyleSheetCustomization - DefaultStyles]]
[[StyleSheetCustomization - Buttons]]
[[StyleSheetCustomization - Collapse buttons]]
[[StyleSheetCustomization - Generic styles]]
[[StyleSheetCustomization - Wikispecific]]

[[StyleSheetCustomization - NestedSlidersPlugin]]
/*{{{*/
/* ********************************************************
 * This tiddler contains the CSS rules for the button
 * displaying a big link on screen.
 ******************************************************** */
/*}}}*/

/*{{{*/
.linkbigbtn a {
	-moz-box-shadow:inset 0px 1px 0px 0px #f29c93;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f29c93;
	box-shadow:inset 0px 1px 0px 0px #f29c93;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
	background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
	background-color:#fe1a00;
	-webkit-border-top-left-radius:20px;
	-moz-border-radius-topleft:20px;
	border-top-left-radius:20px;
	-webkit-border-top-right-radius:20px;
	-moz-border-radius-topright:20px;
	border-top-right-radius:20px;
	-webkit-border-bottom-right-radius:20px;
	-moz-border-radius-bottomright:20px;
	border-bottom-right-radius:20px;
	-webkit-border-bottom-left-radius:20px;
	-moz-border-radius-bottomleft:20px;
	border-bottom-left-radius:20px;
	text-indent:0;
	border:1px solid #d83526;
	display:inline-block;
	color:#ffffff;
	font-family:Arial;
	font-size:22px;
	font-weight:bold;
	font-style:normal;
	height:50px;
	line-height:50px;
	text-decoration:none;
	text-align:center;
	text-shadow:1px 1px 0px #b23e35;
	padding-left: 3em;
	padding-right: 3em;
}
.linkbigbtn a:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
	background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
	background-color:#ce0100;
	text-decoration: none;
}
.linkbigbtn a:active {
	position:relative;
	top:1px;
}
/* This button was generated using CSSButtonGenerator.com */
/*}}}*/
/*{{{*/
/* ********************************************************
 * This tiddler contains the CSS rules for the buttons
 * used to expand or collapse a block, using the nested
 * sliders plugin.
 * It also defines the CSS rules of the expanded blocks.
 ******************************************************** */
/*}}}*/

/*{{{*/
/* ********************************************************
 * Buttons common features
 ******************************************************** */
.docsmallbtn, .implsmallbtn, .exsmallbtn, .moresmallbtn, .implbigbtn, .docbigbtn, .exbigbtn , .morebigbtn, .doclink a, .morelink a {
	text-indent:0;
	display:inline-block;
	color:#ffffff;
	font-family:Arial;
	font-size:15px;
	font-weight:bold;
	font-style:normal;
	text-decoration:none;
	margin-top: 1px ;
	margin-bottom: 1px ;
}
.docsmallbtn:hover, .implsmallbtn.hover, .exsmallbtn:hover, .moresmallbtn:hover, .implbigbtn:hover, .docbigbtn:hover, .exbigbtn:hover, .morebigbtn:hover, .morelink a:hover, .doclink a:hover {
	color: #FFFFFF;
	text-decoration: none;
}
.docsmallbtn:active, .implsmallbtn:active, .exsmallbtn:active, .moresmallbtn:active, .implbigbtn:active, .docbigbtn:active, .exbigbtn:active, .morebigbtn:active, .morelink a:active, .doclink a:active {
	position:relative;
	top:1px;
}
/* ********************************************************
 * Small buttons common features
 ******************************************************** */
.docsmallbtn, .implsmallbtn, .exsmallbtn, .moresmallbtn, .morelink a, .doclink a {
	-webkit-border-top-left-radius:20px;
	-moz-border-radius-topleft:20px;
	border-top-left-radius:20px;
	-webkit-border-top-right-radius:20px;
	-moz-border-radius-topright:20px;
	border-top-right-radius:20px;
	-webkit-border-bottom-right-radius:20px;
	-moz-border-radius-bottomright:20px;
	border-bottom-right-radius:20px;
	-webkit-border-bottom-left-radius:20px;
	-moz-border-radius-bottomleft:20px;
	border-bottom-left-radius:20px;
	line-height:24px;
	height:24px;
	text-align:center;
	width:120px;
}
/* ********************************************************
 * Big buttons common features
 ******************************************************** */
.implbigbtn, .docbigbtn, .exbigbtn, .morebigbtn {
	-webkit-border-top-left-radius:0px;
	-moz-border-radius-topleft:0px;
	border-top-left-radius:0px;
	-webkit-border-top-right-radius:11px;
	-moz-border-radius-topright:11px;
	border-top-right-radius:11px;
	-webkit-border-bottom-right-radius:0px;
	-moz-border-radius-bottomright:0px;
	border-bottom-right-radius:0px;
	-webkit-border-bottom-left-radius:0px;
	-moz-border-radius-bottomleft:0px;
	border-bottom-left-radius:0px;
	height:40px;
	line-height:40px;
	padding-left: 2.5em;
	width:75%;
}
/*}}}*/

/*{{{*/
/* ********************************************************
 * Common features of blocks following a big or small button
 ******************************************************** */
.implsection, .exsection, .docsection, .docsubsection, .moresection {
	display:block;
	padding: 0.5em;
	margin-top:0.25em;
	margin-bottom:0.25em;
}
/*}}}*/

/*{{{*/
/* ********************************************************
 * Implementation-related declarations
 ******************************************************** */
/*}}}*/
/*{{{*/
/* Definition of the common features of the small 
 * and big buttons that can be put 
 * in a line to display the implementation */
/* This button was generated using CSSButtonGenerator.com */
.implsmallbtn, .implbigbtn {
	-moz-box-shadow:inset 0px 1px 0px 0px #c1ed9c;
	-webkit-box-shadow:inset 0px 1px 0px 0px #c1ed9c;
	box-shadow:inset 0px 1px 0px 0px #c1ed9c;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) );
	background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
	background-color:#9dce2c;
	border:1px solid #83c41a;
	text-shadow:1px 1px 0px #689324;
}
.implsmallbtn:hover, .implbigbtn:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) );
	background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
	background-color:#8cb82b;
}
/* Definition of the block under the button displaying the implementation */
.implsection {
	border:1px solid #30BF30;
	background-color: #C3FFC3;
}
/* Change the color of the titles inside an implementation section. */
.implsection h1, .implsection h2, .implsection h3, .implsection h4, .implsection h5 {
	color: #30BF30;
}
/*}}}*/

/*{{{*/
/* ********************************************************
 * Documentation-related declarations
 ******************************************************** */
/*}}}*/
/*{{{*/
/* Definition of the common features of the small 
 * and big buttons that can be put 
 * in a line to display the documentation */
/* This button was generated using CSSButtonGenerator.com */
.docsmallbtn, .docbigbtn, .doclink a {
	-moz-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
	-webkit-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
	box-shadow:inset 0px 1px 0px 0px #bbdaf7;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5) );
	background:-moz-linear-gradient( center top, #79bbff 5%, #378de5 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#378de5');
	background-color:#79bbff;
	border:1px solid #84bbf3;
	text-shadow:1px 1px 0px #528ecc;
}
.docsmallbtn:hover, .docbigbtn:hover, .doclink a:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff) );
	background:-moz-linear-gradient( center top, #378de5 5%, #79bbff 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#378de5', endColorstr='#79bbff');
	background-color:#378de5;
}

/* Definition of the block under the button displaying the documentation */
.docsection {
	border:1px solid #528fcc;
	background-color: #d6eafc;
}
.docsubsection {
	border:1px solid #528fcc;
	background-color: #96d9f5;
}
/* Change the color of the titles inside a document section. */
.docsection h1, .docsection h2, .docsection h3, .docsection h4, .docsection h5 {
	color: #528fcc;
}

/* Definition of a title style for the javadoc */
.javadoctitle {
	display: block;
	font-weight: bold;
	font-size:130%;
	text-decoration: underline;
	color: #528fcc;
	margin-top: 1em;
}

/* Definition of a block displaying the javadoc */
.javadocsection {
	display: block;
	border:1px solid #528fcc;
	padding: 0.5em;
	background: #FFFFFF;
	margin-top:-1em;
	margin-bottom:0.25em;
	margin-left: 1em;
}
/*}}}*/


/*{{{*/
/* ********************************************************
 * Example-related declarations
 ******************************************************** */
/*}}}*/
/*{{{*/
/* Definition of the common features of the small 
 * and big buttons that can be put 
 * in a line to display an example */
/* This button was generated using CSSButtonGenerator.com */
.exsmallbtn, .exbigbtn {
	-moz-box-shadow:inset 0px 1px 0px 0px #fed897;
	-webkit-box-shadow:inset 0px 1px 0px 0px #fed897;
	box-shadow:inset 0px 1px 0px 0px #fed897;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f6b33d), color-stop(1, #d29105) );
	background:-moz-linear-gradient( center top, #f6b33d 5%, #d29105 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6b33d', endColorstr='#d29105');
	background-color:#f6b33d;
	border:1px solid #eda933;
	text-shadow:1px 1px 0px #cd8a15;
}
.exsmallbtn:hover, .exbigbtn:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d29105), color-stop(1, #f6b33d) );
	background:-moz-linear-gradient( center top, #d29105 5%, #f6b33d 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d29105', endColorstr='#f6b33d');
	background-color:#d29105;
}
/* Definition of the block under the button displaying the example */
.exsection {
	border:1px solid #eda933;
	background-color: #fae4bd;
}
/* Change the color of the titles inside an example section. */
.exsection h1, .exsection h2, .exsection h3, .exsection h4, .exsection h5 {
	color: #eda933;
}
/*}}}*/

/*{{{*/
/* ********************************************************
 * Read more-related declarations
 ******************************************************** */
/*}}}*/
/*{{{*/
/* Definition of the common features of the small 
 * and big buttons that can be put 
 * in a line to display more information*/
/* This button was generated using CSSButtonGenerator.com */
.moresmallbtn, .morebigbtn, .morelink a {
	-moz-box-shadow:inset 0px 1px 0px 0px #f29c93;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f29c93;
	box-shadow:inset 0px 1px 0px 0px #f29c93;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
	background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
	background-color:#fe1a00;
	border:1px solid #d83526;
	text-shadow:1px 1px 0px #b23e35;
}
.moresmallbtn:hover, .morebigbtn:hover, .morelink a:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
	background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
	background-color:#ce0100;
}
/* Definition of the block under the button displaying the additional information */
.moresection {
	border:1px solid #dcdcdc;
	background-color: #f9f9f9;
}
/* Change the color of the titles inside additional information. */
.moresection h1, .moresection h2, .moresection h3, .moresection h4, .moresection h5 {
	color: #ce0100;
}
/*}}}*/
/*{{{*/
/* ********************************************************
 * This tiddler contains the CSS rules for the custom 
 * default behavior of some HTML tags of the wiki.
 ******************************************************** */
/*}}}*/

/*{{{*/
/* Put an image before the "back to parent" link. */
.toparent a:before {
	content:url(images/arrow.png);
	margin-right: 0.5em;
}
.toparent {
	display:block;
	margin-bottom: -0.5em;
}
/*}}}*/

/*{{{*/
/* Justify text by default */

body {
	text-align: justify;
}
/*}}}*/
/*{{{*/
/* Put a border around images by default */

#tiddlerDisplay img {
	border:1px solid #A60000;
	padding: 0.25em;
	margin: 0.25em;
}
/*}}}*/
/*{{{*/
/* Prevent bullets from overlapping a floating block */

ul, ol {
	overflow: hidden;
}
/*}}}*/
/*{{{*/
/* Set the caption of images as bold. */

span.center.caption {
	font-family: Impact;
	font-style: italic;
	font-size: 130%;
}
/*}}}*/
/*{{{*/
/* Use the same style for internal and external links. */
.externalLink {
	font-weight: bold;
	text-decoration: none;
}
/*}}}*/
/*{{{*/
/* ********************************************************
 * This tiddler contains the CSS rules for the classes
 * that are used in any wiki of this documentation.
 ******************************************************** */
/*}}}*/
/*{{{*/
/* alignment commands */

.center {
	display:block;
	text-align:center;
}
/*}}}*/
/*{{{*/
/* figure related commands */
.caption{
	display:block;
	text-align:center;
	font-family: Impact;
	font-style: italic;
	font-size: 130%;
}
/*}}}*/
/*{{{*/
/* Java classes related commands */
.className {
	font-family: cursive;
	font-weight: bold;
}
.methodName {
	font-family: cursive;
	font-weight: bold;
	font-style: italic;
}
.fieldName {
	font-family: cursive;
	font-weight: bold;
}
.argumentName {
	font-family: cursive;
	font-weight: bold;
}
.packageName {
	font-family: cursive;
	font-style: italic;
	font-weight: bold;
}
.packageName:before, .packageName:after, .methodName:before, .methodName:after {
	content: '"';
}
/*}}}*/
/*{{{*/
/* Block putting a big emphasis on text. */

.focusemphasisblock{
	display:block;
	border:1px solid #008000;
	background-color: #DEFEDE;
	padding: 1.5em;
	font-weight: bold;
	color: #008000;
}
/*}}}*/
/*{{{*/
/* Block putting a strong emphasis on text. */

.bigemphasisblock {
	display:block;
	border:1px solid #A60000;
	background-color: #FF7373;
	padding: 1.5em;
	font-weight: bold;
	color: #FEFEFE;
}
/*}}}*/
/*{{{*/
/* *********************************************
The small button used by the nested slider plugin 
when the "+ + +" maccro is used without a text between "[ ]".
********************************************* */
/*}}}*/
/*{{{*/
.expandbutton {
	-moz-box-shadow:inset 0px 1px 0px 0px #f29c93;
	-webkit-box-shadow:inset 0px 1px 0px 0px #f29c93;
	box-shadow:inset 0px 1px 0px 0px #f29c93;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
	background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
	background-color:#fe1a00;
	-webkit-border-top-left-radius:16px;
	-moz-border-radius-topleft:16px;
	border-top-left-radius:16px;
	-webkit-border-top-right-radius:16px;
	-moz-border-radius-topright:16px;
	border-top-right-radius:16px;
	-webkit-border-bottom-right-radius:16px;
	-moz-border-radius-bottomright:16px;
	border-bottom-right-radius:16px;
	-webkit-border-bottom-left-radius:16px;
	-moz-border-radius-bottomleft:16px;
	border-bottom-left-radius:16px;
	text-indent:0px;
	border:1px solid #d83526;
	display:inline-block;
	color:#ffffff;
	font-family:Arial;
	font-size:14px;
	font-weight:bold;
	font-style:normal;
	height:20px;
	line-height:20px;
	text-decoration:none;
	text-align:center;
	padding-left: 0.4em;
	padding-right: 0.4em;
}
.expandbutton:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
	background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
	background-color:#ce0100;
}
.expandbutton:active {
	position:relative;
	top:1px;
}
/* This button was generated using CSSButtonGenerator.com */
/*}}}*/
/*{{{*/
/* ********************************************************
 * This tiddler contains the CSS rules for the classes
 * that are specific to this wiki.
 ******************************************************** */
/*}}}*/
/*{{{*/
.leaf, .subtree {display:block; margin-left : 0.5em}
.subtree {margin-bottom:0.5em}
#mainMenu {text-align:left}
.branch .button {border:1px solid #DDD; color:#AAA;font-size:9px;padding:0 2px;margin-right:0.3em;vertical-align:middle;text-align:center;}
/*}}}*/
A successful project requires many people to play many roles. Some members write code or documentation, while others are valuable as testers, submitting patches and suggestions.
The team is comprised of Members and Contributors. Members have direct access to the source of a project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members.
!Members
The following is a list of developers with commit privileges that have directly contributed to the project in one way or another.
|!Name |!Email |!Organization |!Roles |
| [[Yoann KUBERA|http://www.yoannkubera.net]]|yoann.kubera@gmail.com |[[LGI2A laboratory|http://www.lgi2a.univ-artois.fr/]] - France |designer, architect, developer|
| [[Gildas MORVAN|http://www.lgi2a.univ-artois.fr/~morvan/Gildas_Morvan/Contact.html]]|gildas.morvan@univ-artois.fr |[[LGI2A laboratory|http://www.lgi2a.univ-artois.fr/]] - France |creator of the IRM4MLS meta-model, developer |
!Contributors
There are no contributors listed for this project.
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options 
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed. 
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab  = config.options.chkHideTabsBarWhenSingleTab  ? config.options.chkHideTabsBarWhenSingleTab  : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
	tooltip : "see ",
	tooltipClose : "click here to close this tab",
	tooltipSave : "click here to save this tab",
	promptRename : "Enter tiddler new name",
	currentTiddler : "",
	previousState : false,
	previousKey : config.options.txtPreviousTabKey,
	nextKey : config.options.txtNextTabKey,	
	tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
	handler: function(place,macroName,params) {
		var previous = null;
		if (config.macros.tiddlersBar.isShown())
			story.forEachTiddler(function(title,e){
				if (title==config.macros.tiddlersBar.currentTiddler){
					var d = createTiddlyElement(null,"span",null,"tab tabSelected");
					config.macros.tiddlersBar.createActiveTabButton(d,title);
					if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
					previous = "active";
				}
				else {
					var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
					var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
					btn.setAttribute("tiddler", title);
					if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
					previous=btn;
				}
				var isDirty =story.isDirty(title);
				var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
				c.setAttribute("tiddler", title);
				if (place.childNodes) {
					place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
					place.insertBefore(d,place.firstChild); 
				}
				else place.appendChild(d);
			})
	}, 
	refresh: function(place,params){
		removeChildren(place);
		config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
		if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
			story.refreshAllTiddlers();
			if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
			config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
		}
	},
	isShown : function(){
		if (config.options.chkDisableTabsBar) return false;
		if (!config.options.chkHideTabsBarWhenSingleTab) return true;
		var cpt=0;
		story.forEachTiddler(function(){cpt++});
		return (cpt>1);
	},
	selectNextTab : function(){  //used when the current tab is closed (to select another tab)
		var previous="";
		story.forEachTiddler(function(title){
			if (!config.macros.tiddlersBar.currentTiddler) {
				story.displayTiddler(null,title);
				return;
			}
			if (title==config.macros.tiddlersBar.currentTiddler) {
				if (previous) {
					story.displayTiddler(null,previous);
					return;
				}
				else config.macros.tiddlersBar.currentTiddler=""; 	// so next tab will be selected
			}
			else previous=title;
			});		
	},
	onSelectTab : function(e){
		var t = this.getAttribute("tiddler");
		if (t) story.displayTiddler(null,t);
		return false;
	},
	onTabClose : function(e){
		var t = this.getAttribute("tiddler");
		if (t) {
			if(story.hasChanges(t) && !readOnly) {
				if(!confirm(config.commands.cancelTiddler.warning.format([t])))
				return false;
			}
			story.closeTiddler(t);
		}
		return false;
	},
	onTabSave : function(e) {
		var t = this.getAttribute("tiddler");
		if (!e) e=window.event;
		if (t) config.commands.saveTiddler.handler(e,null,t);
		return false;
	},
	onSelectedTabButtonClick : function(event,src,title) {
		var t = this.getAttribute("tiddler");
		if (!event) event=window.event;
		if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
			config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
		return false;
	},
	onTiddlersBarAction: function(event) {
		var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
		if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
	},
	createActiveTabButton : function(place,title) {
		if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
			var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
			btn.setAttribute("tiddler", title);
		}
		else
			createTiddlyText(place,title);
	}
}

story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;

story.closeTiddler = function(title,animate,unused) {
	if (title==config.macros.tiddlersBar.currentTiddler)
		config.macros.tiddlersBar.selectNextTab();
	story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
	var e=document.getElementById("tiddlersBar");
	if (e) config.macros.tiddlersBar.refresh(e,null);
}

story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
	story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
	var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;  
	if (config.macros.tiddlersBar.isShown()) {
		story.forEachTiddler(function(t,e){
			if (t!=title) e.style.display="none";
			else e.style.display="";
		})
		config.macros.tiddlersBar.currentTiddler=title;
	}
	var e=document.getElementById("tiddlersBar");
	if (e) config.macros.tiddlersBar.refresh(e,null);
}

var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
	coreRefreshPageTemplate(title);
	if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}

ensureVisible=function (e) {return 0} //disable bottom scrolling (not useful now)

config.shadowTiddlers.StyleSheetTiddlersBar = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .button {border:0}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .tab {white-space:nowrap}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar {padding : 1em 0.5em 2px 0.5em}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tabUnselected .tabButton, .tabSelected .tabButton {padding : 0 2px 0 2px; margin: 0 0 0 4px;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tiddler, .tabContents {border:1px [[ColorPalette::TertiaryPale]] solid;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar +="/*}}}*/";
store.addNotification("StyleSheetTiddlersBar", refreshStyles);

config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");

//}}}
|~ViewToolbar|closeTiddler closeOthers editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></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>
<!--}}}-->
Copyright © 2018 [[Laboratoire de Genie Informatique et d'Automatique de l'Artois|http://www.lgi2a.univ-artois.fr]]. All Rights Reserved.