Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Background: A small community of N persons ( see below to calculate N ) is interested in creating a town - wide water supply. They

Background:
A small community of N persons (see below to calculate N) is interested in creating a town-wide
water supply. They have hired an engineering consultant to look at some options. After
considerable research, the engineer has provided the town with the following information:
An average residents usage (Qp) is 140 gpd (gallons per day).
There are two feasible water sources for the town (sources A and B), either of which could
provide enough water.
Source A is a deep well into the aquifer. The cost function using the water from the
aquifer is:
=
2
106
+395
where VA is the volume of water drawn from source A in gallons and Y is a coefficient below.
4900
Source B is a nearby lake and the cost function for water from this source is:
=
5000
+410
where VB is the volume of water drawn from source B in gallons.
C is the total cost of water from both sources in dollars, C = CA + CB. V = VA + VB is the total
volume of water being pulled on a given day.
The value of N and the coefficient Y can be calculated as:
N = sum(my_name).{Use your own first name here.}
Y = round(N/8).
Problem Statement:
The objective of this lab is to determine the lowest cost option for the towns water supply. This
is an optimization problem. You will need to write a function that determines the total cost to the
town based on how many people are using each source (A or B). The function should look
something like this when it is run:
>>total_cost = my_cost_function(NA, N){enter}
total_cost =58000
where NA is the number of people pulling from source A and N is the total number of people.
(The function should calculate how many people are pulling from source B automatically.)
You will then need to write a script that runs your function for the range of possible values of NA
to determine the best option for the town. Your script should also plot total_cost vs. NA. To
create your figures, use the function plot (check doc plot for more information).
Use your code to answer the following questions:
1. How many people should use each source to minimize the cost to the town?
2. Rerun your code for a population of N =500 persons. How many people should use each
source now?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions