From f896e34772340a2d923e3aebfc682ba23ce4090a Mon Sep 17 00:00:00 2001
From: Olivier Cots <olivier.cots@enseeiht.fr>
Date: Fri, 26 Mar 2021 12:01:13 +0100
Subject: [PATCH] update links to general presentation

---
 .../ex1_cor_application_simple_shooting.ipynb |  2 +-
 .../ex2_cor_implement_simple_shooting.ipynb   |  2 +-
 .../ex3_cor_multiple_shooting_bsb.ipynb       |  2 +-
 .../ex1_application_simple_shooting.ipynb     |  2 +-
 .../ex2_implement_simple_shooting.ipynb       |  2 +-
 .../exercices/ex3_multiple_shooting_bsb.ipynb |  2 +-
 course/lecture/lecture_simple_shooting.ipynb  | 57 +++++++++++--------
 7 files changed, 38 insertions(+), 31 deletions(-)

diff --git a/course/corrections/ex1_cor_application_simple_shooting.ipynb b/course/corrections/ex1_cor_application_simple_shooting.ipynb
index ba865c8..eb2a4cc 100644
--- a/course/corrections/ex1_cor_application_simple_shooting.ipynb
+++ b/course/corrections/ex1_cor_application_simple_shooting.ipynb
@@ -79,7 +79,7 @@
    "metadata": {},
    "source": [
     "**_Remark._** \n",
-    "* See this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method with the use of nutopy package. \n",
+    "* See this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method with the use of nutopy package. \n",
     "* See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example. \n",
     "* See this [page](https://ct.gitlabpages.inria.fr/nutopy/) for the documention of nutopy package."
    ]
diff --git a/course/corrections/ex2_cor_implement_simple_shooting.ipynb b/course/corrections/ex2_cor_implement_simple_shooting.ipynb
index 431d8d5..0229c0a 100644
--- a/course/corrections/ex2_cor_implement_simple_shooting.ipynb
+++ b/course/corrections/ex2_cor_implement_simple_shooting.ipynb
@@ -65,7 +65,7 @@
     "\n",
     "Steps:\n",
     "\n",
-    "1. Use nutopy package to solve the problem: see this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method with the use of nutopy package. See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example.\n",
+    "1. Use nutopy package to solve the problem: see this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method with the use of nutopy package. See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example.\n",
     "2. Replace the [numerical integrator](https://en.wikipedia.org/w/index.php?title=Numerical_integration&oldid=1000975450). It is asked to code Euler (order 1) and Runge (order 2) methods and a Runge-Kutta method of order 4.\n",
     "3. Replace the [Newton solver](https://en.wikipedia.org/wiki/Newton%27s_method). It is asked to code a simple version of a Newton solver."
    ]
diff --git a/course/corrections/ex3_cor_multiple_shooting_bsb.ipynb b/course/corrections/ex3_cor_multiple_shooting_bsb.ipynb
index 9762324..6520695 100644
--- a/course/corrections/ex3_cor_multiple_shooting_bsb.ipynb
+++ b/course/corrections/ex3_cor_multiple_shooting_bsb.ipynb
@@ -84,7 +84,7 @@
     "2. Determine the structure of the non-regularized optimal control problem, that is the structure Bang-Singular-Bang, and find a good approximation of the switching times and of the initial co-vector.\n",
     "3. Solve the non-regularized optimal control problem by multiple shooting.\n",
     "\n",
-    "**_Remark 1._** See this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method.\n",
+    "**_Remark 1._** See this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method.\n",
     "\n",
     "**_Remark 2._** In this particular example, the singular control does not depend on the costate $p$ since it is constant. This happens in low dimension. This could be taken into consideration to simplify the definition of the multiple shooting method. However, to stay general, we will not consider this particular property in this notebook.  \n"
    ]
diff --git a/course/exercices/ex1_application_simple_shooting.ipynb b/course/exercices/ex1_application_simple_shooting.ipynb
index 350e9e1..2a76b9c 100644
--- a/course/exercices/ex1_application_simple_shooting.ipynb
+++ b/course/exercices/ex1_application_simple_shooting.ipynb
@@ -79,7 +79,7 @@
    "metadata": {},
    "source": [
     "**_Remark._** \n",
-    "* See this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method with the use of nutopy package. \n",
+    "* See this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method with the use of nutopy package. \n",
     "* See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example. \n",
     "* See this [page](https://ct.gitlabpages.inria.fr/nutopy/) for the documention of nutopy package."
    ]
diff --git a/course/exercices/ex2_implement_simple_shooting.ipynb b/course/exercices/ex2_implement_simple_shooting.ipynb
index 82037ec..d6f8571 100644
--- a/course/exercices/ex2_implement_simple_shooting.ipynb
+++ b/course/exercices/ex2_implement_simple_shooting.ipynb
@@ -65,7 +65,7 @@
     "\n",
     "Steps:\n",
     "\n",
