Answered step by step
Verified Expert Solution
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 townwide 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 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: where VA is the volume of water drawn from source A in gallons and Y is a coefficient below. Source B is a nearby lake and the cost function for water from this source is: 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 summynameUse your own first name here. Y roundN 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: totalcost mycostfunctionNA Nenter totalcost 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 totalcost vs NA To create your figures, use the function plot check doc plot for more information Use your code to answer the following questions: How many people should use each source to minimize the cost to the town? Rerun your code for a population of N persons. How many people should use each source now?
Background:
A small community of N persons see below to calculate N is interested in creating a townwide
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 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:
where VA is the volume of water drawn from source A in gallons and Y is a coefficient below.
Source B is a nearby lake and the cost function for water from this source is:
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 summynameUse your own first name here.
Y roundN
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:
totalcost mycostfunctionNA Nenter
totalcost
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 totalcost vs NA To
create your figures, use the function plot check doc plot for more information
Use your code to answer the following questions:
How many people should use each source to minimize the cost to the town?
Rerun your code for a population of N persons. How many people should use each
source now?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started