Conceptual question about Integer Linear Programming and Branch and Bound

how can a problem modeled by integer linear programming generate a bounding function to be used in branch and bound? What can be said about the quality of this bounding function?

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/deidaraishi
๐Ÿ“…๏ธŽ Dec 08 2021
๐Ÿšจ๏ธŽ report
[Linear Algebra] I have just previously learned about this topic and am extremely confused. What are some of the steps to write an integer program and graph? tyy :)
๐Ÿ‘๏ธŽ 3
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/marinaxmarina
๐Ÿ“…๏ธŽ Jul 06 2020
๐Ÿšจ๏ธŽ report
Integer Linear Programming Constraints

Hi all,

I'm struggling with the idea of formulating constraints for ILP models.

As an example, the current question I've been working on involves 3 machines: Machine 1, Machine 2, and Machine 3. As a part of formulating the algebraic model, I introduced dummy binary variables X1, X2 and X3, all =1 when the machine is being used.

I've been asked to add a constraint to ensure that if machine 1 is not used, then both machines 2 and 3 are used. I've asked my tutor, and they've just instructed me to build truth tables, which I have done, however, so far I haven't found a suitable constraint that will work.

Am I missing something here? Should I be introducing another dummy variable somewhere along the line?

Any advice in the right direction would be appreciated, cheers.

๐Ÿ‘๏ธŽ 6
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/monkeypumps
๐Ÿ“…๏ธŽ Jun 13 2021
๐Ÿšจ๏ธŽ report
Geometric representation of linear and integer programming problems /r/optimization/comments/โ€ฆ
๐Ÿ‘๏ธŽ 17
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/dj4119
๐Ÿ“…๏ธŽ Dec 27 2020
๐Ÿšจ๏ธŽ report
Integer/Linear Programming Formulation Question

I have M amount of money to spend on 3 types of items with cost $3, $5, $7, respectively.

I want to maximize the amount of money spent.

I cannot buy all 3 types of items (must not buy at least one type of item).

How can I write an integer/linear program constraint for "cannot buy all 3 types of items"?

I tried using binary decision variables but I don't know how to relate 0/1 (buy/don't buy) with x_1 (how many of item 1 am I buying).

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/og_darcy
๐Ÿ“…๏ธŽ Jan 20 2021
๐Ÿšจ๏ธŽ report
[Linear/Integer/Mixed Programming] Given an equation or inequality, how can you determine if it leads to a cutting plane of the optimal solution of a linear program relaxation of an integer program (I)? More specifically, how do you prove it satisfies all feasible solutions of (I)?

There is no specific question, I just needed a general strategy/answer for this question.

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/derpasaur9000
๐Ÿ“…๏ธŽ Nov 25 2016
๐Ÿšจ๏ธŽ report
Integer Linear Programming question

Im going through the book `Introductions to algorithms T.Corman`. So far i undersood mostly everything i guess. But i still cant solve this problem for example:

We want to help some birds getting something to eat. Given " N " different bird kinds we have to feed. We can choose between " K " different bird feed / flavours. But not every bird eats every birdfeed. That means some birds just eat specific bird feed. But some eat almost everything. The price of the "i'th" pack bird feed is called " k'i ". The maximum number of packs we have in store is called " n'i ". We say that every bird just needs exactly 1 pack of feed. We now want to make sure that we will spend as little money as possible and that every bird kind " N " gets the fitting feed since we said not every bird eats every feed. How many packs of which bird feed / flavour do we need to buy ? How can we show this problem as ILP ?

I probably made a lot of grammar and spelling mistakes but i hope it's still clear enough. If something is unclear please tell me :). So i think our objective function is to minimize the costs. the constrains should look something like this right ? : k'i * K <= n'i. I'm kinda lost so it would be nice if someone can explain me on how to do it.

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/Ozay0900
๐Ÿ“…๏ธŽ Jul 10 2020
๐Ÿšจ๏ธŽ report
[University Operations Research: Integer Linear Programming] Problem Formulation

