class="n">solver</span><span class="o">.</span><span class="n">Minimize</span><span class="p">(</span>
                <span class="nb">sum</span><span class="p">([</span><span class="n">resid_sq</span><span class="p">[</span><span class="n">k</span><span class="p">,</span> <span class="n">t</span><span class="p">]</span> <span class="o">*</span> <span class="n">X</span><span class="p">[</span><span class="n">k</span> <span class="o">*</span> <span class="n">T</span> <span class="o">+</span> <span class="n"