1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

Hadrons: scheduler shows starting value

This commit is contained in:
Antonin Portelli 2018-04-24 19:51:47 +01:00
parent c1d0359aaa
commit 6ea2a8b7ca
2 changed files with 5 additions and 2 deletions

View File

@ -58,6 +58,8 @@ public:
// access // access
const Gene & getMinSchedule(void); const Gene & getMinSchedule(void);
V getMinValue(void); V getMinValue(void);
// reset population
void initPopulation(void);
// breed a new generation // breed a new generation
void nextGeneration(void); void nextGeneration(void);
// heuristic benchmarks // heuristic benchmarks
@ -76,8 +78,6 @@ public:
return out; return out;
} }
private: private:
// evolution steps
void initPopulation(void);
void doCrossover(void); void doCrossover(void);
void doMutation(void); void doMutation(void);
// genetic operators // genetic operators

View File

@ -596,6 +596,9 @@ VirtualMachine::Program VirtualMachine::schedule(const GeneticPar &par)
}; };
Scheduler scheduler(graph, memPeak, gpar); Scheduler scheduler(graph, memPeak, gpar);
gen = 0; gen = 0;
scheduler.initPopulation();
LOG(Iterative) << "Start: " << sizeString(scheduler.getMinValue())
<< std::endl;
do do
{ {
//LOG(Debug) << "Generation " << gen << ":" << std::endl; //LOG(Debug) << "Generation " << gen << ":" << std::endl;