47 const std::string& ns)
const
52 const std::string& ns)
60 ocp = std::dynamic_pointer_cast<StructuredOptimalControlProblem>(controller->getOptimalControlProblem());
64 PRINT_WARNING(
"This benchmark is designed for predictive controllers.");
69 "We currently support only StructuredOptimalControlProblems.");
74 std::vector<double> _controller_step_times;
85 std::string ns_bench = ns +
"bench_" + std::to_string(
n) +
"/";
98 PRINT_WARNING_ONCE(
"initial_tf: is negative, using default value of the chosen grid.");
104 shooting_grid->setNumControlsPerShootingInterval(
120 _controller_step_times.push_back(ctrl_statistics->step_time.toSec());
123 signal_target->sendIndexedValues(ns +
"ctrl_step_times",
n, _controller_step_times);
124 _controller_step_times.clear();
134 if (msg) *msg +=
"BenchmarkTaskIncreasingHorizonOpenLoop(): no OpenLoopControlTask specified.\n";
142 *msg +=
"Number of repetitions must be positive.\n";
148 *msg +=
"n_start and n_end must be > 1.\n";
154 *msg +=
"n_end >= n_start ist not satisfied.\n";
166 #ifdef MESSAGE_SUPPORT
167 void BenchmarkTaskIncreasingHorizonOpenLoop::toMessage(corbo::messages::BenchmarkTaskIncreasingHorizonOpenLoop& message)
const
172 message.set_n_end(
_n_end);
180 void BenchmarkTaskIncreasingHorizonOpenLoop::fromMessage(
const corbo::messages::BenchmarkTaskIncreasingHorizonOpenLoop& message,
181 std::stringstream* issues)
185 _open_loop_task->fromMessage(message.open_loop_control_task(), issues);