Hello guys, I'm a computer science student and I need some help doing the formulation phase of a problem using integer programming. I'm in trouble with that so please help me.The problem that I'm trying to model is an Hackerrank problem that I've just solved. This is the link https://www.hackerrank.com/challenges/board-cutting/problem.The target is to model it as a classic Operations Research integer linear programmig specifying the "function objective" and the "subject to".Thank you.

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/peppe0db
๐Ÿ“…๏ธŽ Jun 10 2020
๐Ÿšจ๏ธŽ report
[Integer Linear Programming] TSP as a binary program

Suppose a trucking company delivers goods to 5 customers, with the trucking company delivering goods through 6 routes, each route going through some (not all) customers.

For example, route 1 may serve customers 1,2,3, and 4, but not necessarily in that order.

Given an adjacency matrix, how do I formulate the integer linear program which would minimize the distance travelled by the trucks to make deliveries to all five customers?

Here's how far I've gone:

My objective function would be the sum of the coefficients of the matrix multiplied by a variable xij (1 if truck travels from i to j, 0 otherwise). From my understanding the problem could be separated into six different travelling salesman problems, where for each one I just remove the customers not on each route.

I tried solving the problem with QM, but only with the first route. I formulated my constraints the same way one formulates a TSP constraint (e.g. equations 2.3 and 2.4, page 5, in http://arxiv.org/vc/cs/papers/0609/0609005v5.pdf) but when the solver said there was no feasible solution.

๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/foezz
๐Ÿ“…๏ธŽ Nov 27 2014
๐Ÿšจ๏ธŽ report
[linear algebra/elementary number theory] A proof involving invariant factors/Smith normal form for integer matrices

I had the following question on the final exam for my first-semester abstract algebra class:

> Suppose x and y are n-by-n matrices with integer entries, and suppose xy = cI, where I is the n-by-n identity matrix and c is an integer. If the invariant factors of x are h_1,...,h_n, prove that the invariant factors of y are c/h_n, c/h_{n-1}, ..., c/h_1. (Do not worry about working over an arbitrary PIDโ€”just focus on Z.)

I provided the following argument, which I thought was only a partial solution:

Let g_1,..., g_n be the invariant factors of y. Note that xy=cI implies x = cy^-1, so cy^-1 is an integer matrix. Furthermore, from basic linear algebra we know that y^-1 = 1/det(y) C^T, where C is the cofactor matrix of y, so x = c/det(y) C^T. The invariant factors of the left- and right-hand sides must be the same; in particular, the first invariant factors are equal. The first invariant factor h_1 of x is the gcd of the entries of x, and the first invariant factor of c/det(y) C^T is equal to c/det(y) times the gcd of the entries of C^T. But the entries of C^T are precisely the determinants of the (n-1)-by-(n-1) submatrices of y, so the gcd of the entries of C^T is the (n-1)th determinental divisor of y. In terms of the invariant factors of y, this determinental divisor is equal to the product g_1 g_2 ... g_{n-1}. Thus

h_1 = (c/det(y)) g_1 g_2 ... g_{n-1}

h_1 = (c/(g_1 g_2 ... g_n)) g_1 g_2 ... g_{n-1} (because det(y) is the product of the invariant factors of y)

h_1 = c/g_n.

Similar reasoning also shows that g_1 = c/h_n (just move x over instead of y).

Up until here I know my reasoning is fine. But here I make what I thought was the dubious (read: incorrect) claim that the desired result now follows immediately from the divisibility properties of the invariant factors (h_1 divides h_2 divides ... divides h_n, and likewise for the g_i) and the fact that det(x)det(y) = c^n, i.e. h_1 h_2 ... h_n g_1 g_2 ... g_n = c^n.

My instructor gave me full credit for the problem, so I assume this claim must actually be correct. But I am having trouble seeing why. How do these divisibility properties and the last equation, combined with the two relations h_1 = c/g_n and g_1 = c/h_n, actually imply the desired result for the rest of the invariant factors? For instance how can we deduce from here that h_2 = c/g_{n-1} using just basic number theory/divisibility (as I claimed should be possible)? Am I missing some really eas

... keep reading on reddit โžก

show more
๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/apad201
๐Ÿ“…๏ธŽ Dec 13 2021
๐Ÿšจ๏ธŽ report
Using intlinprog (mixed integer linear programming solver) -- trying to figure out how to make nonlinear constraint linear

Let's say I have 30 design variables, x1 through x10, y1 through y10, and z1-z10.

Let's say my x vector is all zeros except for 3 of the values, which are 1. So something like [0 0 1 0 1 0 0 0 1 0].

Then vector y can either be 1) identical to the x vector, or 2) identical with the exception of 2 values, where one of the 0's became a 1, and a 1 became a 0. Both options 1 and 2 are allowed.

