integer-programming

Minimum exact cover of grid with squares; extra cuts

妖精的绣舞 提交于 2019-11-29 10:50:09
问题 This problem appeared in a challenge, but since it is now closed it should be OK to ask about it. The problem (not this question itself, this is just background information) can be visually described like this, borrowing their own image: I chose to solve it optimally. That's probably (for the decision variant) an NP-complete problem (it's certainly in NP, and it smells like an exact cover, though I haven't proven that a general exact cover problem can be reduced to it), but that's fine, it

How to convert quadratic to linear program?

陌路散爱 提交于 2019-11-28 23:44:31
I have an optimization problem that has in the objective function 2 multiplied variables, making the model quadratic. I am currently using zimpl, to parse the model, and glpk to solve it. As they don't support quadratic programming, I would need to convert this to an MILP. . The first variable is real, in range [0, 1], the second one is real, from range 0 to inf. This one could without a problem be integer. The critical part in the objective function looks like this: max ... + var1 * var2 + ... I had similar problems in the constraints, but they were easily solvable. How could I solve this

Solving an integer linear program: why are solvers claiming a solvable instance is infeasible?

半城伤御伤魂 提交于 2019-11-27 09:15:58
I'm trying to solve integer programming problems. I've tried both use SCIP and LPSolve For example, given the final values of A and B, I want to solve for valA in the following C# code: Int32 a = 0, b = 0; a = a*-6 + b + 0x74FA - valA; b = b/3 + a + 0x81BE - valA; a = a*-6 + b + 0x74FA - valA; b = b/3 + a + 0x81BE - valA; // a == -86561, b == -32299 Which I implemented as this integer program in lp format (the truncating division causes a few complications): min: ; +valA >= 0; +valA < 92; remAA_sign >= 0; remAA_sign <= 1; remAA <= 2; remAA >= -2; remAA +2 remAA_sign >= 0; remAA +2 remAA_sign <

How to implement a constraint solver for 2-D geometry?

我的梦境 提交于 2019-11-26 21:05:38
I have a set of metallic sliding pieces which are constrained to the x and y axis in following way: I would need to maximize the horizontal distance among all pieces constrained by the same slider and the vertical distance among the sliding pieces and the sliders itself. How can this be solved? Any advice and suggestion which can lead to a solution for this problem would be greatly appreciated. I looked first at some very powerful libraries like cassowary and jsLPSolver but i had some trouble to understand the core algorithm and how the constraint are checked for feasibility and how the

Solving an integer linear program: why are solvers claiming a solvable instance is infeasible?

陌路散爱 提交于 2019-11-26 17:49:31
问题 I'm trying to solve integer programming problems. I've tried both use SCIP and LPSolve For example, given the final values of A and B, I want to solve for valA in the following C# code: Int32 a = 0, b = 0; a = a*-6 + b + 0x74FA - valA; b = b/3 + a + 0x81BE - valA; a = a*-6 + b + 0x74FA - valA; b = b/3 + a + 0x81BE - valA; // a == -86561, b == -32299 Which I implemented as this integer program in lp format (the truncating division causes a few complications): min: ; +valA >= 0; +valA < 92;

How to implement a constraint solver for 2-D geometry?

浪尽此生 提交于 2019-11-26 07:48:42
问题 I have a set of metallic sliding pieces which are constrained to the x and y axis in following way: I would need to maximize the horizontal distance among all pieces constrained by the same slider and the vertical distance among the sliding pieces and the sliders itself. How can this be solved? Any advice and suggestion which can lead to a solution for this problem would be greatly appreciated. I looked first at some very powerful libraries like cassowary and jsLPSolver but i had some trouble

Python Mixed Integer Linear Programming

南楼画角 提交于 2019-11-26 06:55:49
问题 Are there any Mixed Integer Linear Programming(MILP) solver for Python? Can GLPK python solve MILP problem? I read that it can solve Mixed integer problem. I am very new to linear programming problem. So i am rather confused and cant really differentiate if Mixed Integer Programming is different from Mixed Integer Linear programming(MILP). 回答1: Pulp is a python modeling interface that hooks up to solvers like CBC(open source), CPLEX (commercial), Gurobi(commercial), XPRESS-MP(commercial) and