@Override
    public String getObjectiveOutput(ColorList color, int level) {
        String str = "";
        for (int i = 0; i <= level; i++)
            str = str + "\t";

        if (level == 0) // is root
            str = str + "attributes " + getName() + " " + getWeight() + "\n";
        else
            str = str + "attributes " + getName() + " *\n";

        for (int i = 0; i < children.size(); i++) {
            str = str + children.get(i).getObjectiveOutput(color, level + 1);
            if (i == children.size() - 1) {
                for (int j = 0; j <= level; j++)
                    str = str + "\t";
                str = str + "end\n";
            }
        }
        return str;
    }