def manageSolverOpts(solver, solverOpts):
    """
    Adds solver specific options.

    Parameters
    ----------
    solver: str, required
        Solver name used by pyomo
    solverOpts: dict, required
        Other solveroptions
    
    Returns
    -------
    solverOpts: dict
    """
    defaultOpts = {}
    defaultOpts_gurobi = {'Threads': 3, 'OptimalityTol': 1e-08, 'Method': 2,
        'Cuts': 0, 'NodeMethod': 2, 'IntFeasTol': 1e-09}
    defaultOpts_scip = {}
    defaultOpts_cbc = {'primalT': 0.001}
    defaultOpts_glpk = {}
    defaultOpts_cplex = {'threads': 3}
    if solver == 'gurobi':
        defaultOpts.update(defaultOpts_gurobi)
    elif solver == 'scip':
        defaultOpts.update(defaultOpts_scip)
    elif solver == 'cplex':
        defaultOpts.update(defaultOpts_cplex)
    elif solver == 'cbc':
        defaultOpts.update(defaultOpts_cbc)
    elif solver == 'glpk':
        defaultOpts.update(defaultOpts_glpk)
        if 'Threads' in solverOpts:
            solverOpts.pop('Threads')
        if 'LogFile' in solverOpts:
            solverOpts.pop('LogFile')
    else:
        raise ValueError(
            'Solver name unknown. Please use one of "gurobi", "scip", "cbc", "glpk" or "cplex".'
            )
    for option in defaultOpts:
        if not option in solverOpts:
            solverOpts[option] = defaultOpts[option]
    return solverOpts
