Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
6e745ddd
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6e745ddd
编写于
11月 14, 2018
作者:
J
JasonZhou404
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Planning: OpenSpace: tuning dual warm start
上级
1b4df402
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
35 deletion
+36
-35
modules/planning/conf/planner_open_space_config.pb.txt
modules/planning/conf/planner_open_space_config.pb.txt
+1
-1
modules/planning/open_space/dual_variable_warm_start_ipopt_interface.cc
...ng/open_space/dual_variable_warm_start_ipopt_interface.cc
+23
-23
modules/planning/open_space/dual_variable_warm_start_ipopt_interface.h
...ing/open_space/dual_variable_warm_start_ipopt_interface.h
+3
-4
modules/planning/open_space/dual_variable_warm_start_problem.cc
...s/planning/open_space/dual_variable_warm_start_problem.cc
+9
-7
未找到文件。
modules/planning/conf/planner_open_space_config.pb.txt
浏览文件 @
6e745ddd
...
...
@@ -15,7 +15,7 @@ warm_start_config : {
}
dual_variable_warm_start_config : {
weight_d : 1
0
.0
weight_d : 1.0
}
distance_approach_config : {
...
...
modules/planning/open_space/dual_variable_warm_start_ipopt_interface.cc
浏览文件 @
6e745ddd
...
...
@@ -128,7 +128,7 @@ bool DualVariableWarmStartIPOPTInterface::get_starting_point(
// 2. lagrange constraint n, 4*obstacles_num * (horizon_+1)
for
(
int
i
=
0
;
i
<
horizon_
+
1
;
++
i
)
{
for
(
int
j
=
0
;
j
<
4
*
obstacles_num_
;
++
j
)
{
x
[
n_index
]
=
0.5
;
x
[
n_index
]
=
1.0
;
++
n_index
;
}
}
...
...
@@ -160,7 +160,7 @@ bool DualVariableWarmStartIPOPTInterface::get_bounds_info(int n, double* x_l,
// horizon_]
for
(
int
i
=
0
;
i
<
horizon_
+
1
;
++
i
)
{
for
(
int
j
=
0
;
j
<
obstacles_edges_sum_
;
++
j
)
{
x_l
[
variable_index
]
=
0.0
;
x_l
[
variable_index
]
=
-
2e19
;
x_u
[
variable_index
]
=
2e19
;
++
variable_index
;
}
...
...
@@ -170,7 +170,7 @@ bool DualVariableWarmStartIPOPTInterface::get_bounds_info(int n, double* x_l,
// 2. lagrange constraint n, [0, 4*obstacles_num-1] * [0, horizon_]
for
(
int
i
=
0
;
i
<
horizon_
+
1
;
++
i
)
{
for
(
int
j
=
0
;
j
<
4
*
obstacles_num_
;
++
j
)
{
x_l
[
variable_index
]
=
0.0
;
x_l
[
variable_index
]
=
-
2e19
;
x_u
[
variable_index
]
=
2e19
;
// nlp_upper_bound_limit
++
variable_index
;
}
...
...
@@ -247,17 +247,17 @@ bool DualVariableWarmStartIPOPTInterface::eval_f(int n, const double* x,
bool
DualVariableWarmStartIPOPTInterface
::
eval_grad_f
(
int
n
,
const
double
*
x
,
bool
new_x
,
double
*
grad_f
)
{
gradient
(
tag_f
,
n
,
x
,
grad_f
);
return
true
;
// std::fill(grad_f, grad_f + n, 0.0);
// int d_index = d_start_index_;
// for (int i = 0; i < horizon_ + 1; ++i) {
// for (int j = 0; j < obstacles_num_; ++j) {
// grad_f[d_index] = weight_d_;
// ++d_index;
// }
// }
// gradient(tag_f, n, x, grad_f);
// return true;
std
::
fill
(
grad_f
,
grad_f
+
n
,
0.0
);
int
d_index
=
d_start_index_
;
for
(
int
i
=
0
;
i
<
horizon_
+
1
;
++
i
)
{
for
(
int
j
=
0
;
j
<
obstacles_num_
;
++
j
)
{
grad_f
[
d_index
]
=
weight_d_
;
++
d_index
;
}
}
return
true
;
}
bool
DualVariableWarmStartIPOPTInterface
::
eval_g
(
int
n
,
const
double
*
x
,
...
...
@@ -733,25 +733,25 @@ void DualVariableWarmStartIPOPTInterface::generate_tapes(int n, int m,
get_starting_point
(
n
,
1
,
xp
,
0
,
zl
,
zu
,
m
,
0
,
lamp
);
trace_on
(
tag_f
);
//
trace_on(tag_f);
for
(
int
idx
=
0
;
idx
<
n
;
idx
++
)
xa
[
idx
]
<<=
xp
[
idx
];
//
for (int idx = 0; idx < n; idx++) xa[idx] <<= xp[idx];
eval_obj
(
n
,
xa
,
&
obj_value
);
//
eval_obj(n, xa, &obj_value);
obj_value
>>=
dummy
;
//
obj_value >>= dummy;
trace_off
();
//
trace_off();
trace_on
(
tag_g
);
//
trace_on(tag_g);
for
(
int
idx
=
0
;
idx
<
n
;
idx
++
)
xa
[
idx
]
<<=
xp
[
idx
];
//
for (int idx = 0; idx < n; idx++) xa[idx] <<= xp[idx];
eval_constraints
(
n
,
xa
,
m
,
g
);
//
eval_constraints(n, xa, m, g);
for
(
int
idx
=
0
;
idx
<
m
;
idx
++
)
g
[
idx
]
>>=
dummy
;
//
for (int idx = 0; idx < m; idx++) g[idx] >>= dummy;
trace_off
();
//
trace_off();
trace_on
(
tag_L
);
...
...
modules/planning/open_space/dual_variable_warm_start_ipopt_interface.h
浏览文件 @
6e745ddd
...
...
@@ -33,10 +33,10 @@
#include "modules/common/configs/vehicle_config_helper.h"
#include "modules/planning/proto/planner_open_space_config.pb.h"
#define tag_f 1
#define tag_g 2
//
#define tag_f 1
//
#define tag_g 2
#define tag_L 3
#define HPOFF 30
//
#define HPOFF 30
namespace
apollo
{
namespace
planning
{
...
...
@@ -163,7 +163,6 @@ class DualVariableWarmStartIPOPTInterface : public Ipopt::TNLP {
unsigned
int
*
cind_L
;
/* column indices */
double
*
hessval
;
/* values */
int
nnz_L
;
int
options_g
[
4
];
int
options_L
[
4
];
//*************** end ADOL-C part ***********************************
};
...
...
modules/planning/open_space/dual_variable_warm_start_problem.cc
浏览文件 @
6e745ddd
...
...
@@ -57,18 +57,20 @@ bool DualVariableWarmStartProblem::Solve(
// Create an instance of the IpoptApplication
Ipopt
::
SmartPtr
<
Ipopt
::
IpoptApplication
>
app
=
IpoptApplicationFactory
();
app
->
Options
()
->
SetStringValue
(
"hessian_approximation"
,
"limited-memory"
);
//
app->Options()->SetStringValue("hessian_approximation", "limited-memory");
// TODO(QiL) : Change IPOPT settings to flag or configs
// app->Options()->SetStringValue("derivative_test", "
first
-order");
// app->Options()->SetStringValue("derivative_test", "
second
-order");
// app->Options()->SetNumericValue("derivative_test_tol", 1.0e-3);
app
->
Options
()
->
SetIntegerValue
(
"print_level"
,
0
);
app
->
Options
()
->
SetIntegerValue
(
"mumps_mem_percent"
,
10
000
);
app
->
Options
()
->
SetIntegerValue
(
"print_level"
,
5
);
// app->Options()->SetIntegerValue("mumps_mem_percent", 2
000);
app
->
Options
()
->
SetNumericValue
(
"mumps_pivtol"
,
1e-5
);
app
->
Options
()
->
SetIntegerValue
(
"max_iter"
,
750
);
app
->
Options
()
->
SetNumericValue
(
"tol"
,
1e-
3
);
app
->
Options
()
->
SetNumericValue
(
"min_hessian_perturbation"
,
1e-12
);
app
->
Options
()
->
SetNumericValue
(
"jacobian_regularization_value"
,
1e-7
);
app
->
Options
()
->
SetNumericValue
(
"tol"
,
1e-
5
);
//
app->Options()->SetNumericValue("min_hessian_perturbation", 1e-12);
//
app->Options()->SetNumericValue("jacobian_regularization_value", 1e-7);
app
->
Options
()
->
SetStringValue
(
"print_timing_statistics"
,
"yes"
);
// app->Options()->SetStringValue("alpha_for_y", "min");
// app->Options()->SetStringValue("recalc_y", "yes");
Ipopt
::
ApplicationReturnStatus
status
=
app
->
Initialize
();
if
(
status
!=
Ipopt
::
Solve_Succeeded
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录