| 1 |
# optidef |
| 2 |
|
| 3 |
Optidef is a small library that provides a standard set of environments for writing optimization problems. |
| 4 |
|
| 5 |
|
| 6 |
## Features |
| 7 |
|
| 8 |
The most important features are: |
| 9 |
|
| 10 |
- Different alignment alternatives between the constraints, objective function and the other problem components. |
| 11 |
|
| 12 |
- Implemenation of a short format where "minimize" is substituted by "min" and "subject to" by "s.t." |
| 13 |
|
| 14 |
- Possibility of splitting the optimization problem across multiple pages. |
| 15 |
|
| 16 |
- It references optimization problem using three different policies: |
| 17 |
* No equation is referenced |
| 18 |
* The problem is referenced with a single label |
| 19 |
* Each equation has an individual reference. |
| 20 |
|
| 21 |
- Limitless number of constraints. |
| 22 |
|
| 23 |
- Four types of optimization problems: |
| 24 |
* minimize |
| 25 |
* maximize |
| 26 |
* arg mini |
| 27 |
* arg maxi |
| 28 |
|
| 29 |
- The objective function can be broken in several lines without compromising the alignment or the structure of the problem. |
| 30 |
|
| 31 |
## Usage |
| 32 |
|
| 33 |
Import the package by directly adding \usepackage{optidef} to your LaTeX document. Consult the documentation for different examples and syntax usage. |
| 34 |
|
| 35 |
|
| 36 |
## Syntax |
| 37 |
|
| 38 |
The syntax to define an optimization problem is given by: |
| 39 |
|
| 40 |
>\begin{mini#}|sizeFormat|[constraintFormat]<break> |
| 41 |
{optimizationVariable} |
| 42 |
{objectiveFunction \label{objectiveReference}} |
| 43 |
{\label{problemReference}} |
| 44 |
{problemResult} |
| 45 |
\addConstraint{LHS.1}{RHS.1 \label{Const.1}}{extraInfo.1} |
| 46 |
\addConstraint{LHS.2}{RHS.2 \label{Const.2}}{extraInfo.2} |
| 47 |
. |
| 48 |
. |
| 49 |
\addConstraint{LHS.N}{RHS.N \label{Const.N}}{extraInfo.N} |
| 50 |
\end{mini#} |
| 51 |
|
| 52 |
|
| 53 |
where mini# takes any of the following values: |
| 54 |
|
| 55 |
- mini\* for no referencing |
| 56 |
- mini! for referencing each equation |
| 57 |
- mini for referencing with a single label the whole problem. |
| 58 |
|
| 59 |
The last two defined problem parameters, "\label{optimizationProblem}"" and "optimizationResult", are mandatory to allow line breaking between the 6 parameters. |
| 60 |
|
| 61 |
After the definition of this parameters, the environment accepts the definition of an infinite number of constraints. |
| 62 |
|
| 63 |
Finally note that \begin{mini#} can be substituted by \begin{maxi#}, \begin{argmini#} or \begin{argmaxi#}. |
| 64 |
|
| 65 |
## Contact for issue reporting or suggestions |
| 66 |
|
| 67 |
E-mail: J.LagoGarcia(at)tudelft.nl |
| 68 |
|
| 69 |
Github: https://github.com/jeslago/optidef |
| 70 |
|
| 71 |
## Latest stable version: Optidef 3.1 |
| 72 |
|
| 73 |
CTAN: https://www.ctan.org/pkg/optidef |
| 74 |
|
| 75 |
## Licensing |
| 76 |
|
| 77 |
Copyright 2018 Jesus Lago |
| 78 |
|
| 79 |
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. |
| 80 |
The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. |
| 81 |
|
| 82 |
This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is Jesus Lago. |
| 83 |
|
| 84 |
This work consists of the file optidef.sty. |