Skip to content

aerialls/KnowledgePlan

Repository files navigation

KnowledgePlan website

Small guide to install the website (needs PHP 5.3.2 min)

Installation

The website has several dependencies. To install these dependencies just run:

php bin/vendors install

This script will download the dependencies in the vendor folder. For more informations about Composer (the software to resolve these dependencies, see https://github.com/composer/composer)

Apache VirtualHost

The website needs a virtualhost pointing to the web folder. For instance:

<VirtualHost *:80>
    DocumentRoot "/path/to/KnowledgePlan/web"
    ServerName www.knowledgeplan.com
    <Directory "/path/to/KnowledgePlan/web">
        AllowOverride All
        Allow from All
    </Directory>
</VirtualHost>

Configuration

All the configuration is done in the bootstrap.php in the KnowledgePlanServiceProvider.

$app->register(new KnowledgePlanServiceProvider(), array(
    // Configuration goes here
));

List of available options

Key Description Example
kp.cache_folder The folder to store simulation files (cached) 'cache/'
kp.simulations_folder The folder where the output files are stored 'simulations/'
kp.dry_run By default, the simulation is store in the cache to speed up the following requests. If you want to always check the output file to create the simulation and never call the cache, set this option to true. The cache will always be ignored. false
kp.options Options for all the plot See below for the list
kp.simulation_options Options for a specific simulation (associative array). See `kp.options` for the list (it's the same). See below for the list
kp.experiences The list of all the experiences See below for the list

kp.options options list

Key Description Example
x_min 0
x_max 10
x_name The name of the field in the output file outputrate
x_label The name of the label. If this field is left blank, the `x_name` field is using Outpute rate (packet/ms)
y_min 0
y_max 10
y_name The name of the field in the output file delay
y_label The name of the label. If this field is left blank, the `y_name` field is using Delay (ms)

kp.experiences options list

Key Description Example
title The title of the experience (will be in the black title bar) My experience
simulations An array of simulations. An empty array means all simulations array('poisson', 'other')
simulations-exclude Each simulation in this array will be removed from the simulation array. It's usefull if you want display all the simulations without one. array('knowledge_plan')
plots The list of plots to be displayed. ('points', 'centroids', 'hlm' or 'delay_max') array('points', 'hlm')
fields Informations for the table. List of: 'time', 'outputrate-average', 'delay-average', 'accepted-flows', 'rejected-flows', 'timeslot-with-qos', 'timeslot-without-qos' array('time')

Full configuration

$app->register(new KnowledgePlanServiceProvider(), array(
    'kp.cache_folder'        => __DIR__.'/cache',
    'kp.simulations_folder'  => __DIR__.'/simulations',
    'kp.options'             => array(
        'x_min'   => 0,
        'x_max'   => 8,
        'y_min'   => 0,
        'y_max'   => 60,
        'x_name'  => 'outputrate',
        'y_name'  => 'delay',
        'x_label' => 'Outpute rate (packet/ms)',
        'y_label' => 'Delay (ms)'
    ),
    'kp.simulation_options' => array(
        'knowledge_plan' => array(
            'x_max' => 8,
            'y_max' => 100
        ),
        'other_simulation' => array(
            'x_name' => 'foo',
            'y_name' => 'bar'
        )
    ),
    'kp.experiences' => array(
        'knowledgeplan' => array(
            'title'       => 'Modelling the Knowledge Plan',
            'simulations' => array('knowledge_plan'),
            'plots'       => array('centroids', 'points', 'hlm'), // 'hlm', 'centroids', 'delay_max' or 'points'
            'fields'      => array('time', 'knowledge-plan')
        ),
        'performance' => array(
            'title'               => 'Performance evaluation',
            'simulations'         => array(), // Empty to all
            'simulations-exclude' => array('knowledge_plan'),
            'plots'               => array('points', 'delay_max'), // 'hlm', 'centroids', 'delay_max' or 'points'
            'fields'              => array(
                'time', 'outputrate-average', 'delay-average',
                'accepted-flows', 'rejected-flows', 'timeslot-with-qos',
                'timeslot-without-qos'
            )
        )
    )
));