solve mpc for building climate control or "cost-optimal" control
mpc
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 |
control | ecos.control; control parameters for ECOS solver. More details can be seen in ECOSolver package |
An object of class R6ClassGenerator
of length 24.
If your focus is energyhub which contains building unit, production or storage unit , ehubmpc object maybe a better choice. mpc only supports building unit without other units involved. Besides, time-variant constraints, such as temperature setpoints and range, electricity cost, equipment power (heating/cooling power) are supported.
#model <- mpc$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(control = ecos.control())