frePPLev2.0
open source Production PLanning
  • Home
  • Documentation
    • Getting started
    • Modeling guide
    • User guide
    • Installation guide
    • Developer guide
    • FAQ
  • C++ API

Configuring multiple models in the user interface

FrePPLe supports working with multiple models in the same web application.
This setup can be useful for the following very typical use cases:

  • Seperate models for seperate product lines or different factories.
    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.

  • What-if models to support scenario analysis.
    A planner can do all kinds of what-if analysis in a copy of the production model.

 

The following steps are required to configure a multi-model setup.

  • Create additional database schemas
    The database administrator needs to create an additional schema in the database for each model.

  • Update the settings.py configuration file
    The connection details of each schema need to be added as a seperate section for the DATABASES parameter in the file settings.py.
    For instance:

      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': '',     
        },
      }

    Some guidelines need to be considered when setting up the schemas:

    • The number of schemas in the web application is unlimited.
      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.
    • One of the schemas MUST be called ‘default’.
      All information on user logins, user permissions and browser sessions are stored in this default schema.
    • Use unambiguous names for the additional schemas.
      Since the short names will be used in the URL a name should be chosen that doesn’t create confusion:
      Good examples: ‘scenario1′, ‘plant1′, …
      Bad examples: ‘admin’, ‘buffer’, ‘scenario/1′, names with non-ascii characters, names with spaces…
    • For whatif scenario modeling the schemas all MUST use the same engine. It is not possible to mix eg MySQL and PostgreSQL schemas.
      If the command frepple_copy isn’t used different database engines could in theory be used, but for simplicity, consistency and maintainability reasons that’s probably not a good idea.
    • The databases can be located on different database servers or database instances, but this is not required.
      This could be useful eg to avoid that users running large tasks on what-if scenarios impact the performance of the regular production model.
  • Initialize the new schema(s)
    If not done yet, the default schema is initialized with the following command. It creates all tables, indices and other database objects and loads the initial demo dataset:
    manage.py syncdb 
    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: see Execute
    If you’re using an Oracle database, please check the help of the frepple_copy command first: your database administrator will need to initialize some database directories first.
    manage.py frepple_copy default my_schema 
    The copy process might take a while for bigger datasets. If  it takes too long, you should consider running the copy as an automated batch job during quiet hours.

  • Restart the web server
    After a change in the settings.py file, the web server needs to be restarted.

  • Navigation between models
    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.
    If only a default schema is present, the dropdown is not shown.

    • Getting started
    • Modeling guide
      • Simplified domain model
      • Detailed domain model
      • Environment variables
      • Python interpreter
      • Global parameters
      • Buffer
      • Calendar
      • Customer
      • Demand
      • Flow
      • Item
      • Load
      • Location
      • Operation
      • Suboperation
      • Operationplan
      • Problem
      • Resource
      • SetupMatrix
      • Skill
      • Resource skill
      • Solver
      • Extension modules
        • Forecast module
        • REST web service module
        • Linear programming solver module
        • OpenERP connector module
    • User guide
      • Main features
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
          • Browser bookmarks
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • User preferences
        • User permissions and roles
      • Screens
        • Data input
        • Supply Path / Where Used
        • Comments
        • History – Audit trail
        • Plan analysis
          • Problem report
          • Constraint report
          • Inventory report
          • Inventory detail report
          • Resource report
          • Resource Gantt report
          • Resource detail report
          • Operation report
          • Operation detail report
          • Demand report
          • Demand detail report
          • Demand Gantt report
          • Forecast report
          • Performance indicator report
        • Execute
      • Batch commands
        • manage.py (manage.exe on Windows)
        • frepple (frepple.exe on Windows)
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling on debian-based linux
      • Compiling on Red Hat based Linux
      • Compiling from the subversion source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring the user interface
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • FAQ
    • Developer guide
      • Code structure
      • Class diagram
      • Solver
        • Solver features
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
      • Extension modules
      • Version control
      • Style guide
      • Portability
      • Security
      • Internationalization
      • Translating the user interface
      • Adding or customizing a report
      • Unit tests
        • buffer_procure_1
        • calendar
        • callback
        • cluster
        • constraints_combined_1
        • constraints_combined_2
        • constraints_leadtime_1
        • constraints_material_1
        • constraints_material_2
        • constraints_material_3
        • constraints_material_4
        • constraints_resource_1
        • constraints_resource_2
        • constraints_resource_3
        • constraints_resource_4
        • constraints_resource_5
        • datetime
        • deletion
        • demand_policy
        • flow_alternate_1
        • flow_alternate_2
        • flow_effective
        • forecast_1
        • forecast_2
        • forecast_3
        • forecast_4
        • forecast_5
        • forecast_6
        • jobshop
        • load_alternate
        • load_effective
        • lpsolver_1
        • multithreading
        • name
        • operation_alternate
        • operation_available
        • operation_effective
        • operation_pre_post
        • operation_routing
        • pegging
        • problems
        • python_1
        • python_2
        • python_3
        • safety_stock
        • sample_module
        • scalability_1
        • scalability_2
        • scalability_3
        • setup_1
        • setup_2
        • skill
        • xml
        • xml_remote
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba