Algorithms
Edgardo Palza edited this page 6 years ago

Introduction

An algorithm is defined in mathematics and computer science as a sequence of action to be performed which can be expressed within a finite amount of space and time through a well-defined formal language. Each algorithm starts at an initial state and with initial values as well as inputs (possibly empty). This values and inputs are modified by defined instructions and leaded through finite amount of successive states, eventually producing a guilty output or solution. This transitions can be deterministic, ergo the same input produces the same output or solution, or stochastic, which includes one or more random variables.

Implementation

Some interesting algorithm implementations are:

  • Heuristic algorithms: Heuristic algorithms are techniques conceived to address problems or to find approximated solutions reasonable timeframes and resource consumption. Often, heuristic algorithms are used when traditional algorithms fail in the process or are too slow to solve a problem or even when classic algorithms are facing a lack of background information. In order to reach the desired solution within an reasonable timeframe, heuristic algorithms compromise certain measurements, such as completeness, accuracy, generality and precision.
    Some examples are: Particle Swarm Optimization (PSO), Artificial Neural Networks, Support Vector Machines, etc.

  • Genetic algorithms: Genetic algorithms (GA) are approaches conceived to search and optimize problems by relying on biological processes, such as mutation, selection, crossover, etc. GA provides as result a high quality solution, presented usually as string of binary variables: 0s and 1s. Normally, GAs use fitness functions to measure the optimization's success.

API

public interface CpsAlgorithm {
    /**
     * This Method will be called in each Iteration.
     */
    public void runAlgorithm(Model model, Control controller);
}

The API uses each timestep of the simulation the current model and the commandos of the controller, refer to the Code documentation, section I.