'Returns the result of the call to the solver.
Parameters
objective : LinOp
The canonicalized objective.
constraints : list
The list of canonicalized cosntraints.
cached_data : dict
A map of solver name to cached problem data.
warm_start : bool
Not used.
verbose : bool
Should the solver print output?
solver_opts : dict
Additional arguments for the solver.
Returns
tuple
(status, optimal value, primal, equality dual, inequality dual)'

def solve(self, objective, constraints, cached_data, warm_start, verbose, solver_opts):

    import mosek
    with mosek.Env() as env:
        with env.Task(0, 0) as task:
            kwargs = sorted(solver_opts.keys())
            if ('mosek_params' in kwargs):
                self._handle_mosek_params(task, solver_opts['mosek_params'])
                kwargs.remove('mosek_params')
            if kwargs:
                raise ValueError(("Invalid    keyword-argument    '%s'" % kwargs[0]))
            if verbose:
                def streamprinter(text):
                    import sys
                    sys.stdout.write(text)
                    sys.stdout.flush()
                env.set_Stream(mosek.streamtype.log, streamprinter)
                task.set_Stream(mosek.streamtype.log, streamprinter)
            data = self.get_problem_data(objective, constraints, cached_data)
            A = data[s.A]
            b = data[s.B]
            G = data[s.G]
            h = data[s.H]
            c = data[s.C]
            dims = data[s.DIMS]
            numvar = (len(c) + sum(dims[s.SOC_DIM]))
            numcon = (((len(b) + dims[s.LEQ_DIM]) + sum(dims[s.SOC_DIM])) + sum([(el ** 2) for el in dims[s.SDP_DIM]]))
            if (numvar == 0):
                result_dict = {s.STATUS: s.OPTIMAL}
                result_dict[s.PRIMAL] = []
                result_dict[s.VALUE] = (0.0 + data[s.OFFSET])
                result_dict[s.EQ_DUAL] = []
                result_dict[s.INEQ_DUAL] = []
                return result_dict
            task.appendvars(numvar)
            task.putclist(np.arange(len(c)), c)
            task.putvarboundlist(np.arange(numvar, dtype=int), ([mosek.boundkey.fr] * numvar), np.zeros(numvar), np.zeros(numvar))
            if (sum(dims[s.SDP_DIM]) > 0):
                task.appendbarvars(dims[s.SDP_DIM])
            task.appendcons(numcon)
            if (A.shape[0] and G.shape[0]):
                constraints_matrix = sp.bmat([[A], [G]])
            else:
                constraints_matrix = (A if A.shape[0] else G)
            coefficients = np.concatenate([b, h])
            (row, col, el) = sp.find(constraints_matrix)
            task.putaijlist(row, col, el)
            type_constraint = ([mosek.boundkey.fx] * len(b))
            type_constraint += ([mosek.boundkey.up] * dims[s.LEQ_DIM])
            sdp_total_dims = sum([(cdim ** 2) for cdim in dims[s.SDP_DIM]])
            type_constraint += ([mosek.boundkey.fx] * (sum(dims[s.SOC_DIM]) + sdp_total_dims))
            task.putconboundlist(np.arange(numcon, dtype=int), type_constraint, coefficients, coefficients)
            current_var_index = len(c)
            current_con_index = (len(b) + dims[s.LEQ_DIM])
            for size_cone in dims[s.SOC_DIM]:
                (row, col, el) = sp.find(sp.eye(size_cone))
                row += current_con_index
                col += current_var_index
                task.putaijlist(row, col, el)
                task.appendcone(mosek.conetype.quad, 0.0, np.arange(current_var_index, (current_var_index + size_cone)))
                current_con_index += size_cone
                current_var_index += size_cone
            for (num_sdp_var, size_matrix) in enumerate(dims[s.SDP_DIM]):
                for i_sdp_matrix in range(size_matrix):
                    for j_sdp_matrix in range(size_matrix):
                        coeff = (1.0 if (i_sdp_matrix == j_sdp_matrix) else 0.5)
                        task.putbaraij(current_con_index, num_sdp_var, [task.appendsparsesymmat(size_matrix, [max(i_sdp_matrix, j_sdp_matrix)], [min(i_sdp_matrix, j_sdp_matrix)], [coeff])], [1.0])
                        current_con_index += 1
            task.putobjsense(mosek.objsense.minimize)
            task.optimize()
            if verbose:
                task.solutionsummary(mosek.streamtype.msg)
            return self.format_results(task, data, cached_data)
