Skip to content

GAMS-dev/gamspy-examples

Repository files navigation

GAMSPy

Tests

GAMSPy Modeling Examples

This repository contains many examples to show how to model mathematical optimization problems by using GAMSPy. The example models are distributed as either Python script files (under models) or Jupyter Notebooks (under notebooks).

Installing Dependencies

git clone git@github.com:GAMS-dev/gamspy-examples.git
pip install -r requirements.txt

Running Locally

cd <model_directory>
python <model_name>.py

Licensing

GAMSPy pip package includes a demo license. For most of the notebooks, this demo license is sufficient. For others, you may need a different license (See Licensing). In case you already have a GAMSPy license, see GAMSPy License Installation guideline.

List of Models

List of models under models directory is listed below. Most models have a GAMS implementation as well for comparison.

GAMSPy Model GAMS Model Model Type License
acopf NLP Demo
aircraft aircraft LP Demo
batchreactor batchreactor NLP Demo
benz benz NLP Demo
blend blend LP Demo
BondIndex BondIndex LP Demo
BoundaryLP BoundaryLP LP Demo
carseq carseq MIP, MINLP Demo
cesam2 cesam2 NLP Demo
chain chain NLP Demo
chenery chenery NLP Demo
circuit circuit NLP Demo
clsp MIP Demo
coex coex MIP Demo
control3 control3 NLP Demo
Corporate Corporate LP Requires license
cpa cpa NLP Demo
cpack cpack QCP Demo
cta cta MIP Demo
cutstock cutstock MIP, RMIP Demo
CVaR CVaR LP Demo
DED DED QCP Demo
DED-PB DED-PB QCP Demo
DEDESSwind DEDESSwind QCP Demo
DedicationMip DedicationMip LP, MIP Demo
DedicationNoBorrow DedicationNoBorrow LP Demo
diffusion2 NLP Demo
dyncge dyncge NLP Demo
edc2 edc2 NLP Demo
EDsensitivity EDsensitivity QCP Demo
EmergencyCentreAllocation EmergencyCentreAllocation MIP Demo
EnergyHub EnergyHub LP Demo
EnvironmentalED EnvironmentalED QCP Demo
fdesign fdesign QCP Demo
fiat fiat NLP Demo
flowshop flowshop MIP Demo
flywheel NLP Demo
food food MIP Demo
fuel fuel MINLP Demo
gapmin gapmin MIP, RMIP Demo
hansmcp hansmcp MCP Demo
hansmge hansmge MCP Demo
heatex3 heatex3 NLP Demo
hhd NLP Demo
Horizon Horizon LP Demo
Immunization Immunization LP Demo
inscribedsquare inscribedsquare DNLP Demo
InternationalMeanVar InternationalMeanVar NLP Demo
invmat LP Demo
iobalance iobalance LP, NLP, QCP Demo
knapsack MIP Demo
korcns korcns CNS Demo
linear linear DNLP, LP, NLP Demo
lop lop LP, MIP Demo
macro macro NLP Demo
MAD MAD LP, NLP Demo
MeanVarMip MeanVarMip MINLP Demo
mexss mexss LP Demo
minlphi minlphi MIP, NLP Demo
minlphix minlphix MINLP Demo
MOED MOED QCP Demo
MultiperiodACOPF24bus MultiperiodACOPF24bus NLP Requires license
nurses nurses MIP Demo
OPF2bus OPF2bus QCP Demo
OPF5bus OPF5bus LP Demo
ParetoOptimalFront ParetoOptimalFront NLP Demo
partssupply partssupply NLP Demo
phase NLP Demo
PMU PMU MIP Demo
PMU-cost PMU-cost MIP Demo
PMU-OBI PMU-OBI MIP Demo
poutil poutil MIP Community
process process NLP Demo
prodmix prodmix LP Demo
protein protein NLP Requires license
ps10_s_mn ps10_s_mn NLP Demo
PutCall PutCall LP Demo
qdemo7 qdemo7 QCP Demo
qp6 qp6 MCP Demo
RampSenDED RampSenDED QCP Demo
ramsey ramsey NLP Demo
rcpsp rcpsp MIP Requires license
refrigeration refrigeration NLP Demo
Regret Regret LP Demo
reservoir reservoir NLP Demo
riversys NLP Demo
robustlp robustlp LP, QCP Demo
rotdk rotdk MIP Requires license
SelectiveHedging SelectiveHedging LP Demo
sgolfer sgolfer MINLP, MIP Requires license
Sharpe Sharpe NLP Demo
SimpleLP SimpleLP LP Demo
SimpleMIP SimpleMIP MIP Demo
spatequ spatequ LP, MCP, NLP Demo
spbenders1 spbenders1 LP Demo
speed speed NLP Demo
springchain springchain QCP Demo
StochDedicationBL StochDedicationBL LP Community
surface surface NLP Demo
syscomp LP Demo
tanksize tanksize MINLP Demo
TEP TEP MIP Demo
tforss tforss LP Demo
thai thai MIP Demo
ThreeStageSPDA ThreeStageSPDA LP, NLP Demo
timesteps timesteps MIP Requires license
TransportationOn-Off TransportationOn-Off MINLP Demo
trnsport trnsport LP Demo
trnspwl trnspwl MIP, NLP Demo
trussm trussm QCP Demo
tsp4 tsp4 MIP Demo
WaterEnergy WaterEnergy MINLP Demo
weapons weapons NLP Demo
whouse whouse LP Demo

All models under notebooks can be run with the demo license.

Releases

No releases published

Packages

No packages published