Loading...
Searching...
No Matches
warehouse.cpp File Reference

This example demonstrates how to solve a simple GAMS model to assign stores to warehouses for different data sets in parallel. More...

#include <iostream>
#include <fstream>
#include <mutex>
#include <thread>
#include "gams.h"

Go to the source code of this file.

Functions

string getModelText ()
 Get model as string.
 

Detailed Description

This example demonstrates how to solve a simple GAMS model to assign stores to warehouses for different data sets in parallel.

The model has been parameterized. The data can be derived from a few numbers namely the number of warehouses, stores, and some fixed cost scalar. The results of the model are written into a single result database that is protected across the parallel threads via a mutex.

Definition in file warehouse.cpp.