Package have been updated according to the tests under Windows

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1078 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jboisson 2008-03-05 15:55:41 +00:00
commit ae4f880827
18 changed files with 83 additions and 160 deletions

View file

@ -3,7 +3,7 @@
######################################################################################
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
######################################################################################
@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
### 1) Define your target(s): just the tsp here
######################################################################################
SET(FUNCTION_LIB_OUTPUT_PATH ${FUNCTION_BINARY_DIR}/lib)
SET(FUNCTION_LIB_OUTPUT_PATH ${FUNCTION_BIN_DIR}/lib)
SET(LIBRARY_OUTPUT_PATH ${FUNCTION_LIB_OUTPUT_PATH})
SET (FUNCTION_SOURCES affectation_eval.cpp

View file

@ -50,7 +50,7 @@ class AffectationInit : public eoInit <Affectation>
void operator () (Affectation & _affectation) ;
//! A bound for the initial value for the deviations
//! A bound for the initial value for the affectation
double bound;
} ;

View file

@ -46,10 +46,6 @@ functionFitness DeviationIncrEval :: operator () (const Deviation & _move, const
deltaX1=_move.first;
deltaX2=_move.second;
/*std::cout << (_affectation.fitness()
+ ( 2*deltaX1*deltaX1 ) + ( deltaX2*deltaX2 ) + ( deltaX1*deltaX2 ) - ( 2*deltaX1 ) - deltaX2
+ ( deltaX1 * ( (4*x1) + x2 ) ) + ( x2*deltaX1 )) << std::endl;*/
return _affectation.fitness()
+ ( 2*deltaX1*deltaX1 ) + ( deltaX2*deltaX2 ) + ( deltaX1*deltaX2 ) - ( 2*deltaX1 ) - deltaX2
+ ( deltaX1 * ( (4*x1) + x2 ) ) + ( x2*deltaX1 );

View file

@ -44,7 +44,7 @@ class DeviationIncrEval : public moMoveIncrEval <Deviation>
{
public :
functionFitness operator () (const Deviation & _move, const Affectation & _route) ;
functionFitness operator () (const Deviation & _move, const Affectation & _affectation);
} ;

View file

@ -40,21 +40,21 @@ DeviationNext::DeviationNext(double _bound, double _step): bound(_bound), step(_
{
if(bound<0.0)
{
std::cout << "[affectation_next.cpp][DeviationNext]: bound is negative, " << bound << " is tranformed to ";
std::cout << "[deviation_next.cpp][DeviationNext]: bound is negative, " << bound << " is tranformed to ";
bound=-bound;
std::cout << bound << "." << std::endl;
}
if(step<0.0)
{
std::cout << "[affectation_next.cpp][DeviationNext]: step is negative, " << step << " is tranformed to ";
std::cout << "[deviation_next.cpp][DeviationNext]: step is negative, " << step << " is tranformed to ";
step=-step;
std::cout << step << "." << std::endl;
}
if(step>bound)
{
std::cout << "[affectation_next.cpp][DeviationNext]: step is higher than bound, " << step << " is tranformed to ";
std::cout << "[deviation_next.cpp][DeviationNext]: step is higher than bound, " << step << " is tranformed to ";
step = bound / 2;
std::cout << step << "." << std::endl;
}
@ -71,12 +71,12 @@ bool DeviationNext::operator () (Deviation & _move, const Affectation & _affecta
//std::cout << "deltaX1 = " << deltaX1 << ", deltaX2 = " << deltaX2 << std::endl;
if( (deltaX1>=bound) && (deltaX2)>=bound )
if( (deltaX1 >= bound) && (deltaX2 > bound) )
{
return false;
}
if(deltaX2 >= bound)
if(deltaX2 > bound)
{
deltaX1+=step;
deltaX2=-bound;