Ga_time_table/classes/fitnessFixedConstraint.php
/*
	|--------------------------------------------------------------------------
	|	Lab Classes
	|--------------------------------------------------------------------------
	|	This function checks lectures that need lab equipment and that have the equipment provided then increases the score.
	|	It also increases the score for those that do not need lab equipment as well.
	*/
|
|       Lab Classes
|
|       This function checks lectures that need lab equipment and that have the equipment provided then increases the score.
|       It also increases the score for those that do not need lab equipment as well.
| | Lab Classes | | This function checks lectures that need lab equipment and that have the equipment provided then increases the score . | It also increases the score for those that do not need lab equipment as well .
public function classesNeedSpecialRoom(){
			$score_counter = 0;	
			foreach($this->_classes as $k => $v){			
				foreach($v as $p => $c){
					if(($c->getLab() == 'false')||(($c->getLab() == 'true') && ($this->rooms[$k]->getLab() == 'true'))){	
						$score_counter +=1;
					}
				}				
			}		
			return $score_counter; 
		}
public function classesNeedSpecialRoom ( ) { $ score_counter = 0 ; foreach ( $ this -> _classes as $ k => $ v ) { foreach ( $ v as $ p => $ c ) { if ( ( $ c -> getLab ( ) == 'false' ) || ( ( $ c -> getLab ( ) == 'true' ) && ( $ this -> rooms [ $ k ] -> getLab ( ) == 'true' ) ) ) { $ score_counter += 1 ; } } } return $ score_counter ; }
|
|       Lab Classes
|
|       This function checks lectures that need lab equipment and that have the equipment provided then increases the score.
| | Lab Classes | | This function checks lectures that need lab equipment and that have the equipment provided then increases the score .
//Check if the current class needs a lab or not