Quantcast
Channel: Yet Another Math Programming Consultant
Browsing all 805 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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 Article


SLSQP 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 Article


Wanted: 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 Article

Image may be NSFW.
Clik here to view.

Bostock'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 Article

Rewriting 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 Article


GAMS: 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 Article

Image may be NSFW.
Clik here to view.

Expanding 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 Article

Image may be NSFW.
Clik here to view.

Inverting 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 Article


Getting 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 Article


Image may be NSFW.
Clik here to view.

Evil 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 Article

Image may be NSFW.
Clik here to view.

Ranking 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 Article

Coding 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 Article

A 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 Article


Maximizing 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 Article

Image may be NSFW.
Clik here to view.

MAX-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 Article


Goal 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 Article

XNOR 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 Article


Image may be NSFW.
Clik here to view.

Artificially 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 Article

Transportation 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 Article

Linearize 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
Browsing all 805 articles
Browse latest View live


Latest Images