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

MS-R

Microsoft has purchased Revolution (an R company). Here are some...

View Article


Image may be NSFW.
Clik here to view.

Logistic Regression

Logistic regression is a well known technique in statistics. Here we show how we can solve the Maximum Likelihood estimation problem in GAMS. We use the data from...

View Article


Image may be NSFW.
Clik here to view.

Page rank in GAMS

The Google PageRank algorithm is a well known algorithm to calculate web page rankings in a search engine. It is surprisingly simple (for smaller data sets). The basic update equation for the page rank...

View Article

List 64 bit and 32 bit ODBC drivers

It is sometimes a bit confusing to find out which ODBC drivers are installed (especially when we need to know precisely which drivers are 32bit or 64bit). This script when run from a 64 bit GAMS...

View Article

Image may be NSFW.
Clik here to view.

Logistic Regression (2): least squares is non-convex

In http://yetanothermathprogrammingconsultant.blogspot.nl/2015/02/logistic-regression.html we implemented a simple maximum likelihood problem which replicates the results from R on a medium size data...

View Article


Image may be NSFW.
Clik here to view.

Gurobi vs R: subset selection

The R package leaps (http://cran.r-project.org/web/packages/leaps/leaps.pdf) provided a convenient way to perform feature selection. The methods are based on work by Alan Miller, described in:Alan...

View Article

Image may be NSFW.
Clik here to view.

GDX2SQLite –small option

In the tool GDX2SQLITE we export a GAMS GDX file to a SQLite database file.The –small option mimics how GAMS stores data internally. All strings (called UELs or Unique Elements) are stored in a pool...

View Article

Image may be NSFW.
Clik here to view.

gdx2sqlite –fast option

The –fast option in the tool gdx2sqlite is sometimes really helpful. This is especially the case if there are many tables:The column avg table size indicates the average number of rows in a table. It...

View Article


Image may be NSFW.
Clik here to view.

Sparse sum: set cover problem in GAMS

In a set cover problem (http://en.wikipedia.org/wiki/Set_cover_problem)  we can organize the sets in two different ways:Use a (sparse) two dimensional set. The cover equation will contain a construct...

View Article


Image may be NSFW.
Clik here to view.

Oligopolistic producer behavior or why airline tickets are not cheaper

 Small example from the literature:  Note: John Nash just won the Abel prize (http://www.nature.com/news/beautiful-mind-john-nash-adds-abel-prize-to-his-nobel-1.17179). We implement different behaviors...

View Article

Image may be NSFW.
Clik here to view.

K-means clustering formulated as MIQCP optimization problem

It is instructive to formulate the k-means clustering problem as a Mixed-Integer Quadratically Constrained Problem (MIQCP) in GAMS. It looks trivial at first sight but in fact requires a little bit of...

View Article

MIP Links

Ed Klotz (Cplex): Identification, Assessment and Correction of Ill-Conditioning and Numerical Instability in Linear and Integer Programs [slides and recording]. Performance VariabilityPerformance...

View Article

Image may be NSFW.
Clik here to view.

More oligopolistic behavior

Even very simple models require attention to detail. In [link] we described simple model from the literature. A related model with a coupling constraint that limits pollution emissions is described...

View Article


Image may be NSFW.
Clik here to view.

k-means clustering heuristic in GAMS and the XOR operator

In http://yetanothermathprogrammingconsultant.blogspot.com/2015/03/k-means-clustering-formulated-as-miqcp.html we were quite underwhelmed by the performance of MIQCPs (Mixed Integer Quadratically...

View Article

Reliability of NLP solvers

NLP solvers can fail for a number of reasons. One way to increase the reliability of a production run is to use a back-up solver in case the main solver fails. In GAMS primal and dual information is...

View Article


Interesting Xpress log

On a very small (convex) MIQCP model (it solves within the limits of the demo version of GAMS/Xpress) we see Xpress struggling mightily. Commercial solvers like Xpress are very robust for LP and MIP...

View Article

More fun with quadratic models

This model seems to be solving just fine:MODEL STATISTICS BLOCKS OF EQUATIONS          81     SINGLE EQUATIONS           81BLOCKS OF VARIABLES         127     SINGLE VARIABLES          127 NON ZERO...

View Article


Image may be NSFW.
Clik here to view.

Diagonalization Algorithm

Followingwe can write a simple diagonalization / relaxation algorithm in GAMS that computes the oligopolistic market equilibrium of the problem described here:...

View Article

Image may be NSFW.
Clik here to view.

operating on an empty set

See: http://www.johndcook.com/blog/2015/04/14/empty-sum-product/Of course modeling systems should do this correctly.GAMS$onempty; set e(*) //; display e; scalars s,p; s = sum(e,1); p = prod(e,1);...

View Article

Image may be NSFW.
Clik here to view.

Does not happen a lot

Often Gurobi and Cplex are in the same ballpark when solving my models. But sometimes you can see something like this:The model is related to scheduling maintenance for power generators.Note: I also...

View Article
Browsing all 804 articles
Browse latest View live