gurobi (44 notebooks)#

AMPL Bin Packing Problem with GCG#

bpp.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Dantzig-Wolfe decomposition for Bin Packing Problem with GCG

AMPL Christmas Model created by ChatGPT#

AMPL Development Tutorial 6/6 – Implementing Benders Decomposition with ampls#

6_benders_ampls_stoch_floc.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This concluding notebook in our six-part series delves into enhancing the efficiency of our decomposition algorithm by utilizing AMPL Solver Libraries (ampls).

Aircrew trainee scheduling with seniority constraints#

Balanced Task Assignment with Inverse Cost Scaling#

Bilevel Markets#

bilevel_markets.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: A notebook that presents a comprehensive mathematical formulation of strategic bidding in electricity markets using bilevel optimization and its equivalent single-level Mathematical Program with Equilibrium Constraints (MPEC) obtained through Karush-Kuhn-Tucker (KKT) transformation.

Bilevel Optimization Introduction#

bilevel_introduction.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: A notebook as a gentle introduction to Bilevel Optimization and how to reformulate to Single Level using KKT conditions and Complementarity using AMPLPy and MP with a simple Stackelberg model

Book Example: Economic equilibria#

economic_eq_lecture.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: economic model using complementarity conditions from Chapter 19 AMPL book

Containers scheduling#

containers_scheduling.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Scheduling model for harbor operations. It is a problem with dependences between containers, which should be dispatch the fastest possible. We are using the MP solver interfaces to model a complex system using techniques from Constraint Programming, such as indicator constraints, and logical or and forall operators. After the model is written, a couple instances are presented and Highs/Gurobi MIP solvers are used to tackle the problem.

Demand prediction and Optimization with scikit-learn & Amplpy#

Diagnose infeasibility#

diagnose_infeasibility.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This notebook demonstrates how to deal with infeasible models.

Employee Scheduling Optimization#

Employee_Scheduling.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Employee scheduling model from the Analytical Decision Modeling course at the Arizona State University.

Enhanced Sector ETF Portfolio Optimization with Multiple Strategies in Python with AMPL#

Notebook_3_Porfolio_Optimization_Sector_ETF.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This notebook compares multiple portfolio optimization strategies for invesment in Sector ETFs

Financial Portfolio Optimization with amplpy#

amplpyfinance_vs_amplpy.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Financial Portfolio Optimization with amplpy and amplpyfinance

Introduction to Linear and Integer Programming#

intro_to_linear_programming.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Basic introduction to linear programming and AMPL via a lemonade stand example

Introduction to Mathematical Optimization#

intro_to_optimization.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Basic introduction to optimization and AMPL via unconstrained optimization

Jupyter Notebook Integration#

magics.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Jupyter Notebook Integration with amplpy

Multi-Objective Knapsack Problem with AMPLPY#

knapsack.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: knapsack problem using multiple objectives, setting objective-specific options

NFL Team Rating#

NFL_Team_Rating.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: NFL Team Rating problem from the Analytical Decision Modeling course at the Arizona State University.

Network Linear Programs#

network.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Basic introduction to network linear programms and AMPL via max flow and shortest path problems

Network design with redundancy#

electric_grid_with_redundancy.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Design of an electricity transportation network provides enough redundancy, so that a break of one component does not prevent any user from receiving electricity. The approach also works for similar distribution networks and can potentially be used in the design of military logistic networks.

Optimization of Reinforced Concrete Production and Shipment: A Conveyor-Based Manufacturing and Curing Model#

Optimize your Christmas Tree to Global Optimality#

Optimized Portfolio Optimization using EIA Data in Python with AMPL#

Notebook_1_Portfolio_Optimization_Commodities.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Portfolio Optimization across Crude Oil, Gold, Natural Gas, Silver, and the S&P 500.

Optimizing Procurement and Sales Strategies for a Retail Chain with Supplier Payment Schemes#

Optimizing the number of staff in a chain of stores#

Pattern Enumeration#

pattern_enumeration.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Pattern enumeration example with amplpy

Pattern Generation#

pattern_generation.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Pattern generation example with amplpy

Porfolio Optimization with Multiple Risk Strategies in Python with AMPL#

Notebook_4_Porfolio_Optimization_Risk_Strategies.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This notebook evaluates three distinct risk-based portfolio strategies: Semivariance Optimization, Conditional Value-at-Risk (CVaR) Optimization, and Conditional Drawdown-at-Risk (CDaR) Optimization.

Portfolio Optimization: Factor Model#

portfolio_factor_model.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Mean-Variance Portfolio Optimization model where the risk estimator is not given explicitly but is instead represented by a factor model, as is common in US equity models [1]. The original notebook is [3].

Power System Optimization with Amplpower package#

ampl_power.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: this notebook uses amplpower package to solver opf problems

Predicting and Optimizing Avocado Sales with Python + Amplpy#

predict_avocado.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: In this notebook, we explore a real-world example of demand estimation and supply optimization using a Kaggle dataset on avocado sales. We start by training a machine learning model to estimate demand and then formulate and solve an optimization model in AMPL to maximize revenue while minimizing waste and transportation costs.

Pricing Optimization (Price Elasticity of Demand)#

Production Model: lemonade stand example#

production_model.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Basic introduction to AMPL’s indexed entities and the Pygwalker Python package via a lemonade stand example

Project management: Minimize project costs by balancing task costs, risks, and late penalties.#

Retrieve Solution pool with AMPL and Gurobi#

solution_pool.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This notebook describes how to retrieve multiple solutions from the solver’s solution pool. Optimization problems usually have several optimal solutions, one is returned by the solver but the others are discarded. These alternative solutions can also be retrieved by AMPL.

Robust Linear Programming with Ellipsoidal Uncertainty#

tip6_robust_linear_programming.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: AMPL Modeling Tips #6: Robust Linear Programming

Roll Cutting - Revision 1 & 2#

pattern_tradeoff.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Pattern tradeoff example with amplpy

Scheduling Multipurpose Batch Processes using State-Task Networks in Python#

batch_processessing.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: The State-Task Network (STN) is an approach to modeling multipurpose batch process for the purpose of short term scheduling. It was first developed by Kondili, et al., in 1993, and subsequently developed and extended by others.

Smart Pipeline Diagnostics#

Unit Commitment Problem with AMPL and Python - Power Grid Lib#

pglib_uc.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Generic notebook to solve Unit Commitment problems with AMPL and Python using the Power Grid Lib model and test instances.

Unit Commitment for Colombia’s Energy Market#

unit_commitment_colombia.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Unit Commitment and Reserve Co-Optimization in the Colombian Market.

Vehicle Routing Problem with Fair Profits and Time Windows (VRP-FPTW)#

vrp_fptw.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: This notebook implements and solves the Vehicle Routing Problem with Fair Profits and Time Windows (VRP-FPTW), a realistic and recent extension of the classical VRP problem.

amplpy setup & Quick Start#

quickstart.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: amplpy setup and quick start