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

If condition in Cplex objective function

I am new to Cplex. I'm solving an integer programming problem, but I have a problem with objective function. Problem is that I have some project, that have a due date D, and if project is tardy, than I have a tardiness penalty b, so it looks like…
A. Smith
  • 1
  • 1
0
votes
1 answer

Algorithms for Optimization of Integer Subset Linking

Consider having two sets of integer values that are divided in multiple subsets. The two sets exist of the same set of values but the order and the division into subsets differ. The idea is to link the subsets from the first set with these from the…
0
votes
0 answers

PulP adding constraints too slowly

I have read this post PuLP very slow when adding many constraints and still remain oblivious to a solution. def choose_lines_to_satisfy_image(lines_list_high_res, image_low_res, lines_to_low_res_matrix, allowed_diff_between_targe_pixel_and_result): …
Gulzar
  • 23,452
  • 27
  • 113
  • 201
0
votes
0 answers

PuLP integer programming: solver returns 'Undefined' for anything beyond toy example

I am trying to find an integer programming formulation for the following problem: Sort a list of items according to 2 criteria, represented by the following cost: 'Positional cost': dependent on the position of the item in the list 'Neighbour…
0
votes
1 answer

GurobiPy; Change continuous [0,1] variable to binary in callback routine

I'm using the Gurobi Python interface gurobipy. I have a model formulation with a lot of variables. I would like to initialize less important variables that are supposed to be binary as continuous variables, and to change them to binary when needed.…
0
votes
0 answers

If-then constraints in integer linear programming

I have a 30*40 matrix. Lets say the components in the matrix are specified with "P" and the related number of the row and column of each "P" is specified by "X" and "Y" accordingly. I have a model that the output should give us the P, X and Y. How…
0
votes
0 answers

Which variable type to pick - Difference between integer, continuous and binary - Gurobi

In my optimization challenge I was adding decision variables with default attributes. As it was taking too much time I switched the variables to integer type, with the hope that the elapsed time will decrease. I discovered that it takes much longer…
0
votes
1 answer

Simple, non-trivial bin-packing instance

Bin packing problem is to find the minimal number of bins of size v, which can contain all objects of size [s_1, s_2, s_3, ..., s_n] I'm searching for a simple, non-trivial instance of the bin-packing problem. A simple instance is an instance which…
Adam Kurkiewicz
  • 1,526
  • 1
  • 15
  • 34
0
votes
1 answer

Mixed Integer Linear Programming in R

I'm looking to solve problems of the form in R: where and is an indicator function that equals 1 if the argument (.) is true and zero otherwise. I've looked into packages lpSolve, Rcplex, and crs but I couldn't quite grasp how I would place my…
obsidian64
  • 23
  • 4
0
votes
0 answers

All-Solution ILP problems with SCIP

I am currently using SCIP for academic research. I met an insufficient memory error when I was trying to get all solutions of an ILP instance. I wonder if there is any setting that can output the solution immediately when the solver finds it instead…
K.Sun
  • 1
0
votes
1 answer

Use of max command inside quicksum - gurobi with python

I am trying to include a python "max" command inside a quicksum command using gurobi with python. There is obviously an error with doing so, under LinExpr limitations as it is not accepted. shutdowncost = quicksum(quicksum(shutdown_cost[i] *…
0
votes
1 answer

Creating a LP Constraint

Below I have summarized how my outputVar should behave with DecisionVar: Entity EntityValue DecisionVar1 OutputVar1 DecisionVar2 OutputVar2 A 5 1 5(base) 1 5(base) B 2 1 5(=prev) …
0
votes
1 answer

Error in using addMIPStart() in CPLEX C++

I faced a problem while using addMIPStart(). At first, for testing purpose, I took a generalized assignment problem (has only one set of binary decision variables x[i][]j) and add a bound using addMIPStart(). It has worked perfectly. But, when I was…
0
votes
1 answer

do this binary numbers have a specific name or property to get them?

i want binary number that only have 0's at the beginning or end, for instance, 1111111 01111110 001111111 000111000 but no: 01001 0011101 do they have an specific name or property to get them? I'm looking for something like linear integer…
kurokirasama
  • 737
  • 8
  • 31
0
votes
1 answer

Algorithm to find subset that is equal to sum with lowest cost

Given one (1xN) list of positive weights (not necessarily integers i.e. floats) and an equaled-length (1xN) list of corresponding costs I want to find the subset of the weight list that sums exactly to a given sum S and has the lowest cost (sum of…