Questions tagged [lpsolve]

lp_solve is a free linear (integer) programming solver. The solver is a callable library written in ANSI C.

lp_solve is a free (see LGPL for the GNU lesser general public license) linear (integer) programming solver based on the revised simplex method and the Branch-and-bound method for the integers.

lp_solve solves pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models.

It can also be called as a library from different languages like C, VB, .NET, Delphi, Excel, Java, ... It can also be called from AMPL, MATLAB, O-Matrix, Scilab, Octave, R via a driver program. lp_solve is written in ANSI C and can be compiled on many different platforms like linux and WINDOWS.

More details, including an FAQ, and an intro to lp_solve can be found here.

271 questions
0
votes
0 answers

Lpsolve rounding in matrix

I'm using LPSolve IDE and have a problem with rounding in constraint matrix. For example, min:; 1275699039.79*X1 + 1304079473.01209677*X2 <= 204401963493.5341; And LPSolve build matrix X1 X2 R1: 1275699039.7903 …
A. Belkin
  • 78
  • 6
0
votes
1 answer

ROI lpsolve plugin gets wrong result with binary constraint

I am trying to use lp_solve solver through ROI interface (ROI.plugin.lpsolve) and get random result on MIP problem. Here is my example where I was expecting 0/1 binary…
Bulat
  • 6,869
  • 1
  • 29
  • 52
0
votes
1 answer

All feasible solutions using lpSolveAPI in R

I am trying to figure out all possible combinations of packaging items together. Basically it's an integer programming problem where you have i number of items, j number of boxes and binary variable x[i,j]. There are many constraints, but I built a…
Ray
  • 383
  • 1
  • 2
  • 9
0
votes
1 answer

lpSolve Linear Program choosing a subset AND choosing weights

I am trying to put together an lp with the following situation. I have 10 objects (O1-O10) that have 5 characteristics (C1-C5). I want to find a set of 3 of those objects with weights such that the total weight of each characteristic is Y. Something…
0
votes
1 answer

R : Storing my lpSolve solution in a list

I'm having trouble storing my lpSolve solution in a c() object, when I execute. l=c() l[1]=lp ("min",f.obj,f.con,f.dir,f.rhs) I get an error: unexpected symbol in "l[1]" Does someone have a clue please? Thanks in advance!
0
votes
0 answers

lpSolve - no feasible solution

Please help, maybe I am stupid, but what do I miss? lpSolve is not converging. Firstly, I try to solve this and it is working f.obj [1] 0.02708294 0.02677628 0.05480254 0.09362836 -0.13018085 0.01081241 0.02723422 0.10048414 0.04800000 …
0
votes
1 answer

LPSolve with R - Multiple datasets as input

I am working on LPSolve with R and my input data is in the form of multiple CSV files, each file having a table. 2 of the tables are mentioned below: Description about constraints - There are routes originating from each production house Total…
Amit Madan
  • 1,013
  • 2
  • 12
  • 23
0
votes
0 answers

Linear programming: not all constraints should be satisfied

Using R, it is very easy to do linear programming with the lpSolve and lpSolveAPI packages. Now, I want to do linear programming with part of the constraints satisfied. Say, with 80% of the constraints are satisfied. It can not predefine which…
pengchy
  • 732
  • 2
  • 14
  • 26
0
votes
1 answer

R lpSolveAPI with non trivial coefficients in set.objfn

I want to optimize a function that looks like this : y= P1*y+sum(x1-P1) + P2*y+sum(x2-P2) + P3*y+sum(x3-P3) with P1, P2 and P3 the three parameters to be optimized and y the function to be minimzed. x1, x2 x3 are vectors of data. Under the…
Amandine.G
  • 181
  • 1
  • 2
  • 9
0
votes
1 answer

How to write this constraint in LP solver (Logical and and Doesnot exist)

Is it possible to write these constraints in Lp solver? I want to check whether two rectangles are overlapping or not? Let us assume, there is one rectangle whose left bottom corner is (xk, yk) and (wi,hi) be there width and height respectively.…
user38375
  • 31
  • 6
0
votes
1 answer

How to use lpsolve in omnet++ simple modules

lpsolve can be called from a c++ program with main() but I am unable to use it in handlemesage() or any other user-defined method in omnet++ simulation. Any help in this regard is appreciated. Thanks
Pasha M.
  • 340
  • 1
  • 12
0
votes
1 answer

Decision variable in rhs of a constraint, implemented in R with lpSolveAPI or lpsolve

This is my first question on Stack Overflow. I'm working on a optimization problem with R and the package lpSolveAPI which, to this point, works perfectly well for me. My problem is very simple: How do I add a decision variable to the right hand…
0
votes
1 answer

How to read parentheses or brackets using CPLEX

I am trying to read a .lp file using CPLEX, and it is giving me an error 1615, which is not being able to read "(" or even "[". I am not happy with it because what I have needs to be read must have parentheses in it. Here is what I have: [num1 +…
DD1
  • 33
  • 4
0
votes
0 answers

AMPL: Constraint optimization not planning over time as expected in LP Solver

I'm trying to build a constraint optimization model using the LP solver with AMPL(.mod) as the language. The context is a factory that receives several orders that then go through several machines (operations) in the production process. The…
0
votes
0 answers

Can't Import lp_solve in anaconda (python2)

I installed lpsolve55 in anaconda using conda. The package wasn't available in the official repository, so I installed it from another user's. However, I can't import it into anaconda. When I try, it gives me this error: ImportError:…
Niklas Braun
  • 393
  • 3
  • 16