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