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

Image may be NSFW.
Clik here to view.

R: lazy load DB files

R can read data very fast and conveniently from .Rdata files. E.g.> load("indus89.rdata")> length(ls())[1] 275For this data set we have a lot of data: 275 objects are loaded:If we just want to...

View Article


Image may be NSFW.
Clik here to view.

Self-descriptive number

In http://stackoverflow.com/questions/35485185/puzzle-taken-from-gardner a small problem is given:This is called a self-descriptive number.Of course we can use a MIP solver instead of Prolog:The...

View Article


Image may be NSFW.
Clik here to view.

Quadprog: R vs Javascript

RThe R package quadprog contains a QP (Quadratic Programming) algorithm that solves the following problem:\[ \begin{align} \min\>&\frac{1}{2}x^TQx-d^Tx \\ &A_1^Tx = b_1 \\ &A_2^Tx \ge...

View Article

Image may be NSFW.
Clik here to view.

Cardinality Constrained Portfolio Optimization: MIQP without MIQP Solver

The optimization toolbox of Matlab does not contain an MIQP (Mixed Integer Quadratic Programming) solver. So when they discuss a cardinality constrained portfolio problem (this means only a certain...

View Article

Ceiling function in a Mixed Integer Program

In this post the question was asked how to implement the Ceiling() function in a MIP model. The constraint in question is:\[\left\lceil \frac{x-A}{B} \right\rceil \cdot C + D\cdot x < E...

View Article


Image may be NSFW.
Clik here to view.

Tennis Scheduling

Scheduling models are not always simple to write down. Here someone is quite stuck in the mud trying to implement a scheduling model in the Constraint Programming system Choco. Let’s see if some Math...

View Article

Image may be NSFW.
Clik here to view.

More Tennis Scheduling

Consider the case where we want to design a mixed doubles tennis tournament. Mixed doubles means every team consist of one man and one woman. The idea is to have several rounds where we want try to to...

View Article

Reformulate MINLP to MIP

In this post the question came up, what type of solver can handle this problem: \[\begin{align} \max\> & (0.9 x_0 + 0.8 x_1 + 0.85 x_2) \cdot(0.95 x_3 + 0.8 x_4 + 0.7 x_5)\cdot (0.98 x_6 + 0.94...

View Article


Image may be NSFW.
Clik here to view.

The Weight Problem of Bachet de Meziriac

In a comment in this post there was a question about the Weight Problem of Bachet de Meziriac. From this description:A merchant had a forty pound weight that broke into four pieces as a result of a...

View Article


Image may be NSFW.
Clik here to view.

MIP vs Matlab

In this post an interesting problem is posted. I am trying to suggest an optimization model opposed to some heuristic algorithm in Matlab. Looking at the zero points I get for my answer, without much...

View Article

Image may be NSFW.
Clik here to view.

Microsoft: Python, R

Python 3 starts to take over Python 2 (finally!)An analysis by Microsoft looking at packages requiring Python 2 or Python 3, gives an indication when Python 3 starts to take over: that is when more...

View Article

GAMS/Gurobi Announcement

Received from sales@gams.com: Next week we will start to release the distribution 24.7.There is one change, which will also affect your clients using GAMS/Gurobi: Gurobi Optimization, Inc. has decided...

View Article

Image may be NSFW.
Clik here to view.

PolySCIP: multi-criteria integer programming

http://polyscip.zib.de/Looks interesting. Unfortunately, not being an academic I am not allowed to download it and try it out.

View Article


R: is.integer and is.wholenumber

It is not the first time that a user is confused with this R output:> is.integer(1)[1] FALSEThe reason is the type of such a number is actually:> typeof(1)[1] "double"The help of is.integer is...

View Article

Image may be NSFW.
Clik here to view.

Large assignment problem

I usually solve assignment problems:\[\begin{align} \min\>& \sum_{i,j} c_{i,j} x_{i,j} & \\ & \sum_j x_{i,j} = 1 & \forall i \\ & \sum_i x_{i,j} = 1 & \forall j \\ & x...

View Article


Image may be NSFW.
Clik here to view.

Exam scheduling: Debugging C++ vs Modeling

In this post a question was asked about a small interesting scheduling problem. The model was implemented in C++ using Cplex. Debugging someone else’s C++ code is not my favorite pastime so instead...

View Article

Image may be NSFW.
Clik here to view.

ggplot and miptrace

The output of miptrace can be used to plot the MIP bounds. In this post we used it to show the results on an Exam Scheduling Model. After a little bit of clean-up here is a better version:plot.trace...

View Article


Image may be NSFW.
Clik here to view.

Web based visualization of multi-criteria model results

Some funding became available to add a Web based visualization tools to a larger engineering design application. Below is a depiction of the architecture. The solution points are (all or many) Pareto...

View Article

Image may be NSFW.
Clik here to view.

MySQL Import Wizard vs LOAD INFILE

The MySQL workbench has a handy tool to import CSV files:Unfortunately it is extremely slow. Here are some timing figures when compared with the LOAD INFILE command.Timings are in seconds....

View Article

Image may be NSFW.
Clik here to view.

Small LP, wrong solution

 From http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.optimize.linprog.html: This does not look right. Note: Seems to be fixed in newer versions. My python system seems to do the right...

View Article
Browsing all 805 articles
Browse latest View live