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
7
votes
2 answers

R for solving linear programming problems

I am searching for a nice R package to solve linear programming models. I'm quite happy with the default lpSolve::lp, but there's no way to get the shadow and reduced prices. I need these, together with integrality constraints. Sample model: A =…
mreq
  • 6,414
  • 4
  • 37
  • 57
6
votes
1 answer

java.lang.UnsatisfiedLinkError:Can't find dependent libraries

I am new to lp solve. I am trying to run the following code and getting the following error: package package1; /** * Created by ANJANEY on 6/13/2014. */ import lpsolve.*; public class Demo { public static void main(String[] args) { …
anjaneypandey
  • 203
  • 2
  • 3
  • 7
6
votes
4 answers

Windows\System32\lpsolve55j.dll: Can't find dependent libraries

When I try to use LPSolve for Java (mavenized version, http://code.google.com/p/lpsolve-java/source/checkout ), I get following error: java.lang.UnsatisfiedLinkError: C:\Windows\System32\lpsolve55j.dll: Can't find dependent libraries at…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
5
votes
1 answer

Implementing additional constraint variables in integer programming using lpSolve

I'm working to implement a lpSolve solution to optimizing a hypothetical daily fantasy baseball problem. I'm having trouble applying my last constraint: position - Exactly 3 outfielders (OF) 2 pitchers (P) and 1 of everything else cost - Cost less…
jasbner
  • 2,253
  • 12
  • 24
5
votes
1 answer

How to set up linear programming optimization in R using LpSolve?

For example, I have this sample data: d=data.frame(x=c(1,1,1,2,2,3,4,4),y=c(5,6,7,8,7,5,6,5),w=c(1,2,3,4,5,6,7,8)) Which looks like this: x y w 1 1 5 1 2 1 6 2 3 1 7 3 4 2 8 4 5 2 7 5 6 3 5 6 7 4 6 7 8 4 5 8 x and y represent indices from datax…
eyio
  • 337
  • 3
  • 14
5
votes
1 answer

lpSolve in R with Character and Column Sum Contraints

I have a list of rooms, the rooms' maximum square feet, programs, the programs' maximum square feet, and the values of how well a room matches (match #) the intended program use. With help, I have been able to maximize match # and square feet use…
medavis6
  • 843
  • 10
  • 32
5
votes
1 answer

R lpsolve see all possible solutions of an integral LP

Is there a way to make lpSolve return multiple solutions? In below case i want (5,0) and (0,5) both. If lpSolve cannot do that then is there any other R package which will return all possible solutions of an integral linear optimization program? …
user2543622
  • 5,760
  • 25
  • 91
  • 159
5
votes
1 answer

Find all alternative basic solutions using existing linear-programming tool

I have to find all basic solutions of some tiny linear-programming problems. Here's an example (in lp_solve format): max: x1 + x2; x1 + x2 <= 1; x1 <= 0.8; x2 <= 0.8; All 2 basic solutions: x1 = 0.2, x2 = 0.8 x1 = 0.8, x2 = 0.2 Of course there is…
tdihp
  • 2,329
  • 2
  • 23
  • 40
5
votes
1 answer

How to write lp object to lp file?

I have been using lpSolve and lpSolveAPI. I build my constraint matrix, objective function etc and feed to the lp function and this works just fine. I want to save the problem as an lp file using write.lp and am having trouble. I keep getting an…
5
votes
1 answer

How to augment lpsolve R optimization solution to run on a hadoop cluster?

I am using R lpsolve package to optimize my transportation model. My code runs fine but it takes a lot of time to run as I have huge number of nodes and paths. I am planning to run my code over hadoop cluster. Please guide me regarding changes that…
user2543622
  • 5,760
  • 25
  • 91
  • 159
4
votes
2 answers

Optimization in R: cost function with binary scheduling variables?

The below details a simplified version of an optimization problem that I am having trouble solving. The objective is to minimize a cost function for an organization that delivers water via trucks and use that equation to produce a truck delivery…
4
votes
1 answer

Using lpSolve to optimize choices

I am trying to use lpSolve to assign students to groups. Each student has ranked their interested in the group from first (most interest) to third (least interest). Students are listed as rows and their preferences as columns: desires <-…
4
votes
2 answers

lpsolve not printing lp model in R

I am new to LP modelling in R. I am using lpSolveAPI. When I try a small example with two decision variables and print the model, then it prints the complete model. library(lpSolveAPI) lprec <-…
4
votes
1 answer

how can I specify the linear programming I have created to be maximizing or minimizing programming with lpsolve

I am learning to use lpsolve in python to solve the linear programming, I followed the website, and it worked well. But I could not find where to set the max/min attribute in LP problem, it has tortured me for some days.
Sunflower
  • 41
  • 1
4
votes
1 answer

lpsolve package in R

I'm using lpsolve package for linear programming but have read in its tutorial that only solves for non-negative variables. Here's my code: library(lpSolve) #linear programming solver c = c(30, 18, 20, 23, 24, 26) a = scan(text="66 89 82 14 35…
nopeva
  • 1,583
  • 5
  • 22
  • 38
1
2 3
18 19