Skip to content
Snippets Groups Projects
Main.java 836 B
Newer Older
s2010720's avatar
s2010720 committed
package Main;

import java.util.Map;
import FaultTree.*;
s2010720's avatar
s2010720 committed
import Heuristics.ByWeightHeuristic;
s2010720's avatar
s2010720 committed
import Heuristics.Heuristic;

public class Main {
    public static void main(String[] args) throws Exception {
        String heuristicArg = args[0];

        Heuristic heuristic;
s2010720's avatar
s2010720 committed
        switch (heuristicArg.toLowerCase()) {
s2010720's avatar
s2010720 committed
            case "h1":
            case "depth-first":
                heuristic = null; // TODO
                break;
s2010720's avatar
s2010720 committed
            case "h4":
            case "by-weight":
                heuristic = new ByWeightHeuristic();
                break;
s2010720's avatar
s2010720 committed
            default:
                throw new Exception("You have to specify a valid heuristic.");
        }

        FaultTree tree = null; // TODO

        Map<BasicEvent, Integer> ordering = heuristic.getOrder(tree);
        // TODO: call transformation
    }
}