warehouse.py File Reference

Go to the source code of this file.


def warehouse.get_model_text ()
def warehouse.solve_warehouse (workspace, number_of_warehouses, result, db_lock)


 warehouse.ws = GamsWorkspace(system_directory = sys.argv[1])
 warehouse.result_db = ws.add_database()
string warehouse.status_string = ""
int warehouse.status = 0
 warehouse.db_lock = threading.Lock()
dictionary warehouse.threads = {}

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.py.