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
Copy file name to clipboardExpand all lines: README.md
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ Notes were produced on the subject in book form written in portuguese language,
58
58
59
59
[[Download the book here]](https://github.com/lucasmoschen/Optimal_Control_Biological/blob/master/notes/book.pdf)
60
60
61
-
It was also developed in notebooks all the laboratories studied in these notes. For these simulation, *Python Programming Language* associated with *Jupyter Notebook* was used, because of its easy usage and aimple interpretation. A class in `optimal_control_class.py` file was designed to deal with all laboratories, no need to worry with the code, initially. This code contains the famous method in the area called forward-backward sweep.
61
+
It was also developed in notebooks all the laboratories studied in these notes. For these simulation, *Python Programming Language* associated with *Jupyter Notebook* was used, because of its easy usage and simple interpretation. A class in `optimal_control_class.py` file was designed to deal with all laboratories, no need to worry with the code, initially. This code contains the famous method in the area called forward-backward sweep.
62
62
63
63
### Built With
64
64
@@ -100,8 +100,8 @@ After opening each notebook, it's easy to follow the guide.
100
100
101
101
If one have a optimal control problem, it can be used the Python class developed for your case. This function can handle problems with:
102
102
103
-
- Initial condition of the states (obliged);
104
-
- A characterization of the control in order to update it each iteration, that is, write $u = f(t, x, \lambda)$ (obliged);
103
+
- Initial conditions of the states (obliged);
104
+
- A characterization of the control in order to update it each iteration, that is, write $$u = f(t, x, \lambda)$$ (obliged);
105
105
- Linear payoff terms (optional);
106
106
- Bounds in the control (optional);
107
107
- One or several states.
@@ -117,17 +117,21 @@ For example, in the Laboratory 8, we first define these variables
117
117
118
118

119
119
120
-
Because we have more than one state, we specify `n_states = 3`. We also specify the bounds. It must be specified as a list of tuples indicating for each control, its bounds. `numpy.inf` is a possibility. However, the control characterization must be written inserting the bounds as specified in the example. If one have a linear payoff term, it can be specified as a function:`diff_phi = lambda x, params: np.array([C, D, E])`. Observe that the parameters must be passed as a dictionary, including in the functions.
120
+
Because we have more than one state, we specify `n_states = 3`. We also specify the bounds. The bounds must be specified as a list of tuples for each control and `numpy.inf` is a possibility. However, the control's characterization must be written including the bounds as specified in the example. If one have a linear payoff term, it can be specified as a function:
Observe that the parameters must be passed as a dictionary, including in the functions. At last, we define the final time and initial condition and use it in the `solve` method.
123
125
124
-
At last, we define the final time and initial condition and use it in the `solve` method.
126
+

125
127
126
128
If one has a Bang-Bang problem, the characterization of u is given by
127
129
128
130
`u = lambda t, x, lambda, params: a if psi(t) < 0 else b`
129
131
130
-
Suppose we have a nonlinear payoff term or we define a final value for some state, in these cases, we do not have the final value for the adjoint corresponding to the state with that additional condition. In this case, the adapted forward-backward sweep must be used. It's not developed for so, but can be used in the following manner: one define the list `free_adj_final` with the adjoints with that characteristic. Associated with that, one make a guess passing it in `theta_list` parameter. For more details, consult the notebook `Chapter21-examples.ipynb`.
132
+
Suppose we have a nonlinear payoff term or we define a final value for some state, in these cases, we do not have the final value for the adjoint corresponding to the state with that additional condition. In this case, the adapted forward-backward sweep must be used. It's not developed for so, but can be used in the following manner: one define the list `free_adj_final` with the adjoints with that characteristic. Associated with that, one make a guess passing it in `theta_list` parameter. For more details, consult the notebook
0 commit comments