File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 11import argparse
22
3+ from adf_core_python .core .config .config import Config
4+ from adf_core_python .core .launcher .agent_launcher import AgentLauncher
5+ from adf_core_python .core .launcher .config_key import ConfigKey
6+
37
48class Main :
59 def __init__ (self ) -> None :
@@ -55,7 +59,23 @@ def __init__(self) -> None:
5559 )
5660 args = parser .parse_args ()
5761 print (args )
62+ self .config = Config ()
63+ self .config .set_value (ConfigKey .KEY_KERNEL_HOST , args .host )
64+ self .config .set_value (ConfigKey .KEY_KERNEL_PORT , args .port )
65+ self .config .set_value (ConfigKey .KEY_AMBULANCE_CENTRE_COUNT , args .ambulance )
66+ self .config .set_value (ConfigKey .KEY_FIRE_STATION_COUNT , args .firebrigade )
67+ self .config .set_value (ConfigKey .KEY_POLICE_OFFICE_COUNT , args .policeforce )
68+ self .config .set_value (ConfigKey .KEY_PRECOMPUTE , args .precompute )
69+ self .config .set_value (ConfigKey .KEY_DEBUG_FLAG , args .verbose )
70+
71+ def launch (self ):
72+ agent_launcher : AgentLauncher = AgentLauncher (
73+ self .config ,
74+ )
75+ agent_launcher .init_connector ()
76+ agent_launcher .launch ()
5877
5978
6079if __name__ == "__main__" :
6180 main = Main ()
81+ main .launch ()
You can’t perform that action at this time.
0 commit comments