-    "1. Use nutopy package to solve the problem: see this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method with the use of nutopy package. See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example.\n",
+    "1. Use nutopy package to solve the problem: see this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method with the use of nutopy package. See this [page](https://ct.gitlabpages.inria.fr/gallery/smooth_case/smooth_case.html) for a more detailed use of nutopy package on a smooth example.\n",
     "2. Replace the [numerical integrator](https://en.wikipedia.org/w/index.php?title=Numerical_integration&oldid=1000975450). It is asked to code Euler (order 1) and Runge (order 2) methods and a Runge-Kutta method of order 4.\n",
     "3. Replace the [Newton solver](https://en.wikipedia.org/wiki/Newton%27s_method). It is asked to code a simple version of a Newton solver."
    ]
diff --git a/course/exercices/ex3_multiple_shooting_bsb.ipynb b/course/exercices/ex3_multiple_shooting_bsb.ipynb
index 561097d..6493ec5 100644
--- a/course/exercices/ex3_multiple_shooting_bsb.ipynb
+++ b/course/exercices/ex3_multiple_shooting_bsb.ipynb
@@ -84,7 +84,7 @@
     "2. Determine the structure of the non-regularized optimal control problem, that is the structure Bang-Singular-Bang, and find a good approximation of the switching times and of the initial co-vector.\n",
     "3. Solve the non-regularized optimal control problem by multiple shooting.\n",
     "\n",
-    "**_Remark 1._** See this [page](https://ct.gitlabpages.inria.fr/gallery/shooting_tutorials/simple_shooting_general.html) for a general presentation of the simple shooting method.\n",
+    "**_Remark 1._** See this [page](../lecture/lecture_simple_shooting.ipynb) for a general presentation of the simple shooting method.\n",
     "\n",
     "**_Remark 2._** In this particular example, the singular control does not depend on the costate $p$ since it is constant. This happens in low dimension. This could be taken into consideration to simplify the definition of the multiple shooting method. However, to stay general, we will not consider this particular property in this notebook.  \n"
    ]
diff --git a/course/lecture/lecture_simple_shooting.ipynb b/course/lecture/lecture_simple_shooting.ipynb
index 557165d..a544cd2 100644
--- a/course/lecture/lecture_simple_shooting.ipynb
+++ b/course/lecture/lecture_simple_shooting.ipynb
@@ -98,7 +98,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x104742fd0>"
+       "<IPython.lib.display.IFrame at 0x10cab5f10>"
       ]
      },
      "execution_count": 1,
@@ -130,7 +130,6 @@
     "    \n",
     "According to the PMP, if $u$ is solution of the problem (with $x$ the *associated trajectory*), then there exists a *covector* $p$ (which is [absolutely continuous](https://en.wikipedia.org/wiki/Absolute_continuity)), a scalar $p^0 \\in \\{-1, 0\\}$, a *Lagrange multiplier* $\\lambda$, such that: \n",
     "\n",
-    "\n",
     "1. $(p, p^0) \\ne (0,0)$,\n",
     "\n",
     "2. $\\displaystyle \\dot{x}(t) = \\nabla_p H(x(t),p(t),u(t))$, $\\displaystyle \\dot{p}(t) = -\\nabla_x H(x(t),p(t),u(t))$, a.e on $[0, t_f]$,\n",
@@ -142,14 +141,16 @@
     "</div>\n",
     "\n",
     "<div class=\"alert alert-info\">\n",
-    "    \n",
+    "\n",
     "**_Assumptions_**\n",
-    "    \n",
+    "\n",
     "We assume the following:\n",
-    "    \n",
+    "\n",
     "* $U = \\mathrm{R}^m$,\n",
-    "* $\\forall (x,p) \\in \\mathrm{R}^n \\times \\mathrm{R}^n$, $u \\mapsto H(x,p,u)$ has a unique maximum denoted $\\varphi(x,p)$ (or $u[x,p]$ to recall the fact that it is the control law in feedback form),\n",
-    "* $\\varphi$ is smooth, that is at least $C^1$.\n",
+    "* $\\forall (x,p) \\in \\mathrm{R}^n \\times \\mathrm{R}^n$, $u \\mapsto H(x,p,u)$ has a unique\n",
+    "    maximum denoted $\\varphi(x,p)$ (or $u[x,p]$ to recall the fact that it is the control\n",
+    "    law in feedback form),\n",
+    "* $\\varphi$ is smooth, that is at least $C^1$.    \n",
     "    \n",
     "</div>\n",
     "\n",
@@ -183,7 +184,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047b4310>"
+       "<IPython.lib.display.IFrame at 0x10cb57c10>"
       ]
      },
      "execution_count": 2,
@@ -244,7 +245,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047b4b90>"
+       "<IPython.lib.display.IFrame at 0x10cbda2d0>"
       ]
      },
      "execution_count": 3,
@@ -284,7 +285,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047b4710>"
+       "<IPython.lib.display.IFrame at 0x10cbdab90>"
       ]
      },
      "execution_count": 4,
@@ -347,11 +348,11 @@
     "**_Remark:_** We do not consider the transversality condition when the target $x_f$ is fixed. We can retrieve simply the Lagrange multiplier by the relation $p(t_f)=\\lambda$.\n",
     "\n",
     "**_Remark:_** The maximization condition,\n",
