Contexts 3.7.1

  1. Contexts 3.7.1 For Pc
  2. Contexts 3.7.1 For Students

2 days ago Enters a new context manager and adds its exit method to the callback stack. The return value is the result of the context manager’s own enter method. These context managers may suppress exceptions just as they normally would if used directly as part of a with statement. Push (exit) ¶. Use Context Management Manage Contexts to develop and maintain contexts. Prerequisites The strategy management administrator has set application defaults for the number of status indicators, the hierarchical levels to use within the application, and the ability to create cascaded objectives or KPIs if applicable.

3.7.1

Contexts 3.7.1 For Pc


3.7.1 Simple Model. Example 12: Design of a Response Distfict. Suppose that we have once more the situation described in Exercise 3.1, where requests for assistance are medical emergencies and the urban response unit is an ambulette. The context attribute of a Schema is a general-purpose store for extra information that may be needed for (de)serialization. It may be used in both Schema and Field methods. Schema = UserSchema # Make current HTTP request available to # custom fields, schema methods, schema validators, etc. Context 'request' = request schema.

Contexts 3.7.1 For Students

3.7.1 Simple Model

Example 12: Design of a Response Distfict

Suppose that we have once more the situation described inExercise 3.1, where requests for assistance are medical emergencies and the urban response unitis an ambulette. Under the assumptions that (1) locations of a medical emergency(X1, Y1) and of the ambulette(X2, Y2) are independent anduniformly distributed over the response district, and (2) travel is parallel to the sidesof the rectangular response area, the travel distance [from (3.11)] is given by

D =|X1 -X2| + |Y1 -Y2|

From Exercise 3.1, we then have that

E[D) = 1/3[Xo + YJ (3.12a)

where X0 andY0 are the sides of the rectangle (see Figure 3.3). In this example wewish to formulate and solve the problem of optimal district design and to investigate thesensitivity of our results to suboptimal designs.

Solution

To find the district dimensions which lead to theminimum expected travel distance, we must keep the area of the response district
A0 =X0 Y0 constant and minimize(3.12a) subject to the condition YO =AO/XO. Without this constant, a zero area (point) district would beoptimal, an obviously infeasible result considering that the collection of districts in acity must usually cover the entire city (which has fixed positive area). Notsurprisingly, (3.12a) is minimized when the rectangle becomes a square,



More generally, if the effective travel speeds inthe x-direction and the y-direction, vx andvy, are independent of travel distance, the expected travel time,



Intuitively speaking, the optimal shape of thedistrict, as given by (3.80), is the one for which it takes as much time to traverse thedistrict from 'east to west' as from 'north to south.'
The expressions for E[D] and E[T] turn out tobe 'robust' (i.e., rather insensitive to the exact values ofX0 and Y0). To see this, letus examine the case where

X0 =Y0 (3.82)

where is a positive constant.Without loss of generality we assume > 1 and, as before, we setA0 =X0 Y0. Then (3.12) can bewritten as



The second term in (3.83) is the amount by which E[D] deviatesfrom its minimum value in (3.79). For = 1.5 that term becomes equalto 0.014,A0 (i.e., E[D] is only about 2 percent greater than its minimumvalue). Even for = 4, E[D] is only 25 percent more than its minimum value. An entirelysimilar analysis can demonstrate the robustness of (3.80).

Results such as those of (3.79) and (3.80) canbe derived for various district shapes. The first three columns of Table 3-1summarize the equivalents of (3.79) for a square district, a square district rotated by 45' withrespect to the right-angle directions of travel, and a circular district. Thefollowing four cases are included:8

  1. Euclidean (straight-line) travel when the response unit israndomly and uniformly positioned in the district.
  2. Case I with right-angle travel.
  3. Euclidean travel with the response unit located at the centerof the district.
  4. Case 3 with right-angle travel.

In all cases it is assumed that the locations ofrequests for service are uniformly distributed in the district and independent of thelocation of the service unit. When the constants in Table 3-1 are multiplied by , thesquare root of the area of the district in question, E[D] is obtained. In some instances(e.g., a square district with a randomly positioned response unit and Euclidean travel) theconstant of interest is not known exactly and the best known approximation, totwo-decimal-place accuracy, is shown. Some of these constants have already been derived in thischapter or will be derived in the Problems.


The three district geometries included in Table 3-1 are'special cases' of rectangular, diamond-shaped, and elliptic districts.If one varies the district dimensions of each type while constraining district area toequal a constant A0, E[D] is minimized by the symmetric geometries represented in Table3-1.
It can be seen from Table 3-1 that, for any givendistrict area A, E[D] is very insensitive to the exact geometry of the district. This canbe confirmed by deriving E[D] for other possible district geometries, such asequilateral triangles or piece-of-pie-like sectors of circles. Moreover, for any givendistrict geometry, the value of E[D] is insensitive to changes of the dimensions of the districtthat might make it appear to deviate appreciably from its optimum shape. This, too, canbe confirmed by performing a sensitivity analysis similar to the one for therectangular district in Example 12.
From these observations it can be concluded thatwe can use the first three columns of Table 3-1 to infer similar approximate expressionsfor E[D] that apply to districts of any shape as long as (1) one of the dimensions (e.g.,'length') is not much greater than the other dimension (e.g., width), and (2)major barriers or boundary indentations do not exist in the district. Districts thatsatisfy both of the conditions above will be called here, informally, 'fairlycompact and fairly convex districts.' We can now state the following:

For fairly compact and fairly convex districts andfor independently and spatially uniformly distributed requests for service,



where A0, is the area ofthe district and c is a constant that depends only on the metric in use and onthe assumption regarding the location of the response unit in the district.

The last column of Table 3-1 lists values thatcan be used for c in (3.84) for the four combinations of response unit locations andmetrics that we have examined here. In all cases, we have selected the largest value of clisted in each row of the three leftmost columns of Table 3-1.
When the effective travel speed is independent ofthe distance covered, one can use the constants in the fourth column of Table 3-1 toapproximate the expected travel time, E[T), as well. In that case we have



in the case of Euclidean travel (assuming that the effective travelspeed v is independent of the direction of travel) and



for right-angle travel. In this latter case, the district'compactness' statement requires that

E[Teast-west] E[Tnorth-south]

That is, it takes on the average about as much timeto traverse the district from east to west as from north to south.
Another observation that can be made on the basisof the foregoing discussion is that both E[D] and E[T] are proportional to the squareroot of the district area, A0, irrespective ofthe specific distance metric in use. This is hardly surprising since this relationship isbasically a dimensional one: distance is the square root of area. More formally,if the coordinates of each point (x, y) in the district of interest are multiplied by m (m > 1) [i.e.,point (x, y) now becomes point (m x, m y)], then the area of the district increases m-fold but the length,L, of any given route between the pair of points(x1, y1,) and(x2, y2,) in theoriginal district-becomes equal to mL in the expanded district.
Equivalently, we can state that E[D] and E[Tjmust be proportional to the inverse of the square root of the density of response units in adistrict, for districts with more than one response unit. That is, if a districtof area A is divided into n approximately equal fairly convex and fairly compactsubdistricts of responsibility (whose shapes may vary), then



where y denotes the spatial density of service units. We shallderive the same functional type of relationship in a somewhat different context later in thischapter [cf. (3.101a) and (3.104a)].

8 few results for metrics other than Euclideanor right-angle are derived in the Problems.

Comments are closed.