Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,189 changes: 648 additions & 541 deletions Kernel.py

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions abides.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
import importlib
import sys

if __name__ == '__main__':
if __name__ == "__main__":

# Print system banner.
system_name = "ABIDES: Agent-Based Interactive Discrete Event Simulation"
# Print system banner.
system_name = "ABIDES: Agent-Based Interactive Discrete Event Simulation"

print ("=" * len(system_name))
print (system_name)
print ("=" * len(system_name))
print ()
print("=" * len(system_name))
print(system_name)
print("=" * len(system_name))
print()

# Test command line parameters. Only peel off the config file.
# Anything else should be left FOR the config file to consume as agent
# or experiment parameterization.
parser = argparse.ArgumentParser(description='Simulation configuration.')
parser.add_argument('-c', '--config', required=True,
help='Name of config file to execute')
parser.add_argument('--config-help', action='store_true',
help='Print argument options for the specific config file.')
# Test command line parameters. Only peel off the config file.
# Anything else should be left FOR the config file to consume as agent
# or experiment parameterization.
parser = argparse.ArgumentParser(description="Simulation configuration.")
parser.add_argument("-c", "--config", required=True, help="Name of config file to execute")
parser.add_argument(
"--config-help",
action="store_true",
help="Print argument options for the specific config file.",
)

args, config_args = parser.parse_known_args()
args, config_args = parser.parse_known_args()

# First parameter supplied is config file.
config_file = args.config

config = importlib.import_module('config.{}'.format(config_file),
package=None)
# First parameter supplied is config file.
config_file = args.config

config = importlib.import_module("config.{}".format(config_file), package=None)
Loading