13 static int NR_ITEMS_HUGE_TEST = 1500000;
16 static int NR_ITEMS_BIG_TEST = 1500;
22 public void OneTimeSetup()
28 hugeTestSet = db.
AddSet(
"set", 1,
"test set");
30 DateTimeOffset startTime = DateTimeOffset.UtcNow;
31 for (
int i = 0; i < NR_ITEMS_HUGE_TEST; i++)
35 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
36 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
42 public void testAddingRecords()
49 DateTimeOffset startTime = DateTimeOffset.UtcNow;
50 for (
int i = 0; i < NR_ITEMS_HUGE_TEST; i++)
54 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
55 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
61 public void testAddingSymbols()
67 DateTimeOffset startTime = DateTimeOffset.UtcNow;
68 for (
int i = 0; i < NR_ITEMS_HUGE_TEST; i++)
72 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
73 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
79 public void testAddingDatabases()
84 DateTimeOffset startTime = DateTimeOffset.UtcNow;
85 for (
int i = 0; i < NR_ITEMS_BIG_TEST; i++)
89 Assert.AreEqual(1, db.
GetSet(
"someset").
Dim);
91 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
92 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
98 public void testAddingJobs()
103 DateTimeOffset startTime = DateTimeOffset.UtcNow;;
104 for (
int i = 0; i < NR_ITEMS_BIG_TEST; i++)
108 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
109 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
115 public void testAddingOptions()
120 DateTimeOffset startTime = DateTimeOffset.UtcNow;;
121 for (
int i = 0; i < NR_ITEMS_BIG_TEST; i++)
125 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
126 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
132 public void testIteratingRecords()
135 DateTimeOffset startTime = DateTimeOffset.UtcNow;;
141 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
142 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
143 Assert.AreEqual(NR_ITEMS_HUGE_TEST, i);
148 public void testRunningJobs()
154 DateTimeOffset startTime = DateTimeOffset.UtcNow;;
155 for (
int i = 0; i < NR_ITEMS_BIG_TEST; i++)
159 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
160 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
166 public void testDuplicatingModelInstances()
178 DateTimeOffset startTime = DateTimeOffset.UtcNow;;
179 for (
int i = 0; i < NR_ITEMS_BIG_TEST; i++)
184 double totalTime = (DateTimeOffset.UtcNow - startTime).TotalSeconds;
185 Console.WriteLine(
"Elapsed time: " + totalTime +
"s");
GAMSModelInstance AddModelInstance(string modelInstanceName=null)
GAMSSet AddSet(string identifier, int dimension, string explanatoryText="", SetType setType=SetType.multi)
GAMSSet GetSet(string setIdentifier)
void Run(GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true)
GAMSModelInstance CopyModelinstance(string modelInstanceName=null)
void Solve(SymbolUpdateType updateType=SymbolUpdateType.BaseCase, TextWriter output=null, GAMSModelInstanceOpt miOpt=null)
void Instantiate(string modelDefinition, params GAMSModifier[] modifiers)
new GAMSSetRecord AddRecord(params string[] keys)
GAMSJob AddJobFromGamsLib(string model, GAMSCheckpoint checkpoint=null, string jobName=null)
GAMSDatabase AddDatabase(string databaseName=null, string inModelName=null)
GAMSCheckpoint AddCheckpoint(string checkpointName=null)
GAMSOptions AddOptions(GAMSOptions optFrom=null)