## Wordle: number of words from unique letters

In [1] an optimization model is proposed for the following problem:Using a list of 5-letter words, try to find a set of 5 words such that each letter is used at most once. DataThe list of 5-letter words is from the wordle [2] game. Words with duplicate letters are removed. A partial list is: ---- 1035 SET w words: large list of 5-letter wordsabdom, abend, abets, abhor, abide, abies, abyes, abilo, abime, ...

## Large sparse transportation model with CVXPY,CVXR

In [1] I was trying out different formulations of a large, sparse (but very easy) transportation model using different modeling tools and solvers. The conclusion was:Exploiting sparsity leads to the best performanceGAMS/Cplex is about 10 times as fast as Python/PuLP/CBCGAMS/Cplex is about 1000 times as fast as R/OMPR/GLPKDon't overinterpret these numbers: this is a single model, which may not be at all representable for your models....

## A model with semi-continuous variables

In [1], a selection problem is posted, that turns out to be an easy MIP. The problem is: From a (large) collection of products select those products with the highest unit return (or value) subject to:A product can only be ordered between a minimum and maximum amountThere is a budget w.r.t. the total amount of productsThis can be modeled using so-called semi-continuous variables: variables that can assume zero or a value between the...

## The inverse of A(i,j) has signature B(j,i)

GAMS has strict domain checking (type checking). This has some interesting consequences. Basically all good: much better protection against errors compared to simply using integer indices \(1,\dots,n\). Consider the square matrix \(\color{darkblue}A_{i,j}\): set i /a,b,c,d/ j /1,2,3,4/ ; parameter A(i,j) 'square matrix'; A(i,j) = min(ord(i),ord(j)); display A; The so-called "minij" matrix looks like: ---- 7...

## Transportation model with some non-existing links

I am again looking at simple models based on the transportation model: Dense Transportation Model\[\begin{align}\min&\sum_{i,j}\color{darkblue}c_{i,j}\cdot\color{darkred}x_{i,j}\\ & \sum_j \color{darkred}x_{i,j} \le \color{darkblue}a_i && \forall i \\& \sum_i \color{darkred}x_{i,j} \ge \color{darkblue}b_j && \forall j \\ & \color{darkred}x_{i,j} \ge 0 \end{align}\] This is a good time to discuss what...

## Getting rid of non-linearities

In [1], an attempt was made to implement the following non-linear constraint: \[\frac{\displaystyle\sum_t \max\left\{\sum_i CF_{i,t}\cdot q_i -L_t, 0 \right\}}{\displaystyle\sum_t L_t} \le 0.015 \] Obviously code like: cfm = quicksum( max(quicksum(cf[i][t] * q[i] - L[t] for i in range(I)), 0) for t in range(T) / quicksum(L[t] for t in range(T)) <= 0.015is really not what we want to see. It is best, not to directly start up your...