util

Utility functions and classes for the GDPopt solver.

Classes

SuppressInfeasibleWarning()

Suppress the infeasible model warning message from solve().

fix_discrete_problem_solution_in_subproblem(...)

fix_discrete_solution_in_subproblem(...)

Functions

a_logger(str_or_logger)

Returns a logger when passed either a logger name or logger object.

copy_var_list_values(from_list, to_list, config)

Copy variable values from one list to another.

fix_discrete_var(var, val, config)

Fixes the discrete variable var to val, rounding to the nearest integer or not, depending on if rounding is specified in config and what the integer tolerance is.

get_main_elapsed_time(timing_data_obj)

Returns the time since entering the main time_code context

is_feasible(model, config)

Checks to see if the algebraic model is feasible in its current state.

lower_logger_level_to(logger[, level, tee])

Increases logger verbosity by lowering reporting level.

move_nonlinear_objective_to_constraints(...)

solve_continuous_problem(m, config)

time_code(timing_data_obj, code_block_name)

Starts timer at entry, stores elapsed time at exit