Visualization: Animating flow along an edge
In a large network, it is a bit of a pain to visualize the flow. Here is an attempt to show the shortest path in a random sparse directed graph. The shortest path is of course a min-cost flow of one...
View ArticleSLSQP original paper
This is somewhat hard to find (although I did), so I share it. This is the original paper[1] describing the SLSQP solver used in scipy[2]: To download use the menu button at the bottom and choose...
View ArticleWanted: better error messages
In [1] a user tries the following constraint: mdl.addConstrs((t[i,k] * X[i,j,k] - te1[i] <= 5) >> (z1[i,k] == 1) for i,j,k in arcos if i != 0 and i != 23)(t and X and variables). This is not...
View ArticleBostock's command-line cartography tutorial under Windows
In [1], an excellent tutorial is presented about the process of making maps. It is a little bit dated, so here I develop some Windows-based scripts that make it possible to follow these tutorials. The...
View ArticleRewriting old GAMS code
It is always a good idea to revisit existing GAMS code and see if we can improve it. Here is an example of an actual model.The problem is that we want to set up a mapping set between two sets based on...
View ArticleGAMS: Undocumented PUT formats
The GAMS documentation mentions f.nr=1 (standard notation) and f.nr=2 (scientific notation) for formatting numeric items using the PUT statement. There are however a few more. Here we print values...
View ArticleExpanding Visual Studio in the Task Manager
This is scary. Note that is in an idle state (nothing compiling, running, or debugging at the moment). Soon we all need 128 GB of RAM.
View ArticleInverting a large, dense matrix
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleGetting rid of non-linearities
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleEvil Sudoku
On sudoku.com[1] there is now an "evil" difficulty level. I found these very difficult to solve by hand (I usually give up). Of course, a good MIP presolver/preprocessor devours this in no time. It...
View ArticleRanking using numpy.argsort
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleCoding is to programming like typing is to writing
Quote by Leslie Lamport: Coding is to programming like typing is to writingMy generalization: IMHO, developers often start coding (i.e. typing) way too early.
View ArticleA subset selection problem
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleMaximizing Standard Deviation
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleMAX-CUT
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleGoal Programming
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleXNOR as linear inequalities
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleArtificially creating a large LP model: why is Cplex so efficient
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleTransportation model with some non-existing links
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View ArticleLinearize min(a,b)>min(x,y)
table.xyz { table-layout: fixed; border-collapse: collapse; margin-left:auto; margin-right:auto; } table.xyz th, table.xyz td { border: 1px solid black; } table.blueTable { border: 1px solid #1C6EA4;...
View Article