Re: [R] optimization: multiple assignment problem

2013-11-14 Thread Hans W.Borchers
Jean-Francois Chevalier bisnode.com> writes: > You have already given the answer yourself. You have binary variables x(j, i), you need to set up the inequalities, and then apply one of the mixed-integer linear programming solvers in R, for instance 'lpSolve', 'Rglpk', 'Rsymphony'. Setting up th

Re: [R] optimization: multiple assignment problem

2013-11-14 Thread Simon Zehnder
It would be more clear if you tell, what you want to do instead of what you do not want to do. If you start with a usual cost matrix (whatever cost function you have) and you have to assign N to N this reduces to the well-known Munkre’s algorithm (see for example: http://gallery.rcpp.org/artic

[R] optimization: multiple assignment problem

2013-11-14 Thread Jean-Francois Chevalier
Hello, I'm trying to solve a multiple assignment problem. I found a package Adagio and its function mknapsack which maximize vstar = p(1)*(x(1,1) + ... + x(m,1)) + ... ... + p(n)*(x(1,n) + ... + x(m,n)) subject to w(1)*x(i,1) + ... + w(n)*x(i,n) <= k(i) for i=1,...,m x(1,j) + ... + x(m,j) <= 1