Permalink
Browse files

plan: renamed SQP_GN into SQP

  • Loading branch information...
giaf committed Jul 20, 2018
1 parent f18328d commit 16453c38f9ac4c3ca07df7e842cc6dd4b3531054
@@ -1121,7 +1121,7 @@ int main()
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(NN);
// TODO(dimitris): not necessarily GN, depends on cost module
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
// NOTE(dimitris): switching between different objectives on each stage to test everything
for (int i = 0; i <= NN; i++)
@@ -66,7 +66,7 @@ int main() {
// Make plan
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(N);
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
plan->ocp_qp_solver_plan.qp_solver = PARTIAL_CONDENSING_HPIPM;
for (int i = 0; i <= N; i++)
plan->nlp_cost[i] = LINEAR_LS;
@@ -78,7 +78,7 @@ int main() {
ocp_nlp_solver_plan plan = {
qp_plan,
sim_plan.data(),
SQP_GN,
SQP,
cost_plan.data()
};
ocp_nlp_solver_config *config = ocp_nlp_config_create(plan, N);
@@ -504,7 +504,7 @@ int main()
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(NN);
// plan->nlp_solver = SQP_GN;
// plan->nlp_solver = SQP;
plan->nlp_solver = SQP_RTI;
for (int i = 0; i <= NN; i++)
@@ -760,7 +760,7 @@ int main()
ocp_qp_partial_condensing_solver_opts *pcond_solver_opts;
// nlp opts
if (plan->nlp_solver == SQP_GN)
if (plan->nlp_solver == SQP)
{
ocp_nlp_sqp_opts *sqp_opts = nlp_opts;
@@ -878,7 +878,7 @@ int main()
// get sim_solver memory
ocp_nlp_dynamics_cont_memory *dynamics_mem;
if (plan->nlp_solver == SQP_GN)
if (plan->nlp_solver == SQP)
{
ocp_nlp_sqp_memory *sqp_mem = solver->mem;
dynamics_mem = sqp_mem->dynamics[i];
@@ -981,7 +981,7 @@ int main()
// print info
if (true)
{
if (plan->nlp_solver == SQP_GN)
if (plan->nlp_solver == SQP)
{
printf("\nproblem #%d, status %d, iters %d\n", idx, status, ((ocp_nlp_sqp_memory *)solver->mem)->sqp_iter);
}
@@ -90,7 +90,7 @@ ocp_nlp_solver_plan *ocp_nlp_plan_assign(int N, void *raw_memory)
void ocp_nlp_plan_initialize_default(int N, ocp_nlp_solver_plan *plan)
{
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
for (int ii = 0; ii <= N; ii++)
{
plan->nlp_cost[ii] = NONLINEAR_LS;
@@ -124,7 +124,7 @@ ocp_nlp_solver_config *ocp_nlp_config_create(ocp_nlp_solver_plan plan, int N)
void *config_mem = calloc(1, bytes);
ocp_nlp_solver_config *config = ocp_nlp_solver_config_assign(N, config_mem);
if (plan.nlp_solver == SQP_GN)
if (plan.nlp_solver == SQP)
{
ocp_nlp_sqp_config_initialize_default(config);
}
@@ -33,7 +33,7 @@ extern "C" {
typedef enum
{
SQP_GN, // why _GN ??? exact hessian would use the same scheme
SQP,
SQP_RTI,
} ocp_nlp_solver_t;
@@ -152,7 +152,7 @@ void ocp_nlp::initialize_solver(std::string solver_name, std::map<std::string, o
if (solver_name == "sqp")
{
ocp_nlp_sqp_config_initialize_default(config_.get());
plan_->nlp_solver = SQP_GN;
plan_->nlp_solver = SQP;
}
else
{
@@ -115,7 +115,7 @@ static void mdlStart(SimStruct *S)
nq[NUM_STAGES] = 0;
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(NUM_STAGES);
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
for (int i = 0; i < NUM_STAGES; i++)
{
@@ -1237,7 +1237,7 @@ void setup_and_solve_nlp(int NN,
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(NN);
// TODO(dimitris): not necessarily GN, depends on cost module
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
ocp_nlp_cost_t cost_type = cost_enum(cost_str);
switch (cost_type)
@@ -525,7 +525,7 @@ void setup_and_solve_nlp(std::string const& integrator_str, std::string const& q
ocp_nlp_solver_plan *plan = ocp_nlp_plan_create(NN);
plan->nlp_solver = SQP_GN;
plan->nlp_solver = SQP;
for (int i = 0; i <= NN; i++)
plan->nlp_cost[i] = LINEAR_LS;

0 comments on commit 16453c3

Please sign in to comment.