Skip to content

Commit e98764b

Browse files
committed
begin fixes to paper
1 parent 605198f commit e98764b

File tree

2 files changed

+51
-56
lines changed

2 files changed

+51
-56
lines changed

paper/paper.tex

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ \subsection{Model}
6969
\end{align}
7070
\vskip 6pt
7171

72-
\subsection{Linear GDP reformulation example}
72+
\subsection{Solution Technique: Reformulation to Mixed-Integer Program}
7373
The simplest example of a linear GDP system is given in \eqref{eq:ex} - \eqref{eq:y}, where $Y_i$ is a Boolean indicator variable that enforces the constraints in the disjunct ($Ax \le b$ or $Cx \le d$) when $true$.
7474
\vskip 6pt
7575
\begin{equation}
@@ -107,7 +107,7 @@ \subsection{Linear GDP reformulation example}
107107
\vskip 6pt
108108

109109
\subsubsection{Big-M Reformulation}
110-
The Big-M reformulation for this problem is given by \eqref{eq:x}, \eqref{eq:ex_bigm1} - \eqref{eq:ex_bigm4}, where $M$ is a sufficiently large scalar that makes the particular constraint redundant when its indicator variable is not selected (i.e., $y_i = 0$). Note that the Boolean variables, $Y_i$, are replaced by binary variables, $y_i$. When the integrality constraint in Eq. \eqref{eq:ex_bigm4} is relaxed to $0 \leq x_1, x_2 \leq 1$, the resulting feasible region can be visualized by projecting the relaxed model onto the $x_1, x_2$ plane. This results in the region encapsulated by the dashed line in Figure \ref{fig:bigm}. It should be noted that the relaxed feasible region is not as tight as possible around the original feasible solution space. The choice of the large $M$ value determines the tightness of this relaxation, and the minimal value of $M$ for the optimal relaxation can be found through interval arithmetic when the model is linear. For nonlinear models, the tightest $M$ can be obtained by solving the maximization problem $\{\max h_{ik}(x): x \in X\}$. An alternate method for tight Big-M relaxations is given in \cite{TRESPALACIOS201598}.
110+
The Big-M reformulation for this problem is given by \eqref{eq:ex_bigm1} - \eqref{eq:ex_bigm5}, where $M$ is a sufficiently large scalar that makes the particular constraint redundant when its indicator variable is not selected (i.e., $y_i = 0$). Note that the Boolean variables, $Y_i$, are replaced by binary variables, $y_i$. When the integrality constraint in Eq. \eqref{eq:ex_bigm4} is relaxed to $0 \leq x_1, x_2 \leq 1$, the resulting feasible region can be visualized by projecting the relaxed model onto the $x_1, x_2$ plane. This results in the region encapsulated by the dashed line in Figure \ref{fig:bigm}. It should be noted that the relaxed feasible region is not as tight as possible around the original feasible solution space. The choice of the large $M$ value determines the tightness of this relaxation, and the minimal value of $M$ for the optimal relaxation can be found through interval arithmetic when the model is linear. For nonlinear models, the tightest $M$ can be obtained by solving the maximization problem $\{\max h_{ik}(x): x \in X\}$. An alternate method for tight Big-M relaxations is given in \cite{TRESPALACIOS201598}.
111111

112112
\begin{equation}
113113
\label{eq:ex_bigm1}
@@ -123,6 +123,10 @@ \subsection{Linear GDP reformulation example}
123123
\end{equation}
124124
\begin{equation}
125125
\label{eq:ex_bigm4}
126+
0 \leq x \leq U
127+
\end{equation}
128+
\begin{equation}
129+
\label{eq:ex_bigm5}
126130
y_1, y_2 \in \{0,1\}
127131
\end{equation}
128132

@@ -134,24 +138,36 @@ \subsection{Linear GDP reformulation example}
134138
\end{figure}
135139

