transport14.cpp File Reference
This is the 14th model in a series of tutorial examples. More...
Go to the source code of this file.
Functions | |
void | run (Optimizer optim, double bmult) |
int | main (int argc, char *argv[]) |
Detailed Description
This is the 14th model in a series of tutorial examples.
Here we show:
- How to run multiple GAMSJobs in parallel each using different scenario data
Definition in file transport14.cpp.
Function Documentation
◆ main()
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 43 of file transport14.cpp.
44{
45 cout << "---------- Transport 14 --------------" << endl;
46
47 try {
48 vector<double> bmultlist { 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3 };
50
51 vector<thread> threads;
52 for (auto bmult : bmultlist)
53 threads.push_back(thread(run, optim, bmult));
54
55 for (auto& t : threads)
56 t.join();
57
59 cout << "GAMSException occured: " << ex.what() << endl;
60 } catch (exception &ex) {
61 cout << ex.what() << endl;
62 }
63
64 return 0;
65}
Definition optimizer.h:35
◆ run()
void run | ( | Optimizer | optim, |
double | bmult ) |
Definition at line 33 of file transport14.cpp.
Referenced by main().