Questions tagged [integer-programming]

Solving systems of linear equations where variables are integers.

An integer program is a problem where, in addition to the linear inequalities constraints, the variables are also constraint to be integers only.

While can be solved in polynomail time, integer-programming is NP-hard.

A good solver for such optimization problems is lp_solve. See also GLPK (http://www.gnu.org/software/glpk/) and CBC (https://projects.coin-or.org/Cbc)

However, for large or hard instances you may need a commercial solver such as CPLEX or Gurobi.

For more information see wikipedia.

307 questions
0
votes
0 answers

In branch-and-price, how to handle variables that have a cost with an offset?

I am implementing a branch-and-price (or column-generation) algorithm. The variables (or columns) I generate during optimization have a cost with an offset. For example, if I want to introduce a new variable xi it has both a cost coefficient ci that…
0
votes
0 answers

Resource Allocation in a Wireless Network

What deterministic algorithm is suitable for the following resource allocation/scheduling problem? Consider a set of players: P1, P2, P3 and P4. Each player receives data from a cell tower (e.g. in a wireless network). The tower transmits data in 1…
0
votes
1 answer

Using max/min in mixed integer programming model

I building a mixed integer programming model, and I want to define the minimum and mzximum of a decision variable. for example lets say the C={19, 20, 30} I want to define C_early as 19 and C_late as 30. Then I want to minimize the difference. The…
H.D
  • 1
  • 1
0
votes
1 answer

How to solve this non 0-1 integer Knapsack_Problem in Ruby

Question: Minimising x1+x2+...+xn Known k1*x1+k2*x2+...kn*xn = T k1,k2,...,kn and T are known integers and > 0 k1 > k2 > k3 > ... > kn All the x are also integers and >= 0 Find all the x I was trying to use Rglpk and Glpk. But I can't find an…
0
votes
1 answer

Trying to code summation of combination of nodes in a graph for gurobi optimization with quicksum

Im trying to code this into python using gurobi and networkx, S >= quicksum(uij for j in N) for every i in N My code is import gurobipy as grb import networkx as nx g = nx.Graph() g.add_edges_from(edges) for i in g.nodes_iter(): m.addConstr(S…
Art Zahar
  • 155
  • 1
  • 3
  • 7
0
votes
2 answers

Multiobjective integer programming

I wish to use integer programming to enumerate pareto optimal solutions. I would like to implement an algorithm that uses gurobi or a similar single-objective integer programming solver to do this, but I don't know any such algorithms. Could someone…
william007
  • 17,375
  • 25
  • 118
  • 194
0
votes
2 answers

Integer Programs - How to force the solution to be in multiples of an integer?

So I'm trying to create this IP that has an optimal solution where all the variables are integers, and are all in multiples of a number, like 3. ( so the variables in the solution would have to be either 0,3,6,9,12,etc.) I code in R, and it's pretty…
0
votes
0 answers

Incrementally adding constraints to a linear programming instance

I would like to solve a linear programming problem incrementally, adding new constraints and solving it to optimality with dual simplex. Although it is done internally in the solvers, I can't find how to do it in the APIs of GLPK, Clp or LPsolve. I…
Ggouvine
  • 136
  • 6
0
votes
1 answer

Real time Integer/Binary programming (microSecond compute time)

My binary programming problem is: max: (a1 * x1) + (a2 * x2) + ..... + (an * xn) subject to: (c1 * x1) + (c2 * x2) + ..... + (cn * xn) < C n = 10 a1, ... an, c1, ... cn, C are known x1, ... xn are binary This is a process task assignment…
0
votes
1 answer

Setting termination time in CPLEX using Java

Using java and OptimJ plugin, I am writing a Cplex model and testing it using many test cases. But when I execute it, some cases takes long time to finish, which is not practical. I am wondering if there is a way to set a maximum time in java for…
Traveling Salesman
  • 2,209
  • 11
  • 46
  • 83
0
votes
1 answer

Resetting priorities just before branching or customized branching rule

Given the node where the MIP solver is just about to pick a variable to branch, I would like to suggest a small subset of variables to chose from but leave breaking ties to the solver's heuristics. I have good reasons to believe that this can…
Ali
  • 56,466
  • 29
  • 168
  • 265
0
votes
0 answers

How to match x chars from y total in groups of z with each char matching at least w others

Programming up a pattern matching game. We have 135 symbols. Of those 135, a subset of 108 symbols is used. From the subset of 108, either 18, 21, or 24 symbols are chosen at random. For simplicity, let's stick with 18. When a symbol is chosen, it…
0
votes
1 answer

Integer programming: assignment of absolute value (depending on variable value)

I am relatively new to integer programming and (again) got stuck with the formulation of a constraint. In my simplified model I have a (continous) variable with a lower bound LB below zero and an upper bound UB above zero. Now I want to assign the…
0
votes
1 answer

Bintprog, selection criteria

I'm have a binary integer programming problem and want to solve it with bintprog. A = [1 0 1 0; 0 1 1 0; 1 1 1 1; 0 0 1 1]; f=[1 1 1 1]; b=[1 1 1 1]; [x,xfval,exitflag,output]=bintprog(f,-A,-b); The solution bintprog gave me is x={3}, but I would…
maostah
  • 1
  • 2
0
votes
1 answer

Mixed integer programming: variable assignment per condition (if then else)

I am relatively new to (mixed) integer programming and got stuck with the formulation of a constraint. In my simplified model I have one Parameter and two Variables that are positive Reals having the value 321 as upper bound. The logic I want to…