2,638 questions
5
votes
3
answers
8k
views
Optimization problem in Python
I need to solve a problem. I have 5 devices. They all have 4 kind of I/O types. And there is a target input/output combination. At first step, I want to find all combinations among the devices so that ...
1
vote
3
answers
708
views
how to compute the original vector from a distance matrix?
I have a small question about vector and matrix.
Suppose a vector V = {v1, v2, ..., vn}. I generate a n-by-n distance matrix M defined as:
M_ij = | v_i - v_j | such that i,j belong to [1, n].
That ...
6
votes
2
answers
215
views
LP modelling question... long time since school
Sure, this isn't a programming question, per se... but I couldn't think of a better place to ask it all the same.
I'm writing an application that ultimately will assist a shopped to determine how to ...
6
votes
2
answers
4k
views
How can I inscribe a rectangle or circle inside an arbitrary quadrilateral
This may be a more math focused question, but wanted to ask here because it is in a CS context. I'm looking to inscribe a rectangle inside another (arbitrary) quad with the inscribed quad having the ...
5
votes
3
answers
6k
views
Linear program question
I'm trying to prepare for my midterm and I was going over some problems out of my algorithm book but can't seem to figure out the following problem:
Find necessary and sufficient conditions on the ...
0
votes
2
answers
535
views
Algorithm that can turn a linear programming problem to a feasible one
I need an algorithm that automatically makes a linear programming problem feasible. Concretely, the algorithm is such that its input is a linear programming problem which potentially does not have ...
16
votes
4
answers
18k
views
Is there a simple algorithm for calculating the maximum inscribed circle into a convex polygon?
I found some solutions, but they're too messy.
0
votes
2
answers
2k
views
Simplex solver Library Help
I have to migrate some old code which used the c based LPPSolver library to solve a Simplex problem. My problem in Java is to find anon commercial JAVA based solver which can handle large number of ...
5
votes
1
answer
967
views
Find the Discrete Pair of {x,y} that Satisfy Inequality Constriants
I have a few inequalities regarding {x,y}, that satisfies the following equations:
x>=0
y>=0
f(x,y)=x^2+y^2>=100
g(x,y)=x^2+y^2<=200
Note that x and y must be integer.
Graphically it can ...
2
votes
0
answers
273
views
Open Source .Net Linear Programming Library [duplicate]
Possible Duplicate:
Good linear programming library for C# ?
Is there any free open source .Net linear programming library available?
8
votes
2
answers
9k
views
Good linear programming library for C#? [closed]
I'm looking for a linear programming solver for C#. In the other words I'm looking for a library for C# that solves linear programming problems.
I need an easy to use library (so I can learn how to ...
20
votes
5
answers
6k
views
What is linear programming? [closed]
I read over the wikipedia article, but it seems to be beyond my comprehension. It says it's for optimization, but how is it different than any other method for optimizing things?
An answer that ...
17
votes
3
answers
17k
views
binary linear programming solver in Python
I have a Python script in which I need to solve a linear programming problem. The catch is that the solution must be binary. In other words, I need an equivalent of MATLAB's bintprog function. NumPy ...
1
vote
0
answers
566
views
How do I solve the linear programming relaxed MKP?
I am studying about Knapsack problem. So I do not understand one thing here.
The profit/pseudo-resource consumption ratios
Uj = Pj / Wj with Wj = Rji * Aj
I hope so you people know this equation ...
10
votes
6
answers
8k
views
Sparse constrained linear least-squares solver
This great SO answer points to a good sparse solver for Ax=b, but I've got constraints on x such that each element in x is >=0 an <=N.
Also, A is huge (around 2e6x2e6) but very sparse with <...
2
votes
0
answers
909
views
How to solve this logical description with Prolog? [duplicate]
That's my first question so please be tolerant.
I've logical problem to write in prolog/CLP:
"It is known only one character is
telling the truth. Mr April says
Mr May tells lies. Mr May says ...
10
votes
3
answers
7k
views
Recommended library for linear programming in .Net? [closed]
Can anyone recommend a library - free, or commercial but affordable (
There are some listed here:
http://en.wikipedia.org/wiki/Linear_programming#Solvers_and_scripting_.28programming.29_languages
......
27
votes
5
answers
22k
views
How to choose an integer linear programming solver?
I am newbie for integer linear programming.
I plan to use a integer linear programming solver to solve my combinatorial optimization problem.
I am more familiar with C++/object oriented programming on ...
2
votes
3
answers
1k
views
Which linear programming package should I use for high numbers of constraints and "warm starts" [closed]
I have a "continuous" linear programming problem that involves maximizing a linear function over a curved convex space. In typical LP problems, the convex space is a polytope, but in this case the ...
4
votes
2
answers
807
views
NSPredicate as a constraint solver?
I'm working on a project which includes some slightly more complex dynamic layout of interface elements than what I'm used to. I always feel stupid writing complex code that checks if so-and-so is ...
0
votes
1
answer
4k
views
Solving linear systems in Maxima
I'm trying to write a general solver for a linear system in Maxima using linsolve(eqlist, varlist), but without having to explicitly specify the dimension of the problem.
This works, but fixes the ...
4
votes
7
answers
4k
views
Integer linear programming: example and good tools?
Find a vector x which minimizes c . x subject to the constraint m . x >= b, x integer.
Here's a sample input set:
c : {1,2,3}
m : {{1,0,0},
{0,1,0},
{1,0,1}}
b : {1,1,1}
With output:
x = {...
2
votes
2
answers
3k
views
Integer Linear Programming Java: Multiple Open Source and Commercial tools are available. Which one to use?
I need to use Integer Linear Programming API/Tool for my application. Though my application is in Java but I don’t mind calling an EXE (Tool) from Java providing input using file (MPS, etc).
My ...
0
votes
1
answer
1k
views
Linear Independence Matrix
Suppose we have a m by n matrix A with rank m and a set K⊆{1..n} such that the columns of A indexed by K are linearly independent. Now we want to extend K and find a set L so that k⊆L and columns ...
4
votes
4
answers
8k
views
How to solve a system of inequalities?
I've reduced my problem (table layout algorithm) to the following problem:
Imagine I have N variables X1, X2, ..., XN. I also have some (undetermined) number of inequalities, like:
X1 >= 2
x2 + X3 >=...
13
votes
3
answers
21k
views
LP Simplex algorithm in C++ [closed]
I need the robust C++ source code of the simplex algorithm (is a popular algorithm for numerical solution of the linear programming problem).
Please, no links to wikipedia. I need good source code ...
1
vote
2
answers
1k
views
The GNU Linear Programming Kit
Has anyone used the GLPK for production systems?
I have an application currently powered by CPLEX and wish to replace it with a free software alternative.
It is used to solve a large MIP (thousands ...
1
vote
8
answers
672
views
Keeping top 5 values in PHP efficently
I'm writing a small algorithm in PHP that goes through n number of movies with ratings, and will store the top 5. I'm not reading from a datafile, but from a stream so I cannot simply order the movies ...
2
votes
2
answers
2k
views
number of possible combinations in a partitioning
Given is a set S of size n, which is partitioned into classes (s1,..,sk) of sizes n1,..,nk. Naturally, it holds that n = n1+...+nk.
I am interested in finding out the number of ways in which I can ...
11
votes
6
answers
3k
views
How do I solve a set of constraints in Perl?
I have the following set of constraints in Perl (just a sample set of constraints, not the ones I really need):
$a < $b
$b > $c
$a is odd => $a in [10..18]
$a > 0
$c < 30
And I need to ...
23
votes
8
answers
15k
views
Which algorithm for assigning shifts (discrete optimization problem)
I'm developing an application that optimally assigns shifts to nurses in a hospital. I believe this is a linear programming problem with discrete variables, and therefore probably NP-hard:
For each ...
5
votes
5
answers
22k
views
Java Library? - Simplex / Linear Programming / Optimization [closed]
I'm looking for an optimization library. My two requirements are that it does not use JNI and that it does not have license restrictions preventing it from being used on multiple computers ...
65
votes
13
answers
77k
views
Open source Mixed-Integer Linear Programming (MILP) optimization solver benchmark [closed]
I am solving huge mixed-integer linear programming (MILP) optimization problem (more than 100k variables).
How to properly run benchmark comparing various MILP solvers on various common and famous MIP ...
1
vote
4
answers
641
views
Linear Programming with Complication
I'm trying to solve a problem that looks like a standard Linear Programming problem with one twist.
We have as input a set of "phrases" each of which has a weight. We need to choose how many times ...
3
votes
2
answers
2k
views
matlabs linprog too slow
I am working on a matlab application for which I need much improved speed. I am using linprog to solve a 2-constraint linear program with around 10,000 variables bounded by zero and one. Linprog is ...
24
votes
3
answers
34k
views
Linear Programming Tool/Libraries for Java [closed]
I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available?
3
votes
5
answers
2k
views
Solving an inequality for minimum value
I'm working on a programming problem which boils down to a set of an equation and inequality:
x[0]*a[0] + x[1]*a[1] + ... x[n]*a[n] >= D
x[0]*b[0] + x[1]*b[1] + ... x[n]*b[n] = C
I want to solve ...
16
votes
7
answers
21k
views
mathematical optimization library for Java --- free or open source recommendations? [closed]
Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with ...