TOGA Help Pages

Contents

TOGA Command Options

TOGA takes a single command option switch and a variable number of arguments.

-v Display version information.
-l Display licence information.
-hI Display the Introduction to TOGA in text format
-HI Display the Introduction to TOGA in HTML format
-h X

Help in text format, where the optional X parameter is one of the table codes below.

If a table code is supplied, the help page for that table is displayed, otherwise text help for command options is shown.

-H X

Help in HTML format, where the optional X parameter is one of the table codes below.

If a table code is supplied, the help page for that table is displayed, otherwise HTML help for command options is shown.

-i Interactive mode.
-g GUI mode.
-d Delete the previous optimisation session from the database. The next optimisation run will have to start from scratch. Use this option with care!
-rX F Read into the database a file containing table data, where X is one of the table codes below, and F is a file name.
-c Check the integrity of the database.
-o n

Run the optimiser on the current database, where the optional n parameter is the number of generations for the algorithm to run.

If no n parameter is supplied, the algorithm runs for a default number of generations.

-og n

Run the optimiser on the current database, where the optional n parameter is the number of generations for the algorithm to run.

If no n parameter is supplied, the algorithm runs for a default number of generations.

This mode creates a graphical display (called a "Value Path Diagram") of the final population of solutions. This requires installation of the wxPython library. NB: Not available in this version.

-s Show a summary of the current candidate solution.
-p Print out the timetable represented by the current candidate solution. NB: The behaviour of this command is likely to change in the future.
-wX F Write table data from the database to file, where X is one of the table codes below, and F is a file name.
-b F Read commands in batch mode from file named F.

Table Codes

Code Table Tier
R Resource 0
N Location 0
D Department 0
T Staff 0
P Pupil 0
S Slot 0
F Facility 1
C Course 1
M Commitment 1
L Lesson 2
E Enrolment 2
Q Requirement 3
K Candidate 3
Y Prototype 4

File Formats

Table files are accepted as comma separated values (.csv). They may be created with any spreadsheet program, such as OpenOffice.org Calc or Microsoft Excel.

The structure of each table is given in the help page for that table. As an example, here are a few lines you might find in the Location Table:

# LocationTable.csv
MAH,    750,    Main Assembly Hall
S01,    23,     Science Block Room 1
S02,    23,     Science Block Room 2

Consulting the help page for this table shows its structure to be:

(locNo, capacity, description)

Where locNo is identified as being the primary key of the table. Primary keys may be in any format the user wishes, but they must be unique.

Examples

Read the Introduction to TOGA in text format:

python toga.py -hI | more

Get HTML help on the Commitment Table:

python toga.py -HM

Read the Resource table from the file ResourceTable.csv:

python toga.py -rR ResourceTable.csv

Run the Genetic Algorithm for 50 generations and look at the Value Path diagram:

python toga.py -og 50

Write the Prototype table to the file output.csv:

python toga.py -wY output.csv