Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
c9d60d98
Commit
c9d60d98
authored
May 30, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compile time bug and also made it so you can set all the targets at once.
parent
c4e4cd00
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
mpc.h
dlib/control/mpc.h
+9
-1
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
+=
tra
ns
(
B
)
*
temp
*
B
;
lambda
+=
tra
ce
(
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