21 package org.matsim.core.replanning.selectors;
23 import org.apache.logging.log4j.LogManager;
24 import org.apache.logging.log4j.Logger;
49 static boolean betaWrnFlag = true ;
50 static boolean scoreWrnFlag = true ;
70 if (currentPlan == null) {
75 if ((currentPlan.getScore() == null) || (otherPlan.getScore() == null)) {
80 if ( currentPlan.getScore()!=null && otherPlan.getScore()==null ) {
82 log.error(
"yyyyyy not switching to other plan although it needs to be explored. " 83 +
"Possibly a serious bug; ask kai if you encounter this. kai, sep'10" ) ;
84 scoreWrnFlag = false ;
91 if ( currentPlan.getScore().isNaN() ) {
94 if ( otherPlan.getScore().isNaN() ) {
98 double currentScore = currentPlan.getScore();
99 double otherScore = otherPlan.getScore();
102 log.warn(
"Would make sense to revise this once more. See comments in code. kai, nov08") ;
109 betaWrnFlag = false ;
111 double weight = Math.exp( 0.5 * this.beta * (otherScore - currentScore) );
static Random getRandom()
Factory< T, I > setBetaValue(double beta)
T selectPlan(final HasPlansAndId< T, I > person)
ExpBetaPlanChanger(double beta)
ExpBetaPlanChanger< T, I > build()
abstract T getSelectedPlan()