15from gams
import GamsWorkspace
23if __name__ ==
"__main__":
24 parser = argparse.ArgumentParser()
25 parser.add_argument(
"sysDir", nargs=
"?", default=
None)
26 parser.add_argument(
"-nonInteractive", action=
"store_true")
27 args = parser.parse_args()
29 ws = GamsWorkspace(system_directory=args.sysDir)
33 job = ws.add_job_from_file(
"dicex.gms")
34 opt = ws.add_options()
35 opt.all_model_types =
"scip"
37 if args.nonInteractive:
39 threading.Thread(target=interrupt_gams, args=(job,)).start()
42 signal.signal(signal.SIGINT,
lambda signal, frame: job.interrupt())
45 job.run(opt, output=sys.stdout)