Questions tagged [ode]

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable.

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable. Equations of this type can be solved numerically or analytically.

1902 questions
3
votes
1 answer

curve fitting to an ordinary differential equation

I want to fit a curve to the ODE shown below- dA/dt = k1*profit + k2 I have the observed time series of the variables A and profit and I would like to get the optimal values of k1 and k2 using a curve fitting technique in python. I am able to write…
lsr729
  • 752
  • 2
  • 11
  • 25
3
votes
1 answer

Solving ODEs in parallel in Julia: variable answers, hangs after several executions

I am using Julia DifferentialEquations on a large system of ODEs (127) that need to be solved repeatedly for different initial value vectors. I have found that CVODE_BDF is the fastest. I'd like to send each ODE solve() to a different processor.…
3
votes
0 answers

Parallel simd MUCH slower than serial simd in Julia

Summary: Scroll down for reproducible example which should run-from-scratch in Julia if you have the packages specified in the using lines. (Note: the ODE has a complex, re-usable structure which is specified in a Gist which is downloaded/included…
3
votes
0 answers

Obtaining coefficient from non linear ODE

I'm trying to solve non-linear ODE in the form of dy/dt = a(y, t) * y(t) with scipy.integrate.ode. I'm getting good results solving this kind of equation, but I wish to optimize my code. Currently, my function is defined as f(y, t) = a(y, t)*y(t),…
tiwock
  • 31
  • 1
3
votes
1 answer

Using Gekko to reproduce a control history in an observed trajectory

I am trying to get Gekko to reproduce the bank angle history from the Apollo 10 reentry event. I have altitude, velocity, and latitude state histories and the actual NASA bank angle data for comparison. My path constraints look like…
Jacob Olsen
  • 103
  • 5
3
votes
2 answers

How to use Gekko to solve for optimal control for a reusable reentry vehicle

I am seeking to find optimal control (aoa and bank angle) to maximize cross range for a shuttle type reentry vehicle using Gekko. Below is my code currently and I am getting a "Solution not found" with "EXIT: Maximum Number of Iterations Exceeded".…
Jacob Olsen
  • 103
  • 5
3
votes
2 answers

Implement ball bouncing in free fall using scipy.ivp()

I want to solve ordinary differential equations using scipy_ivp() of a ball falling with an inital velocity of 1 in the x-direction, and 0 in the y-direction. The gravitational acceleration is g = 9.82, and when the ball hits the ground, its…
Cazo
  • 151
  • 7
3
votes
0 answers

How to avoid event detection of initial conditions in scipy solve_ivp

I am working on a simulation of neural circuits. The circuit consists of eight segments, and I solve the activity of each segment with differential equations. The differential equation is dE[i]/dt = f(b[i] * E[i]) (i = 0, 1, ... 7) and b[i] is…
3
votes
1 answer

Scipy solve_ivp events

I try to use events in scipy.integrate.solve_ivp function, but dont understand one thing. From example in docs(https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html) i know that i can stop integrate when y position…
3
votes
1 answer

Parameter estimation in an ODE system using GEKKO

I have a system of nonlinear Ordinary Differential Equations that has 3 parameters as inputs: mu, target, and omega. I am trying the estimate these parameters by minimizing the least squared error between my observed values and the output of the ODE…
gizmou
  • 31
  • 2
3
votes
1 answer

Bayesian ODE with Julia

I have been trying to implement Bayesian ODE. In Oil industry, we use the following equation to fit production data then forecasting : The ODE equation is described as : where 0
Minou92
  • 137
  • 7
3
votes
1 answer

Why can't I get this Runge-Kutta solver to converge as the time step decreases?

For reasons, I need to implement the Runge-Kutta4 method in PyTorch (so no, I'm not going to use scipy.odeint). I tried and I get weird results on the simplest test case, solving x'=x with x(0)=1 (analytical solution: x=exp(t)). Basically, as I…
DeltaIV
  • 4,773
  • 12
  • 39
  • 86
3
votes
1 answer

Solve_ivp integration gets stuck if initial condition triggers event with terminal = True

I work in spacecraft trajectory design and I am implementing an algorithm for finding periodic orbits that needs to detect whenever a trajectory crosses a specific plane. I am using scipy.integrate's solve_ivp and its events functionality. Ideally,…
3
votes
1 answer

Simultaneous event detection using solve_ivp

I'm trying to couple several Quadratic integrate-and-fire neurons. My script works successfully with two neurons, but when I modified the script for 3 neurons, I noticed that the voltage of the third neuron suddenly explodes and therefore, the…
AHEsmaeili
  • 33
  • 5
3
votes
1 answer

ODE in Julia -matrix form possible?

I am new to the promising language of Julia, in the hope that it will accelerate my stiff ordinary differential equations. Here is the thing: 1) The equation must be defined in matrix form, by using mass, damping, stiffness matrices outa Matlab…