Loading...
Searching...
No Matches
gamsjob.h
1
26#ifndef GAMSJOB_H
27#define GAMSJOB_H
28
29#include "gamslib_global.h"
30#include <string>
31#include <memory>
32#include <vector>
33#include <set>
34#include <unordered_map>
35#include "gamsengineconfiguration.h"
36
37namespace gams {
38
39class GAMSWorkspace;
40class GAMSModelInstance;
41class GAMSJobImpl;
42class GAMSOptions;
43class GAMSCheckpoint;
44class GAMSDatabase;
45
60class LIBSPEC GAMSJob
61{
62public:
65
68
72 GAMSJob operator=(const GAMSJob& other);
73
77 bool operator!=(const GAMSJob& other) const;
78
82 bool operator==(const GAMSJob& other) const;
83
86 bool isValid() const;
87
88 //TODO: complete run methods
89
91 void run();
92
95 void run(std::ostream& outstream);
96
99 void run(GAMSOptions& gamsOptions);
100
104 void run(GAMSOptions& gamsOptions, std::ostream& outstream);
105
109 void run(GAMSOptions& gamsOptions, GAMSDatabase db);
110
113 void run(GAMSCheckpoint gamsCheckpoint);
114
118 void run(GAMSOptions& gamsOptions, GAMSCheckpoint gamsCheckpoint);
119
126 void run(GAMSOptions& gamsOptions, const GAMSCheckpoint &gamsCheckpoint, std::ostream& output,
127 bool createOutDB, const std::vector<gams::GAMSDatabase> &databases);
128
139 void runEngine(const GAMSEngineConfiguration &engineConfiguration, GAMSOptions* gamsOptions,
140 gams::GAMSCheckpoint *checkpoint, std::ostream* output = nullptr,
141 const std::vector<gams::GAMSDatabase> &databases = {},
142 const std::set<std::string> &extraModelFiles = {},
143 const std::unordered_map<std::string, std::string> &engineOptions = {},
144 bool createOutDB = true, bool removeResults = true);
145
148
150 std::string name();
151
154
158 bool interrupt();
159
162 LogId logID();
163
164private:
165 friend class GAMSWorkspaceImpl;
166 GAMSJob(const std::shared_ptr<::gams::GAMSJobImpl>& impl);
167 GAMSJob(gams::GAMSWorkspace &ws, const std::string& jobName = "", const std::string& fileName = ""
168 , const GAMSCheckpoint *checkpoint = 0);
169
170private:
171 std::shared_ptr<::gams::GAMSJobImpl> mImpl;
172};
173
174} // namespace gams
175
176#endif // GAMSJOB_H
~GAMSJob()
Desctructor.
GAMSWorkspace workspace()
Get GAMSWorkspace containing GAMSJob.
void runEngine(const GAMSEngineConfiguration &engineConfiguration, GAMSOptions *gamsOptions, gams::GAMSCheckpoint *checkpoint, std::ostream *output=nullptr, const std::vector< gams::GAMSDatabase > &databases={}, const std::set< std::string > &extraModelFiles={}, const std::unordered_map< std::string, std::string > &engineOptions={}, bool createOutDB=true, bool removeResults=true)
bool operator!=(const GAMSJob &other) const
void run(GAMSOptions &gamsOptions, GAMSCheckpoint gamsCheckpoint)
void run(GAMSCheckpoint gamsCheckpoint)
bool interrupt()
void run(GAMSOptions &gamsOptions, GAMSDatabase db)
bool operator==(const GAMSJob &other) const
void run(std::ostream &outstream)
GAMSDatabase outDB()
Get GAMSDatabase created by Run method.
GAMSJob operator=(const GAMSJob &other)
GAMSJob()
Standard constructor.
void run(GAMSOptions &gamsOptions)
std::string name()
Retrieve name of GAMSJob.
void run(GAMSOptions &gamsOptions, const GAMSCheckpoint &gamsCheckpoint, std::ostream &output, bool createOutDB, const std::vector< gams::GAMSDatabase > &databases)
void run()
Run GAMSJob.
void run(GAMSOptions &gamsOptions, std::ostream &outstream)
bool isValid() const
Definition: gams.h:91