ApproximateMPCSettings#
- class ApproximateMPCSettings(n_hidden_layers=3, n_neurons=50, act_fn='tanh', output_act_fn='linear', device='auto', scaling=True, lbx=None, ubx=None, lbu=None, ubu=None)[source]#
Bases:
objectSettings for
do_mpc.approximateMPC.ApproxMPC.This class contains the mandatory settings for Approximate MPC int
do_mpc.approximateMPC.ApproxMPC. This class creates an instance of typeApproximateMPCSettingsand adds it to its class attributes.- Parameters:
n_hidden_layers (
int)n_neurons (
int)act_fn (
str)output_act_fn (
str)device (
str)scaling (
bool)lbx (
list)ubx (
list)lbu (
list)ubu (
list)
Methods#
Attributes#
act_fn#
-
ApproximateMPCSettings.act_fn:
str= 'tanh'# Activation function used after each layer
device#
-
ApproximateMPCSettings.device:
str= 'auto'# Type of device used. Can be auto, cuda or cpu
lbu#
-
ApproximateMPCSettings.lbu:
list= None# Lower bound for the control variables
lbx#
-
ApproximateMPCSettings.lbx:
list= None# Lower bound for the state variables
n_neurons#
-
ApproximateMPCSettings.n_neurons:
int= 50# Number of neurons per hidden layer
output_act_fn#
-
ApproximateMPCSettings.output_act_fn:
str= 'linear'# Output type
scaling#
-
ApproximateMPCSettings.scaling:
bool= True# Decides whether the state and control variables are scaled or not
ubu#
-
ApproximateMPCSettings.ubu:
list= None# Upper bound for the control variables
ubx#
-
ApproximateMPCSettings.ubx:
list= None# Upper bound for the state variables