Then vector z has the option of being 1) identical to vector y, 2) different from vector y by 2 values (same as before, 0 --> 1 and 1 --> 0) or 3) different from vector by 4 values, where two 0's became two 1's and two 1's became two 0's. Option 3 is only allowed if option 1 was chosen for vector y.

So basically, my design variables are those 3 sets of 10 variables which can each be either 0 or 1, and the constraint that I want to impose is allowing the vector y variables to only differ from vector x variables by up to 2 values, and allowing vector z to differ from vector y by up to either 2 or 4 values, as I explained previously.

Is it possible to create a viable constraint that I desire, within the intlinprog function?

๐Ÿ‘๏ธŽ 6
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/neymarflick93
๐Ÿ“…๏ธŽ Dec 11 2019
๐Ÿšจ๏ธŽ report
How would you code a program to determine if an integer is a prime number? - wrong answers only.
๐Ÿ‘๏ธŽ 19
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/Anttte
๐Ÿ“…๏ธŽ Jan 24 2022
๐Ÿšจ๏ธŽ report
Mixed Integer Linear Programming Question: Will this constraint work given its counterpart?

I have a set of conditional bounds. Suppose X is a sum of some relevant variables and Y is a binary variable. Values are nonnegative.

If Y=0, then X=0.

If Y=1, then 4<=X<=7.

The upper bound is simple enough: X<=7Y. I'm struggling to find a way to write the lower bound. What I figured was X>=4Y was "okay" not because it satisfies the conditions BUT because when coupled with the other condition it will produce the desired result. I can't simultaneously have Y=0 in one condition and Y=1 in the other.

Is this acceptable? How else can I go about this?

๐Ÿ‘๏ธŽ 3
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/mahblastedcar
๐Ÿ“…๏ธŽ Jun 09 2019
๐Ÿšจ๏ธŽ report
Linear and integer programming

Hi redditors, I need help with creating the LP or IP if needed for this case.

Supermarket A open from 10:00-21:00. Salary of staff is $20/hour, but from 18:00 onward it's $25/hour. During normal time they need 10 staff, but during peak hour from 16:00-19:00 they would need 15 staff. One staff can work from 5-9 hours/day, with limitation of maximum 38 hours and 5 working days/week. The objective is to minimize labor cost by minimizing the number of staff needed.

I know it's not exactly math, but I don't know where else to put this question. If anyone have any suggestion on where to post this on a better subreddit please let me know.

Thanks a lot for your help!

๐Ÿ‘๏ธŽ 3
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/crimsoniris
๐Ÿ“…๏ธŽ May 07 2018
๐Ÿšจ๏ธŽ report
Help with Integer Linear Programming homework!

This is the link to the problem and what I've done

https://imgur.com/a/voOVRpb

I don't know if what I am on the right track! Please guide me! Thanks!

Objective function:

Maximise total time spent for projects

30X11 + 16X21 +24X31 +20X41 + 10X51 + 40X91 + 40X12 + 24X22 +24X72 + 28X82 + 34X92 + 50X102 + 30X33 + 24X43 + 16X53 + 14X63 + 26X73 + 30X83 + 30X93 + 36X103

Define the decision variables:

Let Xij = 1 when book i is introduced to agent j

= 0 otherwise,

i = 1,2,3โ€ฆโ€ฆ10 and j = 1,2,3

Define constraints:

ยท At least 2 Agent per project:

  1. X11 - X12 = 0 (corequisite)(Business Calculus)
  2. X21 - X22 = 0 (corequisite)(Finite mathematics)
  3. X31 - X33 = 0 (corequisite)(General Stats)
  4. X41 - X43 = 0 (corequisite)(Mathematical Stats)
  5. X51 - X53 = 0 (corequisite)(Business Stats)
  6. X63 = 1 (Finance)
  7. X72 - X73 = 0 (corequisite)(Finance Accounting)
  8. X82 - X83 = 0 (corequisite)(Managerial Accounting)
  9. X91 + X92 + X93 => 2 (English Literature)
  10. X102 - X103 = 0 (corequisite)(German)

ยท Agent project load(Can take multiple projects or even no project):

  1. X11 + X21 + X31 + X41 + X51 + X91 => 0 (Johnโ€™s project)
  2. X12 + X22 + X72 + X82 + X92 + X102 => 0 (Susanโ€™s project)
  3. X33 + X43 + X53 + X63 + X73 + X83 + X93 + X103 => 0 (Monicaโ€™s project)

ยท Time Constraints:

  1. 30X11 + 16X21 +24X31 +20X41 + 10X51 + 40X91 <= 60 (Johnโ€™s Time)
  2. 40X12 + 24X22 +24X72 + 28X82 + 34X92 + 50X102 <= 40 (Susanโ€™s Time)
  3. 30X33 + 24X43 + 16X53 + 14X63 + 26X73 + 30X83 + 30X93 + 36X103 <= 40 (Monicaโ€™s Time)

ยท Product Constraints:

  1. No more than 2 Statistics books. If a project is assigned, 2 agents will work on the project. Since Xij is binary and given the condition that no more than 2 statistic books should be released, the max amount of assignment is 2+2.

(X31 + X33 ) + (X41+ X43)+ (X51 + X53) <= 4 (No more than 2 stats books)

  1. No more than 1 accounting book. If a project is assigned, similarly 2 agents will work on the project. Given the condition that no more than 1 accounting book should be released, the max amount of assignment is 2.

(X72 + X73) + (X82 + X83) <=2 (No more than 1 accounting book)

  1. At least 1 but not both mathematics book means that only 1 out of 2 projects will be chosen. 2 agents will work on the project.

(X11 + X12) + (X21 + X22) = 2 (At least 1 but not both mathematics book)

show more
๐Ÿ‘๏ธŽ 3
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/KennyNg39
๐Ÿ“…๏ธŽ Oct 22 2018
๐Ÿšจ๏ธŽ report
integer linear programming is hard
๐Ÿ‘๏ธŽ 5
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/nielsrolf
๐Ÿ“…๏ธŽ Feb 15 2019
๐Ÿšจ๏ธŽ report
Shae Erisson: SMT Solvers, Integer Linear Programming shapr.github.io/posts/201โ€ฆ
๐Ÿ‘๏ธŽ 2
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/CentennialSnowflake
๐Ÿ“…๏ธŽ Jul 10 2019
๐Ÿšจ๏ธŽ report
A simple example of what Integer Linear Programming can do stackoverflow.com/questioโ€ฆ
๐Ÿ‘๏ธŽ 42
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/joelthelion
๐Ÿ“…๏ธŽ Jun 10 2013
๐Ÿšจ๏ธŽ report
Parallelism for Linear and Mixed Integer Programming, and why it's not super helpful youtu.be/PhEhQhGDCvs
๐Ÿ‘๏ธŽ 8
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/ORcoder
๐Ÿ“…๏ธŽ Oct 13 2017
๐Ÿšจ๏ธŽ report
linear/integer programming help

I need to come up with a creative problem statement that involves linear/integer programming.

Ideas will be greatly appreciated. Thanks in advance.

๐Ÿ‘๏ธŽ 3
๐Ÿ’ฌ๏ธŽ
๐Ÿ‘ค๏ธŽ u/mikeemice
๐Ÿ“…๏ธŽ Feb 28 2018
๐Ÿšจ๏ธŽ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.