How to get started using Unfit

Here you can find some information on the easiest ways to get started using Unfit. The content of this page is included in the available release (README).

Getting Started:

1. Download and install Code::Blocks (http://www.codeblocks.org/).
Note: if you are on Windows, choose the version with GCC (mingw)
2. Download and unpack Unfit
3. Start Code::Blocks and open the Unfit project file (Unfit.cbp)
4. Build and Run

Getting Started (Development Version):

1. Download and install Code::Blocks (http://www.codeblocks.org/).
Note: if you are on Windows, choose the version with GCC (mingw)
2. Download and unpack Unfit
3. Start Code::Blocks and open the UnitTest++ project file (UnitTest++.cbp)
4. Build (this should create Debug and Release libraries by default).
Note: you only need to do this the first time you want to compile Unfit
5. Close the UnitTest++ project
6. Open the Unfit development project file (Unfit-devel.cbp)
7. Build and Run

What Now?

Create your own cost functions so you can minimise what is important to you. Even if you don't want to compile the development version, it may be useful to have a look at the test examples to get ideas as to how to code up your custom cost functions.

We have created a new tutorial which provides a step by step guide to writing your own cost functions from scratch.
We have also created another new tutorial to explain how to write your own optimizer using the Unfit framework.

Development Environment:

Unfit has been developed primarily on GNU Linux using various flavours of Ubuntu. For the current release, testing and development was done on Ubuntu 14.04. Our IDE of choice is Code::Blocks (currently 13.12 on both Linux and Windows), and our compiler GCC (and mingw). The core of Unfit requires C++11 support. We use the UnitTest++ testing framework, svn for code management, a trac wiki, and run a Jenkins CI server.

UnitTest++:

UnitTest++ is distributed with Unfit for your convenience. All of the credit for UnitTest++ should go to the original authors, who allow redistribution of their source. The license for UnitTest++ is different from that of Unfit, and can be found in the COPYING file in the UnitTest++ directory. The code in the UnitTest++ directory was downloaded from sourceforge.net, and we encourage you to take a look there for any updates: http://sourceforge.net/projects/unittest-cpp.
Unfit was developed using UnitTest++ version 1.4 without modifications. The only thing we did was to create the Code::Blocks project file so that the UnitTest++ library can be easily compiled alongside Unfit using the same IDE. We have, however, written some nice utility functions to allow you to easily run just one test, or one suite.

A Note to Visual Studio Users:

If you are a hard core Visual Studio fan and don't want to use Code::Blocks, it is possible to compile Unfit in Visual Studio. However, at the time of writing Visual Studio does not support some C++11 constexpr functionality (which we use). All of the problem code is in Options.hpp and Options.cpp. All you need to do is explicitly put the defaults into the constructor and the Reset methods, then you can removed the constexpr lines and all should hopefully compile. Note also that some tests may fail due to different random number generation implementations and the stochastic nature of some of the algorithms.