Beispiel #1
0
 def add_data(data, idle_data, algorithm, configuration=None):
     labelsUpdated = False
     if data:  # not empty
         gat_data.append(data)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(
                     get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labelsUpdated = True
     if idle_data:
         idle_planning_data.append(idle_data)
     return labelsUpdated
Beispiel #2
0
 def add_data(generated_subdata,
              expanded_subdata,
              algorithm,
              configuration=None):
     labelsUpdated = False
     if generated_subdata:  # not empty
         generated_data.append(generated_subdata)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(
                     get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labelsUpdated = True
     if expanded_subdata:
         expanded_data.append(expanded_subdata)
     return labelsUpdated
 def add_data(data, idle_data, algorithm, configuration=None):
     """ Adds the retrieved data to the collections to be returned.
     :param data: GAT data for algorithm
     :param idle_data: idle planning time data for algorithm
     :param algorithm: algorithm for which the data belongs to
     :param configuration: the configuration of the algorithm
     :return: True if the labels list was updated with new data; False if the labels list was unchanged
     """
     labels_updated = False
     if data:  # not empty
         gat_data.append(data)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labels_updated = True
     if idle_data:
         idle_planning_data.append(idle_data)
     return labels_updated
 def add_data(generated_subdata, expanded_subdata, algorithm, configuration=None):
     """ Adds the retrieved data to the collections to be returned.
     :param generated_subdata: generated nodes data for algorithm
     :param expanded_subdata: expanded nodes data for algorithm
     :param algorithm: algorithm for which the data belongs to
     :param configuration: the configuration of the algorithm
     :return: True if the labels list was updated with new data; False if the labels list was unchanged
     """
     labels_updated = False
     if generated_subdata:  # not empty
         generated_data.append(generated_subdata)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labels_updated = True
     if expanded_subdata:
         expanded_data.append(expanded_subdata)
     return labels_updated
 def add_data(data, idle_data, algorithm, configuration=None):
     """ Adds the retrieved data to the collections to be returned.
     :param data: GAT data for algorithm
     :param idle_data: idle planning time data for algorithm
     :param algorithm: algorithm for which the data belongs to
     :param configuration: the configuration of the algorithm
     :return: True if the labels list was updated with new data; False if the labels list was unchanged
     """
     labels_updated = False
     if data:  # not empty
         gat_data.append(data)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(
                     get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labels_updated = True
     if idle_data:
         idle_planning_data.append(idle_data)
     return labels_updated
 def add_data(generated_subdata,
              expanded_subdata,
              algorithm,
              configuration=None):
     """ Adds the retrieved data to the collections to be returned.
     :param generated_subdata: generated nodes data for algorithm
     :param expanded_subdata: expanded nodes data for algorithm
     :param algorithm: algorithm for which the data belongs to
     :param configuration: the configuration of the algorithm
     :return: True if the labels list was updated with new data; False if the labels list was unchanged
     """
     labels_updated = False
     if generated_subdata:  # not empty
         generated_data.append(generated_subdata)
         if configuration is not None:
             labels.append(
                 plotutils.translate_algorithm_name(
                     get_configuration_plot_name(algorithm, configuration)))
         else:
             labels.append(plotutils.translate_algorithm_name(algorithm))
         labels_updated = True
     if expanded_subdata:
         expanded_data.append(expanded_subdata)
     return labels_updated
data = times.values()
# print(data
# datadata = np.array(data)

# print(data
# print(datadata
# print(datadata.reshape(len(data[0]), len(data))

plt.ylabel("Goal Achievement Time (ms)")
labels = []
if domain_groups:
    assert num_domains == 1
    plt.xlabel("Algorithm")
    plt.title(plotutils.translate_domain_name(next(iter(domain_counts.keys()))))
    for key in times.keys():  # Assumes same order will be plotted
        labels.append(plotutils.translate_algorithm_name(key[plotutils.Results.ALGORITHM]))
else:
    assert num_algorithms == 1
    plt.xlabel("Domain")
    plt.title(plotutils.translate_algorithm_name(algorithm_counts.keys()[0]))
    for key in times.keys():
        labels.append(plotutils.translate_domain_name(key[plotutils.Results.DOMAIN]))

# print(len(data)
x = np.arange(1, len(times) + 1)
y = data
print(x)
print(y)

med, confidence_intervals_low, confidence_intervals_high = plotutils.median_confidence_intervals(y)
data = times.values()
# print(data
# datadata = np.array(data)

# print(data
# print(datadata
# print(datadata.reshape(len(data[0]), len(data))

plt.ylabel("Goal Achievement Time (ms)")
labels = []
if domain_groups:
    assert num_domains == 1
    plt.xlabel("Algorithm")
    plt.title(plotutils.translate_domain_name(next(iter(domain_counts.keys()))))
    for key in times.keys():  # Assumes same order will be plotted
        labels.append(plotutils.translate_algorithm_name(key[plotutils.Results.ALGORITHM]))
else:
    assert num_algorithms == 1
    plt.xlabel("Domain")
    plt.title(plotutils.translate_algorithm_name(algorithm_counts.keys()[0]))
    for key in times.keys():
        labels.append(plotutils.translate_domain_name(key[plotutils.Results.DOMAIN]))

# print(len(data)
x = np.arange(1, len(times) + 1)
y = data
print(x)
print(y)

med, confidence_intervals_low, confidence_intervals_high = plotutils.median_confidence_intervals(y)