8000 Update documentation for python API by sandmaennchen · Pull Request #1253 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update documentation for python API #1253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SPHINXPROJ = acados
SOURCEDIR = .
BUILDDIR = _build
GENERATED = .doctrees _static _sources .buildinfo .nojekyll genindex.html objects.inv search.html searchindex.js
DOXYBUILDDIR = _build_doxygen_c_interface _build_doxygen
DOXYBUILDDIR = _build_doxygen # _build_doxygen_c_interface


default: doxygen html
Expand All @@ -52,9 +52,10 @@ html:
@$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doxygen:
@$(DOXYBUILD) c_interface/Doxyfile
@$(DOXYBUILD) doxygen/Doxyfile

# @$(DOXYBUILD) c_interface/Doxyfile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"use_source_button": True,
"use_issues_button": True,
"show_navbar_depth": 1, # 2 looks nice, but only extends for real subpages, like C interface, which is not so relevant
"show_toc_level": 1,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Documentation latest build: |today|
interfaces/index
python_interface/index
matlab_octave_interface/index
c_interface/index
embedded_workflow/index
```

<!-- c_interface/index -->
52 changes: 38 additions & 14 deletions docs/python_interface/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,92 +103,116 @@ The following image shows an overview of the available classes in the `acados` P
:align: center
```

## acados OCP solver interface -- `AcadosOcp` and `AcadosOcpSolver`
The class [`AcadosOcp`](#acados_template.acados_ocp.AcadosOcp) can be used to formulate optimal control problems (OCP), for which an acados solver ([`AcadosOcpSolver`](#acados_template.acados_ocp_solver.AcadosOcpSolver)) can be created.
## `acados` OCP solver interface

The interface to interact with the acados OCP solver in C is based on [ctypes](https://cython.org/).
The class [`AcadosOcp`](#acados_template.acados_ocp.AcadosOcp) can be used to formulate optimal control problems (OCP), for which an `acados` solver ([`AcadosOcpSolver`](#acados_template.acados_ocp_solver.AcadosOcpSolver)) can be created.

The interface to interact with the `acados` OCP solver in C is based on [ctypes](https://cython.org/).

Additionally, there is the option to use a Cython based wrapper around the C part.
This offers faster interaction with the solver, because getter and setter calls, which include shape checking are done in compiled C code.
The cython based wrapper is called [`AcadosOcpSolverCython`](#acados_template.acados_ocp_solver.AcadosOcpSolverCython) and was added in [PR #791](https://github.com/acados/acados/pull/791).
`AcadosOcpSolverCython` and `AcadosOcpSolver` offer the same functionality and equivalent behavior is ensured in CI tests.


### `AcadosOcpSolver`
``` eval_rst
.. automodule:: acados_template.acados_ocp_solver
:members:
:private-members:
:exclude-members: make_ocp_dims_consistent
```


<!-- ## acados OCP -->
### `AcadosOcp`
``` eval_rst
.. automodule:: acados_template.acados_ocp
:members:
:private-members:
:exclude-members:
```

### `AcadosOcpCost`
``` eval_rst
.. automodule:: acados_template.acados_ocp_cost
:members:
:private-members:
:exclude-members:
```

### `AcadosOcpConstraints`
``` eval_rst
.. automodule:: acados_template.acados_ocp_constraints
:members:
:private-members:
:exclude-members:
```

### `AcadosOcpOptions`
``` eval_rst
.. automodule:: acados_template.acados_ocp_options
:members:
:private-members:
:exclude-members:
```

### `AcadosOcpDims`
``` eval_rst
.. automodule:: acados_template.acados_dims
:members:
:members: AcadosOcpDims
:private-members:
:exclude-members:
```



<!-- ## acados model -->
### `AcadosModel`
``` eval_rst
.. automodule:: acados_template.acados_model
:members:
:members: AcadosModel
:private-members:
:exclude-members:
```



## acados integrator interface -- `AcadosSim` and `AcadosSimSolver`
## `acados` integrator interface

The class `AcadosSim` can be used to formulate a simulation problem, for which an acados integrator (`AcadosSimSolver`) can be created.
The class [`AcadosSim`](#acados_template.acados_sim.AcadosSim) can be used to formulate a simulation problem, for which an acados integrator, [`AcadosSimSolver`](#acados_template.acados_sim_solver.AcadosSimSolver), can be created.
The interface to interact with the acados integrator in C is based on ctypes.


### `AcadosSim`
``` eval_rst
.. automodule:: acados_template.acados_sim
:members:
:members: AcadosSim
:private-members:
:exclude-members:
```

<!-- ## acados sim solver -->
### `AcadosSimSolver`
``` eval_rst
.. automodule:: acados_template.acados_sim_solver
:members:
:private-members:
:exclude-members: make_ocp_dims_consistent
```

### `AcadosSimOptions`
``` eval_rst
.. automodule:: acados_template.acados_sim
:members: AcadosSimOptions
:private-members:
:exclude-members: make_ocp_dims_consistent
```

### `AcadosSimDims`
``` eval_rst
.. automodule:: acados_template.acados_dims
:members: AcadosSimDims
:private-members:
:exclude-members: make_ocp_dims_consistent
```


## Builders
The default builder for `acados` is `make` using a `Makefile` generated by `acados`.
If cross-platform compatibility is required `CMake` can be used to build the binaries required by the solvers.
Expand All @@ -199,7 +223,7 @@ If cross-platform compatibility is required `CMake` can be used to build the bin
```


## acados multi-phase OCP
## `acados` multi-phase OCP
Advanced feature interface to formulate multi-phase OCPs.

Added in
Expand Down
Loading
2908
0