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

Image may be NSFW.
Clik here to view.

Matlab primal simplex solver

I would guess there are problems where primal simplex is doing well. Apparently not enough of those.

View Article


Image may be NSFW.
Clik here to view.

Pivoting a table: GAMS, SQLite, R and Python

In an earlier post I read a GAMS variable into Python program. Here I add some more notes on the tools and procedures we can use for this.1. GAMS: Export to GDX and dump into SQLite We are interested...

View Article


Image may be NSFW.
Clik here to view.

Cutting Wood

In this post an interesting problem was described:Raw material is a number of lengths of wood types A,B,C and D. We want to cut it so we can create final product. This final product consists of combos...

View Article

Image may be NSFW.
Clik here to view.

SciPy infeasibility error

This model is obviously infeasible. However SciPy’s SLSQP algorithm returns as if everythin is hunky-dory:(I hope I did not make a mistake here: things are not as readible as I would like). R also has...

View Article

Image may be NSFW.
Clik here to view.

Dataframe Pivoting: some timings

In Pivot a table: GAMS, SQLite, R and Python we described a pivoting operation on a small example. In the comments it was mentioned that for larger tables or dataframes, especially tydir is very fast....

View Article


Image may be NSFW.
Clik here to view.

ggplot example

To produce high-quality plots for a document R’s ggplot is always a good choice:> library(ggplot2)> df<- read.csv("c:\\tmp\\testsolution.csv")> head(df) ID Performance Cost Weight1 1 0.7051...

View Article

Image may be NSFW.
Clik here to view.

Multi-dimensional Knapsack: Genetic Algorithm vs MIP

In http://pyeasyga.readthedocs.org/en/latest/examples.html a small example of a knapsack problem is shown. Here it has two constraints instead of the usual one (hence multi-dimensional). Note that we...

View Article

Image may be NSFW.
Clik here to view.

Maximum Edge Biclique Problem

The standard network problems such as shortest path and min-cost flow are easily expressed as linear programming problems. Here is a network problem that is somewhat more challenging both in solving...

View Article


Cplex wish list

Express your most wanted features here: https://www.ibm.com/developerworks/rfe/. And look what other users want.On top of my list: better feedback if something is wrong. For example infeasible or...

View Article


Image may be NSFW.
Clik here to view.

R: The RData File Format

R has a quite efficient way to store data in a file using its own RData file format. You can save objects to the file using save() and load data from a file using load(). The file format is largely...

View Article

Image may be NSFW.
Clik here to view.

R: The RData File Format (2)

Now that we understand the .RData file format (as shown here) we can start writing some code to actually generate some .Rdata files. The tool gdx2r takes a GAMS GDX file and dumps the contents into an...

View Article

Image may be NSFW.
Clik here to view.

Experiments writing .Rdata files

While building a prototype .Rdata writer we developed a gdx2r application. This tool will convert a GAMS GDX file to an .RData file. Here we do some performance testing to get a feeling of how fast...

View Article

Image may be NSFW.
Clik here to view.

Slime Mold and Linear Programming

Growing LP solvers in the basement?A Slime Mold Solver for Linear Programming ProblemsPhysarum can compute shortest pathsOn a Natural Dynamics for Linear ProgrammingTokyo rail network designed by...

View Article


Image may be NSFW.
Clik here to view.

Microsoft R: links

Microsoft has acquired Revolution. Here are some early results of that. Microsoft R OpenThis is the standard R version with the addition of the Intel MKL library for high performance linear algebra...

View Article

Image may be NSFW.
Clik here to view.

R: Factors vs Strings on large data sets

When exporting data sets in R’s .Rdata format, one of the things to consider is how string vectors are exported. I can now write factors in my .Rdata writer, so we can do some experiments on exporting...

View Article


Move GAMS data into R: gdxrrw vs gdx2r

GAMS tool GDXRRWScript:$set script script.R$set rpath  C:\Program Files\R\R-3.2.3\bin\x64\Rscriptset i /i1*i200/;alias (i,j,k);parameter p(i,j,k);p(i,j,k) = uniform(0,1);execute_unload"p",p;$onecho...

View Article

R: load and environments

When using load(), R will load all objects in the “global environment”, i.e. the interactive workspace:> load("results.rdata",verbose=T)Loading objects: i f c xIf you want to load data but not...

View Article


Image may be NSFW.
Clik here to view.

Two nonlinear formulations

Problem DescriptionFrom: http://math.stackexchange.com/questions/1652150/turn-off-the-ovens-an-optimization-problem: I am not at all sure the physics make sense, but lets fox on the mathematics of this...

View Article

Strange restriction

In this post the question is posed how to model the restriction\[x \in \{1,2,3,4,5,6,8,10,12,..,100\}.\]Note that this is \(\{1,2,3,4,5\} \cup \{6,8,10,..,98,100\}\).  Never seen a thing like this, but...

View Article

xor as linear inequalities

I came across a question about using an xor condition in a MIP model. Here is a summary of the answer. Expressing \(z=x\cdot y\) (or \(z=x\text{ and }y\) ) where \(x,y,z \in \{0,1\}\) as a set of...

View Article
Browsing all 805 articles
Browse latest View live