[Doc] User guide to the duals: every kind, constraint ↔ dual, direct ↔ indirect

Đang mở
#1,035 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ocots đang làm issue này rồi.

Từ ngày 31/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Part of control-toolbox/CTFlows.jl#512 (tracking of the constraint duals), workstream C.

Goal

A user-side guide to the duals of a solution. It should show users everything they can get, how each dual relates to its constraint, and how the direct and the indirect methods meet. #1015 (the page on the convention) and #1016 (the sign examples) are parts of it. This issue is the guide that puts them together and shows off the feature.

What the guide should show

  1. Every kind of dual, read by its label with dual(sol, ocp, :label): path (pure state, mixed), state box, control box, boundary, and variable box. For each kind: what it is (a function of time or a number), its sign, and how it appears in plot(sol).
  2. The link between a constraint and its dual.
    • An inequality has a nonnegative dual however it is written; an equality or a two-sided constraint has a signed dual (SGN2, SGN3).
    • The dual is 0 where the constraint is inactive and nonzero on a boundary arc.
    • The same constraint as a box or as a path constraint gives the same dual (SGN5).
    • The labels: why naming a constraint matters, and what happens without a name.
  3. The link between the direct and the indirect method.
    • The same problem solved by solve and rebuilt with Flow(ocp, law; constraint=:label, multiplier=μ): the same costate and the same duals, compared on one plot.
    • The dictionary between the μ of the maximum principle and dual.
    • What the indirect side computes by itself (control box, boundary duals by transversality) and what the user gives (μ of a state or mixed constraint).
    • Multi-phase solutions: the jumps of the duals at the switching times (#992).
  4. What a dual tells about the solution: sensitivity, a check of the extremal, and an unknown dual (PreconditionError) rather than a wrong 0.

Depends on

The features of control-toolbox/CTFlows.jl#512, workstreams A and B. Each section can be written as soon as its feature is released. Each example should also be a test (#1034).

Related: #1014, #1015, #1016, #1034, #992, #968.

🤖 Generated with Claude Code

Ngôn ngữ chính
Julia
Star
135
Fork
11
Merge trung bình
7 giờ 49 phút
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của control-toolbox/OptimalControl.jl

Tất cả issue của control-toolbox/OptimalControl.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.