Commit 079642f5 authored by HUMEAU Jéremie's avatar HUMEAU Jéremie

add checkpoint and some run files

parent 01c3e212
This diff is collapsed.
for idx in 1 2 3 4
do
for nbCours in 105 #LATER 95 85 75 65 55 45 35
do
for i in 3 4 5
do
for cbyTF in 5 6 7 8 9 10
do
for maxCbyC in 7 #LATER 3 4 5 6
do
for maxPre in 2 #LATER 3 4 DONE 5
do
for nbGen in 10000
do
let "nbComps=$idx * ($nbCours/2)"
let "maxCbyTF=$nbCours/$i"
let "minCbyTF=$nbCours/10"
if [ $minCbyTF -lt $cbyTF ]
then
let "minCbyTF=$cbyTF"
fi
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${minCbyTF}_${maxCbyTF}_${nbGen}"
mkdir $RESDIR
for run in 30
do
let "nbComps=$idx * ($nbCours/2)"
let "maxCbyTF=$nbCours/$i"
let "minCbyTF=$nbCours/10"
if [ $minCbyTF -lt $cbyTF ]
then
let "minCbyTF=$cbyTF"
fi
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${minCbyTF}_${maxCbyTF}_${nbGen}"
sbatch --array=1-${run} --job-name=${RESDIR} --output=${RESDIR}.out --export=C=$nbCours,c=$nbComps,R=$maxCbyC,Q=$maxPre,A=$cbyTF,n=$minCbyTF,N=$maxCbyTF,r=1,q=0,O=$RESDIR,B=20,x=0.75,X=0.75,F=3,G=$nbGen job.sh
echo "-C=${nbCours} -c=${nbComps} -R=${maxCbyC} -Q=${maxPre} -A=${cbyTF} -n=${minCbyTF} -N=${maxCbyTF} -r=1 -q=0" >> case
done
done
done
done
done
done
done
done
#
for nbCours in 55 #LATER 95 85 75 65 55 45 35
do
for i in 3 #4 5
do
for cbyTF in 6 #6 7 8 9 10
do
for maxCbyC in 5 #LATER 3 4 5 6
do
for maxPre in 3 #LATER 2 3 4
do
for nbGen in 10000
do
nbComps=75
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${nbGen}"
mkdir $RESDIR
for run in 30
do
nbComps=75
minCbyTF=7
maxCbyTF=15
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${nbGen}"
sbatch --array=1-${run} --job-name=${RESDIR} --output=${RESDIR}.out --export=C=$nbCours,c=$nbComps,R=$maxCbyC,Q=$maxPre,A=$cbyTF,n=$minCbyTF,N=$maxCbyTF,r=1,q=0,O=$RESDIR,B=50,x=0.75,X=0.75,F=3,G=$nbGen job.sh
echo "-C=${nbCours} -c=${nbComps} -R=${maxCbyC} -Q=${maxPre} -A=${cbyTF} -n=${minCbyTF} -N=${maxCbyTF} -r=1 -q=0" >> case
done
done
done
done
done
done
done
#
for nbCours in 105 #LATER 95 85 75 65 55 45 35
do
for cbyTF in 9 #6 7 8 9 10
do
for maxCbyC in 5 #LATER 3 4 5 6
do
for maxPre in 3 #LATER 2 3 4
do
for nbGen in 100000
do
nbComps=210
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${nbGen}"
mkdir $RESDIR
for run in 30
do
nbComps=210
minCbyTF=10
maxCbyTF=21
RESDIR="../results/${nbCours}_${nbComps}_${maxCbyC}_${maxPre}_${cbyTF}_${nbGen}"
sbatch --array=1-${run} --job-name=${RESDIR} --output=${RESDIR}.out --export=C=$nbCours,c=$nbComps,R=$maxCbyC,Q=$maxPre,A=$cbyTF,n=$minCbyTF,N=$maxCbyTF,r=1,q=0,O=$RESDIR,B=50,x=0.75,X=0.75,F=3,G=$nbGen job.sh
echo "-C=${nbCours} -c=${nbComps} -R=${maxCbyC} -Q=${maxPre} -A=${cbyTF} -n=${minCbyTF} -N=${maxCbyTF} -r=1 -q=0" >> case
done
done
done
done
done
done
#!/bin/bash
#SBATCH -o main.out
#SBATCH -N 1
#SBATCH -n 1
#SBATCH --mem=4G
#SBATCH -p defq
/home/jeremie.humeau/private/gitProject/csdvp-evolutionary-algorithm-optimization/build/application/ceao2 -G=10000 -P=100 -S=1 -C=105 -c=104 -R=7 -Q=5 -A=7 --outputfile=./TFtest -n=10 -N=25 -r=1 -q=0 -B=20 -x=0.75 -X=0.75 -F=3 -T=10
exit 0
#ifndef SRC_MODEL_EA_BESTFITSTAT_H_
#define SRC_MODEL_EA_BESTFITSTAT_H_
#include <eo>
#include <fstream>
#include <iostream>
#include "cursus.h"
template <class EOT>
class bestFitStat: public eoStat<EOT, typename EOT::Fitness>
{
public:
typedef typename EOT::Fitness Fitness;
bestFitStat(int _interval, std::string _filename, std::string _description="best "):eoStat<EOT, Fitness>(Fitness(), _description), interval(_interval),filename(_filename){
cpt=0;
}
void operator()(const eoPop<EOT>& _pop){
if((cpt%interval)==0){
std::ofstream outputfile(filename.c_str(), std::ios::app);
outputfile << cpt << ":\t" << std::endl;
_pop.best_element().printOn(outputfile);
outputfile << std::endl;
outputfile.close();
}
cpt++;
}
virtual void lastCall(eoPop<EOT>& _pop){
std::ofstream outputfile(filename.c_str(), std::ios::app);
outputfile << cpt << ":\t" << std::endl;
_pop.best_element().printOn(outputfile);
outputfile << std::endl;
outputfile.close();
}
int interval;
std::string filename;
int cpt;
};
#endif // SRC_MODEL_EA_BESTFITSTAT_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment