Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > b4938f6e602e6d7a47abeaff7a5df581 > files > 427

sevmgr-doc-1.00.0-3.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta name="robots" content="index,follow"/>
	<title>Tutorials</title>
	<link rel="shortcut icon" href="favicon.ico">
	<link href="tabs.css" rel="stylesheet" type="text/css"/>
	<link href="sevmgr.css" rel="stylesheet" type="text/css"/>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
	<script type="text/javascript">
	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-28344140-1']);
	  _gaq.push(['_setDomainName', 'none']);
	  _gaq.push(['_setAllowLinker', true]);
	  _gaq.push(['_trackPageview']);
	  (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	</script>
	<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
  </head>
  <body>
	<div id="top"><!-- do not remove this div! -->
	  <div id="titlearea">
		<table width="100%">
		  <tbody>
			<tr style="height: 56px;">
			  <td style="padding-left: 0.5em;">
				<div id="projectname"><a href="http://sevmgr.sourceforge.net"><img height="45px" alt="SEvMgr Logo" src="sevmgr_logo.png"></a>
				  &#160;<span id="projectnumber">1.00.0</span>
				</div>
				<div id="projectbrief">C++ Simulation-Oriented Discrete Event Management Library</div>
			  </td>
			  <!-- begin SOURCEFORGE_CUSTOM-->
			  <td>
				<div id="sflogo"><a href="http://sevmgr.sourceforge.net"><img height="45px" alt="SourceForge Logo" src="sfx_logo.png"></a></div>
			  </td>
			  <!-- end SOURCEFORGE_CUSTOM-->
			</tr>
		  </tbody>
		</table>
	  </div>
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('tutorials.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Tutorials </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="tut_toc"></a>
Table of Contents</h1>
<ul>
<li><a class="el" href="tutorials.html#tut_configuration">Preparing the AirSched Project for Development</a></li>
<li><a class="el" href="tutorials.html#tut_procedure">Your first networkBuilde</a><ul>
<li><a class="el" href="tutorials.html#tut_procedure_summary">Summary of the different steps</a></li>
<li><a class="el" href="tutorials.html#tut_procedure_results">Result of the Batch Program</a></li>
</ul>
</li>
<li><a class="el" href="tutorials.html#tut_how_network_building_file">Network building with an input file</a><ul>
<li><a class="el" href="tutorials.html#tut_how_build_network_file">How to build a network input file?</a></li>
<li><a class="el" href="tutorials.html#tut_how_network_building">Building the BOM tree with an input file</a></li>
<li><a class="el" href="tutorials.html#tut_how_network_building_result">Result of the Batch Program</a></li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="tut_configuration"></a>
Preparing the AirSched Project for Development</h1>
<p>The source code for these examples can be found in the <code>batches</code> and <code>test/airsched</code> directories. They are compiled along with the rest of the <code>AirSched</code> project. See the <a class="el" href="users_guide.html">Users Guide</a> for more details on how to build the <code>AirSched</code> project.</p>
<h1><a class="anchor" id="tut_procedure"></a>
Your first networkBuilde</h1>
<h2><a class="anchor" id="tut_procedure_summary"></a>
Summary of the different steps</h2>
<p>All the steps below can be found in the same order in the batch <code>AirSched.cpp</code> program.</p>
<p>First, we instanciate the AIRSCHED_Service object:</p>
 <div class="fragment"></div><!-- fragment --></p>
<p>Then, we construct a default sample list of travel solutions and a default booking request (as mentionned in ug_procedure_bookingrequest and ug_procedure_travelsolution parts):</p>
 <div class="fragment"></div><!-- fragment --></p>
<p>For basic use, the default BOM tree can be built using:  <div class="fragment"></div><!-- fragment --></p>
<p>The main step is the network building (see <a class="el" href="users_guide.html#ug_procedure">The travel solution calculation procedure</a>):  <div class="fragment"></div><!-- fragment --></p>
<h2><a class="anchor" id="tut_procedure_results"></a>
Result of the Batch Program</h2>
<p>When the <code>AirSched.cpp</code> program is run (with the <code>-b</code> option), the log output file should look like:</p>
<div class="fragment"></div><!-- fragment --><p>What is interesting is to compare the travel solution list (here reduced to a single travel solution) displayed before:</p>
 <div class="fragment"></div><!-- fragment --></p>
<p>and after the network building:</p>
<p><div class="fragment"></div><!-- fragment --></p>
<p>Between the two groups of dashes, we can see that a network option structure has been added by the network builder: the price is 450 EUR for the Y class, the ticket is refundable but there are exchange fees and the customer must stay over on saturday night.</p>
<p>Let's return to our default BOM tree display: the only network rule stored was a match for the travel solution into consideration (same origin airport, same destination airport, flight date included in the network rule date range, same airline "BA", ...).</p>
<p>By looking at the network rule trip type "RT", we can guess we face a round trip network: that means the price given in the default bom tree construction in <code>stdair::CmdBomManager.hpp</code> has been divided by 2 because we are considering either an inbound trip or an outbound one.</p>
<h1><a class="anchor" id="tut_how_network_building_file"></a>
Network building with an input file</h1>
<h2><a class="anchor" id="tut_how_build_network_file"></a>
How to build a network input file?</h2>
<p>The objective here is to build a network input file to network builde the default travel solution list built using:</p>
 <div class="fragment"></div><!-- fragment --></p>
<p>This travel solution list, reduced to a singleton, can be displayed as done before:</p>
 <div class="fragment"></div><!-- fragment --></p>
<p>We deduce:</p>
<ul>
<li>we need a network rule whose origin-destination couple is "LHR, SYD".</li>
<li>the date range must include the date "2011-06-10".</li>
<li>the time range must include the time "21:45".</li>
<li>the airline operating is "BA", so it must be the airline pricing.</li>
</ul>
<p>We can deduce a part of our network rule file :</p>
<div class="fragment"></div><!-- fragment --><p>We have no information about stay duration and advance purchase (such information are contained into the booking request): so let us put "0" to embrace all the requests possible.</p>
<p>No information for the point-of-sale and the channel too: let us consider all the channels ("IN", "DN", "IF" and DF") and all the points of sale 
(the origin "LHR", the destination "SYD" and the rest-of-the-world "ROW") existing. To access this information, we could look into the default booking request.</p>
<p>The input file is now:</p>
<div class="fragment"></div><!-- fragment --><p>Let us say we have just the Economy cabin "Y" and Bristish Airways prices ticket for class "Y".</p>
<p>No information about the trip type, so we duplicate all the network rules for both type: one-way "OW" and round-trip "RT" (to access this information, we could look to the default booking request).</p>
<p>The network options are all set to a default value "T" (meaning true) and the network values are chosen to be all distinct.</p>
<p>We obtain:</p>
<div class="fragment"></div><!-- fragment --><h2><a class="anchor" id="tut_how_network_building"></a>
Building the BOM tree  with an input file</h2>
<p>The steps are the same as before <a class="el" href="tutorials.html#tut_procedure_summary">Summary of the different steps</a> except the bom tree must be built using the network input file :</p>
 <div class="fragment"></div><!-- fragment --></p>
<h2><a class="anchor" id="tut_how_network_building_result"></a>
Result of the Batch Program</h2>
<p>When the <code>AirSched.cpp</code> program is run with the <code>-f</code> option linking with the file built just above: </p>
<pre class="fragment">~/AirSched -f ~/&lt;YourFileName&gt;.csv 
</pre><p>the last lines of the log output should look like:</p>
<pre class="fragment">[D]~/AirSchedgit/AirSched/batches/AirSched.cpp:223: Travel solutions:
    [0] [0] BA, 9, 2011-06-10, LHR, SYD, 21:45 --- Y, 145, 1 1 1 --- 
</pre><p>We have just one network option added to the travel solution. We can deduce from the price value 145 that the network builder used the network rule number 15 to price the travel solution. We have an inbound or outbound trip of a round trip: the total price 290 has been divided by 2. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
		
		<li class="footer">Generated on Wed May 22 2013 21:15:38 for SEvMgr by
		  <a href="http://www.doxygen.org/index.html">
			<img class="footer" src="doxygen.png" alt="doxygen"/></a> 
		  1.8.3.1
		</li>
		<li class="footer">
		  <a href="http://sourceforge.net/projects/sevmgr"><img class="footer" src="http://sflogo.sourceforge.net/sflogo.php?group_id=537815&type=12&format=.png" alt="SourceForge Logo"></a>
		</li>
	  </ul>
	</div>
  </body>
</html>