linear-programming

Using min/max *within* an Integer Linear Program

為{幸葍}努か 提交于 2019-11-28 04:32:17
I'm trying to set up a linear program in which the objective function adds extra weight to the max out of the decision variables multiplied by their respective coefficients. With this in mind, is there a way to use min or max operators within the objective function of a linear program? Example: Minimize (c1 * x1) + (c2 * x2) + (c3 * x3) + (c4 * max(c1*x1, c2*x2, c3*x3)) subject to #some arbitrary integer constraints: x1 >= ... x1 + 2*x2 <= ... x3 >= ... x1 + x3 == ... Note that (c4 * max(c1*x1, c2*x2, c3*x3)) is the "extra weight" term that I'm concerned about. We let c4 denote the "extra

error: iostream.h due to including cplex

两盒软妹~` 提交于 2019-11-28 01:05:41
问题 I am trying to use cplex in eclipse in Ubuntu 12.04 but when I include ilocplex.h I get the following error /opt/ibm/ILOG/CPLEX_Studio124/concert/include/ilconcert/ilosys.h:360:22: fatal error: iostream.h: No such file or directory The only two includes are written as follows: #include <ilcplex/ilocplex.h> #include <iostream> I would appreciate if anyone could help me with this. 回答1: At the time ILOG's Concert library was first released, the older iostream.h headers were still common in C++

linear programming in python?

一世执手 提交于 2019-11-27 19:53:05
问题 I need to make a linear programming model. Here are the inequalities I'm using (for example): 6x + 4y <= 24 x + 2y <= 6 -x + y <= 1 y <= 2 I need to find the area described by these inequalities, and shade it in a graph, as well as keep track of the vertices of the bounding lines of this area, and draw the bounding line in a different color. See the graph below for an example of what I'm looking for. . I'm using Python 3.2, numpy, and matplotlib. Are there better modules for linear

How to choose an integer linear programming solver?

倖福魔咒の 提交于 2019-11-27 15:39:16
问题 I am newbie for integer linear programming. I plan to use a integer linear programming solver to solve my combinatorial optimization problem. I am more familiar with C++/object oriented programming on an IDE. Now I am using NetBeans with Cygwin to write my applications most of time. May I ask if there is an easy use ILP solver for me? Or it depends on the problem I want to solve ? I am trying to do some resources mapping optimization. Please let me know if any further information is required.

Which algorithm for assigning shifts (discrete optimization problem)

对着背影说爱祢 提交于 2019-11-27 14:46:48
问题 I'm developing an application that optimally assigns shifts to nurses in a hospital. I believe this is a linear programming problem with discrete variables, and therefore probably NP-hard: For each day, each nurse (ca. 15-20) is assigned a shift There is a small number (ca. 6) of different shifts There is a considerable number of constraints and optimization criteria, either concerning a day, or concerning an emplyoee, e.g.: There must be a minimum number of people assigned to each shift

R lpsolve binary find all possible solutions

…衆ロ難τιáo~ 提交于 2019-11-27 08:15:42
问题 I have a linear programming problem. All variables are binary and I want to get all possible solutions.I know that I can set parameter num.bin.solns to provide multiple solutions. But is there any easy way to ask for all possible solutions? For example in below case I know that the maximum number of answers is 6. But if I don't know the maximum possible solutions then how can I set the num.bin.solns parameter such that it would return all possible solutions? library("lpSolve") A=matrix (c(1,1

mathematical optimization library for Java — free or open source recommendations? [closed]

自作多情 提交于 2019-11-27 07:29:05
Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have to write my own implementations, or buy one of those commercial products (CPLEX and the like)? A good answer is dependent on what you mean by "convex" and "more general" If you are trying to solve large or challenging linear or convex-quadratic optimization problems (especially with a discrete component to them), then it's hard to beat the main

Using min/max *within* an Integer Linear Program

天涯浪子 提交于 2019-11-27 05:22:18
问题 I'm trying to set up a linear program in which the objective function adds extra weight to the max out of the decision variables multiplied by their respective coefficients. With this in mind, is there a way to use min or max operators within the objective function of a linear program? Example: Minimize (c1 * x1) + (c2 * x2) + (c3 * x3) + (c4 * max(c1*x1, c2*x2, c3*x3)) subject to #some arbitrary integer constraints: x1 >= ... x1 + 2*x2 <= ... x3 >= ... x1 + x3 == ... Note that (c4 * max(c1

Best open source Mixed Integer Optimization Solver [closed]

那年仲夏 提交于 2019-11-27 03:00:58
I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale so I really need to find an alternative or start writing our own ad-hoc optimization library (which will be painful) Any suggestion/insight would be much appreciated I personally found GLPK better (i.e. faster) than LP_SOLVE. It supports various file formats, and a further advantage is its library interface, which allows smooth integration with your

Linear Programming Tool/Libraries for Java [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 20:10:14
问题 I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available? 回答1: I used lp_solve with success. It looks like there is a native Java API, but I've only used the text file interface. It supports the semi-standard MPS and LP file formats, which I found more convenient for trying out different solvers (such as glpsol). 回答2: There were several suggestions from an earlier question that I posted: CPLEX