diff --git a/initialization.hpp b/initialization.hpp index ae170d2..09110da 100644 --- a/initialization.hpp +++ b/initialization.hpp @@ -7,22 +7,40 @@ namespace initialization{ std::vector initialization_1(KusiakLayoutEvaluator &evaluator, WindScenario &wscenario); -} + /* initialization_1 -* -* This implementation does... -* params: -* KusiakLayoutEvaluator &evaluator : a reference of the evaluator variable -* used in the main program. -* WindScenario &wscenario : a reference of the wind scenario variable -* used in the main program. -* -* returns: -* vector : this is a collection of all the different layouts -* that are produced. In other words -* this represents the population. -*/ + * + * This function takes the relevant layout data as parameter and produces + * a population / vector of those turbine layouts. + * The returned layouts are completely random based and + * will be corrected by the "replaceviolations" function + * + * !! srand(time(0)); needs to be in the main function !! + * + * parameters: WindScenario wscenario, int pop_size + * return: std::vector population + * + */ +std::vector initialization_1(WindScenario wscenario,int pop_size); + + +/* replace_violations + * + * This functions takes a population reference and the layout + * constraints as parameters, and automatically corrects + * all turbine positions within the given population by new + * random positions. No return value. + * + * !! srand(time(0)); needs to be in the main function !! + * + * parameters: std::vector &population, + * WindScenario wscenario + * + * return: void + */ +void replace_violations(std::vector &population,WindScenario wscenario); +} std::vector initialization::initialization_1( KusiakLayoutEvaluator &evaluator, WindScenario &wscenario){