solve ehubmpc for "cost-optimal" control in energyhub with storage(i.e. battery, ice storage) or/and production(i.e. PV, wind turbine) units

ehubmpc

Arguments

N

prediction horizon

Tsim

simulation horizon; Tsim >= N

obj

control purpose; obj should be one of "cost" or "comfort". "cost" means "cost-optimal" econimic mpc while "comfort" means temperature/humidity control. Different value respresents different objective in linear programming

cost

electricity price; it should be a matrix of electricity price whether the price is changed or not

ymin/ymax

lower/upper limit of temperature/humidity; a matrix

yref

reference y, i.e. temperature setpoint; a matrix

ECR

penalty factor for slack variable s; default 1e6

umax/umin

lower/upper limits of heating/cooling power

unit.index

a vector indicates whether storage or production units exist or not. Default value is c(1,0), which means there is storage unit without production unit.

control

ecos.control; control parameters for ECOS solver. More details can be seen in ECOSolver package

Format

list of equipment power(U),temperature values(Y),battery charge/discharge power(Ub), net electricity power(E), battery capacity(Xb)

Note

Two battery kinds, namely simple model and lead-acid battery model are support at present.

Examples

#model <- ehubmpc$new() #model$initialize() #model$set_parameters(N,Tsim,obj,cost,ymin,ymax,yref,ECR,umax,umin) #model$print_para() #model$set_mpc_constraint() #model$solve_mpc(unit.index = c(1,0),control = ecos.control())