pyepo.model.omo.omomodel ======================== .. py:module:: pyepo.model.omo.omomodel .. autoapi-nested-parse:: Abstract optimization model based on Pyomo Attributes ---------- .. autoapisummary:: pyepo.model.omo.omomodel._HAS_PYOMO Classes ------- .. autoapisummary:: pyepo.model.omo.omomodel.optOmoModel Module Contents --------------- .. py:data:: _HAS_PYOMO :value: True .. py:class:: optOmoModel(solver='glpk') Bases: :py:obj:`pyepo.model.opt.optModel` This is an abstract class for Pyomo-based optimization model .. attribute:: _model Pyomo model :type: PyOmo model .. attribute:: solver optimization solver in the background :type: str .. py:attribute:: solver :value: 'glpk' .. py:method:: __repr__() .. py:method:: setObj(c) A method to set objective function :param c: cost of objective function :type c: np.ndarray / list .. py:method:: solve() A method to solve model :returns: optimal solution (list) and objective value (float) :rtype: tuple .. py:method:: copy() A method to copy model :returns: new copied model :rtype: optModel .. py:method:: addConstr(coefs, rhs) A method to add new constraint :param coefs: coeffcients of new constraint :type coefs: np.ndarray / list :param rhs: right-hand side of new constraint :type rhs: float :returns: new model with the added constraint :rtype: optModel