/*
 * Ohodnoceni.java
 *
 * Created on 12. říjen 2000, 12:13
 */

package timetable.school.solver.strategy.price;

import timetable.data.*;
import timetable.util.*;

/**
 *
 * @author  Ferda Mravenec, Prace vseho druhu s.r.o.
 * @version alpha.1
 */
public class SchoolSingleActivityEvaluation extends timetable.solver.strategy.price.SingleActivityEvaluation {
    
    public SchoolSingleActivityEvaluation(Config config) throws TimetableException {
        super(config);
    }
    
    public int value(Activity activity,int slot,ActivityResources selectedResources,ActivityDependenceGroup dependences,ActivityGroup conflictActivities) throws TimetableException {
        int sum = super.value(activity,slot,selectedResources,dependences,conflictActivities);
        for (int i=0;i<activity.length;i++) 
            sum -= this.config.getInt("VAHA_CASOVA_PREFERENCE") * config.getGlobalPref()[slot+i];
        return sum;    
    }
    

    
    

}
