Questions tagged [casadi]

CasADi is an open-source tool for nonlinear optimization and algorithmic differentiation.

CasADi is an open-source tool for nonlinear optimization and algorithmic differentiation.

It facilitates rapid — yet efficient — implementation of different methods for numerical optimal control, both in an offline context and for nonlinear model predictive control (NMPC).

See https://web.casadi.org/

21 questions
0
votes
0 answers

Optimization of data-driven function as Tensorflow model

I try to find the optimum of a data-driven function represented as a Tensorflow model. Means I trained a model to approximate a function and now want to find the optimum of this approximated function using a algorithm and software package/python…
ptrem
  • 1
  • 1
0
votes
0 answers

How to solve a system of differential equations in the form f(x_dot, x, u) == 0 with Acados?

I have some problem with the implementation of the differential equations that describes my dynamic system. I have 4 equations that are in the form f(x_dot, x, u) == 0. And each equation depends to the other one. So I'm looking for a method to solve…
bgsax
  • 9
  • 1
0
votes
0 answers

How to get the symbolic gradient in Tensorflow 2.x

I want to convert https://web.casadi.org/blog/tensorflow/ , which was written in Tensorflow 1 with casadi, using Tensorflow 2. I have changed the code yet tf.disable_v2_behavior() had to be done to get it working. import casadi as ca import…
GPrathap
  • 7,336
  • 7
  • 65
  • 83
0
votes
0 answers

Error in overwriting zeros array "could not broadcast input array from shape (8,1) into shape (8,)"

import numpy as np x0 = [1, 2, 3, 4, 5, 6, 7, 8] xx = np.zeros((8, 20)) xx[:,0] = x0 I want to overwrite zero arrays columns but it gives an error as: could not broadcast input array from shape (8,1) into shape (8,)
D_S
  • 45
  • 7
0
votes
1 answer

Not getting the expected answer?

I have written an optimization problem in ACADO, and it works as expected. Here is the program: where and x0 =…
GPrathap
  • 7,336
  • 7
  • 65
  • 83
-1
votes
2 answers

How to discretize a nonlinear system

How can i discretize the following nonlinear system. Im using Matlab and Casadi for Model Predictive Control. The Constant C is betwenn 0 and 1. dx/dt = C * x/(x^2 + 1) Thank you for your time and Help.
mkloster
  • 21
  • 1
  • 7
1
2