Skip to content

Commit

Permalink
Fix documentation for the Simulink Interface (#56)
Browse files Browse the repository at this point in the history
* Correct formatting for the Simulink interface documentation
darnstrom authored Nov 16, 2024
1 parent 5649110 commit f002e2c
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/docs/install.md
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ pip install daqp
```

## Installing the Simulink interface
The Simulink interface can be installed directly by running the following commands in MATLAB in the directory where you want to store interface:
The Simulink interface can be installed directly by running the following commands in MATLAB in the directory where you want to store the interface:
```shell
websave('daqp.tar.gz','https://github.com/darnstrom/daqp/archive/refs/heads/master.tar.gz')
untar('daqp.tar.gz')
21 changes: 11 additions & 10 deletions docs/docs/simulink.md
Original file line number Diff line number Diff line change
@@ -22,16 +22,17 @@ _Note_: Please make sure to have a C-compiler installed on your system and linke
After the c-code has been compiled, a new file called ``daqp_sfunc.mexw64`` (windows) or ``daqp_sfunc.mexa64`` (linux, mac) should be found.

The corresponding S-function block has the following inputs:

| Inputs | Description | Size |
| --- | --- | --- |
| $H$ | The Hessian matrix of the quadratic objective function | [$n$ x $n$] |
| $f$ | The linear part of the objective function | [$n$ x 1]
| $A$ | The matrix of linear constraints | [$m_g$ x $n$]
| $b_l$ | The lower bound of the linear constraints | [$m$ x 1]
| $b_u$ | The upper bound of the linear constraints | [$m$ x 1]
| sense | The type of the constraints | [$m$ x 1]
| $$H$$ | The Hessian matrix of the quadratic objective function | [ $$n$$ x $$n$$ ] |
| $$f$$ | The linear part of the objective function | [ $$n$$ x 1 ] |
| $$A$$ | The matrix of linear constraints | [ $$m_g$$ x $$n$$ ] |
| $$b_l$$ | The lower bound of the linear constraints | [ $$m$$ x 1 ] |
| $$b_u$$ | The upper bound of the linear constraints | [ $$m$$ x 1 ] |
| sense | The type of the constraints | [ $$m$$ x 1 ] |

_Note_: When $b_u$ and $b_l$ have more elements than the number of rows in $A$, the first elements in $b_u$ and $b_l$ are interpreted as simple bounds.
_Note_: When $$b_u$$ and $$b_l$$ have more elements than the number of rows in $$A$$ the first elements in $$b_u$$ and $$b_l$$ are interpreted as simple bounds.

The following parameters are used to set up the problem and need to be set in the mask of the s-function block:

@@ -43,8 +44,8 @@ The block has the following outputs:

| Outputs | Description | Size |
| --- | --- | --- |
| $x$ | The optimal solution | [$n$ x 1] |
| $\lambda$ | The optimal Lagrange multipliers | [$m$ x 1] |
| $f_{val}$ | The optimal value of the objective function | 1 |
| $$x$$ | The optimal solution | [ $$n$$ x 1 ] |
| $$\lambda$$ | The optimal Lagrange multipliers | [ $$m$$ x 1 ] |
| $$f_{val}$$ | The optimal value of the objective function | 1 |
| exitflag | The exit flag of the solver | 1 |
| iter | The number of iterations used by the solver | 1 |

0 comments on commit f002e2c

Please sign in to comment.