interruptGams(
GAMSJobjob)
23 static voidMain(
string[] args)
25Boolean nonInteractive =
false;
26 stringsysDir =
string.Empty;
29 if(2 == Environment.GetCommandLineArgs().Length)
31nonInteractive = String.Equals(Environment.GetCommandLineArgs()[1],
"-nonInteractive", StringComparison.OrdinalIgnoreCase);
33sysDir = Environment.GetCommandLineArgs()[1];
35 else if(3 == Environment.GetCommandLineArgs().Length)
37nonInteractive = String.Equals(Environment.GetCommandLineArgs()[1],
"-nonInteractive", StringComparison.OrdinalIgnoreCase);
40sysDir = Environment.GetCommandLineArgs()[1];
41nonInteractive = String.Equals(Environment.GetCommandLineArgs()[2],
"-nonInteractive", StringComparison.OrdinalIgnoreCase);
44sysDir = Environment.GetCommandLineArgs()[2];
47 if(
string.Empty != sysDir)
55opt.AllModelTypes =
"Lindo";
60Thread waitAndInterrupt =
newThread(
newThreadStart(delegate() { interruptGams(job); }));
61waitAndInterrupt.Start();
65Console.CancelKeyPress += delegate(
objectsender, ConsoleCancelEventArgs a) { job.
Interrupt(); a.Cancel =
true; };
68job.
Run(opt, output: Console.Out);
void Run(GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true)
GAMSJob AddJobFromGamsLib(string model, GAMSCheckpoint checkpoint=null, string jobName=null)
GAMSOptions AddOptions(GAMSOptions optFrom=null)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4