Skip to content

Conversation

ArnaudDeza
Copy link
Collaborator

Preliminary draft of my chapter in Pluto. Arnaud will have to update the julia file for Monday Sept 29 (birthday!) with a more complete version of the chapter

@ArnaudDeza
Copy link
Collaborator Author

Hi, this is the current draft of the preliminary chapter. Some things I am struggling with and would love some help/comments about:

  • How long should the chapter be? I.e how long should it take someone to read and play with the code?
  • Is this the correct structure for the chapter: have one main overview file that basically links to the smaller subsections that the read goes over sequentially?

@andrewrosemberg
Copy link
Member

Grade commit f552acd.

@klamike please review and:

  • Send us the grade relative to the grade commit.

  • Request changes in order for this to be a fully readable and good chapter.

The grade should be evaluated using the following metric (that sums up to 100 max):

  • (33) Is this fully readable (complete sentences, coherent text, ...)? 30 means that it reads like a book chapter, and there is no room for ambiguity.
  • (34) Is the content correct? 30 Means there are no mistakes.
  • (33) Does this bridge the student from the previous class to the next? 30 means that a student who doesn't work on optimization has all the optimization background they will need to follow the next lectures.

@andrewrosemberg
Copy link
Member

Hi, this is the current draft of the preliminary chapter. Some things I am struggling with and would love some help/comments about:

  • How long should the chapter be? I.e how long should it take someone to read and play with the code?
  • Is this the correct structure for the chapter: have one main overview file that basically links to the smaller subsections that the read goes over sequentially?

Unfortunately, these questions were due prior to the deadline, but @klamike review should help you from now on to get it to the standards we want for the book.

@andrewrosemberg
Copy link
Member

andrewrosemberg commented Sep 29, 2025

From what I see, we are missing edits to the chapter main page that would read like a chapter intro to guide the reader. The current version is not up to standards. We don't want lists: https://github.com/LearningToOptimize/LearningToControlClass/blob/main/class02/overview.md.

Previous documents have not been removed. Please clean up the folder and files pinged to the documentation.


# ╔═╡ a89a5e16-9c64-11f0-3c6f-772fd0a68437
md"""
## Sections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatGPT loves lists. We want paragraphs that guide the reader through the content.

"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use a lecture central project.toml if possible

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

begin
class_dir = @__DIR__
import Pkg
Pkg.activate(".")
Pkg.instantiate()
using PlutoUI
using PlutoTeachingTools
using MarkdownLiteral
end

Copy link
Collaborator

@klamike klamike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall great start, but still some work to be done before it reaches what I imagine a 100% would look like. Adding the code you showed us in class will go a long way, as well as adjusting wordings to be paragraphs instead of bullet points as Andrew suggested. For more detailed feedbacks, see the comments.

Grade:

(25/33) Readability   (use paragraphs, fix math format)
(33/34) Correctness   (see comment on Gauss-Newton)
(22/33) Completeness  (see comments throughout)

Total: 80/100

Note that I did not review the correctness of all of the math equations in detail due to the formatting issue making it difficult to do so.


Though it should be obvious since I am myself a student, I want to make it clear that this grade is by no means final. Indeed, it is a function of not only the quality of your chapter draft but also my ability to review it. Furthermore, it is my understanding that you have the option of improving the chapter until the end of the semester (which I am happy to help with, too). Thanks again for volunteering for an early class, and for delivering a great, engaging lecture.

* **Learning-based control** wraps optimizers inside training loops (differentiable programming), so smoothness and convergence matter.

**Mental model (any time step (k))**
State (x_k) → **optimizer** solves a small problem → control (u_k) → plant evolves (x_{k+1}=f(x_k,u_k)).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
State (x_k) **optimizer** solves a small problem control (u_k) plant evolves (x_{k+1}=f(x_k,u_k)).
State $x_k$ **optimizer** solves a small problem control $u_k$ plant evolves $x_{k+1}=f(x_k,u_k)$.

I won't leave comments on all of them but please correct the math syntax throughout all the sections/notebooks. See https://plutojl.org/en/docs/latex/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe a more generic term than "plant" here?

"""


# ╔═╡ 46558377-74bc-4453-b2c2-273ccaf3d2d7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please hide the source for all the markdown cells, and any other cells where the source code is not important. You can do this in the UI by clicking the 👁️ icon on the left of the cell.

You can also do this in the source by looking at the very bottom of the file:

# ╠═46558377-74bc-4453-b2c2-273ccaf3d2d7
# ╟─61fc1519-10c9-4b57-ac8f-4b660c08b39d

The means source is shown, the means it is hidden.


* **Vector-valued** (g:\mathbb{R}^m\to\mathbb{R}^n)

* **Jacobian:** (\dfrac{\partial g}{\partial y}\in\mathbb{R}^{n\times m})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider writing out the matrix, so the entries are dg_i/dy_j

Comment on lines +117 to +124
# ╔═╡ a65e8de6-8f17-4adb-8359-cbe8a349eff8
md"""

"""

# ╔═╡ 12cbe2ab-9a12-4db6-a044-de0578bb49f3


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these empty cells at the end

# ╔═╡ a89a5e16-9c64-11f0-3c6f-772fd0a68437
md"""
## Sections
- [Root finding](class02_root_finding.jl)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems these links don't work when using Pluto locally. But we can keep this for now and Andrew/I will fix it for the final book. Have you gotten links between Pluto notebooks working @andrewrosemberg ?


[⬅ Back to overview](class02_overview.jl)

[➡ Constrained minimization & KKT (next)](class02_constrained_min.jl)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this point to sqp?


**Idea.** Solve a nonlinear constrained problem by repeatedly solving a **quadratic program (QP)** built from local models.

* Linearize constraints; build a quadratic model of the **Lagrangian/objective**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better understood through the lens of linearizing the KKT system like we discussed in class. This makes it much easier to understand why we have a quadratic objective but linear constraints. Currently it makes it seem like a design choice when in fact it follows from the KKT linearization.


# ╔═╡ 1adff7b2-d86b-4311-9626-22d52057f551
md"""
## Cell 2 — What is SQP?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the cell numbers

@@ -0,0 +1,308 @@
### A Pluto.jl notebook ###
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall: add the code from class and add more detail to the text descriptions. I did not review the math in detail due to format issue.

]
Solve the QP for (d_k), then set (x_{k+1}=x_k+\alpha_k d_k) using a merit/filter/trust-region globalization.

*(When you add code: plot feasibility (|g|), violation (|h^-|), and objective vs. iteration.)*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants