# LION COMMUNITY USAGE CASE

### Reactive Search Optimization (RSO): identifying optimal configurations.

### What is Reactive Search Optimization (RSO)?

A scenario for applying Reactive Search Optimization is where a system (an electronic system, a production plant, a fleet of trucks, a business process) requires you to set some operating parameters (knobs, switches, travel plans, procedures) to improve its function. Depending on how the parameters are set, the system is going to give a better or worse outcome (measured by production speed, net income, fuel consumption, customer satisfaction...), as shown by the following figure.

In order to optimize the outcome, a simple loop is performed: set the parameters,
observe the outcome, then change the parameters ** in a strategic and intelligent manner **
until a satisfactory solution is identified.

The intelligence of the process lies in the Reactive Search Optimization component,
which decides about the next step to take based on information collected during the
ongoing exploration of alternatives. In order to operate efficiently, Reactive Search Optimization
uses ** memory and intelligence **, to recognize ways to improve solutions in a directed and focussed manner.
The RSO tool in the LIONoso software provides a simple way for the user to solve problems with continuous parameters
(floating-point numbers).
The user defines the system to be optimized and invokes a powerful RSO solver that
aims at locating the best values for the operating parameters.

### Use case: Rastrigin model.

The use case is a widely-used benchmark model, called Rastriging function, with two input values and one output
to be minimized.
The model is ** plagued by local minima (points which are locally optimal) **. If you consider the output value
as the elevation of a point on a two-dimensional plane, the resulting countryside is filled with basins
which may trap solvers. The contour plot of this nasty function is shown below.

The curved "egg crate mattress" form of the model is clear also from the following surface plot.

Now be careful: your vision is very powerful and you immediately spot the optimal solution at the center,
but your computer is in a worse situation. It has to discover the optimal point ** by examining one point
at a time **, and it has to form a "global picture" after a sufficient number of samples.
Trivial "local search" schemes will be easily fooled by the abundance of locally-optimal points.
Think about trying to discover the lowest value in this curved egg crate by letting a ball
roll over the surface, ... not so easy.

### Objectives of LIONoso tools:

The objective is to identify the input values associated to the minimum output value.

Setting up the optimization task is immediate: drag the RSO solver tool and the test model Rastrigin to the workbench and connect them with an arrow. Then click on the RSO icon and click "start" in the left component window. After the selected search period expires you will get the list of "locally optimal" points. The workbench will look as in the following figure:

### LIONoso snapshots

The position of the "locally optimal" points on the two-dimensional surface is shown in the
following figure. The set of points include the point at the origing, the globally optimal solution
(the true minimum point): ** the RSO solver has not been fooled by the abundance of local-minima traps! **

**Download the LIONoso-ready data fileoptimization.lion**