Skip to content

Instantly share code, notes, and snippets.

@cipher982
Last active December 19, 2017 20:46
Show Gist options
  • Select an option

  • Save cipher982/27646ffc34278afc9967f837ac9b4d52 to your computer and use it in GitHub Desktop.

Select an option

Save cipher982/27646ffc34278afc9967f837ac9b4d52 to your computer and use it in GitHub Desktop.
// actuator shock absorber
if (t < N - 2) {
//steering
fg[0] += 30000.0*CppAD::pow(vars[delta_start + t + 1] - vars[delta_start + t], 2);
//acceleration
fg[0] += CppAD::pow(vars[a_start + t + 1] - vars[a_start + t], 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment