warehouse.cpp
Go to the documentation of this file.
110void solveWarehouse(GAMSWorkspace* ws, int numberOfWarehouses, GAMSDatabase* resultDB, mutex* dbMutex)
129 resultDB->getParameter("objrep").addRecord(to_string(numberOfWarehouses)).setValue(gmsJ.outDB().getVariable("obj").findRecord().level());
137 resultDB->getSet("supplyMap").addRecord(to_string(numberOfWarehouses), supplyRec.key(0), supplyRec.key(1));
146 statusString = gmsJ.outDB().getSet("res").findRecord(gmsJ.outDB().getSet("ares").firstRecord().key(0)).text();
194 v.emplace_back([&ws, nrWarehouses, &resultDB, &dbMutex]{solveWarehouse(&ws, nrWarehouses, &resultDB, &dbMutex);});
198 throw GAMSExceptionExecution("Error when running GAMS: " + GAMSEnum::text((GAMSEnum::GAMSExitCode) status) + " " + statusString, status, &ws);
GAMSSet addSet(const std::string &name, const int dimension, const std::string &explanatoryText="", GAMSEnum::SetType setType=GAMSEnum::SetType::Multi)
GAMSParameter addParameter(const std::string &name, const int dimension, const std::string &explanatoryText="")
void doExport(const std::string &filePath="")
GAMSSet getSet(const std::string &name)
GAMSParameter getParameter(const std::string &name)
GAMSVariable getVariable(const std::string &name)
static std::string text(GAMSEnum::SymbolType type)
GAMSExitCode
ExecutionError
int rc()
GAMSDatabase outDB()
void run()
void setAllModelTypes(const std::string &solver)
void setOptCR(const double value)
void setDefine(const std::string &key, const std::string &value)
void setValue(const double val)
GAMSParameterRecord addRecord(const std::vector< std::string > &keys)
std::string text()
GAMSSetRecord findRecord(const std::vector< std::string > &keys)
GAMSSetRecord firstRecord(const std::vector< std::string > &slice)
GAMSSetRecord addRecord(const std::vector< std::string > &keys)
std::string key(int index)
double level()
GAMSVariableRecord findRecord(const std::vector< std::string > &keys)
void setSystemDirectory(std::string systemDir)
GAMSOptions addOptions()
GAMSJob addJobFromString(const std::string &gamsSource, const std::string &jobName="")
GAMSDatabase addDatabase(const std::string &databaseName="", const std::string &inModelName="")