Skip to content
Snippets Groups Projects
Commit d9f59336 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

remove warnings

parent 2596488f
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@ int main() {
xinit << 0.0, 0.0;
xDes << 1.0, 0.0;
unsigned int i;
unsigned int T = 300;
double dt = 1e-2;
unsigned int iterMax = 20;
......@@ -33,7 +32,6 @@ int main() {
DDPSolver<double, STATE_NB, COMMAND_NB>::traj lastTraj;
ModelLinear model(dt);
ModelLinear* noisyModel = NULL;
CostLinear cost;
DDPSolver<double, STATE_NB, COMMAND_NB> solver(model, cost, DISABLE_FULLDDP, DISABLE_QPBOX);
solver.FirstInitSolver(xinit, xDes, T, dt, iterMax, stopCrit);
......
......@@ -76,7 +76,7 @@ int main(int argc, char *argv[]) {
unsigned int iter;
testSolverActuator.FirstInitSolver(xinit, xDes, T, dt, iterMax, stopCrit);
for (int i = 0; i < nbIterTestMax - 1; i++) {
for (unsigned int i = 0; i < nbIterTestMax - 1; i++) {
gettimeofday(&tbegin, NULL);
testSolverActuator.initSolver(xinit, xDes);
......@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) {
xinit << xList[1](0, 0), xList[1](1, 0);
xDes << vec_joint_pos[i + 1], 0.0;
texec += ((double)(tend.tv_sec - tbegin.tv_sec) * 1000.0 + ((tend.tv_usec - tbegin.tv_usec) / 1000.0));
texec += ((double)(tend.tv_sec - tbegin.tv_sec) * 1000.0 + ((double)(tend.tv_usec - tbegin.tv_usec) / 1000.0));
cout << "texec:" << texec << std::endl;
string ResultNumber;
......@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
ofstream file(("results_sinu/results_sinu" + ResultNumber + ".csv").c_str(), ios::out | ios::trunc);
if (file) {
file << "q,qdes,qDot,qDotDes,u" << endl;
for (int i = 0; i < T; i++) {
for (unsigned int i = 0; i < T; i++) {
file << xList[i](0, 0) << "," << xDes[0] << "," << xList[i](1, 0) << "," << xDes[1] << ","
<< uList[i - 1](0, 0) << endl;
}
......
......@@ -59,7 +59,7 @@ int main() {
ofstream fichier("results_simple.csv", ios::out | ios::trunc);
if (fichier) {
fichier << "q,qDot,u" << endl;
for (int i = 0; i < T; i++) {
for (unsigned int i = 0; i < T; i++) {
fichier << xList[i](0, 0) << "," << xList[i](1, 0) << "," << uList[i](0, 0) << endl;
}
fichier << xList[T](0, 0) << "," << xList[T](1, 0) << "," << uList[T - 1](0, 0) << endl;
......
......@@ -28,7 +28,6 @@ int main() {
xinit << -1.0, 0.0, -100.0, 0.0, 0.0;
xDes << 0.5, 0.0, 0.0, 0.0, 0.0;
unsigned int i;
unsigned int T = 3000;
double dt = 1e-3;
unsigned int iterMax = 100;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment