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 ➑

πŸ‘︎ 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)

πŸ‘︎ 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
πŸ’¬︎
πŸ“…︎ 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.