Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 54

frepple-doc-0.8.1-3.fc15.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"/>
  <title>Frepple / Configuring with multiple models</title>
  <link rel='stylesheet' href='../styles.css' type='text/css' />
  <!--PageHeaderFmt-->  
</head>
<body>
<div id="container">

<div id="menubar">
  
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a></div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='../reference/index.html'>C++ API</a></h3>
<br/><div>
</div>  
</div>
</div>

<div id="content">
<br/>
<!--PageText-->
<div id='wikitext'>
<p><a class='wikilink' href='../Main/HomePage.html'>Main</a> &gt; <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Installation.html'>Download and install</a> > <a class='selflink' href='MultiDB.html'>Configuring with multiple models</a></span>
</p>
<p class='vspace'>FrePPLe supports working with multiple models in the same web application.<br />This setup can be useful for the following very typical use cases:
</p><ul><li><strong>Seperate models for seperate product lines or different factories.</strong><br />  When the interaction between product divisions or plants is relatively low, it might be useful to create seperate models for the planners to work in. This allows their business processes, planner workflows and data to be more loosely coupled.
<div  style='text-align: center;'> <img src='../uploads/Frepple/multimodel.png' alt='' title='' /></div>
</li><li><strong>What-if models to support scenario analysis.</strong><br />  A planner can do all kinds of what-if analysis in a copy of the production model.
<div  style='text-align: center;'> <img src='../uploads/Frepple/whatif.png' alt='' title='' /> </div>
</li></ul><p class='vspace'>The following steps are required to configure a multi-model setup.
</p>
<div class='vspace'></div><ul><li><strong>Create additional database schemas</strong><br />  The DBA needs to create an additional schema in the database for each model.
<div class='vspace'></div></li><li><strong>Update the settings.py configuration file</strong><br />  The connection details of each schema need to be added as a seperate section for the DATABASES parameter in the file settings.py.<br />  For instance:<br /><pre class='escaped'>
  DATABASES = {
  'default': {
    'ENGINE': 'django.db.backends.oracle',
    'NAME': 'orcl',
    'USER': 'frepple',
    'PASSWORD': 'frepple',
    'HOST': '',     
    'OPTIONS': {},  
    'PORT': '',     
    },
  'scenario1': {
    'ENGINE': 'django.db.backends.oracle',
    'NAME': 'orcl',
    'USER': 'scenario1',
    'PASSWORD': 'frepple',
    'HOST': '',     
    'OPTIONS': {},  
    'PORT': '',     
    },
  }
</pre>
Some guidelines need to be considered when setting up the schemas:
<ul><li>The number of schemas in the web application is unlimited.<br />   However, for heavily loaded systems it may be wise to configure also seperate web servers, not only configuring multiple schemas on a shared web application.
</li><li>One of the schemas MUST be called 'default'.<br />   All information on user logins, user permissions and browser sessions are stored in this schema.
</li><li>Use unambiguous names for the additional schemas.<br />   Since the short names will be present in the URL a name should be chosen that doesn't create confusion:<br />   Good examples: 'scenario1', 'plant1', ...<br />   Bad examples: 'admin', 'buffer', 'scenario/1', names with non-ascii characters, names with spaces...
</li><li>For whatif scenario modeling the schemas all MUST use the same engine. It is not possible to mix eg MySQL and PostgreSQL schemas.<br />   If the schema copying script isn't used different database engines could in theory be used, but for simplicity, consistency and maintainability reasons that is not a good idea.
</li><li>The databases could be located on database servers or database instances, but this is not required.<br />   It could be useful eg to avoid that users running large tasks on what-if scenarios impact the performance of the regular production model.
</li></ul><div class='vspace'></div></li><li><strong>Initialize the new schema(s)</strong><br />  If not done yet, the production schema is initialized with the following command. It creates all tables, indices and other database objects and loads the initial demo dataset:
<pre> 
  manage.py syncdb  
</pre>To initialize the additional schemas you copy the default schema with the command below. The command can also be executed from the user interface in the execution screen.<br />  If you're using an Oracle database, please check the help of the frepple_copy command first: your DBA will need to initialize some database directories first. The copy process might take a while for bigger datasets.
<pre> 
  manage.py frepple_copy default my_schema  
</pre><div class='vspace'></div></li><li><strong>Restart the web server</strong><br />  After a change in the settings.py file, the web server needs to be restarted.
<div class='vspace'></div></li><li><strong>Navigation between models</strong><br />  After the restart you'll see a list of your schemas in the upper right corner of the screen. To start using a different model, simply select it from the list.<br />  If only a default schema is present, the dropdown is not shown.
<div><img src='../uploads/Frepple/scenariodropdown.png' alt='' title='' /></div>
</li></ul><div class='vspace'></div>
</div>

<!--PageFooterFmt-->
<!--HTMLFooter-->
</div></div>
</body>
</html>