I am a full-time consultant and provide services related to the design, implementation and deployment of mathematical programming, optimization and data-science applications. I also teach courses and workshops. Usually I cannot blog about projects I am doing, but there are many technical notes I'd like to share. Not in the least so I have an easy way to search and find them again myself. You can reach me at erwin@amsterdamoptimization.com.
Tuesday, June 3, 2025
Graph connectivity as constraints
Thursday, June 16, 2022
MAX-CUT
The MAX-CUT problem is quite famous [1]. It can be stated as follows:
Given an undirected graph \(G=(V,E)\), split the nodes into two sets. Maximize the number of edges that have one node in each set.
Here is an example using a random sparse graph:
Friday, September 17, 2021
Reallocate people: a very small but interesting LP
![]() |
U-Haul Moving Van [link] |
This is a strange little problem [1]. We have individuals (of different categories) and regions with a given capacity. The initial set of assigned persons fits within the capacity of each region. Now a new batch of individuals arrives with their chosen zones. Unfortunately, the total demand (old + new individuals) does not fit anymore in all cases. This means we need to reallocate people. We can do this at a price (the costs are given). What is the optimal (least cost) new allocation?
Sunday, August 8, 2021
A network model: Pyomo vs GAMS
Monday, March 8, 2021
Minimum Spanning Trees in Math Programming Models
Algorithms for the Minimum Spanning Tree (MST) problem are readily available. However, sometimes we want to solve this problem inside a Mathematical Programming model. Usually, this is for two reasons:
- We have some side constraints
- Or as part of a larger model
---- 298 SET cities
Manchester, N.H. , Montpelier, Vt. , Detroit, Mich. , Cleveland, Ohio , Charleston, W.Va.
Louisville, Ky. , Indianapolis, Ind. , Chicago, Ill. , Milwaukee, Wis. , Minneapolis, Minn.
Pierre, S.D. , Bismarck, N.D. , Helena, Mont. , Seattle, Wash. , Portland, Ore.
Boise, Idaho , Salt Lake City, Utah, Carson City, Nevada , Los Angeles, Calif. , Phoenix, Ariz.
Santa Fe, N.M. , Denver, Colo. , Cheyenne, Wyo. , Omaha, Neb. , Des Moines, Iowa
Kansas City, Mo. , Topeka, Kans. , Oklahoma City, Okla., Dallas, Tex. , Little Rock, Ark.
Memphis, Tenn. , Jackson, Miss. , New Orleans, La. , Birmingham, Ala. , Atlanta, Ga.
Jacksonville, Fla. , Columbia, S.C. , Raleigh, N.C. , Richmond, Va. , Washington, D.C.
Boston, Mass. , Portland, Me.
Monday, December 7, 2020
Directed vs undirected networks in math programming models
Many practical optimization models contain some network structures. In virtually all cases, these networks are modeled as directed graphs. I.e., between nodes \(i\) and \(j\), we consider arcs \(i \rightarrow j\) and \(j \rightarrow i\). In graph theory, it is very customary to talk about undirected graphs. In this case, there is just one link between nodes \(i\) and \(j\). Why am I using directed graphs, with two uni-directional arcs for each pair of nodes? I will try to answer this in this post.
As an example, let's consider the shortest path problem. This is really the same as a min-cost problem. I took the following data (from [1]):