'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
Should the previous solver result be used to warm_start?
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 cmpb
    data = self.get_problem_data(objective, constraints, cached_data)
    solver_opts['verbose'] = verbose
    var_len = data[s.C].size
    types = [cmpb.MPBFREECONE]
    lengths = [var_len]
    indices = np.arange(var_len)
    var_cones = cmpb.MPBCones(types, lengths, indices)
    constr_len = data[s.B].size
    dims = data[s.DIMS]
    types = []
    lengths = []
    if dims[s.EQ_DIM]:
        types.append(cmpb.MPBZEROCONE)
        lengths.append(dims[s.EQ_DIM])
    if dims[s.LEQ_DIM]:
        types.append(cmpb.MPBNONNEGCONE)
        lengths.append(dims[s.LEQ_DIM])
    for soc_len in dims[s.SOC_DIM]:
        types.append(cmpb.MPBSOC)
        lengths.append(soc_len)
    if dims[s.EXP_DIM]:
        types += ([cmpb.MPBEXPPRIMAL] * dims[s.EXP_DIM])
        lengths += ([3] * dims[s.EXP_DIM])
    indices = np.arange(constr_len)
    constr_cones = cmpb.MPBCones(types, lengths, indices)
    var_types = None
    if (data[s.BOOL_IDX] or data[s.INT_IDX]):
        var_types = []
        for i in range(var_len):
            if (i in data[s.BOOL_IDX]):
                var_type = cmpb.MPBBINVAR
            elif (i in data[s.INT_IDX]):
                var_type = cmpb.MPBINTVAR
            else:
                var_type = cmpb.MPBCONTVAR
            var_types.append(var_type)
    Acoo = data[s.A].tocoo()
    model = cmpb.MPBModel(solver_opts['package'], solver_opts['solver_str'], data[s.C], Acoo, data[s.B], constr_cones, var_cones, var_types)
    model.optimize()
    results_dict = {}
    results_dict['status'] = model.status()
    results_dict['pobj'] = model.getproperty('objval')
    results_dict['x'] = model.getsolution()
    results_dict['y'] = model.getdual()
    return self.format_results(results_dict, data, cached_data)
