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/Transport1_8cs_source.html below:

Transport1/Transport1.cs Source File

3using

System.Collections.Generic;

28 static void

Main(

string

[] args)

31 if

(Environment.GetCommandLineArgs().Length > 1)

32

ws =

new GAMSWorkspace

(systemDirectory: Environment.GetCommandLineArgs()[1]);

41

Console.WriteLine(

"Ran with Default:"

);

43

Console.WriteLine(

"x("

+ rec.Key(0) +

","

+ rec.Key(1) +

"): level="

+ rec.

Level

+

" marginal="

+ rec.

Marginal

);

48

opt.AllModelTypes =

"xpress"

;

51

Console.WriteLine(

"Ran with XPRESS:"

);

53

Console.WriteLine(

"x("

+ rec.Key(0) +

","

+ rec.Key(1) +

"): level="

+ rec.

Level

+

" marginal="

+ rec.

Marginal

);

56 using

(StreamWriter optFile =

new

StreamWriter(Path.Combine(ws.WorkingDirectory,

"xpress.opt"

)))

57 using

(TextWriter logFile =

new

StreamWriter(Path.Combine(ws.WorkingDirectory,

"transport1_xpress.log"

)))

60

optFile.WriteLine(

"algorithm=barrier"

);

62

opt.AllModelTypes =

"xpress"

;

64

t1.Run(opt, output: logFile);

68

Console.WriteLine(

"Ran with XPRESS with non-default option:"

);

70

Console.WriteLine(

"x("

+ rec.Key(0) +

","

+ rec.Key(1) +

"): level="

+ rec.

Level

+

" marginal="

+ rec.

Marginal

);

void Run(GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true)

void GamsLib(string model)

GAMSJob AddJobFromFile(string fileName, GAMSCheckpoint checkpoint=null, string jobName=null)

This is the 1st model in a series of tutorial examples. Here we show: How to run a GAMSJob from file ...


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