Ga_time_table/classes/fitnessFixedConstraint.php
/*
	|--------------------------------------------------------------------------
	|	Consecutive Hours 
	|--------------------------------------------------------------------------
	|	This function checks if the current lecture is being held at thesame venue for the entire duration.
	|	It increases the score if the class is held at thesame venue for the duration and doesn't if the class does not.
	*/
|
|       Consecutive Hours
|
|       This function checks if the current lecture is being held at thesame venue for the entire duration.
|       It increases the score if the class is held at thesame venue for the duration and doesn't if the class does not.
| | Consecutive Hours | | This function checks if the current lecture is being held at thesame venue for the entire duration . | It increases the score if the class is held at thesame venue for the duration and doesn ' t if the class does not .
public function consecutiveHours($s){
			$cnt = 0;	
			$clsDurationCount = 0;
			$score_counter = 0;
			foreach($this->_classes as $k => $v){
				foreach($v as $p => $c){				
					$crses = array_slice($s[$k],$p,$c->getDuration());	
					if(count($crses) == $c->getDuration()){
						$score_counter++;
					}
				}
			}
			return $score_counter;			
		}
public function consecutiveHours ( $ s ) { $ cnt = 0 ; $ clsDurationCount = 0 ; $ score_counter = 0 ; foreach ( $ this -> _classes as $ k => $ v ) { foreach ( $ v as $ p => $ c ) { $ crses = array_slice ( $ s [ $ k ] , $ p , $ c -> getDuration ( ) ) ; if ( count ( $ crses ) == $ c -> getDuration ( ) ) { $ score_counter ++ ; } } } return $ score_counter ; }
|
|       Consecutive Hours
|
|       This function checks if the current lecture is being held at thesame venue for the entire duration.
| | Consecutive Hours | | This function checks if the current lecture is being held at thesame venue for the entire duration .
//Remove the number of elements for the duration in the array