-    "$$\n",
+    "$\n",
     "H[t] = \\max_{w \\in \\mathrm{R}} H(x(t), p(t), w),\n",
-    "$$\n",
+    "$\n",
     "is equivalent here to the condition \n",
-    "$$\\nabla_u H[t] = 0$$ by concavity.\n",
+    "$\\nabla_u H[t] = 0$ by concavity.\n",
     "\n",
     "Solving $\\nabla_u H[t] = 0$, the control satisfies $u(t) = u[x(t), p(t)] := p(t)$ where we have introduced the smooth function on $\\mathrm{R} \\times \\mathrm{R}$:\n",
     "\n",
@@ -388,7 +389,7 @@
     "satisfying the dynamics $\\dot{z}(t) = (-x(t)+p(t), p(t))$ together with the initial condition $z(0) = (x_0, p_0)$. \n",
     "\n",
     "<div class=\"alert alert-warning\">\n",
-    "  \n",
+    "\n",
     "**_Goal_**\n",
     "    \n",
     "The goal is thus to find the right initial covector $p_0$ such that $x(t_f, x_0, p_0) = x_f$.\n",
@@ -418,7 +419,13 @@
     "\n",
     "with $\\pi_x(x,p) := x$. Solving $S(p_0) = 0$ is what we call the *indirect simple shooting method*.\n",
     "\n",
-    "**_Remark:_** Note that thanks to the PMP, we have replaced the research of u (which is a function of time) by the research of an element of $\\mathrm{R}$: the covector $p_0$. The prize of such a drastic reduction is to work in the *cotangent space*, that is the trajectory $x$ is lifted in a bigger space and adjoined with a covector $p$: this makes the simple shooting method to be qualified of *indirect*. It is important to note that in the indirect methods we work with $z=(x,p)$ and not only with the trajectory $x$.\n",
+    "<div class=\"alert alert-success\">\n",
+    "\n",
+    "**_Summary_**\n",
+    "    \n",
+    "Note that thanks to the PMP, we have replaced the research of u (which is a function of time) by the research of an element of $\\mathrm{R}$: the covector $p_0$. The prize of such a drastic reduction is to work in the *cotangent space*, that is the trajectory $x$ is lifted in a bigger space and adjoined with a covector $p$: this makes the simple shooting method to be qualified of *indirect*. It is important to note that in the indirect methods we work with $z=(x,p)$ and not only with the trajectory $x$.\n",
+    "\n",
+    "</div>\n",
     "\n",
     "<!--<video width=600 src=\"http://cots.perso.enseeiht.fr/indirect_simple_shooting/video4_EX1D.mov\" controls>video4_EX1D.mov</video>-->\n"
    ]
@@ -442,7 +449,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047b4ed0>"
+       "<IPython.lib.display.IFrame at 0x10cbde710>"
       ]
      },
      "execution_count": 5,
@@ -485,7 +492,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047c2910>"
+       "<IPython.lib.display.IFrame at 0x10cbe1150>"
       ]
      },
      "execution_count": 6,
@@ -561,7 +568,7 @@
     "<div class=\"alert alert-info\">\n",
     "\n",
     "**_Boundary value problem_**\n",
-    "    \n",
+    "\n",
     "Under our assumptions and thanks to the PMP we have to solve the following boundary value problem with a parameter $\\lambda$:\n",
     "\n",
     "$$\n",
@@ -584,7 +591,7 @@
     "<div class=\"alert alert-info\">\n",
     "\n",
     "**_Shooting function_**\n",
-    "    \n",
+    " \n",
     "To solve the BVP, we define a set of nonlinear equations, the so-called the *shooting equations*. To do so, we introduce the *shooting function* $S \\colon \\mathrm{R}^n \\times \\mathrm{R}^k \\to \\mathrm{R}^k \\times \\mathrm{R}^n$:\n",
     "\n",
     "$$\n",
@@ -600,10 +607,10 @@
     "    \n",
     "</div>\n",
     "\n",
-    "<div class=\"alert alert-warning\">\n",
-    "    \n",
+    "<div class=\"alert alert-success\">\n",
+    "\n",
     "**_Indirect simple shooting method_**\n",
-    "    \n",
+    " \n",
     "Solving the BVP is equivalent to find a zero of the shooting function, that is to solve \n",
     "\n",
     "$$\n",
@@ -684,7 +691,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047c6150>"
+       "<IPython.lib.display.IFrame at 0x10cbdeb50>"
       ]
      },
      "execution_count": 7,
@@ -723,7 +730,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x1047c6a10>"
+       "<IPython.lib.display.IFrame at 0x10cbe1190>"
       ]
      },
      "execution_count": 8,
@@ -762,7 +769,7 @@
        "        "
       ],
       "text/plain": [
-       "<IPython.lib.display.IFrame at 0x104745cd0>"
+       "<IPython.lib.display.IFrame at 0x10cbe1990>"
       ]
      },
      "execution_count": 9,
-- 
GitLab