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
1 answer

How to change weight restrictions in lpSolve?

I am applying the CCR Data Envelopment Analysis model to benchmark between stock data. To do that I am running R code from a DEA paper published here. This document uses lpSolve to solve a linear problem. The documentation for lpSolve is here. This…
Alex Bădoi
  • 830
  • 2
  • 9
  • 24
0
votes
1 answer

defining linear equations in Java

I am trying to implement a paper and I am facing problem while representing linear equations mentioned in the paper. I am using LPsolve (linear problem solver) to solve the equations. But not able to represent some equations in Java so that LPSOLVE…
stafan
  • 155
  • 1
  • 9
0
votes
1 answer

Lpsolve matlab installation error

The error is: Error using mxlpsolve Failed to initialise lpsolve library. I run the Makefile.m in the folder and the compiliation, it says everything compiled fine. Where do i need to put mslpsolve and where do i find it?
quesaionasis
  • 137
  • 1
  • 2
  • 11
0
votes
2 answers

Lpsolve python installation error

When i download lp_solve_5.5.2.0_Python_source.tar.gz and run python setup.py install it throws: pythonmod.h:15:20: fatal error: lp_lib.h: No such file or directory #include "lp_lib.h" What do i need to do to install lpsolve.
quesaionasis
  • 137
  • 1
  • 2
  • 11
0
votes
1 answer

lpsolve library dynamically linking

the lpsolve library has a script to build a demo.c file. #This script expects to be located in a subdirectory of a subdirectory of the base lpsolve files cc -DEXPLICIT -I../.. -O3 demo.c explicit.c -lm -ldl -o demoe…
apfel
  • 33
  • 6
0
votes
1 answer

How to create upper bound on many variables w/ lpsolve in R?

I have a dataset with 135 foods that I am using to solve the diet problem: minimizing cost and maximizing nutritional value. I would like to create a model that includes a diversity of foods, rather than one that, for example, tells to me only to…
0
votes
1 answer

How to formulate x != y in lpsolve?

I'm trying to formulate that the variables x,y,z must all be different and that they accept only the values 1, 2 or 3 (this is, of course, a toy example): min: x+y+z; 1 <= x <= 3; 1 <= y <= 3; 1 <= z <= 3; but to make this work I still need either…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
0
votes
1 answer

Modeling Source open cost with lpSolveAPI

I would like to use lpSolveAPI in R to solve a facility optimization problem that includes a cost burden to set-up product manufacture in the source location. I am looking for advice on how to model this in the lprec object. I'll use the example…
0
votes
2 answers

Installing lpsolve to work with python in Ubuntu?

Read other questions; unfortunately they were not relevant. Using this tutorial: http://lpsolve.sourceforge.net/5.5/Python.htm Found this file: lp_solve_5.5.2.0_exe_ux32 That contains these…
AturSams
  • 7,568
  • 18
  • 64
  • 98
0
votes
1 answer

Require integer optimization variables to take unique values

I used lp solve to solve a linear programming equation and the solution gives a vector > lp("max", obj, con, ineqs, rhs, all.int=TRUE,)$solution [1] 5 0 13 11 4 0 1 11 0 which is fine, but I want each entry in this vector to be an integer…
calculator
  • 37
  • 7
0
votes
1 answer

solve MILP with MILP solver for multiple values of variables

I am using lp_solve...I want to solve this MILP with various constraints min: Y; // subject to, constraints are x1 + z1h1 + (1 - z1)w1 <= x2 + m(x12 + y12); x1 - z2h2 - (1 - z2)w2 >=x2 - m(1 - x12 + y12); y1 + z1w1 + (1 - z1)h1 <= y2 + m(1 + x12 -…
Sangeet Saha
  • 83
  • 1
  • 7
0
votes
1 answer

how to solve integer linear programming when one of the variables belong to a set

I am working on solving optimization problems using integer linear programming, one of the constraints assume that the variable has a value belongs to a set of values like the following min 5*x1 + 2*x2 s.t. x1,x2>0 x1 in {2,4,-5} how i can…
0
votes
1 answer

adding a static library to my xcode command line project

I have a liblpsolve55.a file and liblpsolve55.dylib file which I got from a directory at macports. I didn't install anything using macports but I used this link to get the liblpsolve55.a and liblpsolve55.dylib files. Now as I understand I have to…
Morpheus
  • 3,285
  • 4
  • 27
  • 57
0
votes
1 answer

How to create a static library in osx

lpsolve is a C library that can be used to solve linear programming problems. They have some header files and using that you can create a dylib or a static library(.a). The osx library has some header files, a dylib file and .a file. but these were…
Morpheus
  • 3,285
  • 4
  • 27
  • 57
0
votes
0 answers

lpIsolveApi, solution outside of constraints

I am at a wits end, please help! below is the setup for the problem. by the way, why is it that I can't view the model detail when there are more than 8 variables? I have set up the constraints to bound the answer to within window. The…