pyepo.model.grb.grbmodel ======================== .. py:module:: pyepo.model.grb.grbmodel .. autoapi-nested-parse:: Abstract optimization model based on GurobiPy Attributes ---------- .. autoapisummary:: pyepo.model.grb.grbmodel._HAS_GUROBI Classes ------- .. autoapisummary:: pyepo.model.grb.grbmodel.optGrbModel Module Contents --------------- .. py:data:: _HAS_GUROBI :value: True .. py:class:: optGrbModel Bases: :py:obj:`pyepo.model.opt.optModel` This is an abstract class for Gurobi-based optimization model .. attribute:: _model Gurobi model :type: GurobiPy model .. py:method:: __repr__() .. py:property:: num_cost number of cost to be predicted .. 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