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

Modeling the shift types in Staff schedulling with linear programming

So i want to solve problem ,that looks like nurse scheduling Problem, the different is that there is 2 type of Workers, who should work minimum 40 hours per week, the other type should work minimum 10 hours per week. In order to solve this problem…
Mustgo
  • 5
  • 3
0
votes
0 answers

The output from LPSolver is not the optimal result

Since I need to create an automatic shift planning tool, R lpSolve is the package I plan to use. However, I can't get the optimal output by the code shown as below. The output(hourly supply by accumulating all shifts available) can't fulfill the…
Carson
  • 85
  • 6
0
votes
1 answer

How to maximize sales using lpSolve with constraints

Let's say I'm trying to maximize sales and have two variables, the amount spent on two types of advertisements, ads and ads2 in dollars, that affect the sales. After calculating a linear model on the effect of sales I extract the coefficients to get…
kkz
  • 306
  • 1
  • 8
0
votes
1 answer

Alternatives to lpsolve in Python for fast setup and solve

I have been using lpsolve in Python for a very long time, with generally good results. I have even written my own Cython wrapper to it to overcome the mess that the original Python wrapper is. My Cython wrapper is much faster in the setup of the…
Infinity77
  • 1,317
  • 10
  • 17
0
votes
1 answer

How to get lpsolveAPI to return all possible solutions?

I am using 'lpSolveAPI' to solve multiple binary linear programming problems in R. How do I get it too return ALL the variable combinations for a maximizing problem. Ive searched the documentation and can not find a command for this. Trying to…
Henry Holm
  • 495
  • 3
  • 13
0
votes
1 answer

Different results optimizing a linear system using different solvers in python

I have a linear system derived from a network of pairs and I would like to optimize the minimum using a solver in python. An example for this system derived from a small network is summarized by the following data obj_func {('1', '2'): [1, 1, 1], …
Noah16
  • 294
  • 2
  • 13
0
votes
1 answer

Comparing the results from lpSolve to linprog, is it a problem in implementation?

I would like to minimize a linear programming system with linear constraints "equalities". The system summarized in the following code "Python 3" >>> obj_func = [1,1,1] >>> const = [[[1, 0, 0], [0, 1, 0], [0, 0, 1], [1, 1, 1]]] >>> constraints=…
Noah16
  • 294
  • 2
  • 13
0
votes
1 answer

LPSolve - Setting constraints for the sum of multiple columns

I have a good grasp on using LPSolve for linear optimization problems, but one aspect has be stumped. I'd like to create a constraint for the sum of multiple columns. For example, I have a constraint that disallows any of four specific columns to be…
CoolGuyHasChillDay
  • 659
  • 1
  • 6
  • 21
0
votes
2 answers

R for solving linear programming marketing problem

I have this problem and I know the answer but I need to be able to solve it via R There are 5 campaigns called A,B,C,D,E there is a maximum possible budget that can be spent on each campaign and a ROI for each dollar spent on each campaign. it will…
Juan Lozano
  • 635
  • 1
  • 6
  • 17
0
votes
1 answer

LPSolve returning Error "no feasible solution found"

I'm following this guide on LPSolve, which I've used in the past, but I'm now getting the result "Error: no feasible solution found" my data.table looks like so: Position Name...ID Name ID Roster.Position Salary…
ike
  • 342
  • 3
  • 17
0
votes
0 answers

Unable to install lp_solve 5.5 extension on my WAMP server

I want to install and run lp_solve through PHP for a project I am working on. I've already created the solver in C and will be then working on converting it to PHP (and maybe even try incorporating a MySQL table to list off the array, it seems like…
Codingmedic
  • 55
  • 1
  • 1
  • 8
0
votes
0 answers

Setup for Linear Programming Problem : lpSolve in R

I need to solve a problem (reproducible toy example below): There is a p matrix (N =3 x M=2): p<-matrix(c(3,17,14,20,0,3), nrow=3, ncol=2, byrow=TRUE) I seek to maximize the element-wise sum where lets say X is (3x2) and are binary variables: The…
B_Miner
  • 1,840
  • 4
  • 31
  • 66
0
votes
0 answers

R: lpSolve crashing R

I'm trying to solve a linear optimization problem in R using lpSolve. The details of what the problem is are described in a previous question here:…
0
votes
0 answers

Installing LPSolve to MATLAB: "mxlpsolve.dll not found"

I'm trying to install lpsolve to use in MATLAB. I've followed the following instructions correctly. Download an uncompress lp_solve_5.5.0.10_dev.zip from https://sourceforge.net/projects/lpsolve/. Copy lpsolve55.dll into the C:/WINDOWS/system32…
HnCetin
  • 118
  • 8
0
votes
0 answers

Mixed integer programming for parameter estimation in R

I am looking to find a good way to find the optimum parameter for a linux program using R. It takes about 20 seconds to run each time. You put in a single integer number as input and get a single decmial number out.My goal is to get this output…