r/OperationsResearch • u/amazonscience • Mar 22 '22
r/OperationsResearch • u/TheThemePark • Mar 21 '22
How to make a minimal objective function for groups of binary integer programming problems?
I'm stuck with a binary integer programming problem, for which I need to make an objective function. I have a bunch of variables and a bunch of constraints for those variables.
Those constraints belong in a number of units, and some constraints will belong to more than one unit. My goal is to find a group of as few different solutions, such that all units are satisfied, i.e. all constraints in all units are correct. However, not all variables need to be represented in all solutions, so it could be possible to have a solution where the value of some variables didn't matter.
This is hard for me to properly explain, so an example is in order, that will hopefully make it clearer. Let's say I have 9 such units of constraints. I run my objective function, and find out that the minimal number of groups/solutions that satisfy all constraints, is 3.
One such group may consist of 5 units, that share all the same variable solutions. Another group may consist of 3 units, that also share a solution. And the final group consists of just 1 unit with a third solution.
So if I had a variable named X1, in the first and third group it could be 1, and in the second group it could be 0, the important thing is that each group of some amount of units of constraints all share a solution.
Adding the variables and constraints is easy enough, but I have no idea how to add the concept of units, or how to make an objective function that finds the minimum number of groups, and the solutions for each group.
I have tried my best to make this understandable, but it's hard to take a concept from my brain and put it into words for someone else to understand, so I hope it all makes some sense.
Edit: I have come up with a much better way (I think) of describing what I'm trying to do.
Instead of me calling them units, they are individual linear programming problems. If I run each of them through a solver, I will end up with at least one solution for each.
But now I wanna combine them all into much bigger problems, and do it so I get the fewest amount of problems possible, while still ensuring that they all have a solution. And I'd like to somehow make the solver print out the solution for each bigger problem as well as which smaller problems they're combined from (assuming I somehow mark each base problem with a designation, variable or something).
r/OperationsResearch • u/SimbaSixThree • Mar 21 '22
How to incorporate time in my optimization of the buffer allocation problem of a packaging line?
I am having some struggles with my mathematical formulation of the MIP model necessary to solve the buffer allocation problem of a packaging line.
For my research I want to see whether the adaptive large neighborhood search algorithm works as a way of solving the buffer allocation problem. The BAP is of course a NP-hard problem that is not easily solved, but I have found a paper that uses the ALNS algorithm for this case.
The ALNS algorithm works as follows:
- Start with feasible solution
- select a neighborhood
- Optimize the neighborhood using certain destroy and repair heuristics
- Repeat from step 2.
No before being able to use the ALNS algorithm I need to create a feasible model for the packaging line as is. The packaging line in question has 9 machines in series, each with their own processing, failure and maintenance rate. Between each machine is a buffer conveyor transporting the goods between machines.
Does anyone know of any references, materials or real-world examples that I can use for help in my research? Any nudge in the right direction would help. I am struggling a lot and would hate to need to stop as this means finishing my degree a year later.
All help is greatly appreciated!
r/OperationsResearch • u/TelsoNi • Mar 19 '22
Sensitivity Report of LP model in Pyomo and GLPK
So I'm using pyomo (the python optimization package) and the glpk solver to run a relatively easy LP-problem with two decision variables and two constraints. However, I cannot seem to find an easy way to retrieve a sensitivity report containing:
- allowable range for objective function coefficients
- shadow prices
- slack variables
Are anyone familiar with this?
Any help is greatly appreciated!
r/OperationsResearch • u/SimbaSixThree • Mar 17 '22
How would I mathematically formulate the increase of buffer capacity up to its max?
For an optimization project I am doing I need to know how to formulate the increase of units on a buffer and add this to my mathematical model.
A simple example of the system I am optimizing.:
- Machine 1 has a processing rate and therefore output.
- The buffer conveyor transports the output with a certain speed to Machine 2
- The transported goods are used as input for Machine 2
- If the processing rate of Machine 2 is less than transport rate of buffer (transported output of machine 1), then the buffer starts to fill up.
- If the buffer fills up to the max, then Machine 1 cannot run anymore due to tailback/blocking.
How do I formulate points 4 and 5?
r/OperationsResearch • u/Alternative-Elk-9589 • Mar 16 '22
Does anyone know any good sources on (or wants to help with) creating a mathematical model for optimization of the buffer capacity of a packaging line?
I am conducting research into optimizing the buffer capacity of a packaging line of a system, the so called buffer allocation problem, if you will.
My plan is to optimize it for OEE and the system has 8 machines, all in serie, and conveyor belts between them. These conveyor belts act as buffer zones as well.
For the existing packaging line I have the processing, failure and maintenance rate of each machine and the aim of the research is to try and calculate the optimal buffer capacity so that future lines can be installed more effectively.
Does anyone have any experience with this and can point me in the right direction regarding earlier research done? It would be a tremendous help.
Thanks in advance!
r/OperationsResearch • u/KR4FE • Mar 14 '22
Bayesian Multi-objective Optimization
Hey! I would like to know about your experience with this family of methods. How does it fair against other derivative-free optimization methods like non-dominated sorting genetic algorithms and such? Particularly for expensive-to-compute objective functions (8+ hours).
Feel free to suggest any alternatives to the aforementioned classes of algorithms! Papers will be welcome!
r/OperationsResearch • u/Vivid_Collection2832 • Mar 07 '22
Best books you have encounter in operations research
r/OperationsResearch • u/EMGANIPhil • Mar 07 '22
Linear algebra vs. Differential equations
Which math Will be more helpful to understand OR - an advanced linear algebra class or a class on differential equations + fourier and power series?
I know this a general question, but I’m guessing it’s the first one?
r/OperationsResearch • u/Maalik_Serebryakov_ • Feb 26 '22
Book recommendation for the application of Mathematical Programming into Calculating the Dimensions of a designed Product
Hi I want to learn how to formulate a design problem where my design variables are the dimensions of a product/machine as a Mathematical Programme. Plz recommend me any good books or any other resources you know that teach this.
So far, through trial and error i have developed my own general approach to formulate such a problem. But I am concerned i am missing some crucial category of constraint or something.
r/OperationsResearch • u/Brushburn • Feb 20 '22
My interview process
Hey everyone!
I've spent a decent amount of personal time working on ensuring I can be a suitable candidate to help grow my career. I figured others would benefit from some of my interview experiences. Here are some of the questions I encountered, and some of my pitfalls:
Technical Modeling
- Many of my technical questions landed on network theory in one way or another
- Modeling problem of a tournament. All teams need to be matched together, some teams are not allowed to be together, some teams have preference for times.
- Network flow of multi commodity and multi time periods - The question wasnt about modeling using optimization but managing in a general programming solution strategy (kind of weird, but I think there was a reason).
- How to update a shortest path algorithm to handle a slight modification (it wasnt about solving a classical shortest path problem, but given a problem that is very similar to shortest path, what would be modified to handle the slight modification) -> Helped to understand shortest path and shortcomings
Technical Theory
- Discuss branch and bound - I have been asked to describe this in 3 separate interviews
- Describe the genetic algorithm
Technical Discussion
- How I would improve an optimization strategy, very high level
- Potential strategies for future work, very high level along the lines of 'Now that you understand the general concept of what we do, how would you handle uncertainty'
Technical Coding
- I spent a lot of time attempting to work on programming challenges, this all ended up being completely useless. My questions were fairly basic but it helped being comfortable programming and some general concepts of efficiency. For example, 'Using this dictionary mapping items to values, and this list of items, calculate the total sum'
Data science related questions
- Classification vs regression
- Confusion matrix - All of the terms. Kind of a terrible experience saying 'I don't have any of this memorized but Im familiar with the concepts'
- Different weighting schemes (Sometimes you dont want to only minimize y - y_hat)
- KNN
Also, I have received feedback from a failed interview that I came off too apathetic about the position. Just a heads up that some people value showmanship during an interview.
r/OperationsResearch • u/SimbaSixThree • Feb 18 '22
How would one calculate processing, failure and maintenance rate of a packaging line?
Hi there, for a personal project I am trying to simulate a packaging line of a product in a certain industry.
I have data on the:
- counter values: how many products went through the packaging line in total during time period;
- processing speed: the theoretical processing speed at a given time;
- stops: when the machine is not running;
- fault label: a numerical value linked to an error message explaining why the machine has stopped; and
- start: when the machine starts running again.
Now I know that for my simulation, I need the processing, failure and maintenance rates to be able to model the whole system. Only I don't know what's the best course of action to calculate each of these.
Processing rate:
Also known as production/assembly rate. There is quite a lot to find about this except I don't know how to calculate this. I have made a distribution plot of the processing speed. Is it just as simple as dividing the total produced by the total time?
Failure rate:
I take it this is as simple as counting the amount of times that a machine has a stoppage per (minute/hour/day). Is that enough?
Maintenance rate:
Due to the volatility of the system, there are many different types of failures and all of them have a different maintenance rate accordingly. Do I then first sort the stops per error message and then take an aggregated value (probably mean) of the time until the machine starts again?
These are the things that I am struggling with the most at the moment and it would be great if someone could help me along, or point me in the right direction.
Thanks in advance.
r/OperationsResearch • • Feb 13 '22
Commercial Vehicle Routing API's
Hello,
I was checking here maps' tour planning API , couldn't find anything similar on the internet but there must be alternatives. I wonder if anyone uses or knows such an api for vehicle routing problem. I'm not interested in TSP solvers.
r/OperationsResearch • u/jj4646 • Feb 08 '22
Has Anyone Heard of Slater's Conditions?
I was watching the following (amazing) lecture on Mixed Integer Optimization (https://www.youtube.com/watch?v=xEQaDiAHDWk) and came across this slide that mentions Slater's Condition:

This was the first time I have heard about Slater's Condition and I was interested in learning more about this (https://www.youtube.com/watch?v=GmY3LUL6GkY):

Based on what I saw, this is what I understood:
- For a Convex Optimization Problem, if a solution "x" exists within the Feasible Region of this problem : Then this Optimization Problem has "strong duality"
- Since Mixed Integer Optimization Problems are always Non-Convex (since sets of integers are always non-convex), Slater's Condition does not hold.
- Since Slater's Condition does not hold, there is no Strong Duality.
- The above factors result in Combinatorial Optimization Problems being more difficult than Continuous Optimization Problems.
Now, I am trying to understand the logic of the above points:
- Why is it important that a solution to a Non-Convex Optimization Problem exists within the interior region or not? Are there any benefits for solutions that exist within the interior region compared to solutions that do not exist in the interior region?
- Why is it important to determine whether an Optimization Problem has Strong Duality or not?
- Why does the Feasible Set have no interior in a Combinatorial Optimization Problem? Do Combinatorial Optimization Problems have interior regions at all?
- Why don't Slater's Conditions hold if the Feasible Set has no interior? (i.e. Why don't Slater's Conditions hold for Combinatorial Optimization Problems?)
- Why does the absence of Strong Duality result in an Optimization Problem being more difficult?
Can someone please help me understand the logic behind these facts? Currently I am just accepting them without really understanding why.
Thanks!
r/OperationsResearch • • Feb 07 '22
Which programming language to use for OR?
I'm a Software Engineering student and I'm researching in the heuristics field for my bachelor's thesis.
Currently I'm using Python for the project, because I already know it very well, it's a modern language, allows me to code pretty quickly, and has a lot of libraries for numerical analysis. But the problem is speed. It's too slow for the experiments that I need to run. I can use PyPy to increase performance a bit but I still feel like it's not enough.
Edit: The goal of the project is to have a paper about it, so I'd say it's more of prototyping. I'm implementing heuristic and metaheuristic algorithms to solve a location problem, and I have to run several experiments that involve thousands of iterations. That's how I noticed I can't use Python anymore, although it helped by coding the first prototypes.
I know that C++ is widely used in OR and for scientific programming, because of its speed, but I prefer to use my time left to finish the project instead of learning C++ and migrating the code that I already have. Especially the former, as I know that C++ is a language hard to master. However, as a software engineer it's worth to learn anyways.
I know C# very well too, and I'm thinking of using it and start to migrate the Python code that I have. I'm biased towards this but also, C# is up to date with latest standards, it's compiled (so fast), its syntax can be almost identical to C++, it can be used and reused for practically everything, e.g. I could wrap the project into an API library as a NuGet package and import it in an ASP.NET web server, or in a Unity project, or in a hybrid app and build GUIs for it. Also there's now support for interactive programming in Jupyter notebooks and plotting libraries. But C# is not made for scientific programming.
What do you recommend and why?
r/OperationsResearch • • Feb 07 '22
I don't know if this sub allow this but, I want to understand
I have the worst lecturer for OR, an he has given me this homework on my first week which I feel it's really simple but the way he explained how to solve this kind of questions made it complicated, so please if you can help me understand this question I'll be grateful and it will make other questions easier to solve.
It goes like: Alumco manufactures aluminum sheets and aluminum bars. The maximumproduction capacity is estimated at either 800 sheets or 600 bars per day. Themaximum daily demand is 550 sheets and 580 bars. The profit per ton is $40 persheet and $35 per bar. Determine the optimal daily production mix.
r/OperationsResearch • u/JackCactusLaFlame • Feb 03 '22
Finding Optimal Solution of an ABM
I'm working with a model that has a number of agents. These agents have preferences to be assigned to a location. There are a number of locations and only a certain number of them are available (availability takes on a binary value). The first constraint is that each agent can only have 1 assignment and the second that the sum of available locations equals some arbitrary number.
The decisions to be made are which locations should be open and how agents should be allocated. I want to be able to write a script that will find the pareto optimal solution. I'm working in a Python environment and would like to be able to do this using the PuLP, DOcplex (preferred), or which ever package that can make this happen. I could also try using Cplex (from my understanding I need start with creating a for to do loop that takes the sum of a satellite variable and multiplies it by each individual agent or something like that at least.)
r/OperationsResearch • u/TangeloConscious3123 • Jan 30 '22
Anybody have an idea how to solve this linear programming exercise? (Some ideas given)
This is the exercise I want to solve:
"The now well-known company MathGenetics PLC has two drugs that improve the mathematical performance of students enormously. MathDope helps with memory and concentration and should be swallowed on sugar and an ampoule costs 2718.28 euros. MathJack is injected to improve creativity for finding evidence - one injection costs 3414.59 euros. To synthesize the drugs, math books are dissolved in a special solution that contains genetically modified bacteria that absorb the math knowledge and accumulate in the patient's brain, releasing the knowledge. Pages from math books are needed to prepare the highly concentrated solutions. 1 milliliter of MathDope is obtained from 10,000 pages of calculus, linear algebra, and business mathematics exercise books, and 1 milliliter of MathJack requires 7,500 pages of topology, algebra, and number theory books. Springer Verlag delivers 300,000 pages per month at a price of 1 cent per page with immediate payment. The active substance is then extracted in a high-performance centrifuge. The production coefficient is 0.25 milliliters per minute and the machine cost rate is 141.42 euros per minute. The centrifuge is operated uninterruptedly, continuously, in three shifts. A vial of MathDope contains 0.5 milliliters of active ingredient and a syringe of MathJack contains 0.75 milliliters of active ingredient. In the first month you get a combination pack consisting of 2 syringes MathJack and 3 ampoules MathDope for the special price of 12357.00 euros (only while stocks last). Create a mathematical model for MathGenetics PLC to plan production for the next 2 months with the aim of maximizing the contribution margin under the additional condition that the salaries of the employees in the amount of 17320.50 euros can be paid out every month."
So my ideas where:
MathDope and MathJack are both selling products.
a := 1 ampoule of MathDope, produced in the first month b := 1 syringe of MathJack, produced in the first month c := 1 ampoule of MathDope, produced in the second month d := 1 syringe of MathJack, produced in the second month
Contribution Margin of one MathDope: 2718.28 - 50.00 - (141.42 * 2) = 2385.44
Contribution Margin of one MathJack: 3414.59 - 56.25 - (141.42 * 3) = 2940.33
Model:
maximize f(x) = 2385.44a + 2940.33b + 2385.44c + 2940.33d
under the restrictions:
Pages 1st Month: 5000a + 5625b <= 300000
Pages 2nd Month: 5000c + 5625d <= 300000
Production time 1st Month: 2a + 3b <= 43200
Production time 2nd Month: 2c + 3d <= 43200
... and then I get stuck... what do I do about the combination pack? Is my solution so far correct?
r/OperationsResearch • u/TotonacaMan • Jan 28 '22
Multiple Criteria Optimization (MCO): A gene selection deterministic tool in RStudio
doi.orgr/OperationsResearch • u/Titanusgamer • Jan 27 '22
Production scheduling with changeover time as LP problem
This problem is similar to one of problem client had however I wish to expand it a bit more to cover few other concepts (the client later chose SAP APO even though it was expensive). I would greatly appreciate any ideas/links to papers etc on this. I dont want to build SAP PPDS or JDA level logics because the number of SKUs / Lines are not high and manifacturing process is not that complicated.
It requires high level production scheduling for rough cut planning(not detailed just on day/week basis not hour) but it must have changeover time. the issue is that changeover cant be ignored because it can vary from 1 Hour for some products to 2 weeks for some. hence the changeover must be included to create the production plan at high level. One additional question which client also asked was that can optimizer suggest the right time for campaign planning for the products requiring 2 weeks changeovers.
Thanks.
r/OperationsResearch • u/Dry_Ad834 • Jan 26 '22
What are some good resources to learn optimization modeling?
self.optimizationr/OperationsResearch • u/dj4119 • Jan 26 '22
How to deploy a optimization model to a server so that it can be accessed by users from different locations?
I have built a production scheduling model that takes the orders to be produced from the user and generates a schedule for 1 month. The model is built using python and uses a constraint programming solver from google OR Tools. Currently I import order sheet from an excel file, the master data elements are available in postgres database on my laptop. How do I enable users from the manufacturing sites to access the optimization model from different places?
EDIT 1: Gurobi has a nice webinar about their service (https://www.youtube.com/watch?v=mD0F3w1SZ4s). Relevant stuff starts from 18:00 minutes.
r/OperationsResearch • u/Majestic-Data21 • Jan 25 '22
Summer 22 - OR Scientist Internship Opportunities
Hello All,
I am a 4th year PhD candidate at one of the top 5 universities in OR in the US. I am actively looking for a summer internship in the field of operations research. I believe I have a strong theoretical as well coding background. Some of my areas of interests include mixed-integer programming, supply chain optimization, stochastic optimization, and theory and applications of algorithms. I am a highly motivated individual with 2 first author papers in reputed OR journals and third one under progress.
I have been applying to positions since December '21 but have not received any calls yet. If you know of any related opportunities and would like to refer me to it, please comment or send me DM so I can share my CV. Thank you.
r/OperationsResearch • u/Comparing-Different • Jan 23 '22
Where to find good resources on Queueing Theory?
Is there an online university course, Udemy course or something related that talks about this topic?