Source code for dhnx.model

# -*- coding: utf-8

"""
This module is designed to base classes for optimization and simulation models.

This file is part of project dhnx (). It's copyrighted
by the contributors recorded in the version control history of the file,
available from its original location:

SPDX-License-Identifier: MIT
"""

from addict import Dict


[docs]class Model(): r""" Abstract base class for different kind of models. """ def __init__(self, thermal_network): self.thermal_network = thermal_network self.setup() self.results = Dict()
[docs] def setup(self): pass
[docs] def solve(self): pass
[docs] def get_results(self): pass
[docs] def is_consistent(self): pass
[docs]class OperationOptimizationModel(Model): r""" Abstract base class for operational optimization models. """ def __init__(self, thermal_network): super().__init__(thermal_network) self.is_consistent() self.results = ['a', 'b']
[docs] def is_consistent(self): # TODO. pass
[docs]class InvestOptimizationModel(Model): r""" Abstract base class for investment optimization models. """ def __init__(self, thermal_network): super().__init__(thermal_network) self.is_consistent() self.results = ['a', 'b']
[docs] def is_consistent(self): # TODO. pass
[docs]class SimulationModel(Model): r""" Abstract base class for simulation models. """ def __init__(self, thermal_network): super().__init__(thermal_network) self.is_consistent() self.results = ['a', 'b']
[docs] def is_consistent(self): # TODO. pass