Solve spring system I am not physics in training so if anything is unclear please request clarification.
I have a set of objects to be placed on a line, linked with springs of known lengths (L) and stiffnesses (K). I want to solve the equilibrium positions of each object (x).
o---------o--------------o
x0        x1             x2
|~~~~L1~~~|~~~~~~L2~~~~~~|
|~~~~~~~~~~L3~~~~~~~~~~~~|

I am following this Wikipedia entry - I believe the idea is to set the forces on each object zero and then solve linear equations.
However, my problem is a bit more complicated. My objects have known lengths, so the problem becomes:
ooooo------ooo------------oooo
x0         x1             x2
    |~~L1~~| |~~~~~~L2~~~~|
    |~~~~~~~~~L3~~~~~~~~~~|

I would also forbid the objects occupy the same place. Can someone please help me derive a solution here? Thanks so much.
 A: I'm assuming you want to solve such problems automatically on a computer. If you want to solve them individually by hand, the best method will obviously be different.
Without the constraint that the objects can't pass through each other, the problem is an unconstrained quadratic optimization problem, which is solved simply by taking the gradient of that quadratic function and setting it to zero (which is a linear equation).
With the constraint, the problem becomes a quadratic programming problem. The potential energy matrix Q will indeed be positive definite (because if you make add a sufficiently large multiple of any perturbation to the coordinates, the potential energy will eventually go up), so it's also an example of convex programming.
There are many libraries available to solve convex quadratic programming problems for you with well-known algorithms. That Wikipedia article gives the examples of OpenOpt, qp-numpy, CVXOPT...
So to solve your problem you just convert the given spring and object lengths and spring stiffnesses into the format of a quadratic programming problem, call an appropriate library function to solve it, and then interpret the solution as the desired equilibrium positions.
A: Springs in series
The masses' finite lengths and the rest lengths of the springs are not really relevant because they don't change and hence don't contribute to the energy.  
If the total length from the beginning of the first mass to the end of the last one is 10 meters, for example, and all the rest lengths of springs and sizes of masses add up to 3 meters, just subtract that and work with 7 meters of length.  The springs now have zero rest length.  You can add the masses back in at the end.
We now have springs in a line.  Their tension must all be the same at equilibrium, so if $k_i$ represents the spring constant of spring $i$ and $x_i$ represents its stretched length, then
$$k_ix_i = T$$
for all springs, with $T$ the tension.
Additionally,
$$\sum_i x_i = L$$
with $L$ the adjusted length (original length minus masses and rest lengths).
This is easy to solve.  Plugging the first relation into the second,
$$\sum_i\frac{T}{k_i} = L$$
or
$$ T = \frac{L}{\sum_i 1/k_i}$$
Now we know the tension, we can find the individual $x_i$ by
$$x_i = \frac{T}{k_i}$$
Springs in parallel
The finite size of the masses means that some masses may touch.  I suggest you fix this by solving the system with the masses having zero size.  Then check to see if any masses are too close to each other, so that they overlap, or have passed through each other.  For any such pairs of masses, modify the problem to combine these into a single mass, thus modifying the initial conditions.  Then solve the problem over again. 
To solve the problem with zero-size masses, let spring $j$ have spring constant $k_j$, length $l_j$, and rest length $l_{0j}$.  We need to minimize the potential energy
$$U = \frac{1}{2}\sum_j(l_j - l_{0j})^2 k_j$$
subject to some constraints such as
$$l_a + l_b = l_c$$
Write these constraints as
$$f_i(l_a,l_b,l_c) = 0$$
for constraint $i$.  
Then we can introduce a Lagrange multiplier $\lambda_i$ for each constraint and write
$$\nabla U = \sum_i \lambda_i \nabla f_i$$
If we look at just the $j^{th}$ component of these gradients we get
$$k_j(l_j - l_{0j}) = \pm \lambda_{j1} + \pm \lambda_{j2} + \ldots$$
where the $\pm$ depends on how $l_j$ enters that particular constraints, and the sum is over all the constraints involving spring $j$.
This is just a system of linear equation which you can solve via the usual methods.
