2024-07-03 23:29:26 +09:00
|
|
|
import argparse
|
2024-07-04 16:07:12 +09:00
|
|
|
|
|
|
|
|
import usim
|
2024-07-03 23:29:26 +09:00
|
|
|
|
|
|
|
|
from mixnet.sim.config import Config
|
|
|
|
|
from mixnet.sim.simulation import Simulation
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
parser = argparse.ArgumentParser(
|
|
|
|
|
description="Run mixnet simulation",
|
|
|
|
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
|
|
|
)
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
"--config", type=str, required=True, help="Configuration file path"
|
|
|
|
|
)
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
config = Config.load(args.config)
|
|
|
|
|
sim = Simulation(config)
|
2024-07-04 16:07:12 +09:00
|
|
|
usim.run(sim.run())
|
2024-07-03 23:29:26 +09:00
|
|
|
|
|
|
|
|
print("Simulation complete!")
|