Ejemplo n.º 1
0
def main():

    system = create_system()
    
    uri = get_server_uri()
    worker = ConnectWorker(uri, system=system, strategy="random")
    worker.run()
Ejemplo n.º 2
0
def main():
    parser = argparse.ArgumentParser(description="connect worker queue")
    parser.add_argument("p", type=int, help="p-spin")
    parser.add_argument("nspins", type=int, help="number of spins")
    parser.add_argument("--strategy", type=str, help="strategy to adopt: random (default), "
                                                     "untrap, combine, gmin", default="random")
    args = parser.parse_args()

    nspins = args.nspins
    p = args.p

    interactions = get_database_params_worker(nspins, p)
    system = create_system(nspins, p, interactions)

    uri = get_server_uri(nspins, p)
    worker = ConnectWorker(uri, system=system, strategy=args.strategy)
    worker.run()
Ejemplo n.º 3
0
def main():
    parser = argparse.ArgumentParser(description="connect worker queue")
    parser.add_argument("p", type=int, help="p-spin")
    parser.add_argument("nspins", type=int, help="number of spins")
    parser.add_argument("--strategy",
                        type=str,
                        help="strategy to adopt: random (default), "
                        "untrap, combine, gmin",
                        default="random")
    args = parser.parse_args()

    nspins = args.nspins
    p = args.p

    interactions = get_database_params_worker(nspins, p)
    system = create_system(nspins, p, interactions)

    uri = get_server_uri(nspins, p)
    worker = ConnectWorker(uri, system=system, strategy=args.strategy)
    worker.run()
Ejemplo n.º 4
0
def main():
    system = create_system()

    uri = get_server_uri()
    worker = ConnectWorker(uri, system=system, strategy="random")
    worker.run()
Ejemplo n.º 5
0
def start_connect(create_system, uri, strategy="random"):
    system = create_system()
    worker = ConnectWorker(uri, system=system, strategy=strategy)
    worker.run()
Ejemplo n.º 6
0
def start_connect(create_system, uri, strategy="random"):
    system = create_system()
    worker = ConnectWorker(uri, system=system, strategy=strategy)
    worker.run()