Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
c9d60d98
Commit
c9d60d98
authored
May 30, 2015
by
Davis King
Browse files
Fixed compile time bug and also made it so you can set all the targets at once.
parent
c4e4cd00
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
dlib/control/mpc.h
dlib/control/mpc.h
+9
-1
dlib/control/mpc_abstract.h
dlib/control/mpc_abstract.h
+9
-0
No files found.
dlib/control/mpc.h
View file @
c9d60d98
...
...
@@ -117,7 +117,7 @@ namespace dlib
matrix
<
double
,
S
,
S
>
temp
=
diagm
(
Q
);
for
(
unsigned
long
c
=
0
;
c
<
horizon
;
++
c
)
{
lambda
+=
trans
(
B
)
*
temp
*
B
;
lambda
+=
trace
(
trans
(
B
)
*
temp
*
B
)
;
temp
=
trans
(
A
)
*
temp
*
A
+
diagm
(
Q
);
}
...
...
@@ -153,6 +153,14 @@ namespace dlib
target
[
time
]
=
val
;
}
void
set_target
(
const
matrix
<
double
,
S
,
1
>&
val
)
{
for
(
unsigned
long
i
=
0
;
i
<
horizon
;
++
i
)
target
[
i
]
=
val
;
}
void
set_last_target
(
const
matrix
<
double
,
S
,
1
>&
val
)
...
...
dlib/control/mpc_abstract.h
View file @
c9d60d98
...
...
@@ -188,6 +188,15 @@ namespace dlib
- #get_target(time) == val
!*/
void
set_target
(
const
matrix
<
double
,
S
,
1
>&
val
);
/*!
ensures
- for all valid t:
- #get_target(t) == val
!*/
void
set_last_target
(
const
matrix
<
double
,
S
,
1
>&
val
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment