Prescriptive Modeling


Lecture 11

October 2, 2024

Review of Previous Classes

Monte Carlo

  • Stochastic simulation of \(Y = f(X)\)
  • Useful to compute expected values of quantities (integrals)
  • Monte Carlo Estimate of \(\mu = \mathbb{E}[Y]\): \[\tilde{\mu}_n = \mathbb{E}[\{Y_1, \ldots, Y_n\}]\]

Why Monte Carlo Works

  • Unbiased estimates (across multiple samples)
  • Convergence of single sample:
    • Law of Large Numbers
  • Confidence Intervals:
    • Standard error: \(\sigma_Y / \sqrt{n}\)
    • Central Limit Theorem: \[\tilde{\mu} \sim \mathcal{N}\left(0, \frac{\sigma_Y^2}{n}\right)\]

Questions?

Poll Everywhere QR Code

Text: VSRIKRISH to 22333

URL: https://pollev.com/vsrikrish

See Results

Prescriptive Modeling

Prescriptive Modeling

If we want to design a treatment strategy, we are now in the world of prescriptive modeling.

Recall: Precriptive modeling is intended to specify an action, policy, or decision.

  • Descriptive modeling question: “What happens if I do something?”
  • Prescriptive modeling question: “What should I do?”

Decision Models

To make a decision, we need certain pieces of information which:

  • define decision options (or alternatives);
  • provide one or more objectives to assess performance;
  • specify constraints to tell us what decisions are possible or acceptable.

Objectives

Typical objectives can include:

  • Minimizing costs (or maximizing profits);
  • Minimizing environmental impacts;
  • Maximizing some other performance metric.

Decision Modeling for Wastewater Treatment

Wastewater Release Model

Goal: Identify treatment levels for each factory which ensure compliance with regulatory standard of \(1 \ \text{mg}/\text{L}\).

Optimization Problem Formulation

Need 3 components:

  1. Decision variable(s)
  2. Objective function(s)
  3. Constraint(s)

Decision Variables

Wastewater Release Model

What are the decision variables?

Formulating The Objective

What might our objective be?

What information do we need?

Suppose treatment costs \[\$50 E^2 \text{ per } 1000 \ \text{m}^3,\] where \(E\) is the treatment efficiency.

Objectives and Metrics

Objectives are goals, such as “minimize cost” or “maximize environmental quantity”.

Metrics are functions which measure some relevant quantity, in this case the specific cost function.

Many different metrics can be used to specify an objective function!

Objective Function

The objective function includes a goal and a metric:

\[\begin{align*} \min_{E_1, E_2} \quad &50(100)E_1^2 + 50(60)E_2^2 \\ = \min_{E_1, E_2} \quad &5000E_1^2 + 3000E_2^2. \end{align*}\]

Identifying Constraints

Wastewater Release Model

What are relevant constraints?

What information do we need?

Constraint for First Segment

Where does the maximum value of the first segment occur?

Wastewater Schematic

Constraint for First Segment

Where does the maximum value of the first segment occur?

\[100 + 1000(1-E_1) \leq 600 \]

\[\Rightarrow \boxed{1000E_1 \geq 500}\]

Constraint for Second Segment

What is the concentration at the second release with treatment level \(E_2\)?

Wastewater Schematic

Constraint for Second Segment

What is the concentration at the second release with treatment level \(E_2\)?

\[(1100 - 1000E_1) \exp(-0.18) + 1200(1 - E_2) \leq 660 \]

\[\begin{aligned} (1100 - 1000E_1) 0.835 + 1200(1 - E_2) &\leq 660 \\[0.5em] 2119 - 835E_1 - 1200E_2 &\leq 660 \end{aligned}\]

\[\Rightarrow \boxed{835E_1 + 1200E_2 \geq 1459}\]

Additional Constraints?

We have two concentration compliance constraints:

\[\begin{align*} 1000 E_1 &\geq 500\\[0.5em] 835E_1 + 1200E_2 &\geq 1459 \end{align*}\]

Are these a complete set?

Boundary Constraints

We need to add boundary constraints for \(E_1\), \(E_2\) to avoid implausible treatment levels.

\[\begin{align*} 1000 E_1 &\geq 500\\[0.5em] 835E_1 + 1200E_2 &\geq 1459\\[0.5em] \color{purple}E_1, E_2 &\;\color{purple}\geq 0 \\[0.5em] \color{purple}E_1, E_2 &\;\color{purple}\leq 1 \end{align*}\]

Final Problem

\[\begin{alignat}{3} & \min_{E_1, E_2} &\quad 5000E_1^2 + 3000E_2^2 & \\\\ & \text{subject to:} & 1000 E_1 &\geq 500 \\ & & 835E_1 + 1200E_2 &\geq 1459 \\ & & E_1, E_2 &\;\geq 0 \\ & & E_1, E_2 &\;\leq 1 \end{alignat}\]

Solving The Problem

Plotting the Decision Space

Plotting the Feasible Region

The Solution!

So the solution occurs at the intersection of the two constraints, where:

\[E_1 = 0.5, E_2 = 0.85\]

and the cost of this treatment plan is

\[C(0.5, 0.85) = \$ 3417.\]

Does this solution make sense?

Waste Load Allocation Problem

This is an example of a waste load allocation problem.

Each source is allocated a “load” they can discharge based on waste fate and transport.

Waste Load Allocation Problem

Waste loads affect quality \(Q\) based on F&T model:

\[Q=f(W_1, W_2, \ldots, W_n)\]

So the general form for a prescriptive waste load allocation model:

\[\begin{aligned} \text{determine} & \quad W_1, W_2, \ldots, W_n \notag \\\\ \text{subject to:} & \quad f(W_1, W_2, \ldots, W_n) \geq Q^* \notag \end{aligned}\]

Key Takeaways

Key Takeaways

  • Prescriptive modeling involves decision models.
  • Key components of a decision model:
    • Objectives;
    • Constraints.
  • Need to bring to bear relevant engineering, economic, and environmental information to formulate these.

Upcoming Schedule

Next Classes

Monday: Optimization Algorithms and Linear Programming

Wednesday: Prelim 1

Assessments

HW3: Due Thursday (10/3) at 9pm

Prelim 1: Next Wednesday (10/9) in class, includes material through Monte Carlo lecture.