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
1
vote
0 answers

Library for negation of logical expressions?

Given that I have an conditional expression like: a > 9, do you know if a library exists, which can negate the condition correctly to: a <= 9. ? The problem: I have a constraint solver, lp_solve, which I feed with constraints, i.e. conditions. Then…
dynamokaj
  • 471
  • 7
  • 19
1
vote
1 answer

LPSolve - specify constant coefficients

I'm using LPSolve IDE to solve a LP problem. I have to test the model against about 10 or 20 sets of different parameters and compare them. Is there any way for me to keep the general model, but to specify the constants as I wish? For example, if I…
Maciej Stachowski
  • 1,708
  • 10
  • 19
1
vote
2 answers

how do you compile lp_solve toward macports php 5.4.2?

I followed the instructions here: http://lpsolve.sourceforge.net/5.5/PHP.htm#Compile_the_lpsolve_driver and downloaded the source from here: http://sourceforge.net/projects/lpsolve/ however when I type phpize from the directory of the source I get…
thed0ctor
  • 1,350
  • 4
  • 17
  • 34
1
vote
1 answer

Either-Or constraints in LPsolveAPI

I'm currently writing a MIP in LPsolveAPI in R. The program itself is straightforward, but I can't find a way to write an either-or constraint without being able to directly call a new binary variable or the binary values on the lhs. Does LPsolveAPI…
grim_trigger
  • 151
  • 1
  • 6
1
vote
1 answer

Define integrer variables in PyLPsolve (a lpsolve wrapper for python)

PyLPsolve has some great features I want to use. I have a question, though: How do you define the list of integer variables of the MIP? That is, in the standard wrapper of lpsolve: solution = lp_solve(f,A,b,e,lvb,uvb,xint) Where xint is the list of…
mm_
  • 1,566
  • 2
  • 18
  • 37
1
vote
1 answer

Using lpsolve php library

I need to use lpsolve library for one of my projects... How do i configure it with Apache 2.2 and php 5.3.9 on WAMP?
spidergears
  • 194
  • 11
1
vote
1 answer

android linear programming lp_solve library

Can someone help me how to use lpsolve55j.jar on Android device. I tried importing it like every other library (putting it in libs folder and adding it in JavaBuildPath -> Libraries) but I got this error: 03-07 15:28:52.910: W/dalvikvm(3421):…
nikmin
  • 1,803
  • 3
  • 28
  • 46
1
vote
1 answer

unexpected VARSYM, ZIMPL program

I am getting an unexpected VARSYM error for my ZIMPL program, I have no idea what the problem is, here is a portion of the code Here are the variables var FWPlus1 integer >= 0 <= 4; var FWPlus2 integer >= 0 <= 4; var FWPlus3 integer >= 0 <=…
user2007843
  • 609
  • 1
  • 12
  • 30
1
vote
0 answers

installing lpsolve for MATLAB on Ubuntu 12.04 64bit?

I am trying to install this toolkit for 3 hours.... first, for Python.. I gave up. Then for MATLAB... http://web.mit.edu/lpsolve/doc/MATLAB.htm It says something about installation(and I read everything at all other websites), but I have no idea of…
Eric
  • 2,635
  • 6
  • 26
  • 66
1
vote
1 answer

converting a lingo model to lp format

I have written a program using LINGO but the trial version has constraints of 30 nonlinear variables and 30 integer variables, putting me over the limit. Before I decide I might want to buy the next version, I thought I would see how my program…
user2007843
  • 609
  • 1
  • 12
  • 30
0
votes
1 answer

optimize function to maximimize value given a list of unique numbers

I have a function that calculates the total value given a vector of unique integer numbers. For example, in the problem below i would like to find the maximum value by changing the vector numbers. Constraints are that the vector must be a length of…
jsimpsno
  • 448
  • 4
  • 19
0
votes
0 answers

LPSolve R MILP optimization Min and max constraints

I am trying to use lpsolve in R to solve the following lp program. I want to maximize the obj function. The constraints are that the variable weights sum up to 1, and the individual weights have to be either 0 or a minimum of 0.125, and a maximum of…
0
votes
0 answers

LPSolve with 4 Binary Variables, sum of each binary variable column subject to constraints, but each binary variable row weighted differently

I have a working LPSolve Model that takes 4 binary decision variables, with the following working mechanisms: The sum of the count of the 4 different binary variables are subject to constraints (ie. count of Binary 1 < 20, count of Binary 2 <…
Max Grove
  • 1
  • 1
0
votes
0 answers

How to loop linear programming in r and get the values for objval and solution for n number of DMUs?

f <- matrix(NA, nrow = (s+m), ncol = (N+1)) for (j in 1:N){ f.obj = c(1, rep(0,N)) f.dir <- c(rep("<=", (m+s))) df.dir <- c(rep(">=", (m+s))) f.rhs <- c(rep(0,s), as.numeric(df[j,1:m])) for (r in (1:s)){ f[r,1] = (df[j,(m+r)]) …
0
votes
1 answer

Linear Programming Problem R using lpSolveAPI

Here is the data I'm working with: structure(list(Name = c("Jokic", "Butler", "Murray", "Adebayo", "Porter", "Gordon", "Martin", "Pope", "Vincent", "Lowry", "Brown", "Strus", "Robinson", "Green", "Highsmith"), Points = c(62.8, 48.8, 45.8, 41.8,…
Lcsballer1
  • 97
  • 8