You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to define a terminal cost function with variable parameters. I know how to define variable parameters and I have already done it when defining a stage cost function with variable parameters and it is working well (using stage_cost.cost).
However, when defining the terminal cost using the following command, I get the error that the parameters have not been declared:
Initialization failed since variables [stage_cost_weight_xstage_cost_weight_ystage_cost_weight_z] are free. These symbols occur in the output expressions but you forgot to declare these as inputs. Set option 'allow_free' to allow free variables.
Is there any option that I can define the parameter varying terminal cost function?
The text was updated successfully, but these errors were encountered:
This could be a problem with the CasADi version, which one do you have? and which hilo-mpc version do you have?
if you have hilo <= 1.0.3 and you have Casadi >3.5 then that could be the problem. You need to either upgrade hilo-mpc to 1.1.0 or downgrade casadi to 3.5.
if that's not the case, please send me an example code and I'll have a look at it.
Hi,
I am trying to define a terminal cost function with variable parameters. I know how to define variable parameters and I have already done it when defining a stage cost function with variable parameters and it is working well (using stage_cost.cost).
However, when defining the terminal cost using the following command, I get the error that the parameters have not been declared:
self.nmpc.quad_terminal_cost.add_states(names=['x', 'y', 'z'], weights=[self.model.p[1] , self.model.p[2], self.model.p[3]],ref=[self.x_dess,self.y_dess, self.z_dess])
This is the error that I get:
Initialization failed since variables [stage_cost_weight_xstage_cost_weight_ystage_cost_weight_z] are free. These symbols occur in the output expressions but you forgot to declare these as inputs. Set option 'allow_free' to allow free variables.
Is there any option that I can define the parameter varying terminal cost function?
The text was updated successfully, but these errors were encountered: