make the mediator object an abstract class
[aco.git] / aco / strategy / as / ASChoiceInformationStrategy.java
blob8b8337c67f363c46880209abfd6b40ae22ad7c05
1 package aco.strategy.as;
3 import aco.strategy.*;
4 import aco.mediator.*;
5 import aco.mediator.as.*;
7 public class ASChoiceInformationStrategy
8 extends ChoiceInformationStrategy {
10 protected ASMediator acom;
12 public ASChoiceInformationStrategy(ACOMediator acom) {
13 super(acom);
16 public void computeChoiceInformation() {
17 for (int i = 0; i < acom.getNumOfCities(); i++) {
18 for (int j = 0; j < acom.getNumOfCities(); j++) {
19 acom.setChoiceInformation(i,j,
20 Math.pow( acom.getPheromone(i,j), acom.getAlpha() ) *
21 Math.pow( acom.getHeuristicInformation(i,j) , acom.getBeta() ));