136140
\subsubsection{Hull Reformulation}
137-
The Hull reformulation is given by \eqref{eq:x}, \eqref{eq:ex_bigm3} - \eqref{eq:ex_hull3}, which requires lifting the model to a higher-dimensional space. When projected to the original space, the continuous relaxation of the model is tighter than its Big-M equivalent \cite{grossmann_trespalacios_2013}. The reformulation relaxation can be visualized by the region encapsulated by the dashed line in Figure \ref{fig:chr}. Note that this reformulation provides a tighter relaxation than the Big-M reformulation in Figure \ref{fig:bigm}. Also note that describing the geometry of this relaxation is more complex than the Big-M relaxation, which is made possible by the increased number of constraints and variables in the model.
141+
The Hull reformulation is given by \eqref{eq:ex_hull0} - \eqref{eq:ex_hull6}, which requires lifting the model to a higher-dimensional space. When projected to the original space, the continuous relaxation of the model is tighter than its Big-M equivalent \cite{grossmann_trespalacios_2013}. The reformulation relaxation can be visualized by the region encapsulated by the dashed line in Figure \ref{fig:chr}. Note that this reformulation provides a tighter relaxation than the Big-M reformulation in Figure \ref{fig:bigm}. Also note that describing the geometry of this relaxation is more complex than the Big-M relaxation, which is made possible by the increased number of constraints and variables in the model.
138142

139143
\begin{equation}
140-
\label{eq:ex_hull1}
144+
\label{eq:ex_hull0}
141145
Ax_1 \leq by_1
142146
\end{equation}
143147
\begin{equation}
144-
\label{eq:ex_hull0}
148+
\label{eq:ex_hull1}
145149
Cx_2 \leq dy_2
146150
\end{equation}
147151
\begin{equation}
148152
\label{eq:ex_hull2}
149153
x = x_1 + x_2
150154
\end{equation}
155+
\begin{equation}
156+
\label{eq:ex_hull4}
157+
y_1 + y_2 = 1
158+
\end{equation}
159+
\begin{equation}
160+
\label{eq:ex_hull5}
161+
0 \leq x \leq U
162+
\end{equation}
151163
\begin{equation}
152164
\label{eq:ex_hull3}
153165
0 \leq x_i \leq U y_i \quad \forall i \in \{1,2\}
154166
\end{equation}
167+
\begin{equation}
168+
\label{eq:ex_hull6}
169+
y_1, y_2 \in \{0,1\}
170+
\end{equation}
155171

156172
\begin{figure}%[H]
157173
\centering
@@ -173,10 +189,10 @@ \subsubsection{Propositional Logic}
173189
(A \land B) \lor C & \text{ is replaced by } (A \lor C) \land (B \lor C)
174190
\end{align*}
175191

176-
Once the logic propositions are converted to CNF, each clause can be converted into an algebraic constraint with the following equivalence (Note: any negated Boolean variables, $\neg Y_i$, are replaced with $1-y_i$ in the reformulation),
192+
Once the logic propositions are converted to CNF, each clause can be converted into an algebraic constraint with the following equivalence, where the set $I$ represents the subset boolean variables present in the clause, and the set $J$ represents the subset of boolean variables present in the clause in negated form,
177193

178194
\begin{align*}
179-
\bigvee_{i \in I} Y_i & \ \ \text{becomes} \ \ \sum_{i\in I} y_i \geq 1 \\
195+
\bigvee_{i \in I} Y_i \bigvee_{j \in J} (\neg Y_j) & \ \ \text{becomes} \ \ \sum_{i \in I} y_i + \sum_{j \in J} (1-y_j) \geq 1 \\
180196
\end{align*}
181197

182198
Alternate approaches exist for converting propositional logic statements into CNF, which involve preserving clause satisfiability rather than clause equivalence. These approaches prevent exponential size increase in clauses and yield logically consistent results \cite{jackson_sheridan_2005}.
@@ -288,16 +304,19 @@ \subsection{Example}
288304
\item Create the JuMP model and define the model variables and global constraints (mass balances).
289305

290306
\begin{lstlisting}[language = Julia]
291-
using DisjunctiveProgramming, JuMP, HiGHS
307+
using DisjunctiveProgramming, HiGHS
292308

293309
# create model
294-
m = JuMP.Model(HiGHS.Optimizer)
310+
m = GDPModel(HiGHS.Optimizer)
295311
# add variables to model
296312
@variable(m, 0 <= F[i = 1:7] <= 10)
297313
@variable(m, 0 <= CS <= CSmax)
298314
@variable(m, CRmin <= CR <= CRmax)
315+
# add logical variables to model
316+
@variable(m, YR[1:2], LogicalVariable)
317+
@variable(m, YS[1:2], LogicalVariable)
299318

