# Solving linear constrained optimization problem

So I have the following constrained optimization problem to optimize a circuit (electrical engineering) that I am working on:

Minimize the following expression (power dissipation):

$$I_{B1}(V - C_1) + I_{E2}(V - C_2) + I_{B2}(V - C_3) + I_{E3}(V - C_4) + I_{B3}(V - C_5) + I_{E4}(V - C_6) + I_{B4}(V - C7) + I_{X1}(V - C8) + I_{X2}(V - C_9) + I_{X3}(V - C_{10}) + I_{X4}(V - C_{11})$$

Subject to the following constraints:

$$I_{B1} + I_{L1} + I_{E2} = I_{L2} + I_{X1}$$ $$I_{B2} + I_{L2} + I_{E3} + I_{X1} = I_{L3} + I_{X2}$$ $$I_{B3} + I_{L3} + I_{E4} + I_{X2} = I_{L4} + I_{X3}$$ $$I_{B4} + I_{L4} + I_{X3} = I_{X4} + I_{L5}$$

Where: $$I_{L1} = A$$ $$I_{L2} = B$$ $$I_{L3} = C$$ $$I_{L4} = D$$ $$I_{L5} = E$$

Where $V, A, B, C, D, E$ and $C_1...C_{11}$ are all known constants and all variables and constants are real numbers.

Could anyone recommend a method for solving this problem (Lagrange multipliers)? Unfortunately I do not own a copy of Mathematica, is there another software package that can be used to solve systems like this?

• Optimizing a linear function subject to linear constraints is called Linear Programming. Lot's of free software available if you google "linear program solver" – A.Γ. Aug 15 '15 at 10:47
• @A.G. Thank you, I had heard of linear programming, but I was under the impression that such a method was more appropriate in cases of inequality constraints, rather than strict equality constraints...though perhaps this is academic as I guess whatever algorithm free/commercial software is using can likely handle both. – Bitrex Aug 15 '15 at 11:26
• Any linear equality $ax=b$ can be replaced by two inequalities $ax\le b$ and $ax\ge b$ as well as any linear inequality $ax\le b$ can be replaced by the equality $ax+s=b$ and the inequality $s\ge 0$, so I does not really matter for the method what you originally have. – A.Γ. Aug 15 '15 at 11:35
• Are you sure you don't have some positivity constraints? Linear objective with linear equality can be solved explicitly. Find a basis for the linear systems of equations. If it is non-empty, problem is infeasible. If it only has one solution, there is your solution, and if it has an infinite set of solutions, your problem is unbounded unless the objective is orhogonal to the null-space. – Johan Löfberg Aug 15 '15 at 12:25
• @JohanLöfberg You're right, in this case at least, all unknowns must be positive, as current cannot flow from a lower potential to a higher potential. – Bitrex Aug 15 '15 at 14:25