pyepo.model.copt.coptmodel

Abstract optimization model based on Cardinal Optimizer (COPT)

Attributes

_HAS_COPT

Classes

optCoptModel

This is an abstract class for a Cardinal Optimizer optimization model

Module Contents

pyepo.model.copt.coptmodel._HAS_COPT = True
class pyepo.model.copt.coptmodel.optCoptModel

Bases: pyepo.model.opt.optModel

This is an abstract class for a Cardinal Optimizer optimization model

_model

COPT model

Type:

COPT model

__repr__()
setObj(c)

A method to set the objective function

Parameters:

c (np.ndarray / list) – cost of objective function

solve()

A method to solve the model

Returns:

optimal solution (list) and objective value (float)

Return type:

tuple

copy()

A method to copy the model

Returns:

new copied model

Return type:

optModel

addConstr(coefs, rhs)

A method to add a new constraint

Parameters:
  • coefs (np.ndarray / list) – coefficients of new constraint

  • rhs (float) – right-hand side of new constraint

Returns:

new model with the added constraint

Return type:

optModel