where
zi :distance between demand point i and facility location x
bi :coordinates of demand point i
I cannot determine inputs of tfocs function. Thank you for your help in advance.
I solved the problem with CVX. However, my problem instances are very large so computation time of CVX does not seem acceptable. I thought that TFOCS would be faster than CVX since it uses first order algorithms to solve problems.
I solved the problem with CVX. However, my problem instances are very large so computation time of CVX does not seem acceptable. I thought that TFOCS would be faster than CVX since it uses first order algorithms to solve problems.
Unfortunately TFOCS does not support this model exactly. TFOCS_SCD can approximate it, I think; what it would minimize is something like \mu \|x\|_2^2 + \sum_i \|x-b_i\|_2. So for sufficiently small \mu it could come close. But I think a custom method might be appropriate instead.
One approach would be to transform the problem into a smooth problem by the variational characterization
$$||x-b|| = \frac{1}{2} \min_{u\in\mathbb{R}^*_+} \big{\frac{||x-b||^2}{u} + u \big} $$ and implement a smooth_quad_over_lin function (see Section 3.1.2 on TFOCS user guide).
As Michael said, a custom implementation will be the most efficient. But we can handle it with TFOCS, and I have a new second-order-cone function that will be in the next release of TFOCS (hopefully this week). In your case, it will used with the smoothing approach in tfocs_SCD (rather than directly using tfocs.m)