You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,6 +76,35 @@ function generate_documentation(PROBLEM::String, DESCRIPTION::String; draft::Uni
67
76
nothing # hide
68
77
```
69
78
79
+
## Metadata
80
+
81
+
The state components are named:
82
+
83
+
```@example main
84
+
metadata(:$PROBLEM)[:state_name]
85
+
```
86
+
87
+
The control components are named:
88
+
89
+
```@example main
90
+
metadata(:$PROBLEM)[:control_name]
91
+
```
92
+
93
+
$VARIABLE_COMPONENTS
94
+
95
+
The default values of the parameters are:
96
+
97
+
```@example main
98
+
metadata(:$PROBLEM)[:parameters]
99
+
using Printf # hide
100
+
println("Parameter = Value") # hide
101
+
println("------------------") # hide
102
+
for e ∈ pairs(metadata(:$PROBLEM)[:parameters]) # hide
103
+
@printf("%6s = ", string(e.first)) # hide
104
+
@printf("%11.4e\\n", e.second) # hide
105
+
end # hide
106
+
```
107
+
70
108
## Initial guess
71
109
72
110
Before solving the problem, it is often useful to inspect the initial guess (sometimes called the first iterate). This guess is obtained by running the NLP solver with `max_iter = 0`, which evaluates the problem formulation without performing any optimisation steps.
@@ -85,8 +123,8 @@ function generate_documentation(PROBLEM::String, DESCRIPTION::String; draft::Uni
85
123
# -----------------------------
86
124
# Extract dimensions from metadata
87
125
# -----------------------------
88
-
x_vars = metadata[problem][:state_name]
89
-
u_vars = metadata[problem][:control_name]
126
+
x_vars = metadata(problem)[:state_name]
127
+
u_vars = metadata(problem)[:control_name]
90
128
n_states = length(x_vars)
91
129
n_controls = length(u_vars)
92
130
@@ -179,14 +217,12 @@ function generate_documentation(PROBLEM::String, DESCRIPTION::String; draft::Uni
179
217
Before solving, we can inspect the discretisation details of the problem. The table below reports the number of grid points, decision variables, and constraints associated with the chosen formulation.
0 commit comments