frePPLeOpen source Production Planning
  • Home
  • Documentation
  • 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:

  • Separate models for separate 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 djangosettings.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 separate 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 as a prefix in the URLs 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 for instance 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:

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

       frepplectl 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 djangosettings.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 use a different model, simply select it from the list.
    If only a default schema is present, the drop down is not shown.

    • Getting started
      • 1 – Introduction
      • 2 – Installation
      • 3 – Entering data
      • 4 – Modelling concepts
      • 5 – Your first model
      • 6 – Your first plan
    • 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
    • User guide
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • Customizing a screen
        • User preferences
        • User permissions and roles
        • Comments
        • History – Audit trail
      • Data maintenance screens
      • Supply Path / Where Used
      • Plan analysis screens
        • 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
      • Execution screen
      • Batch commands
        • frepplectl
        • frepple
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling from the source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • Extension modules
      • Forecast module
      • Order quoting module
      • REST web service module
      • OpenERP connector module
      • Linear programming solver module
    • Technical guide
      • Architecture
      • Source code repository
      • User interface
        • Creating an extension app
        • Translating the user interface
        • Adding or customizing a report
        • Style guide
      • Solver engine
        • Code structure
        • Class diagram
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
        • Extension modules
        • Style guide
        • Portability
      • Security
      • 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
    • FAQ
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba