I am using lpsolver inside RStudio to solve a supply chain network optimization problem. The MILP model I am trying to solve is taking a lot of time. I want to know if it is possible to get some feedback from the model when it is solving. Feedback like current objective, current upper bound, etc should be sufficient for me.
Related
I am working in a benders decomposition for a MILP using Gurobi. I usually use LazyCuts to add new constrains to the Master Problem. However, this decomposition gives me the opportunity to solve for each index independently and I try to parallelize the process to give better computational times.
I tried to use multiscenarios approach from Gurobi for my problem, but I havent been able to get it to work properly.
Do you have any suggestion of how to solve in parallel the same problem for different indices?
Thank you in advance for any help.
Ricardo
Fair Attraction Problem
What I've Tried
I tried thinking about the switches as bits of a bit string. Basically, no matter the state, I need to get them all to zero. And since this question is in a chapter about decrease-and-conquer I tried to solve for n=1. But, I can't even come up with a brute force solution to ensure that one switch is off.
If you have any ideas or hints, please help, thank you.
Since the only feedback we get is when we're in the goal state, the problem is to explore all possible states as efficiently as possible. The relevant mathematical object is called a Gray code. Since you're looking for a recursive construction, the algorithm is:
If there are no switches, then there's one state, and we're in it.
Otherwise, pick a switch. Recursively explore all configurations of the other switches. Flip the held-out switch and then recursively explore the others again.
I have been studying and trying to solve 3SAT using brute force and N.D.M but could not do so. can anyone please explain these to me in detail and tell me basic algorithm to solve 3SAT using brute force and N.D.M ? thanks
One Brute Force solution is simply to try all possible inputs. So to try and solve (A|B)&(~A|C)&(~B)&(~C) try 000,001,010,011,100,101,110,111 where xyz is A=x,B=y,C=z.
If by NDM you mean Non-Deterministic Machine as in https://en.wikipedia.org/wiki/Non-deterministic_Turing_machine there are different ways of thinking about this. One is to suppose that you have to pay for computing time, but there is a loophole in the contract, where if you try all possible inputs you only get charged for the longest run of these tries - all the others are free.
I've implemented the algorithms marked as the correct answer in this question: What to use for flow free-like game random level creation?
However, using that method will create boards that may have multiple solutions. I was wondering if there is any simple restrictions or modification that can be made to the algorithm to make sure that there is only one possible solution?
Creating unique Numberlink/Flow Free is very difficult. If you look at my algorithm proposal in the mentioned thread, you'll find an algorithm that lets you create puzzles with the necessary condition that solutions must not have a 2x2 square of the same color. The discussion at http://forum.ukpuzzles.org/viewtopic.php?f=3&t=41, however, shows that this is insufficient, since there are also many non-trivial non-unique puzzles.
From my looking into this problem, it seems the only way to solve this problem is to have a separate algorithm for testing uniqueness, and discarding bad instances. One solver that's made precisely for uniqueness testing algorithm is Imo's solver.
Another option is to use multiple different solvers and check that they come up with the same solution.
I think you should implement the solver, which finds all the solutions for some level. The simplest way is backtracking.
When you have many levels, take one by one and look for solutions. As soon as you find the second solution for some level, throw that level away.
I have a problem that I have no idea what it is or how to solve it. I know there is a name for the problem (after it is known, the title could be changed to reflect it).
Its somewhat of getting a perfect fit for a particular list based on a passed formula. For eg.
I have 2 lists of objects. One list of rooms and one list of exams. For each exam, I loop through all available rooms, execute a formula (which returns a value from 0-1), 1 meaning its a good fit, and assign the highest one to the exam. I continue the loop over and over to find the best fit (which may lead to infinite loop).
I am trying to avoid using a genetic algorithm to solve this. Anyone got any idea what the name of the problem is and also a possible solution?
ps. Can an admin rename the title if I do not get the chance to?
This is the Assignment problem. Wikipedia will tell you more about how to solve it.