Skip to content

Commit 075aed1

Browse files
committed
Modifications for ISC paper
1 parent 8303ea5 commit 075aed1

File tree

1 file changed

+56
-42
lines changed

1 file changed

+56
-42
lines changed

main_isc.tex

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
\usepackage{cite}
2828
\usepackage{algorithmic}
2929
\usepackage{textcomp}
30-
\usepackage{hyperref}
30+
\usepackage[
31+
colorlinks=true,
32+
linkcolor=black,
33+
citecolor=black,
34+
urlcolor=black
35+
]{hyperref}
3136
\usepackage{amsmath,amssymb,amsfonts}
3237
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
3338
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
@@ -53,8 +58,8 @@
5358

5459
% Define a switch for double-blind mode
5560
\newif\ifblind
56-
% \blindtrue % set \blindfalse for non-blind mode
57-
\blindfalse
61+
\blindtrue % set \blindfalse for non-blind mode
62+
% \blindfalse
5863

5964
% PDF metadata
6065
\ifblind
@@ -142,7 +147,7 @@ \section{Introduction}
142147

143148
\vspace{0.5cm}
144149
\begin{tikzpicture}[
145-
node distance=1.3cm and 2cm,
150+
node distance=1.3cm and 1.5cm,
146151
every node/.style={font=\scriptsize},
147152
box/.style={
148153
draw, rounded corners, thick,
@@ -317,9 +322,9 @@ \section{From optimal control models to SIMD abstraction}
317322

318323
{\small
319324
\begin{minted}{julia}
320-
function def(; scheme=:trapeze, grid_size=250,
321-
backend=CPU(), init=(0.1, 0.1, 0.1),
322-
base_type=Float64)
325+
function def(; scheme=:trapeze,
326+
grid_size=250, init=(0.1, 0.1, 0.1),
327+
backend=CPU(), base_type=Float64)
323328
\end{minted}
324329
}
325330

@@ -332,7 +337,8 @@ \section{From optimal control models to SIMD abstraction}
332337
x = begin
333338
local ex
334339
try
335-
variable(var"p_ocp##266", 2, 0:grid_size;
340+
variable(var"p_ocp##266", 2,
341+
0:grid_size;
336342
lvar = [var"l_x##271"[var"i##275"]
337343
for (var"i##275", var"j##276") =
338344
Base.product(1:2, 0:grid_size)],
@@ -369,11 +375,13 @@ \section{From optimal control models to SIMD abstraction}
369375
A runtime dimension check ensures that the specified bounds match the length of the state vector being addressed:
370376
{\small
371377
\begin{minted}{julia}
372-
length([-1, 0]) == length([-1, 0]) ==
373-
length(1:2) || throw("wrong bound dimension")
374-
constraint(var"p_ocp##266", (x[var"i##283", 0]
375-
for var"i##283" = 1:2); lcon = [-1, 0],
376-
ucon = [-1, 0])
378+
length([-1, 0]) ==
379+
length([-1, 0]) == length(1:2)
380+
|| throw("wrong bound dimension")
381+
constraint(var"p_ocp##266",
382+
(x[var"i##283", 0] for
383+
var"i##283" = 1:2);
384+
lcon = [-1, 0], ucon = [-1, 0])
377385
\end{minted}
378386
}
379387

@@ -382,9 +390,10 @@ \section{From optimal control models to SIMD abstraction}
382390
{\small
383391
\begin{minted}{julia}
384392
constraint(var"p_ocp##266j",
385-
((x[1, var"j##291" + 1] - x[1, var"j##291"])
386-
- (var"dt##268" * (x[2, var"j##291"] +
387-
x[2, var"j##291" + 1])) / 2
393+
((x[1, var"j##291" + 1] -
394+
x[1, var"j##291"]) - (var"dt##268"
395+
* (x[2, var"j##291"] +
396+
x[2, var"j##291" + 1]))/2
388397
for var"j##291" = 0:grid_size - 1))
389398
\end{minted}
390399
}
@@ -393,11 +402,13 @@ \section{From optimal control models to SIMD abstraction}
393402

394403
{\small
395404
\begin{minted}{julia}
396-
objective(var"p_ocp##266", ((1 * var"dt##268" *
397-
(0.5 * var"u##277"[1, var"j##299"] ^ 2)) / 2
405+
objective(var"p_ocp##266",
406+
((1 * var"dt##268" * (0.5 *
407+
var"u##277"[1, var"j##299"]^2))/2
398408
for var"j##299" = (0, grid_size)))
399-
objective(var"p_ocp##266", (1 * var"dt##268" *
400-
(0.5 * var"u##277"[1, var"j##299"] ^ 2)
409+
objective(var"p_ocp##266",
410+
(1 * var"dt##268" *
411+
(0.5 * var"u##277"[1, var"j##299"]^2)
401412
for var"j##299" = 1:grid_size - 1))
402413
\end{minted}
403414
}
@@ -512,8 +523,7 @@ \section{Supplementary material}
512523
\subsection{Descriptions of the control problems used for the benchmark}
513524
\label{sa1}
514525
The complete code to reproduce the runs of Section~\ref{s6} can be retrieved at the following address:
515-
\href{https://anonymous.4open.science/r/OC-GPU-PP26}{\texttt{https://anonymous.4open.science/r/OC-GPU-PP26}}
516-
% \href{https://github.com/control-toolbox/OC-GPU-paper}{\texttt{github.com/control-toolbox/OC-GPU-paper}}\\
526+
\href{https://anonymous.4open.science/r/OC-GPU/}{\texttt{https://anonymous.4open.science/r/OC-GPU/}}
517527

518528
{\small
519529
\begin{minted}{julia}
@@ -572,34 +582,38 @@ \subsection{Descriptions of the control problems used for the benchmark}
572582
x(0) == zeros(9)
573583

574584
derivative(x1)(t) == x2(t)
575-
derivative(x2)(t) == u1(t) * cos(x7(t)) *
576-
sin(x8(t)) * cos(x9(t)) + u1(t) *
577-
sin(x7(t)) * sin(x9(t))
585+
derivative(x2)(t) == u1(t)
586+
* cos(x7(t)) * sin(x8(t))
587+
* cos(x9(t)) + u1(t)
588+
* sin(x7(t)) * sin(x9(t))
578589
derivative(x3)(t) == x4(t)
579-
derivative(x4)(t) == u1(t) * cos(x7(t)) *
580-
sin(x8(t)) * sin(x9(t)) - u1(t) *
581-
sin(x7(t)) * cos(x9(t))
590+
derivative(x4)(t) == u1(t)
591+
* cos(x7(t)) * sin(x8(t))
592+
* sin(x9(t)) - u1(t)
593+
* sin(x7(t)) * cos(x9(t))
582594
derivative(x5)(t) == x6(t)
583-
derivative(x6)(t) == u1(t) * cos(x7(t)) *
584-
cos(x8(t)) - g
585-
derivative(x7)(t) == u2(t) * cos(x7(t)) /
586-
cos(x8(t)) + u3(t) *
587-
sin(x7(t)) / cos(x8(t))
588-
derivative(x8)(t) ==-u2(t) * sin(x7(t)) +
589-
u3(t) * cos(x7(t))
590-
derivative(x9)(t) == u2(t) * cos(x7(t)) *
591-
tan(x8(t)) + u3(t) * sin(x7(t)) *
592-
tan(x8(t)) + u4(t)
595+
derivative(x6)(t) == u1(t)
596+
* cos(x7(t)) * cos(x8(t)) - g
597+
derivative(x7)(t) == u2(t)
598+
* cos(x7(t)) / cos(x8(t)) + u3(t)
599+
* sin(x7(t)) / cos(x8(t))
600+
derivative(x8)(t) ==-u2(t)
601+
* sin(x7(t)) + u3(t) * cos(x7(t))
602+
derivative(x9)(t) == u2(t)
603+
* cos(x7(t)) * tan(x8(t))
604+
+ u3(t) * sin(x7(t))
605+
* tan(x8(t)) + u4(t)
593606

594607
dt1 = sin(2pi * t / T)
595608
dt3 = 2sin(4pi * t / T)
596609
dt5 = 2t / T
597610

598611
0.5integral( (x1(t) - dt1)^2 +
599-
(x3(t) - dt3)^2 + (x5(t) - dt5)^2 +
600-
x7(t)^2 + x8(t)^2 + x9(t)^2 + r *
601-
(u1(t)^2 + u2(t)^2 +
602-
u3(t)^2 + u4(t)^2) ) => min
612+
(x3(t) - dt3)^2 + (x5(t)
613+
- dt5)^2 + x7(t)^2 + x8(t)^2
614+
+ x9(t)^2 + r * (u1(t)^2
615+
+ u2(t)^2 + u3(t)^2
616+
+ u4(t)^2) ) => min
603617

604618
end
605619
\end{minted}

0 commit comments

Comments
 (0)