#Edges e1 = E + Help(source=n8, target=n4) e2 = E + Help(source=n9, target=n5) e3 = E + Help(source=n9, target=n6) e4 = E + And(source=n7, target=n9) e5 = E + And(source=n8, target=n9) e6 = E + Hurt(source=n14, target=n10) e7 = E + Help(source=n14, target=n11) e8 = E + Help(source=n13, target=n12) e9 = E + Help(source=n15, target=n13) e10 = E + Or(source=n14, target=n16) e11 = E + Or(source=n15, target=n16) graph = Graph(name="GardenBridge", nodes=N.all, edges=E.all) if __name__ == "__main__": from pystar.model import Model from utilities.de import DE from star1.star1 import run run(graph, "miniature")
def test_star1(): from pystar.models.dot_models import modelers from star1 import star1 for model in modelers: star1.run(model())
def test_star1(model_name, show_optimal_index = True): for model in modelers: if model.__name__ == model_name: optimal_index = optimal_indices.get(model_name, None) if show_optimal_index else None star1.run(model(), SUB_FOLDER, optimal_index=optimal_index)
e2 = E + Hurt(source=n7, target=n1) e3 = E + Hurt(source=n6, target=n2) e4 = E + Or(source=n6, target=n4) e5 = E + Or(source=n7, target=n4) e6 = E + And(source=n3, target=n6) e7 = E + And(source=n8, target=n6) e8 = E + And(source=n9, target=n6) e9 = E + And(source=n10, target=n6) e10 = E + And(source=n11, target=n8) e11 = E + And(source=n12, target=n10) e12 = E + And(source=n5, target=n10) graph = Graph(name="AmazonDrone", nodes=N.all, edges=E.all) if __name__ == "__main__": from pystar.model import Model from utilities.de import DE from star1.star1 import run run(graph, "miniature")
def test_star1(model_name, show_optimal_index=True): for model in modelers: if model.__name__ == model_name: optimal_index = optimal_indices.get( model_name, None) if show_optimal_index else None star1.run(model(), SUB_FOLDER, optimal_index=optimal_index)