Processing math: 100%

Tuesday, July 19, 2022

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,,n. Consider the square matrix Ai,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;

Tuesday, July 12, 2022

Linearize min(a,b)>min(x,y)

This question was posed [1]: How to linearize min(a,b)>min(x,y) where a,b,x,y are variables. The type of variables is not specified so let's assume they all are continuous variables.

Monday, July 11, 2022

Transportation model with some non-existing links

I am again looking at simple models based on the transportation model:

Dense Transportation Model
mini,jci,jxi,jjxi,jaiiixi,jbjjxi,j0


Friday, July 8, 2022

Artificially creating a large LP model: why is Cplex so efficient

I am teaching some GAMS classes this summer. The first class is about the transportation model. This is model number 1 from the GAMS model library [1]. It is a tiny model, slightly modified from the original model in [2]. I believe the GAMS version has been made dual degenerate.