Loading...
Searching...
No Matches
transport.h
Go to the documentation of this file.
1
26#ifndef TRANSPORT_H
27#define TRANSPORT_H
28
29#include "gams.h"
30
31#include <ostream>
32#include <string>
33
37{
38public:
41
43 void run(gams::GAMSCheckpoint checkpoint, std::ostream &output);
44
47 {
48 return fi;
49 }
50
53 {
54 return fj;
55 }
56
59 {
60 return fa;
61 }
62
65 {
66 return fb;
67 }
68
71 {
72 return fd;
73 }
74
77 {
78 return ff;
79 }
80
83 {
84 return fx;
85 }
86
89 {
90 return fz;
91 }
92
95 {
96 return fopt;
97 }
98
99private:
101 std::string getModelSource();
102
103private:
105 gams::GAMSDatabase fDbIn1, fDbIn2, fDbOut1;
106 gams::GAMSJob job;
107
108 gams::GAMSSet fi, fj;
109 gams::GAMSParameter fa, fb, fd, ff;
110 gams::GAMSVariable fx, fz;
112};
113
114#endif // TRANSPORT_H
gams::GAMSSet j() const
j(j): markets
Definition transport.h:52
void run(gams::GAMSCheckpoint checkpoint, std::ostream &output)
Executes the trnsport model.
Definition transport.cpp:60
gams::GAMSParameter b() const
b(i): demand at market j in cases
Definition transport.h:64
gams::GAMSParameter f() const
f: freight in dollars per case per thousand miles
Definition transport.h:76
gams::GAMSVariable x() const
x(i,j): shipment quantities in cases
Definition transport.h:82
gams::GAMSParameter a() const
a(i): capacity of plant i in cases
Definition transport.h:58
gams::GAMSParameter d() const
d(i,j): distance in thousands of miles
Definition transport.h:70
gams::GAMSVariable z() const
z: total transportation costs in thousands of dollars
Definition transport.h:88
Transport(gams::GAMSWorkspace ws)
A Transportation Problem.
Definition transport.cpp:35
gams::GAMSOptions opt() const
Options for the execution of the trnsport model.
Definition transport.h:94
gams::GAMSSet i() const
i(i): canning plants
Definition transport.h:46