Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 32 additions & 14 deletions initialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,40 @@
namespace initialization{
std::vector<individual> 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<individual> : 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<individual> population
*
*/
std::vector<individual> 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<individual> &population,
* WindScenario wscenario
*
* return: void
*/
void replace_violations(std::vector<individual> &population,WindScenario wscenario);
}
std::vector<individual> initialization::initialization_1(
KusiakLayoutEvaluator &evaluator,
WindScenario &wscenario){
Expand Down