Loading...
Searching...
No Matches
transport.h
Go to the documentation of this file.
1/*
2 *
3 * GAMS - General Algebraic Modeling System C++ API
4 *
5 * Copyright (c) 2017-2023 GAMS Software GmbH <support@gams.com>
6 * Copyright (c) 2017-2023 GAMS Development Corp. <support@gams.com>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in all
16 * copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
27#ifndef TRANSPORT_H
28#define TRANSPORT_H
29
30#include "gams.h"
31
32#include <ostream>
33#include <string>
34
37class Transport
38{
39public:
41 Transport(gams::GAMSWorkspace ws);
42
44 void run(gams::GAMSCheckpoint checkpoint, std::ostream &output);
45
47 gams::GAMSSet i() const
48 {
49 return fi;
50 }
51
53 gams::GAMSSet j() const
54 {
55 return fj;
56 }
57
59 gams::GAMSParameter a() const
60 {
61 return fa;
62 }
63
65 gams::GAMSParameter b() const
66 {
67 return fb;
68 }
69
71 gams::GAMSParameter d() const
72 {
73 return fd;
74 }
75
77 gams::GAMSParameter f() const
78 {
79 return ff;
80 }
81
83 gams::GAMSVariable x() const
84 {
85 return fx;
86 }
87
89 gams::GAMSVariable z() const
90 {
91 return fz;
92 }
93
95 gams::GAMSOptions opt() const
96 {
97 return fopt;
98 }
99
100private:
102 std::string getModelSource();
103
104private:
106 gams::GAMSDatabase fDbIn1, fDbIn2, fDbOut1;
107 gams::GAMSJob job;
108
109 gams::GAMSSet fi, fj;
110 gams::GAMSParameter fa, fb, fd, ff;
111 gams::GAMSVariable fx, fz;
113};
114
115#endif // TRANSPORT_H