This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
Item = { | |
-- Create a new Item. | |
new = function(name) | |
name = name or "none" | |
assert(type(name)=="string") | |
return { | |
name = name, | |
ingredients = false, | |
produced = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Build GLPK with MinGW | |
rem NOTE: Make sure that HOME variable specifies correct path | |
set HOME="C:\TDM-GCC-64" | |
set PATH=%HOME%\bin;%HOME%\libexec\gcc\x86_64-w64-mingw32\5.1.0;%PATH% | |
copy config_MinGW config.h | |
%HOME%\bin\mingw32-make.exe -f Makefile_MinGW | |
%HOME%\bin\mingw32-make.exe -f Makefile_MinGW check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Solve the Time Division Multiplexing variant of the Multi Commodity Flow Problem in MATLAB. | |
% | |
% The goal of this script is to solve the Multi Commodity Flow Problem | |
% modified for Time Division Multiplexing ( TDM ) as seen in Contention | |
% Free Routing ( CFR ). The Multi Commodity Flow Problem is solved for the | |
% Concurrent Flow variant ( MCFP-CF ) with mixed-integer linear programming | |
% ( MILP ). | |
% | |
% The documentation generated from this script is a tex file. The PDF can | |
% be published from the tex, but \usagepackage{amsmath} needs to be added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file mcfp_cf_itermaxflow_lemon.cc | |
* @author Andrew Powell | |
* @date Oct 9, 2016 | |
* | |
* @brief Solves the Concurrent Flow variant of the Multi- | |
* Commodity Flow Problem. | |
* | |
* In this example, the Concurent Flow variant | |
* of the Multi-Commodity Flow Problem is solved with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* mcfp_cf_lp_lemon_glpk.cc | |
* LEMON provides a simple interface to known solvers! In | |
* this example the Concurrent Flow variant of the | |
* Multi-Commodity Flow Problem is solved with the glpk | |
* solver. | |
* | |
* The following libraries are needed to run this application: | |
* | |
* lemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Solve the Multi-Commodity Flow Problem in MATLAB. | |
% | |
% The goal of this script is to solve the Concurrent-Flow variant of the | |
% Multi-Commodity Flow Problem ( MCFP ) with MATLAB's Linear Programming | |
% ( LP ) tools. | |
% | |
% The documentation generated from this script is a tex file. The PDF can | |
% be generated from the tex, but \usagepackage{amsmath} needs to be added | |
% to the tex file's preamble. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multicommodity Flow Problem for Directed Networks, | |
## Optimized for Concurrent Flow | |
set V; # Vertex Set | |
set E, within V cross V; # Edge Set | |
set K; # Commodity Set | |
param s {K}, symbolic in V; # Source Vertex of Commodity | |
param t {K}, symbolic in V; # Sink Vertex of Commodity | |
param d {K}, >= 0; # Demand of Commodity | |
param c, >= 0; # Capacity of Edge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Purpose: Solves the following GNU MathProg program: | |
* | |
var x; | |
var y; | |
s.t. A: x + 2*y <= 14; | |
s.t. B: 3*x - y >= 0; | |
s.t. C: x - y <= 2; | |
maximize z: 3*x + 4*y; | |
* | |
* References: |