A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.gams.com/latest/docs/apis/examples_dotnet/Interrupt_8cs_source.html below:

Interrupt/Interrupt.cs Source File

16 static void

interruptGams(

GAMSJob

job)

23 static void

Main(

string

[] args)

25

Boolean nonInteractive =

false

;

26 string

sysDir =

string

.Empty;

29 if

(2 == Environment.GetCommandLineArgs().Length)

31

nonInteractive = String.Equals(Environment.GetCommandLineArgs()[1],

"-nonInteractive"

, StringComparison.OrdinalIgnoreCase);

33

sysDir = Environment.GetCommandLineArgs()[1];

35 else if

(3 == Environment.GetCommandLineArgs().Length)

37

nonInteractive = String.Equals(Environment.GetCommandLineArgs()[1],

"-nonInteractive"

, StringComparison.OrdinalIgnoreCase);

40

sysDir = Environment.GetCommandLineArgs()[1];

41

nonInteractive = String.Equals(Environment.GetCommandLineArgs()[2],

"-nonInteractive"

, StringComparison.OrdinalIgnoreCase);

44

sysDir = Environment.GetCommandLineArgs()[2];

47 if

(

string

.Empty != sysDir)

55

opt.AllModelTypes =

"Lindo"

;

60

Thread waitAndInterrupt =

new

Thread(

new

ThreadStart(delegate() { interruptGams(job); }));

61

waitAndInterrupt.Start();

65

Console.CancelKeyPress += delegate(

object

sender, ConsoleCancelEventArgs a) { job.

Interrupt

(); a.Cancel =

true

; };

68

job.

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