300-
# add constraints to model
319+
# add global constraints to model
301320
@constraints(m,
302321
begin
303322
F[1] == F[2] + F[3]
@@ -307,56 +326,32 @@ \subsection{Example}
307326
\end{lstlisting}
308327
\item Define the inner (nested) disjunction for the separation technologies in the superstructure using the \verb|@disjunction| macro.
309328
\begin{lstlisting}[language = Julia]
310-
@disjunction(m,
311-
begin
312-
F[5] == β[:S1]*F[4]
313-
CS == γ[:S1]
314-
end,
315-
begin
316-
F[5] == β[:S2]*F[4]
317-
CS == γ[:S2]
318-
end,
319-
reformulation = :big_m, # reformulation type
320-
name = :YS # symbol for indicator variable
321-
)
322-
\end{lstlisting}
323-
\item Define constraints in the outer disjunctions.
324-
\begin{lstlisting}[language = Julia]
325-
# define constraints in left disjunct
326-
R1_con = @constraints(m,
327-
begin
328-
F[6] == β[:R1]*F[2]
329-
[i = 3:5], F[i] == 0
330-
CR == γ[:R1]
331-
CS == 0
332-
end
333-
)
334-
335-
# define constraints in right disjunct
336-
R2_con = @constraints(m,
337-
begin
338-
F[6] == β[:R2]*F[3]
339-
CR == γ[:R2]
340-
end
341-
)
329+
# define constraints in left YS disjunct
330+
@constraint(m, F[5] == β[:S1]*F[4], DisjunctConstraint(YS[1]))
331+
@constraint(m, CS == γ[:S1], DisjunctConstraint(YS[1]))
332+
# define constraints in right YS disjunct
333+
@constraint(m, F[5] == β[:S2]*F[4], DisjunctConstraint(YS[2]))
334+
@constraint(m, CS == γ[:S2], DisjunctConstraint(YS[2]))
335+
# define disjunction (specify parent disjunct)
336+
@disjunction(m, YS, DisjunctConstraint(YR[2]))
342337
\end{lstlisting}
343-
\item Build the main disjunction using the constraint blocks defined in (3) and the \verb|add_disjunction!| function. Note that the reformulated constraints for the nested disjunction are stored in the \verb|.ext| dictionary of the model under the name of the disjunction (\verb|:YS| in this case).
338+
\item Define the outer disjunctions.
344339
\begin{lstlisting}[language = Julia]
345-
add_disjunction!(m,
346-
R1_con,
347-
(
348-
R2_con, #general constraints in R2 disj.
349-
m.ext[:YS] #reformulated inner disj.
350-
),
351-
reformulation = :big_m, # reformulation type
352-
name = :YR # symbol for indicator variable
353-
)
340+
# define constraints in left YR disjunct
341+
@constraint(m, F[6] == β[:R1]*F[2], DisjunctConstraint(YR[1]))
342+
@constraint(m, [i = 3:5], F[i] == 0, DisjunctConstraint(YR[1]))
343+
@constraint(m, CR == γ[:R1], DisjunctConstraint(YR[1]))
344+
@constraint(m, CS == 0, DisjunctConstraint(YR[1]))
345+
# define constraints in right YR disjunct
346+
@constraint(m, F[6] == β[:R2]*F[3], DisjunctConstraint(YR[2]))
347+
@constraint(m, CR == γ[:R2], DisjunctConstraint(YR[2]))
348+
# define disjunction
349+
@disjunction(m, YR)
354350
\end{lstlisting}
355351
\item Add the selection logical constraints using the \verb|choose!| function. The first constraint enforces that only one reactor is selected (i.e., $Y_{R_1} \ \underline{\vee} \ Y_{R_2}$). The second constraint enforces that the separation system be defined only if the second reactor ($R_2$) is selected. This constraint is equivalent to the proposition $Y_{R_2} \Leftrightarrow Y_{S_1} \ \underline{\vee} \ Y_{S_2}$.
356352
\begin{lstlisting}[language = Julia]
357-
YR, YS = m[:YR], m[:YS]
358-
choose!(m, 1, YR[1], YR[2]; mode = :exactly)
359-
choose!(m, YR[2], YS[1], YS[2]; mode = :exactly)
353+
@constraint(m, YR in Exactly(1))
354+
@constraint(m, YS in Exactly(YR[2]))
360355
\end{lstlisting}
361356
\item Add the objective function and optimize.
362357
\begin{lstlisting}[language = Julia]

paper/ref.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ @article{jackson_sheridan_2005
198198
}
199199
200200
@article{dunning_huchette_lubin_2017,
201-
title={Jump: A modeling language for mathematical optimization},
201+
title={JuMP: A modeling language for mathematical optimization},
202202
volume={59},
203203
number={2},
204204
journal={SIAM Review},

0 commit comments

Comments
 (0)