void TInstantiateObjectTester::RunTests() { NextSubTest(); Case1(); NextSubTest(); Case2(); NextSubTest(); Case3(); NextSubTest(); Case4(); NextSubTest(); Case5(); NextSubTest(); Case6(); NextSubTest(); Case7(); NextSubTest(); Case8(); NextSubTest(); Case9(); NextSubTest(); Case10(); NextSubTest(); Case11(); NextSubTest(); Case12(); NextSubTest(); Case13(); NextSubTest(); Case14(); }
std::vector<double> Controller::DetermineBangBangCaseAndUpdate(double wdot_0, double w_f, double amax, double vmax) { if (wdot_0 < 0.0) { //going the wrong way! return Case1(wdot_0, w_f); } else if (wdot_0 < vmax && w_f > (wdot_0*wdot_0)/(2*amax)) { //speed up return Case2(wdot_0, w_f); } else if (wdot_0 == vmax && w_f > (wdot_0*wdot_0)/(2*amax)) { //cruise return Case3(wdot_0, w_f); } else if (wdot_0 <= vmax && w_f <= (wdot_0*wdot_0)/(2*amax)) { //slow down to reach goal return Case4(wdot_0, w_f); } else if (wdot_0 > vmax) { //exceeds velocity limits return Case5(wdot_0, w_f); } else { std::vector<double> update; return update; } }