decogo.solver.decogo
Main module for running the solution process
Classes
|
A class which is responsible for the logging of the solver. |
|
A class which is responsible for solver process. |
A class which starts the solution process |
|
A class which manages algorithms of the solver. |
- class decogo.solver.decogo.DecogoSolver[source]
A class which starts the solution process
- static _remove_unpicklable_objects_pyomo_model(model)[source]
Removes unpicklable objects from Pyomo model object. This is because multiprocessing is based on serialization and some objects cannot be serialized (pickled). This method does the following:
removes objects Port and Arcs, since they contain weakref objects
sets to None the ‘rule’ property for Constraint, Objective and Param, since it might contain lambda function
sets to None property ‘initialize’ and ‘_init_values._init’ for Set, since it might contain lambda function
- Parameters
model (ConcreteModel) – Pyomo model
- class decogo.solver.decogo.DecogoProcess(input_model, file_name=None)[source]
A class which is responsible for solver process. The main idea of this class is reliable way to set maximum executation time of the whole solver.
- Parameters
input_model (ConcreteModel) – Pyomo model
file_name (str or None) – Name of the file where the log info should be written
solver (DecogoSolverManager) – Solver manager
solver_thread (Thread) – solver single thread which runs the solver
- class decogo.solver.decogo.DecogoSolverManager[source]
A class which manages algorithms of the solver. It performs the decomposition, creates the settings, calls the algorithms and stores the results
- Parameters
decomposer (PyomoModelDecomposer) – Instance of the class which performs the decomposition
problem (PyomoDecomposedProblem or DecomposedProblem) – Decomposed problem
logger_handler (DecogoLogger) – Logger instance
settings (Settings) – Instance of solver settings
results (Results) – Instance of solver results
- class decogo.solver.decogo.DecogoLogger(level, file_name=None)[source]
A class which is responsible for the logging of the solver. It sets up the logs of the solver
- _set_up_into_file(file_name, level)[source]
Sets up the logger into file
- Parameters
file_name (str) – Name of the file
level (logging.DEBUG, logging.INFO etc) – logger level