url
stringlengths
6
1.61k
fetch_time
int64
1,368,856,904B
1,726,893,854B
content_mime_type
stringclasses
3 values
warc_filename
stringlengths
108
138
warc_record_offset
int32
9.6k
1.74B
warc_record_length
int32
664
793k
text
stringlengths
45
1.04M
token_count
int32
22
711k
char_count
int32
45
1.04M
metadata
stringlengths
439
443
score
float64
2.52
5.09
int_score
int64
3
5
crawl
stringclasses
93 values
snapshot_type
stringclasses
2 values
language
stringclasses
1 value
language_score
float64
0.06
1
https://socratic.org/questions/an-object-with-a-mass-of-4-kg-is-acted-on-by-two-forces-the-first-is-f-1-5-n-2-n
1,632,455,170,000,000,000
text/html
crawl-data/CC-MAIN-2021-39/segments/1631780057496.18/warc/CC-MAIN-20210924020020-20210924050020-00469.warc.gz
590,958,394
6,813
# An object with a mass of 4 kg is acted on by two forces. The first is F_1= < -5 N , 2 N> and the second is F_2 = < 7 N, 6 N>. What is the object's rate and direction of acceleration? Jul 21, 2017 $a = 2.06$ ${\text{m/s}}^{2}$ $\theta = {76.0}^{\text{o}}$ #### Explanation: We're asked to find the magnitude and direction of an object's acceleration, given two forces that act on it. To do this, let's first split up the forces into their components: ${F}_{1 x} = - 5$ $\text{N}$ ${F}_{1 y} = 2$ $\text{N}$ ${F}_{2 x} = 7$ $\text{N}$ ${F}_{2 y} = 6$ $\text{N}$ We'll now find the components of the net force that acts on the body, by adding components: $\sum {F}_{x} = - 5$ $\text{N}$ $+ 7$ $\text{N}$ $= 2$ $\text{N}$ $\sum {F}_{y} = 2$ $\text{N}$ $+ 6$ $\text{N}$ $= 8$ $\text{N}$ Now, we can use Newton's second law to find the components of the object's acceleration: $\sum {F}_{x} = m {a}_{x}$ ${a}_{x} = \frac{\sum {F}_{x}}{m} = \left(2 \textcolor{w h i t e}{l} \text{N")/(4color(white)(l)"kg}\right) = 0.5$ ${\text{m/s}}^{2}$ ${a}_{y} = \frac{\sum {F}_{y}}{m} = \left(8 \textcolor{w h i t e}{l} \text{N")/(4color(white)(l)"kg}\right) = 2$ ${\text{m/s}}^{2}$ The magnitude of the acceleration is $a = \sqrt{{\left({a}_{x}\right)}^{2} + {\left({a}_{y}\right)}^{2}} = \sqrt{{\left(0.5 \textcolor{w h i t e}{l} {\text{m/s"^2)^2 + (2color(white)(l)"m/s}}^{2}\right)}^{2}}$ = color(red)(2.06 color(red)("m/s"^2 And the direction is theta = arctan((a_y)/(a_x)) = arctan((2cancel("m/s"^2))/(0.5cancel("m/s"^2))) = color(blue)(76.0^"o" Always be sure to check your direction calculation, as it could be ${180}^{\text{o}}$ off! (by noting what direction the acceleration is relative to the object).
666
1,719
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 33, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.75
5
CC-MAIN-2021-39
latest
en
0.794815
https://www.gamedev.net/forums/topic/338620-terrain-blending/
1,542,280,812,000,000,000
text/html
crawl-data/CC-MAIN-2018-47/segments/1542039742666.36/warc/CC-MAIN-20181115095814-20181115121814-00446.warc.gz
881,070,153
29,598
# terrain blending This topic is 4841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic. ## Recommended Posts hi, im trying to produce a blendmap for my terrain. ive worked out the angle of each point and can do something like: grass = rock = 0.0 if angle > some_specified_angle: rock = 1.0 else grass = 1.0 blendmap.put_pixel(x, y, color = [grass, rock, 0.0]) but how do i make it do a more gradual blend between the rock and the grass texture? i guess i have to introduce some range factor for the blend but i cant think how to do it thanks dunk ##### Share on other sites you could just transform the angle to get your blending factors - if (angle > pies) if (angle < end blending threshold) rock = (angle - threshold) * blending factor or something of that sort. You can probably fit it all in to a single equation, ie, rock = angle*PI/34.54+e^angle, or whatever. ##### Share on other sites sorry i dont understand [disturbed] could you be more specific on the maths? thanks for quick reply tho :) ##### Share on other sites Please excuse me for assuming lack of knowledge, but it's really simple. I'd suggest looking up interpolation. Or just general maths. I even attempted to copy your style. Aren't I nice... rock = (angle - min_rock_angle) / (max_rock_angle - min_rock_angle)if (rock < 0) rock = 0else if rock > 1) rock = 1 BUT, before you use that, I'll walk you through it. angle - min_rock_angle -We want the rock to start when angle gets above min angle. So by subtracting min angle, we have > 0 where rock is, < 0 where it isn't. / (max_rock_angle - min_rock_angle) -Max angle - min angle will give you the range of angles where rock goes from nothing to full. So if we divide our angle (currently between 0 and ?) by it, we will get no rock - full rock from 0 to 1, like we want. Then just make sure the rockness is in a reasonable range. ##### Share on other sites Quote: Original post by RAZORUNREALPlease excuse me for assuming lack of knowledge, but it's really simple. I'd suggest looking up interpolation. Or just general maths. thanks, sometimes i just get a block and cant see the wood for the trees. i get it now and am successfully using it ##### Share on other sites Kinda looks like an underwater scene, not knocking just commenting. ##### Share on other sites the textures suck :| ##### Share on other sites How do you calculate the "angle"? There appears to be something wrong because the middles of all the rocky regions contain grass. I would do it like this: // Assuming Z is up, and N is the normal and it its length is 1 factor = N.x*N.x + N.y*N.y; // Length (squared) of the projection of the normal on the XY plane // Note: 1 is vertical terrain, 0 is horizontal terrain lowThreshold = 0.5f; // tweak this highThreshold = 0.7f; // tweak this rock = ( factor - lowThreshold ) / ( highThreshold - lowThreshold ); rock = min( max( 0.0f, rock), 1.0f ); 1. 1 Rutin 32 2. 2 3. 3 4. 4 5. 5 • 12 • 9 • 9 • 9 • 14 • ### Forum Statistics • Total Topics 633314 • Total Posts 3011325 • ### Who's Online (See full list) There are no registered users currently online ×
862
3,248
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.625
4
CC-MAIN-2018-47
longest
en
0.885783
https://in.mathworks.com/matlabcentral/cody/problems/42948-find-a-specific-element-from-an-matrix/solutions/2397735
1,610,982,177,000,000,000
text/html
crawl-data/CC-MAIN-2021-04/segments/1610703514796.13/warc/CC-MAIN-20210118123320-20210118153320-00413.warc.gz
383,606,092
16,988
Cody # Problem 42948. find a specific element from an matrix Solution 2397735 Submitted on 28 May 2020 by Karl Ezra Pilario This solution is locked. To view this solution, you need to provide a solution of the same size or smaller. ### Test Suite Test Status Code Input and Output 1   Pass x = [1 2 3; 4 5 6] y_correct = 6; assert(isequal(your_fcn_name(x),y_correct)) x = 1 2 3 4 5 6 2   Pass x = [1 2 3; 4 5 7] y_correct = 7; assert(isequal(your_fcn_name(x),y_correct)) x = 1 2 3 4 5 7 ### Community Treasure Hunt Find the treasures in MATLAB Central and discover how the community can help you! Start Hunting!
205
622
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.578125
3
CC-MAIN-2021-04
latest
en
0.745235
https://www.reference.com/world-view/volume-quarter-57bec467df08d7ce
1,722,932,993,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640476915.25/warc/CC-MAIN-20240806064139-20240806094139-00859.warc.gz
752,442,612
13,781
# What Is the Volume of a Quarter? The volume of a quarter is 808.53 mm3. A quarter is a cylinder with a diameter of 24.26 mm and a thickness, or height, of 1.75 mm. The volume of a cylinder is found by taking the radius of the cylinder squared times the height of the cylinder times pi. The volume of a quarter is found by taking the diameter and dividing by 2 to get the radius, which equals 12.13 mm. This value is then squared to get 147.14 mm2. After that, the 147.14 is multiplied by the height and 3.14 as the approximation of pi to get 808.53.
148
553
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.734375
4
CC-MAIN-2024-33
latest
en
0.943153
https://dev.to/xshirl/reverse-a-linked-list-leetcode-573e
1,726,566,051,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700651750.27/warc/CC-MAIN-20240917072424-20240917102424-00696.warc.gz
182,333,679
19,345
Shirley Posted on # Reverse a Linked List - Leetcode I'm sure many of you have seen this problem: reverse a linked list. When you reverse a linked list, you are essentially reversing the direction the linked list goes from. For example, if you have a linked list 1 -> 2 -> 3 -> 4, you want to make the linked list 1 <- 2 <- 3 <- 4. To do this, you need a variable prev that you can set the previous value to. Here's my code for this problem: ``````def reverseList(head): prev = None temp.next = prev prev = temp return prev `````` You first set the variable prev to None. Then you create a while loop that loops through head, which contains the first value of the linked list. You set a temp variable equal to the current node. Then you set the current node to the next node to progress through the linked list, while temp remains the current node. You set the next pointer of temp(current) equal to prev, which is at first None, but then it equals the current node afterwards. Then you repeat. For example, using 1 -> 2 -> 3 -> 4 temp = 1
263
1,044
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.625
3
CC-MAIN-2024-38
latest
en
0.890473
http://www.jiskha.com/display.cgi?id=1289534146
1,498,609,791,000,000,000
text/html
crawl-data/CC-MAIN-2017-26/segments/1498128321961.50/warc/CC-MAIN-20170627235941-20170628015941-00583.warc.gz
568,856,602
3,824
# math 050 posted by . There are 12 girls and 9 boys in the class. What is the ratio of girls to boys? Be sure the ratio is in simplified form. • math 050 - 12/9 = Divide the numerator and denominator by 3 12/9 = 4/3 • math 050 - thats write good fantastic
78
264
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.28125
3
CC-MAIN-2017-26
latest
en
0.898782
https://dsp.stackexchange.com/questions/52612/how-to-programmatically-find-a-sharp-change-in-slope
1,716,523,126,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058677.90/warc/CC-MAIN-20240524025815-20240524055815-00372.warc.gz
181,780,645
41,097
How to programmatically find a sharp change in slope First, apologies if I have the wrong group or this question is far too easy for this group. I am (as you'll see) a newbie. Please point me to another, more appropriate group OR tell me how to fix the question to be more appropriate for this group. I have some data that represents a thermometer that is put in a fridge, and then a freezer, and then finally, back out of the freezer to the fridge. The data might look like this: The horizontal axis is time in seconds and the vertical axis is Celsius. As you can see, it's quite obvious where the thermometer goes into the freezer and where it comes out. One can with the naked eye come up with a pretty good estimate as to where this happens. I'd like to be able to have a computer program (C#) figure this out for me for other data sets that all have this general form. One way might be to look for when the data first reaches -10 and argue that the transition happened at about this time. Another might be to look for a change in the 2nd derivative. That's about the extent of my knowledge. I can imagine there is a whole literature devoted to this problem and probably libraries of code that already do this. I'm looking for 2) Example code in C# (or JAVA or C++) that does the automatic detection. I would like to be able to feed a time series into an algorithm, and have an estimate of when the thermometer was put in the freezer (or taken out) WITH some sort of confidence interval. Example: "it went into the freezer at 18420 seconds +/- 100 seconds with 95% confidence". I am willing to assume (for now) that the thermometer starts changing temperature as soon as it is moved from the fridge to the freezer (I'm still researching this!). Those are the questions. For those, who are curious for background information, please continue to read. I'll add that the motivation is that we are trying to see if some thermometers in the fridge and freezer are in spec. We have several thermometers in the fridge and freezer that we would like to know are in spec. We have a highly accurate "reference" thermometer that we can move around with a robot to the locations where the fridge/freezer thermometers are. As we move the reference thermometer to the various locations with the robot, we have the relevant fridge or freezer thermometer take a temperature and record it. This we can do with very accurate timing. The problem is that the reference thermometer just has a counter every 10 seconds. Presumably the measurements are really 10 seconds apart but there is not absolute time measurements. It's just a counter from 0. You can see the graph of the reference thermometer in my attached picture. It occurs to me that since I move the reference thermometer to the first freezer station, I should be able to use that point on the graph as a "pin" to connect the two timelines. I'd further point out that I leave the reference thermometer at each station for several minutes, so there is some slop available. Finally, for those wise folks that say, "why not have the reference thermometer communicate with the rest of the system via Bluetooth or similar so you don't have to try and match things up after the fact?", my reply is "already suggested (several times) to management without success" :) • – user28715 Oct 15, 2018 at 1:40
719
3,346
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.96875
3
CC-MAIN-2024-22
longest
en
0.966989
http://www.answers.com/topic/cliff-s-hits-album
1,555,972,744,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578582736.31/warc/CC-MAIN-20190422215211-20190423001211-00536.warc.gz
200,155,220
18,585
## Results for: Cliff-s-hits-album In Personal Finance # What are the 5Cs of credit? 5 C's of Credit refer to the factors that lenders of money evaluate to determine credit worthiness of a borrower. They are the following:. 1. Borrower's CHARACTER. 2. Borrow ( Full Answer ) In Acronyms & Abbreviations # What does 5c stand for? The Iphone 5C is Iphone 5Colorful 5c can also stand for thenumber 500 ("c" is the Roman numeral for 100) or for 5 degreesCelsius (centigrade) . +++ . "5c" can not stand fo ( Full Answer ) In Coins and Paper Money # What animal is on a 5c coin? There are multiple animals on 5 cent coins depending on the country and time period such as the Buffalo on the US "buffalo nickel", the Beaver on the Canadian nickel, etc. In Math and Arithmetic # What is -5c plus 9 and how? You can't tell a thing about -5c+9 until you know what 'c' is. And every time 'c' changes, -5c+9 changes. In Volume # What is 5c in milliliters? 5cc? cc means cubic centimetres which is equal to ml, so 5ml. if you mean cl, then that is equal to 50ml In Numerical Analysis and Simulation # What is the answer for 5c equals -75? The 'answer' is the number that 'c' must be, if 5c is really the same as -75. In order to find out what number that is, you could use 'algebra'. First, write the equatio ( Full Answer ) In iPhone 5 # How many pixels does the iPhone 5c have? The iPhone 5c is 640 x 1136 pixels. That is about 326 pixels persquare inch (ppi). In Temperature # What is minus 5c in Fahrenheit? (-5) degrees Celsius = 23 degrees Fahrenheit. Formula: [°F] = [°C] × 9 ⁄ 5 + 32 In iPhone 5 # How many inches is a iPhone 5c? The screen is 4" big. The height is 4.9", width is 2.33" and thedepth is 0.35" In iPhone 5 # How much does an iPhone 5c weigh? The iPhone 5c weighs 4.65 ounches. It is heavier than the iPhone 5and 5s which weight 3.95.
567
1,868
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.359375
3
CC-MAIN-2019-18
latest
en
0.90174
https://stats.stackexchange.com/questions/531538/estimate-the-euler-mascheroni-constant-gamma-by-monte-carlo-simulations
1,713,768,802,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296818081.81/warc/CC-MAIN-20240422051258-20240422081258-00590.warc.gz
481,291,282
47,766
# Estimate the Euler–Mascheroni constant ($\gamma$) by Monte Carlo simulations The Euler–Mascheroni constant is defined simply as the limiting difference between harmonic series and the natural logarithm. $$\gamma =\lim_{n\to \infty}\left(\sum _{k=1}^{n}{\frac {1}{k}}-\ln n\right)$$ I was interested in the estimations of Mathematical constants using Monte Carlo simulations after seeing the following post Approximate $e$ using Monte Carlo Simulation and reading about the countless experiments to approximate $$\pi$$ (Buffon's needle/noodle etc.). I want to showcase a few nice examples of MC simulations in calculating mathematical constants to help motivate the idea. My question is, How can you design a non-trival MC simulation to estimate $$\gamma$$ ? (I say non-trivial since I could just integrate $$\ln n$$ for a sufficiently large $$n$$ using numeric MC integration, but this doesn't seem to be a very interesting showcase.) I thought it might be possible to do using the Gumbel Distribution with $$\mu=0, \beta=1$$ (since mean of the Gumbel Distribution is $$E(X)=\mu+\beta\gamma$$). However, I'm not sure how to implement this. Edit: Thanks to Xi'an and S. Catterall for pointing out that the instructions for simulating the Gumbel Dist were on the Wikipedia article itself. $${\displaystyle Q(p)=\mu -\beta \ln(-\ln(p)),}$$ where you draw $$p$$ from $$(0,1)$$. Simple Mathematica code for $$10^6$$ draws, gumbelrand = RandomReal[{0, 1}, {10^6, 1}]; Mean[-Log[-Log[gumbelrand]]] • Since the Gumbel distribution is straightforward to simulate (eg by inverse cdf), approximating the expectation by Monte Carlo is also immediate. Jun 21, 2021 at 11:11 • In fact there are explicit instructions for simulating from the Gumbel distribution on the wikipedia page you linked to. Jun 21, 2021 at 11:23 • Oh yes you're right. I didn't spot that. Editing it onto the post but I'll leave it open for some time incase there are some other answers. Jun 21, 2021 at 11:37 • If $U$ is a sample of random numbers uniformly distributed in $(0,1)$ then, as you have found, $\frac1n \sum -\log(-\log(u_i))$ is a simulated value of $\gamma$. But there are others which are usually better and not much more complicated, such as $\frac1n \sum \left(\frac1{u_i}+\frac{1}{\log(1-u_i)}\right)$ which is in a sense typically about $18.2$ or $18.7$ times closer Jun 21, 2021 at 14:08 • @BhorisDhanjal See math.stackexchange.com/questions/980593/… for how Henry's suggestion arises Jun 22, 2021 at 11:00 If you are willing to use the exponential and logarithmic functions for your method, you can estimate the Euler–Mascheroni constant using importance sampling from exponential random variables. Letting $$X \sim \text{Exp}(1)$$ we can write the Euler–Mascheroni constant as: \begin{align} \gamma &= - \int \limits_0^\infty e^{-x} \log x \ dx \\[6pt] &= \int \limits_0^\infty (-\log x) \cdot p_X(x) \ dx \\[12pt] &= \mathbb{E}(- \log X). \\[12pt] \end{align} Consequently, we can take $$X_1,...,X_n \sim \text{IID Exp}(1)$$ and use the estimator: $$\hat{\gamma}_n \equiv - \frac{1}{n} \sum_{i=1}^n \log x_i.$$ The law of large numbers ensures that this is a strongly consistent estimator for $$\gamma$$, so it will converge stochastically to this value as $$n \rightarrow \infty$$. We can implement this in R quite simply as follows. Using $$n=10^6$$ simulations we get quite close to the true value. #Create function to estimate Euler–Mascheroni constant simulate.EM <- function(n) { -mean(log(rexp(n, rate = 1))) } #Perform simulations set.seed(1) simulate.EM(10^6) [1] 0.5772535 #True value is 0.5772157 #Our simulation is correct to four DP • +1. (1) Notice that $\log X$ has a Gumbel distribution. (2) Therefore you can efficiently generate the $x_i$ with a standard, universal random number generator that returns a U$(0,1)$ variable: mean(-log(-log(runif(1e6)))) (in R). – whuber Aug 13, 2021 at 14:17 • Yes, that is a good point. I figured that since I am already using the logarithm function, I could reasonably go directly to the exponential distribution. – Ben Aug 13, 2021 at 21:46 The following facts yields an extremely simple method. If $$U \sim U(0,1)$$ and $$W = 1 - \{1/U\}$$ with $$\{x\}$$ denoting the fractional part of $$x$$, we have $$E(W) = \gamma$$ and variance $$Var(W)= \psi(2)+2\int_0^1\ln\Gamma(t+1)\,dt -(1-\gamma)^2 \approx 0.081915$$ where $$\psi(x)$$ is the digamma function. So add up enough $$W$$'s. • This is interesting. Do you know a reference for this fact? Aug 8, 2021 at 21:58 • No, my notes show I derived it 2002 while simulating some Markov chains. Aug 8, 2021 at 22:05 – Ben Aug 13, 2021 at 5:30 • This is the best answer as it doesn’t anything but uniform numbers Aug 14, 2021 at 17:33 Here I will expand on the method described by Balasubramanian Narasimhan in his answer. It is possible to simulate the Euler-Mascheroni constant by elementary methods, using uniform random variables and elementary functions. This is less efficient than the other method I have shown in my other answer, which uses the exponential and logarithmic functions. However, it has the advantage of requiring only uniform pseudo-random numbers and elementary mathematical operations. Let $$U \sim \text{U}(0,1)$$ and define $$X = 1 - \{ 1/U \}$$, where the latter denotes the fractional part of a number. We can use the law of the unconscious statistician and change-of-variable $$r = 1/u$$ to obtain the expectation: \begin{align} \mathbb{E}(X) &= \mathbb{E}(1 - \{ 1/U \}) \\[6pt] &= \int \limits_0^1 (1 - \{ 1/u \}) \ du \\[6pt] &= \int \limits_1^\infty \frac{1 - \{ r \}}{r^2} \ dr \\[6pt] &= \int \limits_1^\infty \frac{1 - r + \lfloor r \rfloor}{r^2} \ dr \\[6pt] &= \int \limits_1^\infty \Big( \frac{\lceil r \rceil}{r^2} -\frac{1}{r} \Big) \ dr \\[6pt] &= \int \limits_1^\infty \Big( \frac{1}{\lfloor r \rfloor} -\frac{1}{r} \Big) \ dr \\[6pt] &= \gamma. \\[6pt] \end{align} (For the penultimate step, see a related question here.) Since $$\mathbb{E}(X) = \gamma$$ (and it can also be shown that the variance is finite), taking $$X_1,...,X_n \sim \text{IID U}(0,1)$$ yields the natural estimator: $$\hat{\gamma}_n = \frac{1}{n} \sum_{i=1}^n X_i = 1 - \frac{1}{n} \sum_{i=1}^n \{ 1/U_i \}.$$ The law of large numbers ensures that this is a strongly consistent estimator for $$\gamma$$, so it will converge stochastically to this value as $$n \rightarrow \infty$$. We can implement this in R quite simply as follows. Using $$n=10^6$$ simulations we get reasonably close to the true value (though not as close as with the estimator in my other answer). #Create function to estimate Euler–Mascheroni constant simulate.EM <- function(n) { U <- runif(n) UU <- 1/U Y <- 1-UU+floor(UU) mean(Y) } #Perform simulations set.seed(1) simulate.EM(10^6) [1] 0.576843 #True value is 0.5772157 #Our simulation is correct to three DP • +1 Using microbenchmark on simulate.EM <- function(n = 1e+5) {UU <- 1/runif(n); mean(1-UU+floor(UU))} and gumbel <- function(n = 1e+5) mean(-log(-log(runif(n)))), this method actually appear to be about 8% faster than the one based on the Gumbel distribution. Aug 13, 2021 at 11:52 Luis Mendo (2020) presented an algorithm that returns 1 with probability equal to $$\gamma$$, using the series expansion found by Sondow (2010), when the algorithm is given an infinite stream of fair coin flips, rather than a stream of uniform random variables in (0, 1). I have described it in my page on Bernoulli factory algorithms, which also includes algorithms to sample probabilities for many other kinds of functions and constants. REFERENCES: • Mendo, L., "Simulating a coin with irrational bias using rational arithmetic", arXiv:2010.14901 [math.PR], 2020. • Sondow, Jonathan, “New Vacca-Type Rational Series for Euler's Constant and Its 'Alternating' Analog ln 4/π.”. In Additive Number Theory: Festschrift in honor of the sixtieth birthday of Melvyn B. Nathanson, 331 (2010). If you want a horrible but fun way, think of the Coupon collector's problem. Suppose that you have $$n$$ different cards which you want to collect. At each time $$t\,\in\,\mathbb{N}$$, you buy a card, which has probability $$1/n$$ of being the i-th card (even if you already have it) until you have all cards. You are not allowed to trade with other players. The question is: on average, how long does it take for you to collect all cards? Being more precise, let $$(C_t)_{t=1}^\infty$$ an i.i.d. sequence of cards, $$C_1 \, \sim \, U(\{1,\ldots,n\})$$, and consider $$S_t = \{C_1, \ldots, C_t\}$$, the set of unique cards that you have at time $$t$$. Defining $$\tau = \inf\{t\,\in\,\mathbb{N}: |S_t| = n\},$$ your goal is to compute $$E[\tau]$$. You can show that (just check wikipedia if you are bored) $$E[\tau] = n\sum_{t=1}^n\frac{1}{t}\quad.$$ Therefore, you have that $$\lim_{n\rightarrow\infty} \left(\frac{E[\tau]}{n} - \log(n)\right) = \gamma \quad.$$ Make $$n$$ large and use Monte Carlo to estimate $$E[\tau]$$. Or produce a card game with those rules, dare your friends to collect all cards, and do a real life Monte Carlo.
2,746
9,089
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 50, "wp-katex-eq": 0, "align": 2, "equation": 0, "x-ck12": 0, "texerror": 0}
3.578125
4
CC-MAIN-2024-18
latest
en
0.883696
http://poohprod.ru/binary-to-hexadecimal.html
1,527,422,228,000,000,000
text/html
crawl-data/CC-MAIN-2018-22/segments/1526794868248.78/warc/CC-MAIN-20180527111631-20180527131631-00338.warc.gz
235,166,013
6,953
# Binary to hexadecimal numbers: two solutions in Matlab To convert a value from binary to hexadecimal, we first need to know what a hexadecimal number is. A major numbering system used in digital systems is the hexadecimal system, also named base 16. In this system, the numbers are counted from 0 to 9 and, since in base 16 we need 16 different symbols, decimal numbers 10 through 15 are represented by letters A through F, respectively. So we go from 0 to F. The following table shows the meaning of all the symbols in the hex (for short) numbering system. Table equivalents: decimal, hexadecimal and binary numbers To convert a value from binary to hexadecimal, you merely translate each 4-bit binary group to its hexadecimal equivalent. For example, the binary number 0011 1111 0111 1010 translates into the hex 3F7A equivalent. ### Solution 1. In Matlab, we can go from binary to decimal, and then, from decimal to hexadecimal. We can embed one instruction into the other, like this: hex_str = dec2hex(bin2dec(bin_str)) It’s important to remember that both binary numbers and hexadecimal ones are treated as strings in Matlab. So, we can use this concept, like this: bin_str = '' hex_str = dec2hex(bin2dec(bin_str)) hex_str = 22F5 ### Solution 2. Now, let’s say that we want to explore how the binary groups are separated to form the hex symbols and we want to manipulate our own strings (binary and hexadecimal). We can develop a function to translate the table shown before. Our proposed method uses a switch-case structure. function h = b2h(b) switch b case {'0', '00', '000', '0000'} h = '0'; case {'1', '01', '001', '0001'} h = '1'; case {'10', '010', '0010'} h = '2'; case {'11', '011', '0011'} h = '3'; case {'100', '0100'} h = '4'; case {'101', '0101'} h = '5'; case {'110', '0110'} h = '6'; case {'111', '0111'} h = '7'; case '1000' h = '8'; case '1001' h = '9'; case '1010' h = 'A'; case '1011' h = 'B'; case '1100' h = 'C'; case '1101' h = 'D'; case '1110' h = 'E'; case '1111' h = 'F'; end Now, we have to call the function for every 4-bit group of binary numbers. One possible solution to separate the binary number into 4-bit groups is shown here: bin_str = input('Enter binary number: ', 's'); i = length(bin_str); n = ceil(i/4); for g = n : -1 : 1 if i > 4 hex_str(g) = b2h(bin_str(i-3 : i)); i = i - 4; else hex_str(g) = b2h(bin_str(1 : i)); end end hex_str Let’s try it. Enter binary number: 101010 hex_str = 2A Enter binary number: 1 hex_str = 62F5 Search Site Top Online Base Converter Hex to binary conversions Binary to Decimal Decimal to Binary Gray Code ## Related pages lagrange polynomial examplesimple matlab program examplebinomial distribution solved examplesamoritzation tablesimpson method integrationbinary to grey codescrap value in accountingfind the integral calculatorascii codes of alphabetssemilogx matlabhow to figure out depreciation ratecombinational gatesonline ohms law calculatorread xls matlabgenerating random numbers in matlabpythagoras theorem solverconverter hex to binaryboolean algebra axiomsmatlab integralshow to determine salvage value of a carhow to solve rc circuitsfive band resistor calculatormatlab trendlinematlab 3d plotbinary to decimal conversion programmatlab code for unit impulse functionhow to change from binary to decimalgauss-jordan elimination step by stepoctal to binary conversionbinary to hexadecimal tablematlab programming tutorialssine wave matlabhalf life formula exponential decaygrey code to binaryscrap value of an assetdecay formula calculatorhow to calculate scrap valuesmitchartcharacter map asciipascals triangle program11011 binary to decimalpiecewise defined functionsascii codes alphabetpascals triangle exampleequation solver in matlabmatlab sample codeshow to 3d plot in matlabprogram to convert binary to decimalwhat is scrap value in depreciationpolynomial fitting matlabbinary to hexadecimal conversion methodbinomial distribution probability calculatorgraphing a piecewise-defined functioncramers methodexcel to matlabtutorial gui matlabmatlab linear fittingexamples of simple interest and compound interestexample of bisection method in numerical analysisdiscount calculator formulafibonacci for loopsolids of revolutionplot legend matlabc program for gauss jordan methodsolve simultaneous equations matlabconvert cell array to matrixpiecewise functions graphingtextscangauss jordon methodhexadecimal examplesascii conversion calculatorsimple interest loan spreadsheetelectronics depreciation calculatorascii code of alphabets
1,104
4,555
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.3125
4
CC-MAIN-2018-22
latest
en
0.725255
http://www.dreamincode.net/forums/topic/192554-secret-code-vii-prime-numbers/page__p__1128991
1,462,331,117,000,000,000
text/html
crawl-data/CC-MAIN-2016-18/segments/1461860122268.99/warc/CC-MAIN-20160428161522-00088-ip-10-239-7-51.ec2.internal.warc.gz
479,683,863
20,421
Page 1 of 1 ## Secret Code VII - Prime numbers Why are Prime numbers so important in encryption Rate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=192554&amp;s=7ac9b02b5f66dcfa6715294389240bc0&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]> ### #1 pbl • There is nothing you can't do with a JTable Reputation: 8369 • Posts: 31,956 • Joined: 06-March 08 Posted 28 September 2010 - 09:19 PM In the next tutorial we will start to use Prime numbers for encryption. Everybody knows (or almost everybody knows) that Prime numbers are very important in crypting/decrypting algorithms. We will see why in the next tutorial when we will talk about transmitting, the secure way, a Key over the net. Before doing that, we need a way to generate Prime numbers and more precisely to get a prime number > a certain number. I apologize to DIC who already wrote a tutorial about the subject. Here is my version of it, very efficient. It uses the sieve of Eratosthene algorithm which use a BitField. Calculations of Prime is done on demand an only when required. It has 2 methods: - isPrime(n) which returns TRUE is the number passed as parameter is a Prime number - getPrimeGreaterOrEqual(n) which returns the first prime number >= n The class does not pre-calculate prime numbers, it just register in a BitSet is a number is a Prime or not (starting with 3) and expands this BitSet on demand if the calls to isPrime() or getPrimeGreatedOrEqual(n) request a bigger number Here is Prime.java... it will be required by the followin tutorials on Secret Code ``` import java.util.BitSet; /* * Encryption/Decrytion requires prime numbers * This class facilates the use of them using the sieve of Eratosthene */ public class Prime { // A BitSet to hold the primes usually when a BitSet is used to generate // Prime numbers using the Sieve of Eratosthene // 1) the BitSet is initialize to TRUE (true meaning that the number IS Prime) // 2) then non Prime numbers are set to FALSE // 3) in the BitSet bit 0 says if 0 is prime or not, bit 1 says if 1 is prime or not, // bit 2 says if 2 is prime or not, ...bit N syas if N is prime or not // This way of working have multiple disavantages // 1) when the BitSet is created and later expanded we have to set to TRUE the bits // in the extension as possible Prime. This is a waste of time. // 2) So here we will inversed the standard way of working // bit set to FALSE means that the corresponding number is Prime // bit set to TRUE means that the corresponding number is NOT Prime // so extending the BitSet will autmatically assumed that the numbers in the extension are Prime // 3) no need to waste memory for even number so // bit 0 is for 1 bit 1 for 3 bit 2 for 5 ... bit N/2 for N // make it static all instances of this class will share the same BitSet and max private static BitSet bitSet = new BitSet(1000); // int to a reasonable size // the largest number stored up to which Primes are identified private static int max = 3; /* * return if a number is prime */ public boolean isPrime(int n) { // if even or 1 surely not a prime if(n == 2) return true; if(n < 3 || n % 2 == 0) return false; // if we have already determine up to that prime if(n <= max) return !bitSet.get(n / 2); // ok we have to extend our bitSet up to that Prime for(int i = 3; i <= n; i += 2) { // if the first multiple of that number is > n we are done if(i * 2 > n) break; // if the already stored number is prime we will have to set all its // multiples to non prime if(!bitSet.get(i / 2)) { // found the last multiple set (recorded in our BitSet) for that prime // so we won't reset them twice for nothing int multiple = max / i; multiple *= i; // at the beginning this will be true if(multiple <= i) multiple = i * 2; // so fetch the first multiple of the prime // set as non prime all the multiples of that prime clearMultiple(i, multiple, n); } } // reset new max (the largest number tested) max = n; // ok return if rime or not depending if the bit is set return !bitSet.get(n / 2); } /* * Returns the first prime greater than the number pass as parameter */ int getPrimeGreaterOrEqual(int n) { // make sure we start with an odd number if(n % 2 == 0) ++n; // loop until we found one while(true) { // if the number is registered as prime return it if(isPrime(n)) return n; // else check next one n += 2; } } /* * Method to set a number not prime */ private void setNotPrime(int n) { // ignore the set for even numbers if it was not the case 6 (multiple of 3) // would set bit 6 / 2 = 3 in the BitSet to non prime and 3 is actually the bit for the number 7 if(n % 2 == 0) return; bitSet.set(n / 2, true); } /* * Will set as non prime all the multiple of this prime up to max * we specify as parameter the multiple to start with so when the BitSet is * expanded we are not redoing the job already done */ private void clearMultiple(int prime, int multiple, int max) { // set as non prime all the multiples of the number until we exceed the max while(multiple <= max) { setNotPrime(multiple); multiple += prime; } } /* * to test the class */ public static void main(String[] args) { // build a Prime object Prime prime = new Prime(); // test if the class returns the good first prime numbers from 3 to 101 // in reverse order to avoid multiple BitSet resizing for(int i = 101; i >= 3; i -= 2) { if(prime.isPrime(i)) System.out.println("Is " + i + " is prime: "); } // do some test with larger ones for(int i = 500; i < 2000; i += 50) System.out.println("The first prime number >= " + i + " is " + prime.getPrimeGreaterOrEqual(i)); } } ``` This code can be showed as example for any thread talking about Prime number Stay tune the next tutorial about key transmission using Prime numbers is coming Happy coding EDITED: use a staic max and BitSet so all instances will share them This post has been edited by pbl: 03 October 2010 - 04:30 PM Is This A Good Question/Topic? 2 ## Replies To: Secret Code VII - Prime numbers ### #2 CTphpnwb • D.I.C Lover Reputation: 3463 • Posts: 12,311 • Joined: 08-August 08 Posted 30 September 2010 - 06:39 AM The number 2 is a prime number. ``` // if even or 1 surely not a prime if(n < 3 || n % 2 == 0) return false; ``` Your code should return true for it. Was This Post Helpful? 2 ### #3 pbl • There is nothing you can't do with a JTable Reputation: 8369 • Posts: 31,956 • Joined: 06-March 08 Posted 30 September 2010 - 03:11 PM CTphpnwb, on 30 September 2010 - 07:39 AM, said: The number 2 is a prime number. ``` // if even or 1 surely not a prime if(n < 3 || n % 2 == 0) return false; ``` Your code should return true for it. you are right, I was distracted by the fact that this code will be used for large numbers but to be exact: ``` // if even or 1 surely not a prime if(n == 2) return true; if(n < 3 || n % 2 == 0) return false; ``` Was This Post Helpful? 0 Page 1 of 1 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}
2,048
7,323
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.484375
3
CC-MAIN-2016-18
latest
en
0.801463
https://www.coursehero.com/file/5665098/Ch13MiniCase/
1,490,830,275,000,000,000
text/html
crawl-data/CC-MAIN-2017-13/segments/1490218191405.12/warc/CC-MAIN-20170322212951-00133-ip-10-233-31-227.ec2.internal.warc.gz
866,727,812
64,883
Ch13MiniCase # Ch13MiniCase - Chapter 13 Mini Case for Financial Options and Real Options Note This sheet contains the mini case for Financial Options The mini This preview shows pages 1–2. Sign up to view the full content. 2/23/2003 Chapter 13. Mini Case for Financial Options and Real Options SITUATION LOOKING AT EXERCISE AND MARKET VALUE OF AN OPTION Exercise (strike) price = \$25 Price of Exercise Exercise the stock Price Value \$0 \$20.00 \$0.00 \$5 \$20.00 \$0.00 \$10 \$20.00 \$0.00 \$15 \$20.00 \$0.00 \$20 \$20.00 \$0.00 \$25 \$20.00 \$5.00 \$30 \$20.00 \$10.00 \$35 \$20.00 \$15.00 \$40 \$20.00 \$20.00 \$45 \$20.00 \$25.00 (1.) What are the corresponding exercise values and option price premiums? Strike Price= \$25 Stock Price Option Price Exercise Values Option Premiums \$25.00 \$3.00 \$0.00 \$3.00 \$30.00 \$7.50 \$5.00 \$2.50 \$35.00 \$12.00 \$10.00 \$2.00 \$40.00 \$16.50 \$15.00 \$1.50 \$45.00 \$21.00 \$20.00 \$1.00 \$50.00 \$25.50 \$25.00 \$0.50 Note: This sheet contains the mini case for Financial Options. The mini case for Real Options is in the sheet with the TAB labeled "Real Options." Assume that you have just been hired as a financial analyst by Tropical Sweets Inc., a mid-sized California company that specializes in creating exotic candies from tropical fruits such as mangoes, papayas, and dates. The firm's CEO, George Yamaguchi, recently returned from an industry corporate executive conference in San Francisco, and one of the sessions he attended was on real options. Since no one at Tropical Sweets is familiar with the basics of either financial or real options, Yamaguchi has asked you to prepare a brief report that the firm's executives could use to gain at least a cursory understanding of the topics. To begin, you gathered some outside materials on the subject and used these materials to draft a list of pertinent questions that need to be answered. In fact, one possible approach to the paper is to use a question-and-answer format. Now that the questions have been drafted, you have to develop the answers. a. What is a real option? What is a financial option? What is the single most important characteristic of an option? Answer: See Chapter 13 Mini Case Show b. Options have a unique set of terminology. Define the following terms: (1) call option; (2) put option; (3) exercise price; (4) striking, or strike price; (5) option price; (6) expiration date; (7) exercise value; (8) covered option; (9) naked option; (10) in-the-money call; (11) out-of-the-money call; and (12) LEAP. Answer: See Chapter 13 Mini Case Show Suppose a stock has the exercise (strike) price shown below. The Exercise Value is the profit if you choose to exercise the stock. If the current price of the stock is greater than the exercise price, then the Exercise Value is the current stock price minus the exercise price; otherwise, it is zero (you would never exercise the option if the stock price is less than the exercise price.) c. Consider Tropical Sweets’ call option with a \$25 strike price. The following table contains historical values for this option at different stock prices: (2.) What happens to the premium of option price over exercise value as the stock price rises? The premium falls as the stock price increases; see the graph below. Why? This preview has intentionally blurred sections. Sign up to view the full version. View Full Document This is the end of the preview. Sign up to access the rest of the document. ## This note was uploaded on 11/16/2009 for the course F 3033 taught by Professor Hh during the Spring '09 term at Maastricht. ### Page1 / 24 Ch13MiniCase - Chapter 13 Mini Case for Financial Options and Real Options Note This sheet contains the mini case for Financial Options The mini This preview shows document pages 1 - 2. Sign up to view the full document. View Full Document Ask a homework question - tutors are online
967
3,903
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.0625
3
CC-MAIN-2017-13
longest
en
0.830064
https://openmdao.org/twodocs/versions/latest/_srcdocs/packages/test_suite.components/sellar.html
1,607,015,516,000,000,000
text/html
crawl-data/CC-MAIN-2020-50/segments/1606141729522.82/warc/CC-MAIN-20201203155433-20201203185433-00663.warc.gz
372,142,185
109,672
# sellar.py¶ Test objects for the sellar two discipline problem. From Sellar’s analytic problem. Sellar, R. S., Batill, S. M., and Renaud, J. E., “Response Surface Based, Concurrent Subspace Optimization for Multidisciplinary System Design,” Proceedings References 79 of the 34th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV, January 1996. class openmdao.test_suite.components.sellar.SellarDerivatives(**kwargs)[source] Group containing the Sellar MDA. This version uses the disciplines with derivatives. __init__(**kwargs) Set the solvers to nonlinear and linear block Gauss–Seidel by default. Parameters **kwargsdict dict of arguments available here and in all descendants of this Group. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. add_subsystem(name, subsys, promotes=None, promotes_inputs=None, promotes_outputs=None, min_procs=1, max_procs=None, proc_weight=1.0) Parameters namestr Name of the subsystem being added subsys<System> An instantiated, but not-yet-set up system object. promotesiter of (str or tuple), optional A list of variable names specifying which subsystem variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_inputsiter of (str or tuple), optional A list of input variable names specifying which subsystem input variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_outputsiter of (str or tuple), optional A list of output variable names specifying which subsystem output variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. min_procsint Minimum number of MPI processes usable by the subsystem. Defaults to 1. max_procsint or None Maximum number of MPI processes usable by the subsystem. A value of None (the default) indicates there is no maximum limit. proc_weightfloat Weight given to the subsystem when allocating available MPI processes to all subsystems. Default is 1.0. Returns <System> the subsystem that was passed in. This is returned to enable users to instantiate and add a subsystem at the same time, and get the reference back. approx_totals(method='fd', step=None, form=None, step_calc=None) Approximate derivatives for a Group using the specified approximation method. Parameters methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step stepfloat Step size for approximation. Defaults to None, in which case, the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case, the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case, the approximation method provides its default value. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute_sys_graph(comps_only=False) Compute a dependency graph for subsystems in this group. Variable connection information is stored in each edge of the system graph. Parameters comps_onlybool (False) If True, return a graph of all components within this group or any of its descendants. No sub-groups will be included. Otherwise, a graph containing only direct children (both Components and Groups) of this group will be returned. Returns DiGraph A directed graph containing names of subsystems and their connections. configure() Configure this group to assign children settings. This method may optionally be overidden by your Group’s method. You may only use this method to change settings on your children subsystems. This includes setting solvers in cases where you want to override the defaults. You can assume that the full hierarchy below your level has been instantiated and has already called its own configure methods. Available attributes: name pathname comm options system hieararchy with attribute access connect(src_name, tgt_name, src_indices=None, flat_src_indices=None) Connect source src_name to target tgt_name in this namespace. Parameters src_namestr name of the source variable to connect tgt_namestr or [str, … ] or (str, …) name of the target variable(s) to connect src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise it must be a tuple or list of size equal to the number of dimensions of the source. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. guess_nonlinear(inputs, outputs, residuals, discrete_inputs=None, discrete_outputs=None) Provide initial guess for states. Override this method to set the initial guess for states. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] outputsVector unscaled, dimensional output variables read via outputs[key] residualsVector unscaled, dimensional residuals written to via residuals[key] discrete_inputsdict or None If not None, dict containing discrete input values. discrete_outputsdict or None If not None, dict containing discrete output values. initialize()[source] Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. promotes(subsys_name, any=None, inputs=None, outputs=None, src_indices=None, flat_src_indices=None, src_shape=None) Promote a variable in the model tree. Parameters subsys_namestr The name of the child subsystem whose inputs/outputs are being promoted. anySequence of str or tuple A Sequence of variable names (or tuples) to be promoted, regardless of if they are inputs or outputs. This is equivalent to the items passed via the promotes= argument to add_subsystem. If given as a tuple, we use the “promote as” standard of (‘real name’, ‘promoted name’)*[]: inputsSequence of str or tuple A Sequence of input names (or tuples) to be promoted. Tuples are used for the “promote as” capability. outputsSequence of str or tuple A Sequence of output names (or tuples) to be promoted. Tuples are used for the “promote as” capability. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None This argument applies only to promoted inputs. The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool This argument applies only to promoted inputs. If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_initial_values() Set all input and output variables to their declared initial values. set_input_defaults(name, val=UNDEFINED, units=None, src_shape=None) Specify metadata to be assumed when multiple inputs are promoted to the same name. Parameters namestr Promoted input name. valobject Value to assume for the promoted input. unitsstr or None Units to assume for the promoted input. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. set_order(new_order) Specify a new execution order for this system. Parameters new_orderlist of str List of system names in desired new execution order. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Build this group. This method should be overidden by your Group’s method. The reason for using this method to add subsystem is to save memory and setup time when using your Group while running under MPI. This avoids the creation of systems that will not be used in the current process. You may call ‘add_subsystem’ to add systems to this group. You may also issue connections, and set the linear and nonlinear solvers for this group level. You cannot safely change anything on children systems; use the ‘configure’ method instead. Available attributes: name pathname comm options system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDerivativesConnected(**kwargs)[source] Group containing the Sellar MDA. This version uses the disciplines with derivatives. __init__(**kwargs) Set the solvers to nonlinear and linear block Gauss–Seidel by default. Parameters **kwargsdict dict of arguments available here and in all descendants of this Group. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. add_subsystem(name, subsys, promotes=None, promotes_inputs=None, promotes_outputs=None, min_procs=1, max_procs=None, proc_weight=1.0) Parameters namestr Name of the subsystem being added subsys<System> An instantiated, but not-yet-set up system object. promotesiter of (str or tuple), optional A list of variable names specifying which subsystem variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_inputsiter of (str or tuple), optional A list of input variable names specifying which subsystem input variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_outputsiter of (str or tuple), optional A list of output variable names specifying which subsystem output variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. min_procsint Minimum number of MPI processes usable by the subsystem. Defaults to 1. max_procsint or None Maximum number of MPI processes usable by the subsystem. A value of None (the default) indicates there is no maximum limit. proc_weightfloat Weight given to the subsystem when allocating available MPI processes to all subsystems. Default is 1.0. Returns <System> the subsystem that was passed in. This is returned to enable users to instantiate and add a subsystem at the same time, and get the reference back. approx_totals(method='fd', step=None, form=None, step_calc=None) Approximate derivatives for a Group using the specified approximation method. Parameters methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step stepfloat Step size for approximation. Defaults to None, in which case, the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case, the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case, the approximation method provides its default value. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute_sys_graph(comps_only=False) Compute a dependency graph for subsystems in this group. Variable connection information is stored in each edge of the system graph. Parameters comps_onlybool (False) If True, return a graph of all components within this group or any of its descendants. No sub-groups will be included. Otherwise, a graph containing only direct children (both Components and Groups) of this group will be returned. Returns DiGraph A directed graph containing names of subsystems and their connections. configure() Configure this group to assign children settings. This method may optionally be overidden by your Group’s method. You may only use this method to change settings on your children subsystems. This includes setting solvers in cases where you want to override the defaults. You can assume that the full hierarchy below your level has been instantiated and has already called its own configure methods. Available attributes: name pathname comm options system hieararchy with attribute access connect(src_name, tgt_name, src_indices=None, flat_src_indices=None) Connect source src_name to target tgt_name in this namespace. Parameters src_namestr name of the source variable to connect tgt_namestr or [str, … ] or (str, …) name of the target variable(s) to connect src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise it must be a tuple or list of size equal to the number of dimensions of the source. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. guess_nonlinear(inputs, outputs, residuals, discrete_inputs=None, discrete_outputs=None) Provide initial guess for states. Override this method to set the initial guess for states. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] outputsVector unscaled, dimensional output variables read via outputs[key] residualsVector unscaled, dimensional residuals written to via residuals[key] discrete_inputsdict or None If not None, dict containing discrete input values. discrete_outputsdict or None If not None, dict containing discrete output values. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. promotes(subsys_name, any=None, inputs=None, outputs=None, src_indices=None, flat_src_indices=None, src_shape=None) Promote a variable in the model tree. Parameters subsys_namestr The name of the child subsystem whose inputs/outputs are being promoted. anySequence of str or tuple A Sequence of variable names (or tuples) to be promoted, regardless of if they are inputs or outputs. This is equivalent to the items passed via the promotes= argument to add_subsystem. If given as a tuple, we use the “promote as” standard of (‘real name’, ‘promoted name’)*[]: inputsSequence of str or tuple A Sequence of input names (or tuples) to be promoted. Tuples are used for the “promote as” capability. outputsSequence of str or tuple A Sequence of output names (or tuples) to be promoted. Tuples are used for the “promote as” capability. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None This argument applies only to promoted inputs. The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool This argument applies only to promoted inputs. If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_initial_values() Set all input and output variables to their declared initial values. set_input_defaults(name, val=UNDEFINED, units=None, src_shape=None) Specify metadata to be assumed when multiple inputs are promoted to the same name. Parameters namestr Promoted input name. valobject Value to assume for the promoted input. unitsstr or None Units to assume for the promoted input. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. set_order(new_order) Specify a new execution order for this system. Parameters new_orderlist of str List of system names in desired new execution order. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Build this group. This method should be overidden by your Group’s method. The reason for using this method to add subsystem is to save memory and setup time when using your Group while running under MPI. This avoids the creation of systems that will not be used in the current process. You may call ‘add_subsystem’ to add systems to this group. You may also issue connections, and set the linear and nonlinear solvers for this group level. You cannot safely change anything on children systems; use the ‘configure’ method instead. Available attributes: name pathname comm options system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDerivativesGrouped(**kwargs)[source] Group containing the Sellar MDA. This version uses the disciplines with derivatives. __init__(**kwargs) Set the solvers to nonlinear and linear block Gauss–Seidel by default. Parameters **kwargsdict dict of arguments available here and in all descendants of this Group. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. add_subsystem(name, subsys, promotes=None, promotes_inputs=None, promotes_outputs=None, min_procs=1, max_procs=None, proc_weight=1.0) Parameters namestr Name of the subsystem being added subsys<System> An instantiated, but not-yet-set up system object. promotesiter of (str or tuple), optional A list of variable names specifying which subsystem variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_inputsiter of (str or tuple), optional A list of input variable names specifying which subsystem input variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_outputsiter of (str or tuple), optional A list of output variable names specifying which subsystem output variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. min_procsint Minimum number of MPI processes usable by the subsystem. Defaults to 1. max_procsint or None Maximum number of MPI processes usable by the subsystem. A value of None (the default) indicates there is no maximum limit. proc_weightfloat Weight given to the subsystem when allocating available MPI processes to all subsystems. Default is 1.0. Returns <System> the subsystem that was passed in. This is returned to enable users to instantiate and add a subsystem at the same time, and get the reference back. approx_totals(method='fd', step=None, form=None, step_calc=None) Approximate derivatives for a Group using the specified approximation method. Parameters methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step stepfloat Step size for approximation. Defaults to None, in which case, the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case, the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case, the approximation method provides its default value. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute_sys_graph(comps_only=False) Compute a dependency graph for subsystems in this group. Variable connection information is stored in each edge of the system graph. Parameters comps_onlybool (False) If True, return a graph of all components within this group or any of its descendants. No sub-groups will be included. Otherwise, a graph containing only direct children (both Components and Groups) of this group will be returned. Returns DiGraph A directed graph containing names of subsystems and their connections. configure()[source] Configure this group to assign children settings. This method may optionally be overidden by your Group’s method. You may only use this method to change settings on your children subsystems. This includes setting solvers in cases where you want to override the defaults. You can assume that the full hierarchy below your level has been instantiated and has already called its own configure methods. Available attributes: name pathname comm options system hieararchy with attribute access connect(src_name, tgt_name, src_indices=None, flat_src_indices=None) Connect source src_name to target tgt_name in this namespace. Parameters src_namestr name of the source variable to connect tgt_namestr or [str, … ] or (str, …) name of the target variable(s) to connect src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise it must be a tuple or list of size equal to the number of dimensions of the source. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. guess_nonlinear(inputs, outputs, residuals, discrete_inputs=None, discrete_outputs=None) Provide initial guess for states. Override this method to set the initial guess for states. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] outputsVector unscaled, dimensional output variables read via outputs[key] residualsVector unscaled, dimensional residuals written to via residuals[key] discrete_inputsdict or None If not None, dict containing discrete input values. discrete_outputsdict or None If not None, dict containing discrete output values. initialize()[source] Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. promotes(subsys_name, any=None, inputs=None, outputs=None, src_indices=None, flat_src_indices=None, src_shape=None) Promote a variable in the model tree. Parameters subsys_namestr The name of the child subsystem whose inputs/outputs are being promoted. anySequence of str or tuple A Sequence of variable names (or tuples) to be promoted, regardless of if they are inputs or outputs. This is equivalent to the items passed via the promotes= argument to add_subsystem. If given as a tuple, we use the “promote as” standard of (‘real name’, ‘promoted name’)*[]: inputsSequence of str or tuple A Sequence of input names (or tuples) to be promoted. Tuples are used for the “promote as” capability. outputsSequence of str or tuple A Sequence of output names (or tuples) to be promoted. Tuples are used for the “promote as” capability. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None This argument applies only to promoted inputs. The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool This argument applies only to promoted inputs. If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_initial_values() Set all input and output variables to their declared initial values. set_input_defaults(name, val=UNDEFINED, units=None, src_shape=None) Specify metadata to be assumed when multiple inputs are promoted to the same name. Parameters namestr Promoted input name. valobject Value to assume for the promoted input. unitsstr or None Units to assume for the promoted input. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. set_order(new_order) Specify a new execution order for this system. Parameters new_orderlist of str List of system names in desired new execution order. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Build this group. This method should be overidden by your Group’s method. The reason for using this method to add subsystem is to save memory and setup time when using your Group while running under MPI. This avoids the creation of systems that will not be used in the current process. You may call ‘add_subsystem’ to add systems to this group. You may also issue connections, and set the linear and nonlinear solvers for this group level. You cannot safely change anything on children systems; use the ‘configure’ method instead. Available attributes: name pathname comm options system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDerivativesPreAutoIVC(**kwargs)[source] Group containing the Sellar MDA. This version uses the disciplines with derivatives. __init__(**kwargs) Set the solvers to nonlinear and linear block Gauss–Seidel by default. Parameters **kwargsdict dict of arguments available here and in all descendants of this Group. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. add_subsystem(name, subsys, promotes=None, promotes_inputs=None, promotes_outputs=None, min_procs=1, max_procs=None, proc_weight=1.0) Parameters namestr Name of the subsystem being added subsys<System> An instantiated, but not-yet-set up system object. promotesiter of (str or tuple), optional A list of variable names specifying which subsystem variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_inputsiter of (str or tuple), optional A list of input variable names specifying which subsystem input variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. promotes_outputsiter of (str or tuple), optional A list of output variable names specifying which subsystem output variables to ‘promote’ up to this group. If an entry is a tuple of the form (old_name, new_name), this will rename the variable in the parent group. min_procsint Minimum number of MPI processes usable by the subsystem. Defaults to 1. max_procsint or None Maximum number of MPI processes usable by the subsystem. A value of None (the default) indicates there is no maximum limit. proc_weightfloat Weight given to the subsystem when allocating available MPI processes to all subsystems. Default is 1.0. Returns <System> the subsystem that was passed in. This is returned to enable users to instantiate and add a subsystem at the same time, and get the reference back. approx_totals(method='fd', step=None, form=None, step_calc=None) Approximate derivatives for a Group using the specified approximation method. Parameters methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step stepfloat Step size for approximation. Defaults to None, in which case, the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case, the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case, the approximation method provides its default value. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute_sys_graph(comps_only=False) Compute a dependency graph for subsystems in this group. Variable connection information is stored in each edge of the system graph. Parameters comps_onlybool (False) If True, return a graph of all components within this group or any of its descendants. No sub-groups will be included. Otherwise, a graph containing only direct children (both Components and Groups) of this group will be returned. Returns DiGraph A directed graph containing names of subsystems and their connections. configure() Configure this group to assign children settings. This method may optionally be overidden by your Group’s method. You may only use this method to change settings on your children subsystems. This includes setting solvers in cases where you want to override the defaults. You can assume that the full hierarchy below your level has been instantiated and has already called its own configure methods. Available attributes: name pathname comm options system hieararchy with attribute access connect(src_name, tgt_name, src_indices=None, flat_src_indices=None) Connect source src_name to target tgt_name in this namespace. Parameters src_namestr name of the source variable to connect tgt_namestr or [str, … ] or (str, …) name of the target variable(s) to connect src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise it must be a tuple or list of size equal to the number of dimensions of the source. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. guess_nonlinear(inputs, outputs, residuals, discrete_inputs=None, discrete_outputs=None) Provide initial guess for states. Override this method to set the initial guess for states. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] outputsVector unscaled, dimensional output variables read via outputs[key] residualsVector unscaled, dimensional residuals written to via residuals[key] discrete_inputsdict or None If not None, dict containing discrete input values. discrete_outputsdict or None If not None, dict containing discrete output values. initialize()[source] Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. promotes(subsys_name, any=None, inputs=None, outputs=None, src_indices=None, flat_src_indices=None, src_shape=None) Promote a variable in the model tree. Parameters subsys_namestr The name of the child subsystem whose inputs/outputs are being promoted. anySequence of str or tuple A Sequence of variable names (or tuples) to be promoted, regardless of if they are inputs or outputs. This is equivalent to the items passed via the promotes= argument to add_subsystem. If given as a tuple, we use the “promote as” standard of (‘real name’, ‘promoted name’)*[]: inputsSequence of str or tuple A Sequence of input names (or tuples) to be promoted. Tuples are used for the “promote as” capability. outputsSequence of str or tuple A Sequence of output names (or tuples) to be promoted. Tuples are used for the “promote as” capability. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None This argument applies only to promoted inputs. The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool This argument applies only to promoted inputs. If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_initial_values() Set all input and output variables to their declared initial values. set_input_defaults(name, val=UNDEFINED, units=None, src_shape=None) Specify metadata to be assumed when multiple inputs are promoted to the same name. Parameters namestr Promoted input name. valobject Value to assume for the promoted input. unitsstr or None Units to assume for the promoted input. src_shapeint or tuple Assumed shape of any connected source or higher level promoted input. set_order(new_order) Specify a new execution order for this system. Parameters new_orderlist of str List of system names in desired new execution order. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Build this group. This method should be overidden by your Group’s method. The reason for using this method to add subsystem is to save memory and setup time when using your Group while running under MPI. This avoids the creation of systems that will not be used in the current process. You may call ‘add_subsystem’ to add systems to this group. You may also issue connections, and set the linear and nonlinear solvers for this group level. You cannot safely change anything on children systems; use the ‘configure’ method instead. Available attributes: name pathname comm options system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis1(units=None, scaling=None)[source] Component containing Discipline 1 – no derivatives version. __init__(units=None, scaling=None)[source] Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs)[source] Evaluates the equation y1 = z1**2 + z2 + x1 - 0.2*y2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, partials, discrete_inputs=None) Compute sub-jacobian parts. The model is assumed to be in an unscaled state. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] partialsJacobian sub-jac components written to partials[output_name, input_name] discrete_inputsdict or None If not None, dict containing discrete input values. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis1CS(units=None, scaling=None)[source] Component containing Discipline 1 – complex step version. __init__(units=None, scaling=None) Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs) Evaluates the equation y1 = z1**2 + z2 + x1 - 0.2*y2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, partials, discrete_inputs=None) Compute sub-jacobian parts. The model is assumed to be in an unscaled state. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] partialsJacobian sub-jac components written to partials[output_name, input_name] discrete_inputsdict or None If not None, dict containing discrete input values. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup() Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis1withDerivatives(units=None, scaling=None)[source] Component containing Discipline 1 – derivatives version. __init__(units=None, scaling=None) Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs) Evaluates the equation y1 = z1**2 + z2 + x1 - 0.2*y2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, partials)[source] Jacobian for Sellar discipline 1. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup() Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis2(units=None, scaling=None)[source] Component containing Discipline 2 – no derivatives version. __init__(units=None, scaling=None)[source] Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs)[source] Evaluates the equation y2 = y1**(.5) + z1 + z2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, partials, discrete_inputs=None) Compute sub-jacobian parts. The model is assumed to be in an unscaled state. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] partialsJacobian sub-jac components written to partials[output_name, input_name] discrete_inputsdict or None If not None, dict containing discrete input values. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup()[source] Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis2CS(units=None, scaling=None)[source] Component containing Discipline 2 – complex step version. __init__(units=None, scaling=None) Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs) Evaluates the equation y2 = y1**(.5) + z1 + z2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, partials, discrete_inputs=None) Compute sub-jacobian parts. The model is assumed to be in an unscaled state. Parameters inputsVector unscaled, dimensional input variables read via inputs[key] partialsJacobian sub-jac components written to partials[output_name, input_name] discrete_inputsdict or None If not None, dict containing discrete input values. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup() Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarDis2withDerivatives(units=None, scaling=None)[source] Component containing Discipline 2 – derivatives version. __init__(units=None, scaling=None) Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None, src_indices=None, flat_src_indices=None, units=None, desc='', tags=None, shape_by_conn=False, copy_shape=None) Add an input variable to the component. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray or Iterable The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if src_indices not provided and val is not an array. Default is None. src_indicesint or list of ints or tuple of ints or int ndarray or Iterable or None The global indices of the source variable to transfer data from. A value of None implies this input depends on all entries of source. Default is None. The shapes of the target and src_indices must match, and form of the entries within is determined by the value of ‘flat_src_indices’. flat_src_indicesbool If True, each entry of src_indices is assumed to be an index into the flattened source. Otherwise each entry must be a tuple or list of size equal to the number of dimensions of the source. unitsstr or None Units in which this input variable will be provided to the component during execution. Default is None, which means it is unitless. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. shape_by_connbool If True, shape this input to match its connected output. copy_shapestr or None If a str, that str is the name of a variable. Shape this input to match that of the named variable. Returns dict add_objective(name, ref=None, ref0=None, index=None, units=None, adder=None, scaler=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. Parameters namestring Name of the response variable in the system. reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. This may be a positive or negative integer. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The objective can be scaled using scaler and adder, where $x_{scaled} = scaler(x + adder)$ or through the use of ref/ref0, which map to scaler and adder through the equations: \begin{align}\begin{aligned}0 = scaler(ref_0 + adder)\\1 = scaler(ref + adder)\end{aligned}\end{align} which results in: \begin{align}\begin{aligned}adder = -ref_0\\scaler = \frac{1}{ref + adder}\end{aligned}\end{align} add_output(name, val=1.0, shape=None, units=None, res_units=None, desc='', lower=None, upper=None, ref=1.0, ref0=0.0, res_ref=None, tags=None, shape_by_conn=False, copy_shape=None) Add an output variable to the component. For ExplicitComponent, res_ref defaults to the value in res unless otherwise specified. Parameters namestr name of the variable in this component’s namespace. valfloat or list or tuple or ndarray The initial value of the variable being added in user-defined units. Default is 1.0. shapeint or tuple or list or None Shape of this variable, only required if val is not an array. Default is None. unitsstr or None Units in which the output variables will be provided to the component during execution. Default is None, which means it has no units. res_unitsstr or None Units in which the residuals of this output will be given to the user when requested. Default is None, which means it has no units. descstr description of the variable. lowerfloat or list or tuple or ndarray or None lower bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no lower bound. Default is None. upperfloat or list or tuple or ndarray or None upper bound(s) in user-defined units. It can be (1) a float, (2) an array_like consistent with the shape arg (if given), or (3) an array_like matching the shape of val, if val is array_like. A value of None means this output has no upper bound. Default is None. reffloat Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 1. Default is 1. ref0float Scaling parameter. The value in the user-defined units of this output variable when the scaled value is 0. Default is 0. res_reffloat Scaling parameter. The value in the user-defined res_units of this output’s residual when the scaled value is 1. Default is None, which means residual scaling matches output scaling. tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs and also when listing results from case recorders. shape_by_connbool If True, shape this output to match its connected input(s). copy_shapestr or None If a str, that str is the name of a variable. Shape this output to match that of the named variable. Returns dict add_recorder(recorder, recurse=False) Add a recorder to the system. Parameters recorder<CaseRecorder> A recorder instance. recurseboolean Flag indicating if the recorder should be added to all the subsystems. add_response(name, type_, lower=None, upper=None, equals=None, ref=None, ref0=None, indices=None, index=None, units=None, adder=None, scaler=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a response variable to this system. The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. Parameters namestring Name of the response variable in the system. type_string The type of response. Supported values are ‘con’ and ‘obj’ lowerfloat or ndarray, optional Lower boundary for the variable upperupper or ndarray, optional Upper boundary for the variable equalsequals or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0upper or ndarray, optional Value of response variable that scales to 0.0 in the driver. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. indexint, optional If variable is an array, this indicates which entry is of interest for this particular response. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. check_config(logger) Perform optional error checks. Parameters loggerobject The object that manages logging output. cleanup() Clean up resources prior to exit. compute(inputs, outputs) Evaluates the equation y2 = y1**(.5) + z1 + z2 compute_jacvec_product(inputs, d_inputs, d_outputs, mode, discrete_inputs=None) Compute jac-vector product. The model is assumed to be in an unscaled state. If mode is: ‘fwd’: d_inputs |-> d_outputs ‘rev’: d_outputs |-> d_inputs Parameters inputsVector unscaled, dimensional input variables read via inputs[key] d_inputsVector see inputs; product must be computed only if var_name in d_inputs d_outputsVector see outputs; product must be computed only if var_name in d_outputs modestr either ‘fwd’ or ‘rev’ discrete_inputsdict or None If not None, dict containing discrete input values. compute_partials(inputs, J)[source] Jacobian for Sellar discipline 2. convert2units(name, val, units) Convert the given value to the specified units. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_from_units(name, val, units) Convert the given value from the specified units to those of the named variable. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. unitsstr The units to convert to. Returns float or ndarray of float The value converted to the specified units. convert_units(name, val, units_from, units_to) Wrap the utility convert_units and give a good error message. Parameters namestr Name of the variable. valfloat or ndarray of float The value of the variable. units_fromstr The units to convert from. units_tostr The units to convert to. Returns float or ndarray of float The value converted to the specified units. declare_coloring(wrt=('*'), method='fd', form=None, step=None, per_instance=True, num_full_jacs=3, tol=1e-25, orders=None, perturb_size=1e-09, min_improve_pct=5.0, show_summary=True, show_sparsity=False) Set options for deriv coloring of a set of wrt vars matching the given pattern(s). Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain input names, output names, or glob patterns. methodstr Method used to compute derivative: “fd” for finite difference, “cs” for complex step. formstr Finite difference form, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference. Leave undeclared to keep unchanged from previous or default value. per_instancebool If True, a separate coloring will be generated for each instance of a given class. Otherwise, only one coloring for a given class will be generated and all instances of that class will use it. num_full_jacsint Number of times to repeat partial jacobian computation when computing sparsity. tolfloat Tolerance used to determine if an array entry is nonzero during sparsity determination. ordersint Number of orders above and below the tolerance to check during the tolerance sweep. perturb_sizefloat Size of input/output perturbation during generation of sparsity. min_improve_pctfloat If coloring does not improve (decrease) the number of solves more than the given percentage, coloring will not be used. show_summarybool If True, display summary information after generating coloring. show_sparsitybool If True, display sparsity with coloring info after generating coloring. declare_partials(of, wrt, dependent=True, rows=None, cols=None, val=None, method='exact', step=None, form=None, step_calc=None) Parameters ofstr or list of str The name of the residual(s) that derivatives are being computed for. May also contain a glob pattern. wrtstr or list of str The name of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. dependentbool(True) If False, specifies no dependence between the output(s) and the input(s). This is only necessary in the case of a sparse global jacobian, because if ‘dependent=False’ is not specified and declare_partials is not called for a given pair, then a dense matrix of zeros will be allocated in the sparse global jacobian for that pair. In the case of a dense global jacobian it doesn’t matter because the space for a dense subjac will always be allocated for every pair. rowsndarray of int or None Row indices for each nonzero entry. For sparse subjacobians only. colsndarray of int or None Column indices for each nonzero entry. For sparse subjacobians only. valfloat or ndarray of float or scipy.sparse Value of subjacobian. If rows and cols are not None, this will contain the values found at each (row, col) location in the subjac. methodstr The type of approximation that should be used. Valid options include: ‘fd’: Finite Difference, ‘cs’: Complex Step, ‘exact’: use the component defined analytic derivatives. Default is ‘exact’. stepfloat Step size for approximation. Defaults to None, in which case the approximation method provides its default value. formstring Form for finite difference, can be ‘forward’, ‘backward’, or ‘central’. Defaults to None, in which case the approximation method provides its default value. step_calcstring Step type for finite difference, can be ‘abs’ for absolute’, or ‘rel’ for relative. Defaults to None, in which case the approximation method provides its default value. Returns dict Metadata dict for the specified partial(s). get_approx_coloring_fname() Return the full pathname to a coloring file. Parameters systemSystem The System having its coloring saved or loaded. Returns str Full pathname of the coloring file. get_constraints(recurse=True) Get the Constraint settings from this system. Retrieve the constraint settings for the current system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all constraints relative to the this system. Returns dict The constraints defined in the current system. get_design_vars(recurse=True, get_sizes=True, use_prom_ivc=True) Get the DesignVariable settings from this system. Retrieve all design variable settings from the system and, if recurse is True, all of its subsystems. Parameters recursebool If True, recurse through the subsystems and return the path of all design vars relative to the this system. get_sizesbool, optional If True, compute the size of each design variable. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The design variables defined in the current system and, if recurse=True, its subsystems. get_io_metadata(iotypes=('input', 'output'), metadata_keys=None, includes=None, excludes=None, tags=(), get_remote=False, rank=None, return_rel_names=True) Retrieve metdata for a filtered list of variables. Parameters iotypesstr or iter of str Will contain either ‘input’, ‘output’, or both. Defaults to both. Names of metadata entries to be retrieved or None, meaning retrieve all available ‘allprocs’ metadata. If ‘values’ or ‘src_indices’ are required, their keys must be provided explicitly since they are not found in the ‘allprocs’ metadata and must be retrieved from local metadata located in each process. includesstr, iter of str or None Collection of glob patterns for pathnames of variables to include. Default is None, which includes all variables. excludesstr, iter of str or None Collection of glob patterns for pathnames of variables to exclude. Default is None. tagsstr or iter of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. get_remotebool If True, retrieve variables from other MPI processes as well. rankint or None If None, and get_remote is True, retrieve values from all MPI process to all other MPI processes. Otherwise, if get_remote is True, retrieve values from all MPI processes only to the specified rank. return_rel_namesbool If True, the names returned will be relative to the scope of this System. Otherwise they will be absolute names. Returns dict A dict of metadata keyed on name, where name is either absolute or relative based on the value of the return_rel_names arg, and metadata is a dict containing entries based on the value of the metadata_keys arg. Every metadata dict will always contain two entries, ‘promoted_name’ and ‘discrete’, to indicate a given variable’s promoted name and whether or not it is discrete. get_linear_vectors(vec_name='linear') Return the linear inputs, outputs, and residuals vectors. Parameters vec_namestr Name of the linear right-hand-side vector. The default is ‘linear’. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals linear vectors for vec_name. get_nonlinear_vectors() Return the inputs, outputs, and residuals vectors. Returns (inputs, outputs, residuals)tuple of <Vector> instances Yields the inputs, outputs, and residuals nonlinear vectors. get_objectives(recurse=True) Get the Objective settings from this system. Retrieve all objectives settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all objective relative to the this system. Returns dict The objectives defined in the current system. get_relevant_vars(desvars, responses, mode) Find all relevant vars between desvars and responses. Both vars are assumed to be outputs (either design vars or responses). Parameters desvarslist of str Names of design variables. responseslist of str Names of response variables. modestr Direction of derivatives, either ‘fwd’ or ‘rev’. Returns dict Dict of ({‘outputs’: dep_outputs, ‘inputs’: dep_inputs, dep_systems) keyed by design vars and responses. get_responses(recurse=True, get_sizes=True, use_prom_ivc=False) Get the response variable settings from this system. Retrieve all response variable settings from the system as a dict, keyed by variable name. Parameters recursebool, optional If True, recurse through the subsystems and return the path of all responses relative to the this system. get_sizesbool, optional If True, compute the size of each response. use_prom_ivcbool Translate auto_ivc_names to their promoted input names. Returns dict The responses defined in the current system and, if recurse=True, its subsystems. get_source(name) Return the source variable connected to the given named variable. The name can be a promoted name or an absolute name. If the given variable is an input, the absolute name of the connected source will be returned. If the given variable itself is a source, its own absolute name will be returned. Parameters namestr Absolute or promoted name of the variable. Returns str The absolute name of the source variable. get_val(name, units=None, indices=None, get_remote=False, rank=None, vec_name='nonlinear', kind=None, flat=False, from_src=True) Get an output/input/residual variable. Function is used if you want to specify display units. Parameters namestr Promoted or relative variable name in the root system’s namespace. unitsstr, optional Units to convert to before return. indicesint or list of ints or tuple of ints or int ndarray or Iterable or None, optional Indices or slice to return. get_remotebool or None If True, retrieve the value even if it is on a remote process. Note that if the variable is remote on ANY process, this function must be called on EVERY process in the Problem’s MPI communicator. If False, only retrieve the value if it is on the current process, or only the part of the value that’s on the current process for a distributed variable. If None and the variable is remote or distributed, a RuntimeError will be raised. rankint or None If not None, only gather the value to this rank. vec_namestr Name of the vector to use. Defaults to ‘nonlinear’. kindstr or None Kind of variable (‘input’, ‘output’, or ‘residual’). If None, returned value will be either an input or output. flatbool If True, return the flattened version of the value. from_srcbool If True, retrieve value of an input variable from its connected source. Returns object The value of the requested output/input variable. get_var_meta(name, key) Parameters namestr Variable name (promoted, relative, or absolute) in the root system’s namespace. keystr Key into the metadata dict for the given variable. Returns object The value stored under key in the metadata dictionary for the named variable. initialize() Perform any one-time initialization run at instantiation. is_active() Determine if the system is active on this rank. Returns bool If running under MPI, returns True if this System has a valid communicator. Always returns True if not running under MPI. property linear_solver Get the linear solver for this system. list_inputs(values=True, prom_name=False, units=False, shape=False, global_shape=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of input names and other optional information to a specified stream. Parameters valuesbool, optional When True, display/return input values. Default is True. prom_namebool, optional When True, display/return the promoted name of the variable. Default is False. unitsbool, optional When True, display/return units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only inputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all input variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all ranks. Default is False, which will display output only from rank 0. out_streamfile-like object Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of input names and other optional information about those inputs. list_outputs(explicit=True, implicit=True, values=True, prom_name=False, residuals=False, residuals_tol=None, units=False, shape=False, global_shape=False, bounds=False, scaling=False, desc=False, hierarchical=True, print_arrays=False, tags=None, includes=None, excludes=None, all_procs=False, list_autoivcs=False, out_stream=DEFAULT_OUT_STREAM) Write a list of output names and other optional information to a specified stream. Parameters explicitbool, optional include outputs from explicit components. Default is True. implicitbool, optional include outputs from implicit components. Default is True. valuesbool, optional When True, display output values. Default is True. prom_namebool, optional When True, display the promoted name of the variable. Default is False. residualsbool, optional When True, display residual values. Default is False. residuals_tolfloat, optional If set, limits the output of list_outputs to only variables where the norm of the resids array is greater than the given ‘residuals_tol’. Default is None. unitsbool, optional When True, display units. Default is False. shapebool, optional When True, display/return the shape of the value. Default is False. global_shapebool, optional When True, display/return the global shape of the value. Default is False. boundsbool, optional When True, display/return bounds (lower and upper). Default is False. scalingbool, optional When True, display/return scaling (ref, ref0, and res_ref). Default is False. descbool, optional When True, display/return description. Default is False. hierarchicalbool, optional When True, human readable output shows variables in hierarchical format. print_arraysbool, optional When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False. tagsstr or list of strs User defined tags that can be used to filter what gets listed. Only outputs with the given tags will be listed. Default is None, which means there will be no filtering based on tags. includesNone or iter of str Collection of glob patterns for pathnames of variables to include. Default is None, which includes all output variables. excludesNone or iter of str Collection of glob patterns for pathnames of variables to exclude. Default is None. all_procsbool, optional When True, display output on all processors. Default is False. list_autoivcsbool If True, include auto_ivc outputs in the listing. Defaults to False. out_streamfile-like Where to send human readable output. Default is sys.stdout. Set to None to suppress. Returns List of output names and other optional information about those outputs. property msginfo Our instance pathname, if available, or our class name. For use in error messages. Returns str Either our instance pathname or class name. property nonlinear_solver Get the nonlinear solver for this system. record_iteration() Record an iteration of the current System. run_apply_linear(vec_names, mode, scope_out=None, scope_in=None) Compute jac-vec product. This calls _apply_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. scope_outset or None Set of absolute output names in the scope of this mat-vec product. If None, all are in the scope. scope_inset or None Set of absolute input names in the scope of this mat-vec product. If None, all are in the scope. run_apply_nonlinear() Compute residuals. This calls _apply_nonlinear, but with the model assumed to be in an unscaled state. run_linearize(sub_do_ln=True) Compute jacobian / factorization. This calls _linearize, but with the model assumed to be in an unscaled state. Parameters sub_do_lnboolean Flag indicating if the children should call linearize on their linear solvers. run_solve_linear(vec_names, mode) Apply inverse jac product. This calls _solve_linear, but with the model assumed to be in an unscaled state. Parameters vec_names[str, …] list of names of the right-hand-side vectors. modestr ‘fwd’ or ‘rev’. run_solve_nonlinear() Compute outputs. This calls _solve_nonlinear, but with the model assumed to be in an unscaled state. set_check_partial_options(wrt, method='fd', form=None, step=None, step_calc=None, directional=False) Set options that will be used for checking partial derivatives. Parameters wrtstr or list of str The name or names of the variables that derivatives are taken with respect to. This can contain the name of any input or output variable. May also contain a glob pattern. methodstr Method for check: “fd” for finite difference, “cs” for complex step. formstr Finite difference form for check, can be “forward”, “central”, or “backward”. Leave undeclared to keep unchanged from previous or default value. stepfloat Step size for finite difference check. Leave undeclared to keep unchanged from previous or default value. step_calcstr Type of step calculation for check, can be “abs” for absolute (default) or “rel” for relative. Leave undeclared to keep unchanged from previous or default value. directionalbool Set to True to perform a single directional derivative for each vector variable in the pattern named in wrt. set_initial_values() Set all input and output variables to their declared initial values. set_solver_print(level=2, depth=1e+99, type_='all') Control printing for solvers and subsolvers in the model. Parameters levelint iprint level. Set to 2 to print residuals each iteration; set to 1 to print just the iteration totals; set to 0 to disable all printing except for failures, and set to -1 to disable all printing including failures. depthint How deep to recurse. For example, you can set this to 0 if you only want to print the top level linear and nonlinear solver messages. Default prints everything. type_str Type of solver to set: ‘LN’ for linear, ‘NL’ for nonlinear, or ‘all’ for all. setup() Declare inputs and outputs. Available attributes: name pathname comm options setup_partials()[source] Declare partials. This is meant to be overridden by component classes. All partials should be declared here since this is called after all size/shape information is known for all variables. system_iter(include_self=False, recurse=True, typ=None) Yield a generator of local subsystems of this system. Parameters include_selfbool If True, include this system in the iteration. recursebool If True, iterate over the whole tree under this system. typtype If not None, only yield Systems that match that are instances of the given type. use_fixed_coloring(coloring=<object object>, recurse=True) Use a precomputed coloring for this System. Parameters coloringstr A coloring filename. If no arg is passed, filename will be determined automatically. recursebool If True, set fixed coloring in all subsystems that declare a coloring. Ignored if a specific coloring is passed in. class openmdao.test_suite.components.sellar.SellarImplicitDis1(units=None, scaling=None)[source] Component containing Discipline 1 – no derivatives version. __init__(units=None, scaling=None)[source] Store some bound methods so we can detect runtime overrides. Parameters **kwargsdict of keyword arguments Keyword arguments that will be mapped into the Component options. abs_name_iter(iotype, local=True, cont=True, discrete=False) Iterate over absolute variable names for this System. By setting appropriate values for ‘cont’ and ‘discrete’, yielded variable names can be continuous only, discrete only, or both. Parameters iotypestr Either ‘input’ or ‘output’. localbool If True, include only names of local variables. Default is True. contbool If True, include names of continuous variables. Default is True. discretebool If True, include names of discrete variables. Default is False. add_constraint(name, lower=None, upper=None, equals=None, ref=None, ref0=None, adder=None, scaler=None, units=None, indices=None, linear=False, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a constraint variable to this system. Parameters namestring Name of the response variable in the system. lowerfloat or ndarray, optional Lower boundary for the variable upperfloat or ndarray, optional Upper boundary for the variable equalsfloat or ndarray, optional Equality constraint value for the variable reffloat or ndarray, optional Value of response variable that scales to 1.0 in the driver. ref0float or ndarray, optional Value of response variable that scales to 0.0 in the driver. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. unitsstr, optional Units to convert to before applying scaling. indicessequence of int, optional If variable is an array, these indicate which entries are of interest for this particular response. These may be positive or negative integers. linearbool Set to True if constraint is linear. Default is False. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. The arguments (lower, upper, equals) can not be strings or variable names. add_design_var(name, lower=None, upper=None, ref=None, ref0=None, indices=None, adder=None, scaler=None, units=None, parallel_deriv_color=None, vectorize_derivs=False, cache_linear_solution=False) Add a design variable to this system. Parameters namestring Name of the design variable in the system. lowerfloat or ndarray, optional Lower boundary for the input upperupper or ndarray, optional Upper boundary for the input reffloat or ndarray, optional Value of design var that scales to 1.0 in the driver. ref0float or ndarray, optional Value of design var that scales to 0.0 in the driver. indicesiter of int, optional If an input is an array, these indicate which entries are of interest for this particular design variable. These may be positive or negative integers. unitsstr, optional Units to convert to before applying scaling. Value to add to the model value to get the scaled value for the driver. adder is first in precedence. adder and scaler are an alterantive to using ref and ref0. scalerfloat or ndarray, optional value to multiply the model value to get the scaled value for the driver. scaler is second in precedence. adder and scaler are an alterantive to using ref and ref0. parallel_deriv_colorstring If specified, this design var will be grouped for parallel derivative calculations with other variables sharing the same parallel_deriv_color. vectorize_derivsbool If True, vectorize derivative calculations. cache_linear_solutionbool If True, store the linear solution vectors for this variable so they can be used to start the next linear solution with an initial guess equal to the solution from the previous linear solve. Notes The response can be scaled using ref and ref0. The argument ref0 represents the physical value when the scaled value is 0. The argument ref represents the physical value when the scaled value is 1. add_discrete_input(name, val, desc='', tags=None) Add a discrete input variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable tagsstr or list of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_discrete_output(name, val, desc='', tags=None) Add an output variable to the component. Parameters namestr name of the variable in this component’s namespace. vala picklable object The initial value of the variable being added. descstr description of the variable. tagsstr or list of strs or set of strs User defined tags that can be used to filter what gets listed when calling list_inputs and list_outputs. Returns dict add_input(name, val=1.0, shape=None,
79,598
368,552
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 20, "equation": 0, "x-ck12": 0, "texerror": 0}
2.515625
3
CC-MAIN-2020-50
latest
en
0.660294
http://hackage.haskell.org/package/swish-0.8.0.0/docs/Swish-RDF-Query.html
1,556,111,145,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578641278.80/warc/CC-MAIN-20190424114453-20190424140453-00238.warc.gz
80,628,284
5,614
swish-0.8.0.0: A semantic web toolkit. Portability H98 experimental Douglas Burke Safe-Infered Swish.RDF.Query Contents Description This module defines functions for querying an RDF graph to obtain a set of variable substitutions, and to apply a set of variable substitutions to a query pattern to obtain a new graph. It also defines a few primitive graph access functions. A minimal example is shown below, where we query a very simple graph: >>> :m + Swish.RDF Swish.RDF.Parser.N3 Swish.RDF.Query >>> let qparse = either error id . parseN3fromText >>> let igr = qparse "@prefix a: <http://example.com/>. a:a a a:A ; a:foo a:bar. a:b a a:B ; a:foo a:bar." >>> let qgr = qparse "?node a ?type." >>> rdfQueryFind qgr igr [[(?type,a:B),(?node,a:b)],[(?type,a:A),(?node,a:a)]] >>> let bn = (toRDFLabel . Data.Maybe.fromJust . Network.URI.parseURI) "http://example.com/B" >>> rdfFindArcs (rdfObjEq bn) igr [(a:b,rdf:type,a:B)] >>> Data.Maybe.mapMaybe (flip Swish.RDF.VarBinding.vbMap (Var "type")) \$ rdfQueryFind qgr igr [a:B,a:A] Synopsis # Documentation Arguments :: RDFGraph The query graph. -> RDFGraph The target graph. -> [RDFVarBinding] Each element represents a set of variable bindings that make the query graph a subgraph of the target graph. The list can be empty. Basic graph-query function. The triples of the query graph are matched sequentially against the target graph, each taking account of any variable bindings that have already been determined, and adding new variable bindings as triples containing query variables are matched against the graph. RDF query filter. This function applies a supplied query binding filter to the result from a call of rdfQueryFind. If none of the query bindings found satisfy the filter, a null list is returned (which is what rdfQueryFind returns if the query cannot be satisfied). (Because of lazy evaluation, this should be as efficient as applying the filter as the search proceeds. I started to build the filter logic into the query function itself, with consequent increase in complexity, until I remembered lazy evaluation lets me keep things separate.) Arguments :: RDFGraph Query graph -> RDFGraph Target graph -> [[RDFVarBinding]] Reverse graph-query function. Similar to rdfQueryFind, but with different success criteria. The query graph is matched against the supplied graph, but not every triple of the query is required to be matched. Rather, every triple of the target graph must be matched, and substitutions for just the variables thus bound are returned. In effect, these are subsitutions in the query that entail the target graph (where rdfQueryFind returns substitutions that are entailed by the target graph). Multiple substitutions may be used together, so the result returned is a list of lists of query bindings. Each inner list contains several variable bindings that must all be applied separately to the closure antecendents to obtain a collection of expressions that together are antecedent to the supplied conclusion. A null list of bindings returned means the conclusion can be inferred without any antecedents. Note: in back-chaining, the conditions required to prove each target triple are derived independently, using the inference rule for each such triple, so there are no requirements to check consistency with previously determined variable bindings, as there are when doing forward chaining. A result of this is that there may be redundant triples generated by the back-chaining process. Any process using back-chaining should deal with the results returned accordingly. An empty outer list is returned if no combination of substitutions can infer the supplied target. RDF back-chaining query filter. This function applies a supplied query binding filter to the result from a call of rdfQueryBack. Each inner list contains bindings that must all be used to satisfy the backchain query, so if any query binding does not satisfy the filter, the entire corresponding row is removed rdfQueryBackModify :: VarBindingModify a b -> [[VarBinding a b]] -> [[VarBinding a b]]Source RDF back-chaining query modifier. This function applies a supplied query binding modifier to the result from a call of rdfQueryBack. Each inner list contains bindings that must all be used to satisfy a backchaining query, so if any query binding does not satisfy the filter, the entire corresponding row is removed Simple entailment (instance) graph query. This function queries a graph to find instances of the query graph in the target graph. It is very similar to the normal forward chaining query rdfQueryFind, except that blank nodes rather than query variable nodes in the query graph are matched against nodes in the target graph. Neither graph should contain query variables. An instance is defined by the RDF semantics specification, per http://www.w3.org/TR/rdf-mt/, and is obtained by replacing blank nodes with URIs, literals or other blank nodes. RDF simple entailment can be determined in terms of instances. This function looks for a subgraph of the target graph that is an instance of the query graph, which is a necessary and sufficient condition for RDF entailment (see the Interpolation Lemma in RDF Semantics, section 1.2). It is anticipated that this query function can be used in conjunction with backward chaining to determine when the search for sufficient antecendents to determine some goal has been concluded. rdfQuerySubs :: [RDFVarBinding] -> RDFGraph -> [RDFGraph]Source Graph substitution function. Uses the supplied variable bindings to substitute variables in a supplied graph, returning a list of result graphs corresponding to each set of variable bindings applied to the input graph. This function is used for formward chaining substitutions, and returns only those result graphs for which all query variables are bound. rdfQueryBackSubs :: [[RDFVarBinding]] -> RDFGraph -> [[(RDFGraph, [RDFLabel])]]Source Graph back-substitution function. Uses the supplied variable bindings from rdfQueryBack to perform a series of variable substitutions in a supplied graph, returning a list of lists of result graphs corresponding to each set of variable bindings applied to the input graphs. The outer list of the result contains alternative antecedent lists that satisfy the query goal. Each inner list contains graphs that must all be inferred to satisfy the query goal. rdfQuerySubsAll :: [RDFVarBinding] -> RDFGraph -> [(RDFGraph, [RDFLabel])]Source Graph substitution function. This function performs the substitutions and returns a list of result graphs each paired with a list unbound variables in each. rdfQuerySubsBlank :: [RDFVarBinding] -> RDFGraph -> [RDFGraph]Source Graph substitution function. This function performs each of the substitutions in vars, and replaces any nodes corresponding to unbound query variables with new blank nodes. rdfQueryBackSubsBlank :: [[RDFVarBinding]] -> RDFGraph -> [[RDFGraph]]Source Graph back-substitution function, replacing variables with bnodes. Uses the supplied variable bindings from rdfQueryBack to perform a series of variable substitutions in a supplied graph, returning a list of lists of result graphs corresponding to each set of variable bindings applied to the input graphs. The outer list of the result contains alternative antecedent lists that satisfy the query goal. Each inner list contains graphs that must all be inferred to satisfy the query goal. rdfFindArcs :: (RDFTriple -> Bool) -> RDFGraph -> [RDFTriple]Source Take a predicate on an RDF statement and a graph, and returns all statements in the graph satisfying that predicate. Use combinations of these as follows: • find all statements with given subject: rdfFindArcs (rdfSubjEq s) • find all statements with given property: rdfFindArcs (rdfPredEq p) • find all statements with given object: rdfFindArcs (rdfObjEq o) • find all statements matching conjunction of these conditions: rdfFindArcs (allp [...]) • find all statements matching disjunction of these conditions: rdfFindArcs (anyp [...]) Custom predicates can also be used. Test if statement has given subject Test if statement has given predicate Test if statement has given object Arguments :: RDFLabel subject -> RDFLabel predicate -> RDFGraph -> [RDFLabel] Find values of given predicate for a given subject Arguments :: RDFLabel subject -> RDFLabel predicate -> RDFGraph -> [Integer] Find integer values of a given predicate for a given subject Arguments :: RDFLabel predicate -> RDFLabel object -> RDFGraph -> [RDFLabel] Find all subjects that match (subject, predicate, object) in the graph. Return a list of nodes that comprise an rdf:collection value, given the head element of the collection. If the list is ill-formed then an arbitrary value is returned. # Utility routines allp :: [a -> Bool] -> a -> BoolSource Test if a value satisfies all predicates in a list anyp :: [a -> Bool] -> a -> BoolSource Test if a value satisfies any predicate in a list # Exported for testing This function applies a substitution for a single set of variable bindings, returning the result and a list of unbound variables. It uses a state transformer monad to collect the list of unbound variables. Adding an empty graph forces elimination of duplicate arcs.
1,987
9,301
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.53125
3
CC-MAIN-2019-18
latest
en
0.753467
https://www.jiskha.com/questions/559106/how-do-i-solve-this-125x-3-343-0-please-help-me
1,597,434,735,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439739370.8/warc/CC-MAIN-20200814190500-20200814220500-00122.warc.gz
658,009,180
5,491
# Algebra How do I solve this? 125x^3 + 343 = 0 1. 👍 0 2. 👎 0 3. 👁 216 1. Hints: 125x^3 + 343 = 0 (5x)³ - 7³ = 0 and a³-b³=(a-b)(a&sup2+ab+b²) 1. 👍 0 2. 👎 0 2. Thank you! 1. 👍 0 2. 👎 0 3. You're welcome! 1. 👍 0 2. 👎 0 ## Similar Questions 1. ### Physics The speed of sound in a classroom is 343m/s. A) A tuning fork of frequency 512Hz is struck. What length of open air tube is required to create a resonant sound at the 1st harmonic? wavelength=v/f=343/512=0.67m 2. ### MATH three consecutive terms of a geomentric progression series have product 343 and sum 49/2. fine the numbers. HOW WILL ONE SOLVE THAT? THANKS 3. ### physics A spelunker drops a stone from rest into a hole. The speed of sound is 343 m/s in air, and the sound of the stone striking the bottom is heard 1.50s after the stone is dropped. How deep is the hole? how can i use the speed of 4. ### Algebra 2 To solve 49(3x) = 343(2x+1), write each side of the equation in terms of base what? . In the brackets are powers. I tried to solve this but I don't understand I believe it is the first base you go off from but I'm not sure what 1. ### British Lit What do we learn about Sir Gawain's character from his speech in line 343-365? 2. ### algebra write the equation in logarithm form a) 343=7^3 b) 25-(1/5)-^2 c A=bc Thank you for your help. I have no idea how to do this problem and I am getting stress. 3. ### physics A shout down a well produces an echo in 2.00 seconds. How deep is the surface of the water in the well? Assume the speed of sound to be 343 m/s. 4. ### Physics suppose that the separation between speakers A and B is 5.80 m and the speakers are vibrating in phase. They are playing identical 135 Hz tones, and the speed of sound is 343 m/s. What is the largest possible distance between 1. ### British Literature Hat do we learn about sir gawain's character from his speech in his lines 343-361 and from his actions ? 2. ### Algebra II Factor: 125x^3 - 27 = 0 3. ### math Simplify: i^25 Sqrt-900 cuberoot-125x^6 4. ### Algebra Which property is illustrated by the following statement? (7p)mn = 7p(mn) a. Commutative Property of Multiplication b. Associative Property of Multiplication(?) c. Inverse Property of Multiplication d. Commutative Property of
708
2,271
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.703125
4
CC-MAIN-2020-34
latest
en
0.908257
https://imathworks.com/tex/tex-latex-how-to-make-a-full-equation-with-tikz/
1,669,656,512,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446710534.53/warc/CC-MAIN-20221128171516-20221128201516-00193.warc.gz
359,838,948
6,873
# [Tex/LaTex] How to make a full equation with tikz matricestikz-matrixtikz-styles I am using this solution here to make long dashes within a matrix, and it is working well. The code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} % possible to customize here the dash aspect \newcommand{\mydash}{ \draw(0.3,0.5ex)--(-0.3,0.5ex); } \begin{document} $P= \begin{tikzpicture}[baseline=-0.5ex] \matrix(m)[matrix of math nodes,left delimiter=(,right delimiter=),ampersand replacement=\&] { \mydash \& y_1 \& \mydash \\ \mydash \& y_2+z_2 \& \mydash \\ \mydash \& y_3 \& \mydash \\ }; \end{tikzpicture}$ \end{document} However, I am now sure how to start writing full blown equations with it. I have not had much luck. The above makes a nice matrix with lines along the rows. 1) What I want is something like P = X Y Z, where X, Y , and Z, are all shown with the lines along its rows as in the prior example given. I cannot seem to concatenate them for whatever reason though… 2) I would like the matrix brackets to also be square, and not curvy. 1) The point to realise is that: everything is happening in a math mode. And, tikzpicture is is simply a new environment in the math mode. So, you are not writing equations in Tikz. You're using Tikz only to get the dashes right. An example will hopefully set this right for you: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{matrix} % possible to customize here the dash aspect \newcommand{\mydash}{ \draw(0.3,0.5ex)--(-0.3,0.5ex); } \begin{document} $X= \begin{tikzpicture}[baseline=-0.5ex] \matrix(m)[matrix of math nodes,left delimiter={[},right delimiter={]},ampersand replacement=\&] { \mydash \& u_1 \& \mydash \\ \mydash \& u_2 \& \mydash \\ \mydash \& u_3 \& \mydash \\ }; \end{tikzpicture} \begin{tikzpicture}[baseline=-0.5ex] \matrix(m)[matrix of math nodes,left delimiter={[},right delimiter={]},ampersand replacement=\&] { \mydash \& b_1 \& \mydash \\ \mydash \& b_2 \& \mydash \\ \mydash \& b_3 \& \mydash \\ \mydash \& b_4 \& \mydash \\ }; \end{tikzpicture} \begin{bmatrix} \biggl| \\ c_1 \\ \biggl| \end{bmatrix}$ \end{document} Output. 2) For the second question about the shape of the enclosing braces, we need to appropriately modify the options: left delimiter and right delimiter. In this case, we set it to: {[} and {]} respectively. Hope that helps.
735
2,387
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.6875
3
CC-MAIN-2022-49
latest
en
0.768498
http://www.jiskha.com/display.cgi?id=1323485175
1,498,462,635,000,000,000
text/html
crawl-data/CC-MAIN-2017-26/segments/1498128320685.63/warc/CC-MAIN-20170626064746-20170626084746-00345.warc.gz
558,629,305
4,118
# Maths posted by . What is the area of the minor segment cut off a circle of radius 10 cm by a chord of length 12 cm? Could you please show me the working out for this question? The answer in the textbook is 16 sq cm. Thanks!!! • Maths - Make a sketch showing the chord of 12 and the the two radii of 10. I see an isosceles triangle. Draw an altitude from the centre to that chord, making two congruent right-angled triangles. let the height be x, then x^2 + 6^2 = 10^2 x^2 = 100-36 = 64 x = √64 = 8 So the area of the large triangle, 10,10,12 is (1/2) (12)(8) = 48 cm^2 We have to find the central angle of the sector. Let each angle at the centre of the right-angled triangles be Ø sinØ = 6/10 = .6 Ø = 36.87‡ and the central angle is 2Ø = 73.74° area of whole circle = π(10)^2 = 100π area of sector/100π = 73.74/360 area of sector = 64.35 cm^2 sooo, the segment is 64.35 - 48 = 16.35 cm^2 (I carried all decimals my calculator could hold and only rounded off the final answer.)
321
992
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.1875
4
CC-MAIN-2017-26
latest
en
0.885354
http://nrich.maths.org/public/leg.php?code=12&cl=2&cldcmpid=973
1,506,145,577,000,000,000
text/html
crawl-data/CC-MAIN-2017-39/segments/1505818689490.64/warc/CC-MAIN-20170923052100-20170923072100-00119.warc.gz
238,234,981
9,692
# Search by Topic #### Resources tagged with Factors and multiples similar to Team Scream: Filter by: Content type: Stage: Challenge level: ### There are 143 results Broad Topics > Numbers and the Number System > Factors and multiples ### Mystery Matrix ##### Stage: 2 Challenge Level: Can you fill in this table square? The numbers 2 -12 were used to generate it with just one number used twice. ### It Figures ##### Stage: 2 Challenge Level: Suppose we allow ourselves to use three numbers less than 10 and multiply them together. How many different products can you find? How do you know you've got them all? ### The Moons of Vuvv ##### Stage: 2 Challenge Level: The planet of Vuvv has seven moons. Can you work out how long it is between each super-eclipse? ### Multiples Grid ##### Stage: 2 Challenge Level: What do the numbers shaded in blue on this hundred square have in common? What do you notice about the pink numbers? How about the shaded numbers in the other squares? ### Tiling ##### Stage: 2 Challenge Level: An investigation that gives you the opportunity to make and justify predictions. ### Sweets in a Box ##### Stage: 2 Challenge Level: How many different shaped boxes can you design for 36 sweets in one layer? Can you arrange the sweets so that no sweets of the same colour are next to each other in any direction? ### Neighbours ##### Stage: 2 Challenge Level: In a square in which the houses are evenly spaced, numbers 3 and 10 are opposite each other. What is the smallest and what is the largest possible number of houses in the square? ### Curious Number ##### Stage: 2 Challenge Level: Can you order the digits from 1-3 to make a number which is divisible by 3 so when the last digit is removed it becomes a 2-figure number divisible by 2, and so on? ### Seven Flipped ##### Stage: 2 Challenge Level: Investigate the smallest number of moves it takes to turn these mats upside-down if you can only turn exactly three at a time. ### Abundant Numbers ##### Stage: 2 Challenge Level: 48 is called an abundant number because it is less than the sum of its factors (without itself). Can you find some more abundant numbers? ### Multiplication Squares ##### Stage: 2 Challenge Level: Can you work out the arrangement of the digits in the square so that the given products are correct? The numbers 1 - 9 may be used once and once only. ### Fractions in a Box ##### Stage: 2 Challenge Level: The discs for this game are kept in a flat square box with a square hole for each disc. Use the information to find out how many discs of each colour there are in the box. ### A Dotty Problem ##### Stage: 2 Challenge Level: Starting with the number 180, take away 9 again and again, joining up the dots as you go. Watch out - don't join all the dots! ### Round and Round the Circle ##### Stage: 2 Challenge Level: What happens if you join every second point on this circle? How about every third point? Try with different steps and see if you can predict what will happen. ### Two Primes Make One Square ##### Stage: 2 Challenge Level: Can you make square numbers by adding two prime numbers together? ### Sets of Numbers ##### Stage: 2 Challenge Level: How many different sets of numbers with at least four members can you find in the numbers in this box? ### A Mixed-up Clock ##### Stage: 2 Challenge Level: There is a clock-face where the numbers have become all mixed up. Can you find out where all the numbers have got to from these ten statements? ### Crossings ##### Stage: 2 Challenge Level: In this problem we are looking at sets of parallel sticks that cross each other. What is the least number of crossings you can make? And the greatest? ### Multiply Multiples 1 ##### Stage: 2 Challenge Level: Can you complete this calculation by filling in the missing numbers? In how many different ways can you do it? ### Ip Dip ##### Stage: 1 and 2 Challenge Level: "Ip dip sky blue! Who's 'it'? It's you!" Where would you position yourself so that you are 'it' if there are two players? Three players ...? ### Multiply Multiples 2 ##### Stage: 2 Challenge Level: Can you work out some different ways to balance this equation? ### Multiply Multiples 3 ##### Stage: 2 Challenge Level: Have a go at balancing this equation. Can you find different ways of doing it? ### Got it for Two ##### Stage: 2 Challenge Level: Got It game for an adult and child. How can you play so that you know you will always win? ### Three Dice ##### Stage: 2 Challenge Level: Investigate the sum of the numbers on the top and bottom faces of a line of three dice. What do you notice? ### Gran, How Old Are You? ##### Stage: 2 Challenge Level: When Charlie asked his grandmother how old she is, he didn't get a straightforward reply! Can you work out how old she is? ### Scoring with Dice ##### Stage: 2 Challenge Level: I throw three dice and get 5, 3 and 2. Add the scores on the three dice. What do you get? Now multiply the scores. What do you notice? ### Zios and Zepts ##### Stage: 2 Challenge Level: On the planet Vuv there are two sorts of creatures. The Zios have 3 legs and the Zepts have 7 legs. The great planetary explorer Nico counted 52 legs. How many Zios and how many Zepts were there? ### Being Determined - Primary Number ##### Stage: 1 and 2 Challenge Level: Number problems at primary level that may require determination. ##### Stage: 2 Challenge Level: If you have only four weights, where could you place them in order to balance this equaliser? ### Multiplication Square Jigsaw ##### Stage: 2 Challenge Level: Can you complete this jigsaw of the multiplication square? ### Factor Lines ##### Stage: 2 and 3 Challenge Level: Arrange the four number cards on the grid, according to the rules, to make a diagonal, vertical or horizontal line. ### A Square Deal ##### Stage: 2 Challenge Level: Complete the magic square using the numbers 1 to 25 once each. Each row, column and diagonal adds up to 65. ### Number Detective ##### Stage: 2 Challenge Level: Follow the clues to find the mystery number. ### Cuisenaire Environment ##### Stage: 1 and 2 Challenge Level: An environment which simulates working with Cuisenaire rods. ### Being Collaborative - Primary Number ##### Stage: 1 and 2 Challenge Level: Number problems at primary level to work on with others. ### Flashing Lights ##### Stage: 2 Challenge Level: Norrie sees two lights flash at the same time, then one of them flashes every 4th second, and the other flashes every 5th second. How many times do they flash together during a whole minute? ### Colour Wheels ##### Stage: 2 Challenge Level: Imagine a wheel with different markings painted on it at regular intervals. Can you predict the colour of the 18th mark? The 100th mark? ### Number Tracks ##### Stage: 2 Challenge Level: Ben’s class were cutting up number tracks. First they cut them into twos and added up the numbers on each piece. What patterns could they see? ### Times Tables Shifts ##### Stage: 2 Challenge Level: In this activity, the computer chooses a times table and shifts it. Can you work out the table and the shift each time? ### What Do You Need? ##### Stage: 2 Challenge Level: Four of these clues are needed to find the chosen number on this grid and four are true but do nothing to help in finding the number. Can you sort out the clues and find the number? ### Money Measure ##### Stage: 2 Challenge Level: How can you use just one weighing to find out which box contains the lighter ten coins out of the ten boxes? ### Down to Nothing ##### Stage: 2 Challenge Level: A game for 2 or more people. Starting with 100, subratct a number from 1 to 9 from the total. You score for making an odd number, a number ending in 0 or a multiple of 6. ### Sets of Four Numbers ##### Stage: 2 Challenge Level: There are ten children in Becky's group. Can you find a set of numbers for each of them? Are there any other sets? ### Multiplication Series: Number Arrays ##### Stage: 1 and 2 This article for teachers describes how number arrays can be a useful reprentation for many number concepts. ### Give Me Four Clues ##### Stage: 2 Challenge Level: Four of these clues are needed to find the chosen number on this grid and four are true but do nothing to help in finding the number. Can you sort out the clues and find the number? ### A First Product Sudoku ##### Stage: 3 Challenge Level: Given the products of adjacent cells, can you complete this Sudoku? ### What Two ...? ##### Stage: 2 Short Challenge Level: 56 406 is the product of two consecutive numbers. What are these two numbers? ### Divide it Out ##### Stage: 2 Challenge Level: What is the lowest number which always leaves a remainder of 1 when divided by each of the numbers from 2 to 10? ### Music to My Ears ##### Stage: 2 Challenge Level: Can you predict when you'll be clapping and when you'll be clicking if you start this rhythm? How about when a friend begins a new rhythm at the same time? ### Three Neighbours ##### Stage: 2 Challenge Level: Look at three 'next door neighbours' amongst the counting numbers. Add them together. What do you notice?
2,110
9,215
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4
4
CC-MAIN-2017-39
latest
en
0.89784
http://seo48.ru/several-variable-calculus-pdf.html
1,563,667,314,000,000,000
text/html
crawl-data/CC-MAIN-2019-30/segments/1563195526799.4/warc/CC-MAIN-20190720235054-20190721021054-00184.warc.gz
138,602,817
3,949
# Several Variable Calculus Pdf ## Account Options You can even adjust the brightness of display determined by the type of system you are utilizing as there exists lot of the ways to adjust the brightness. Don't worry if this doesn't make sense immediately. Here is a sketch of this region. Typically, you'll note the text of the eBook tends to be in medium size. The best solution to overcome this serious problem is to reduce the brightness of the screens of eBook by making specific changes in the settings. One and Several Variables by S. This textbook has been used. Yet, this will not mean that you ought to step away from the computer screen every now and then. Always favor to read the eBook in exactly the same span that will be similar to the printed book. Now, each of the intersection points with the three main coordinate axes is defined by the fact that two of the coordinates are zero. In some ways these are similar to contours. Please use the link provided bellow. Calculus - One and Several Variables. We saw several of these in the previous section. One and Several Variables. ## Calculus III - Functions of Several Variables It was done for the practice of identifying the surface and this may come in handy down the road. Another fun one is a vector field, where every input point is associated with some kind of vector, which is the output of the function there. This is an acceptable book, some writing on a couple pages. There present number of reasons behind it due to which the readers stop reading the eBooks at their first most effort to utilize them. This triangle will be a portion of the plane and it will give us a fairly decent idea on what the plane itself should look like. While reading the eBooks, you must favor to read large text. Working Tips For A Better Ebook Reading Most of the times, it has been felt that the readers, who are utilizing the eBooks for first time, happen to have a rough time before getting used to them. And the fun part with these guys is that you can just kind of, imagine a fluid flowing, so here's a bunch of droplets, like water, and they kind of flow along that. Like I said, you'll be able to learn much more about that in the dedicated video on it, but these functions also can be visualized just in two dimensions, flattening things out. It is proposed to read the eBook with big text. If you're seeing this message, it means we're having trouble loading external resources on our website. This is so, because your eyes are used to the span of the printed book and it would be comfortable for you to read in exactly the same way. The contour will represent the intersection of the surface and the plane. We can graph these in one of two ways. By using all these effective techniques, you can definitely boost your eBook reading experience to a terrific extent. The final topic in this section is that of traces. Math Multivariable calculus Thinking about multivariable functions Introduction to multivariable calculus. And a lot of people, when they start teaching multivariable calculus, they just jump into the calculus, and there's lots of fun things, partial derivatives, gradients, good stuff that you'll learn. So then a multivariable function is something that handles multiple variables. Where we visualize the entire input space in associated color, basic math quiz pdf with each point. Here is the sketch of this region. And we'll get lots of exposure to that. This will definitely help to make reading easier. Most commonly, it happens when the brand new readers cease using the eBooks as they are not able to utilize them with the appropriate and effectual style of reading these books. It's possible for you to try many strategies to turn the pages of eBook to enhance your reading experience. This is an elliptic paraboloid and is an example of a quadric surface. Anderson A copy that has been read, but remains in clean condition. This advice will help you not only to prevent particular hazards which you may face while reading eBook regularly but also ease you to enjoy the reading experience with great relaxation. Because, I mean when you look at something like this, and you've got an x and you've got a y, you could think about those as two separate numbers. ## Lecture Notes And that actually turns out to give insight about the underlying function. In this section we want to go over some of the basic ideas about functions of more than one variable. Basically because that guy there is the single variable.
918
4,518
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.171875
3
CC-MAIN-2019-30
latest
en
0.956837
https://www.hackmath.net/en/examples/area-of-shape?page_num=7
1,558,421,425,000,000,000
text/html
crawl-data/CC-MAIN-2019-22/segments/1558232256281.35/warc/CC-MAIN-20190521062300-20190521084300-00500.warc.gz
803,964,338
6,884
# Examples of area of plane shapes - page 7 1. Rectangle A2dim Calculate the side of the rectangle, if you know that its area is of 2590 m2 and one side is 74 m. 2. Inscribed rectangle The circle area is 216. Determine the area of inscribed rectangle with one side 5 long. 3. Triangular prism Base of perpendicular triangular prism is a right triangle with leg length 5 cm. Content area of the largest side wall of its surface is 130 cm² and the height of the body is 10 cm. Calculate its volume. 4. Trapezoid MO-5-Z8 ABCD is a trapezoid that lime segment CE divided into a triangle and parallelogram as shown. Point F is the midpoint of CE, DF line passes through the center of the segment BE and the area of the triangle CDE is 3 cm2. Determine the area of the trapezoid A 5. Rectangle diagonals It is given rectangle with area 24 cm2 a circumference 20 cm. The length of one side is 2 cm larger than length of second side. Calculate the length of the diagonal. Length and width are yet expressed in natural numbers. 6. Axial section Axial section of the cylinder has a diagonal 40 cm. The size of the shell and the base surface are in the ratio 3:2. Calculate the volume and surface area of this cylinder. 7. Circles Area of circle inscribed in a square is 14. What is the area of a circle circumscribed around a square? 8. Isosceles III The base of the isosceles triangle is 17 cm area 416 cm2. Calculate the perimeter of this triangle. 9. Rectangle Area of rectangle is 3002. Its length is 41 larger than the width. What are the dimensions of the rectangle? 10. Children pool The bottom of the children's pool is a regular hexagon with a = 60 cm side. The distance of opposing sides is 104 cm, the height of the pool is 45 cm. A) How many liters of water can fit into the pool? B) The pool is made of a double layer of plastic film. 11. Equilateral cylinder Equilateral cylinder (height = base diameter; h = 2r) has a volume of V = 199 cm3 . Calculate the surface area of the cylinder. 12. Garden The garden has two opposite parallel fences. Their distance is 33.1 m. Lengths in these two fences are 75.5 meters and 49.4 meters. Calculate the area of this garden. Calculate the radius of the quadrant, which area is equal to area of circle with radius r = 15 cm. 14. Tetrahedral prism Calculate surface and volume tetrahedral prism, which has a rhomboid-shaped base, and its dimensions are: a = 12 cm, b = 7 cm, ha = 6 cm and prism height h = 10 cm. 15. Similarity n-gon 9-gones ABCDEFGHI and A'B'C'D'E'F'G'H'I' are similar. The area of 9-gon ABCDEFGHI is S1=190 dm2 and the diagonal length GD is 32 dm. Calculate area of the 9-gon A'B'C'D'E'F'G'H'I' if G'D' = 13 dm. 16. Rhombus HP Calculate area of the rhombus with height 24 dm and perimeter 12 dm. 17. Rectangle The perimeter of the rectangle is 22 cm and content area 30 cm2. Determine its dimensions, if the length of the sides of the rectangle in centimeters is expressed by integers. 18. Tiles From how many tiles 20 cm by 30 cm we can build a square of maximum dimensions, if we have maximum 881 tiles. 19. ISO trapezium Calculate area of isosceles trapezoid with base 95 long, leg 27 long and with the angle between the base and leg 70 degrees. 20. Truncated pyramid How many cubic meters is volume of a regular four-side truncated pyramid with edges one meter and 60 cm and high 250 mm? Do you have an interesting mathematical example that you can't solve it? Enter it, and we can try to solve it. To this e-mail address, we will reply solution; solved examples are also published here. Please enter e-mail correctly and check whether you don't have a full mailbox.
960
3,634
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.90625
4
CC-MAIN-2019-22
latest
en
0.891227
https://askfilo.com/math-question-answers/let-l-be-the-lower-class-limit-of-a-class-interval-in-a-frequency-distribution
1,695,825,691,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233510300.41/warc/CC-MAIN-20230927135227-20230927165227-00227.warc.gz
125,758,940
19,811
World's only instant tutoring platform Question # Let l be the lower class limit of a class-interval in a frequency distribution and m be the mid point of the class. Then, the upper class limit of the class is ## Text solution Given that, the lower class limit of a class-interval is l and the mid-point of the class is m. Let u be the upper class limit of the class-interval. Therefore, we have ⇒ l +u = 2m ⇒ u = 2m - 1 Thus the upper class limit of the class is (2m - l) .
131
478
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.78125
4
CC-MAIN-2023-40
latest
en
0.806825
http://cboard.cprogramming.com/c-programming/73597-binary-search-tree-printable-thread.html
1,480,995,682,000,000,000
text/html
crawl-data/CC-MAIN-2016-50/segments/1480698541876.62/warc/CC-MAIN-20161202170901-00149-ip-10-31-129-80.ec2.internal.warc.gz
41,962,368
3,787
# Binary Search Tree • 12-16-2005 willmhmd Binary Search Tree I am doing a binary search tree. I need some hints on how to do the insert and find. Anyone? Code: ``` #include <stdio.h> #define MAX_SIZE 32    /* should be a power of two */ #define EMPTY -1      /* special value to indicate empty node */ typedef int tree [MAX_SIZE]; /* Defines 'tree' as the type of an array of MAX_SIZE integers. */ void initialize_tree (tree t) {   int i;   for( i = 0;  i < MAX_SIZE;  i++ )     {       t[i] = -1;     } } void print_tree(tree t) {   int i;   for(i = 1;  i < MAX_SIZE;  i++)     {       if(t[i] == EMPTY) { printf(". "); }       else { printf("%d ", t[i]); }     }   printf("\n"); } void bst_insert(tree t, int v) {   /*** HERE  ***/ } int bst_find(tree t, int v)  /* return 1 if found, 0 if not */ {   /*** HERE ***/   return 0; } int ask_for_number() {   int x;   printf("Enter an integer, or %d to quit.\n", EMPTY);   scanf("%d", &x);   return x; } int main() {   tree t;   int x;   initialize_tree(t);   x = ask_for_number();   while(x != EMPTY)     {       bst_insert(t, x);       print_tree(t);       x = ask_for_number();     }   printf("DONE INSERTING.  Now you may query.\n");   x = ask_for_number();   while(x != EMPTY)     {       if(bst_find(t, x)) { printf("FOUND.\n"); }       else { printf("NOT FOUND.  :(\n"); }       x = ask_for_number();     }   return 0; }``` • 12-16-2005 Hammer • 12-16-2005 Slacker >I need some hints on how to do the insert and find. The big trick to just about anything in a bst is getting the search down pat. To search you check the current node, if the thing you're looking for is less than the current node, you move left. Otherwise you move right. When you get the a match, you found what you're looking for. If it's not found, you'll get to a null pointer: Code: ```int search ( struct node *t, int x ) {   if ( t == NULL ) /* Not found */     return 0;   else if ( t->thing == x ) /* Found */     return 1;   else if ( x < t->thing ) /* Go left */     return search ( t->left, x );   else /* Go right */     return search ( t->right, x ); }``` Insertion is just a planned unsuccessful search, where you insert a new node when you get to the bottom. The big trick is that you need to update the tree, so going back up you need to make sure that the higher parts of the tree know about the changes to the lower parts: Code: ```struct node *insert ( struct node *t, int x ) {   if ( t == NULL ) { /* Not found, insert */     t = malloc ( sizeof *t );     t->thing = x;     t->left = t->right = NULL;     return t;   }   else if ( t->thing == x ) /* Found, ignore */     return t;   else if ( x < t->thing ) /* Go left */     return search ( t->left, x );   else /* Go right */     return search ( t->right, x ); }``` The biggest part to most bst routines is the search, so if you understand that you'll be well on your way. :) Cheers!
863
2,885
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.875
3
CC-MAIN-2016-50
latest
en
0.438731
https://pt.slideshare.net/Ashikapokiya12345/string-matching-algorithms-52582907
1,679,814,458,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296945433.92/warc/CC-MAIN-20230326044821-20230326074821-00577.warc.gz
545,090,920
49,268
O slideshow foi denunciado. Seu SlideShare está sendo baixado. × Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Anúncio Carregando em…3 × 1 de 22 Anúncio String matching algorithms String matching algorithms in easy way String matching algorithms in easy way Anúncio Anúncio Anúncio Anúncio String matching algorithms 1. 1. Presented By:- Ashika Pokiya(12TI083) Guide by:- Nehal Patel STRING MATCHING ALGORITHMS 2. 2. WHAT IS STRING MATCHING • In computer science, string searching algorithms, sometimes called string matching algorithms, that try to find a place where one or several string (also called pattern) are found within a larger string or text. 3. 3. EXAMPLE STRING MATCHING PROBLEM A B C A B A A C A B A B A A TEXT PATTER N SHIFT=3 4. 4. STRING MATCHING ALGORITHMS There are many types of String Matching Algorithms like:- 1) The Naive string-matching algorithm 2) The Rabin-Krap algorithm 3) String matching with finite automata 4) The Knuth-Morris-Pratt algorithm But we discuss about 2 types of string matching algorithms. 1) The Naive string-matching algorithm 2) The Rabin-Krap algorithm 5. 5. THE NAIVE ALGORITHM The naive algorithm finds all valid shifts using a loop that checks the condition P[1….m]=T[s+1…. s+m] for each of the n- m+1 possible values of s.(P=pattern , T=text/string , s=shift) NAIVE-STRING-MATCHER(T,P) 1) n = T.length 2) m = P.length 3) for s=0 to n-m 4) if P[1…m]==T[s+1….s+m] 5) printf” Pattern occurs with shift ” s 6. 6. EXAMPLE  SUPPOSE, T=1011101110 P=111 FIND ALL VALID SHIFT…… 1 0 1 1 1 0 1 1 1 0T=Tex t 1 1 1P=Patter n S= 0 7. 7. 1 0 1 1 1 0 1 1 1 0 1 1 1 S= 1 8. 8. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=2 So, S=2 is a valid shift… 9. 9. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=3 10. 10. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=4 11. 11. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=5 12. 12. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=6 So, S=6 is a valid shift… 13. 13. 1 0 1 1 1 0 1 1 1 0 1 1 1 S=7 14. 14. THE RABIN-KARP ALGORITHM  Rabin and Karp proposed a string matching algorithm that performs well in practice and that also generalizes to other algorithms for related problems, such as two-dimentional pattern matching. 15. 15. ALGORITHM RABIN-KARP-MATCHER(T,P,d,q) 1) n = T.length 2) m = P.length 3) h = d^(m-1) mod q 4) p = 0 5) t = 0 6) for i =1 to m //pre-processing 7) p = (dp + P[i]) mod q 8) t = (d t + T[i]) mod q 9) for s = 0 to n – m //matching 10) if p == t 11) if P[1…m] == T[s+1…. s+m] 12) printf “ Pattern occurs with shift ” s 13) if s< n-m 14) t+1 = (d(t- T[s+1]h)+ T[s+m+1]) mod q 16. 16. EXAMPLE Pattern P=26, how many spurious hits does the Rabin Karp matcher in the text T=3 1 4 1 5 9 2 6 5 3 5… • T = 3 1 4 1 5 9 2 6 5 3 5 P = 2 6 Here T.length=11 so Q=11 and P mod Q = 26 mod 11 = 4 Now find the exact match of P mod Q… 17. 17. 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 3 1 mod 1 1 = 9 not equal to 4 1 4 mod 1 1 = 3 not equal to 4 4 1 mod 1 1 = 8 not equal to 4 3 1 4 1 5 9 2 6 5 3 5 S=1 S=0 S=2 18. 18. 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 1 5 mod 1 1 = 4 equal to 4 SPURIOUS HIT 5 9 mod 1 1 = 4 equal to 4 SPURIOUS HIT 9 2 mod 1 1 = 4 equal to 4 SPURIOUS HIT S=3 S=4 S=5 19. 19. 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 3 1 4 1 5 9 2 6 5 3 5 2 6 mod 1 1 = 4 EXACT MATCH 6 5 mod 1 1 = 10 not equal to 4 5 3 mod 1 1 = 9 not equal to 4 S=7 S=6 S=8 20. 20. 3 1 4 1 5 9 2 6 5 3 5 3 5 mod 1 1 = 2 not equal to 4 S=9 Pattern occurs with shift 6 21. 21. COMPARISSION  The Naive String Matching algorithm slides the pattern one by one. After each slide, it one by one checks characters at the current shift and if all characters match then prints the match.  Like the Naive Algorithm, Rabin-Karp algorithm also slides the pattern one by one. But unlike the Naive algorithm, Rabin Karp algorithm matches the hash value of the pattern with the hash value of current substring of text, and if the hash values match then only it starts matching individual characters. 22. 22. THANK YOU… Notas do Editor • Spurious hit is when we have a match but it isn’t an actual match to the pattern. When this happen, further testing is done.
1,758
4,117
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.59375
4
CC-MAIN-2023-14
latest
en
0.553029
https://www.netlib.org/lapack/explore-html-3.4.2/d8/da7/group__real_g_bauxiliary.html
1,652,793,758,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662517485.8/warc/CC-MAIN-20220517130706-20220517160706-00462.warc.gz
1,051,428,684
5,055
LAPACK  3.4.2 LAPACK: Linear Algebra PACKage Collaboration diagram for real: This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead. ## Functions/Subroutines REAL function slangb (NORM, N, KL, KU, AB, LDAB, WORK) SLANGB returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of general band matrix. subroutine slaqgb (M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, EQUED) SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ. ## Detailed Description This is the group of real auxiliary functions for GB matrices ## Function/Subroutine Documentation REAL function slangb ( character NORM, integer N, integer KL, integer KU, real, dimension( ldab, * ) AB, integer LDAB, real, dimension( * ) WORK ) SLANGB returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of general band matrix. Purpose: ``` SLANGB returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of an n by n band matrix A, with kl sub-diagonals and ku super-diagonals.``` Returns: SLANGB ``` SLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm' ( ( norm1(A), NORM = '1', 'O' or 'o' ( ( normI(A), NORM = 'I' or 'i' ( ( normF(A), NORM = 'F', 'f', 'E' or 'e' where norm1 denotes the one norm of a matrix (maximum column sum), normI denotes the infinity norm of a matrix (maximum row sum) and normF denotes the Frobenius norm of a matrix (square root of sum of squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.``` Parameters: [in] NORM ``` NORM is CHARACTER*1 Specifies the value to be returned in SLANGB as described above.``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0. When N = 0, SLANGB is set to zero.``` [in] KL ``` KL is INTEGER The number of sub-diagonals of the matrix A. KL >= 0.``` [in] KU ``` KU is INTEGER The number of super-diagonals of the matrix A. KU >= 0.``` [in] AB ``` AB is REAL array, dimension (LDAB,N) The band matrix A, stored in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows: AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).``` [in] LDAB ``` LDAB is INTEGER The leading dimension of the array AB. LDAB >= KL+KU+1.``` [out] WORK ``` WORK is REAL array, dimension (MAX(1,LWORK)), where LWORK >= N when NORM = 'I'; otherwise, WORK is not referenced.``` Date: September 2012 Definition at line 124 of file slangb.f. Here is the call graph for this function: Here is the caller graph for this function: subroutine slaqgb ( integer M, integer N, integer KL, integer KU, real, dimension( ldab, * ) AB, integer LDAB, real, dimension( * ) R, real, dimension( * ) C, real ROWCND, real COLCND, real AMAX, character EQUED ) SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ. Purpose: ``` SLAQGB equilibrates a general M by N band matrix A with KL subdiagonals and KU superdiagonals using the row and scaling factors in the vectors R and C.``` Parameters: [in] M ``` M is INTEGER The number of rows of the matrix A. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix A. N >= 0.``` [in] KL ``` KL is INTEGER The number of subdiagonals within the band of A. KL >= 0.``` [in] KU ``` KU is INTEGER The number of superdiagonals within the band of A. KU >= 0.``` [in,out] AB ``` AB is REAL array, dimension (LDAB,N) On entry, the matrix A in band storage, in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows: AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl) On exit, the equilibrated matrix, in the same storage format as A. See EQUED for the form of the equilibrated matrix.``` [in] LDAB ``` LDAB is INTEGER The leading dimension of the array AB. LDA >= KL+KU+1.``` [in] R ``` R is REAL array, dimension (M) The row scale factors for A.``` [in] C ``` C is REAL array, dimension (N) The column scale factors for A.``` [in] ROWCND ``` ROWCND is REAL Ratio of the smallest R(i) to the largest R(i).``` [in] COLCND ``` COLCND is REAL Ratio of the smallest C(i) to the largest C(i).``` [in] AMAX ``` AMAX is REAL Absolute value of largest matrix entry.``` [out] EQUED ``` EQUED is CHARACTER*1 Specifies the form of equilibration that was done. = 'N': No equilibration = 'R': Row equilibration, i.e., A has been premultiplied by diag(R). = 'C': Column equilibration, i.e., A has been postmultiplied by diag(C). = 'B': Both row and column equilibration, i.e., A has been replaced by diag(R) * A * diag(C).``` Internal Parameters: ``` THRESH is a threshold value used to decide if row or column scaling should be done based on the ratio of the row or column scaling factors. If ROWCND < THRESH, row scaling is done, and if COLCND < THRESH, column scaling is done. LARGE and SMALL are threshold values used to decide if row scaling should be done based on the absolute size of the largest matrix element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.``` Date: September 2012 Definition at line 159 of file slaqgb.f. Here is the call graph for this function: Here is the caller graph for this function:
1,581
5,294
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.328125
3
CC-MAIN-2022-21
latest
en
0.735945
https://puzzlefry.com/puzzles/how-many-balls-are-there-in-the-picture/
1,660,151,230,000,000,000
text/html
crawl-data/CC-MAIN-2022-33/segments/1659882571198.57/warc/CC-MAIN-20220810161541-20220810191541-00032.warc.gz
445,891,996
39,324
# How many balls are there in the picture? 1,162.0K Views How many balls are there in the picture? SherlockHolmes Expert Asked on 2nd September 2015 in There are are 16 balls visible and are in the picture that’s the answer. But if it’s a Pyramid of balls then the total amount is 20 (since a pyramid made of balls is 3 sided, not 4 sided). The top level:                                1 ball 1st level from top:                     3 balls 2nd level from top:                   6 balls Bottom level:                               10 balls =20 balls total kennyke Curious Answered on 19th March 2020. Pyramids with triangular bases have 3 sides but this is a square base pyramid as evidenced by the angle perspective (4 sided is a 90 degree corner) and not all balls touch on all sides as shown here. So build each level similar to above but you have 16 base (4×4), 9 level 2 (3×3), 4 level 3 (2×2) and 1 top = 30. 16 is a clever acceptable answer if you consider just hose that you see (2d) despite the appearance of a complete, uniform, 3D pyramid. 🙂 on 13th May 2020. It is most probably a 4 side triangular base pyramid. So there are 25 balls. Base: 12 2nd: 8 3rd: 4 And Top:1 Detective Expert Answered on 2nd September 2015. See above, you’re right it’s a square 4 side base but recheck your math lol… a base of 4 x 4 = 16 balls, etc. per above = 30. on 13th May 2020. If pyramid than 25. Base – 12 2nd – 8 3rd – 4 Top most – 1 swati Curious Answered on 1st October 2015. Number of balls seen = 16, If it is a real pyramid  then 25, But NUMBER OF BALLS I AM SURE OF(visible) is 16 Detective Expert Answered on 2nd September 2015. Why can’t it be 16+9+4+1=30? As, we are not sure, if balls are on back of the picture, We can only see 16 balls in the picture on 18th May 2016. baskaranar – that’s right! it’ a square base pyramid. on 13th May 2020. 25 dhruv Curious Answered on 30th November 2017. • ## More puzzles to try- • ### What is the logic behind these ? 3 + 3 = 3 5 + 4 = 4 1 + 0 = 3 2 + 3 = 4 ...Read More » • ### Defective stack of coins puzzle There are 10 stacks of 10 coins each. Each coin weights 10 gms. However, one stack of coins is defective ...Read More » • ### Which clock works best? Which clock works best? The one that loses a minute a day or the one that doesn’t work at all?Read More » • ### (Advanced) Cheryl’s Birthday Puzzle Paul, Sam and Dean are assigned the task of figuring out two numbers. They get the following information: Both numbers ...Read More » • ### Five greedy pirates and gold coin distribution Puzzle Five  puzzleFry ship’s pirates have obtained 100 gold coins and have to divide up the loot. The pirates are all ...Read More » • ### Tuesday, Thursday what are other two days staring with T? Four days are there which start with the letter ‘T‘. I can remember only two of them as “Tuesday , Thursday”. ...Read More » • ### How could only 3 apples left Two fathers took their sons to a fruit stall. Each man and son bought an apple, But when they returned ...Read More » • ### How Many Eggs ? A farmer is taking her eggs to the market in a cart, but she hits a  pothole, which knocks over ...Read More » • ### Most Analytical GOOGLE INTERVIEW Question Revealed Let it be simple and as direct as possible. Interviewer : Tell me how much time (in days) and money would ...Read More » • ### Lateral thinking sequence Puzzle Solve this logic sequence puzzle by the correct digit- 8080 = 6 1357 = 0 2022 = 1 1999 = ...Read More » • ### How did he know? A man leaves his house in the morning to go to office and kisses his wife. In the evening on ...Read More » • ### Pizza Cost Math Brain Teaser Jasmine, Thibault, and Noah were having a night out and decided to order a pizza for \$10. It turned out ...Read More » • ### Which letter replaces the question mark Which letter replaces the question markRead More » • ### Which room is safest puzzle A murderer is condemned to death. He has to choose between three rooms. The first is full of raging fires, ...Read More » • ### Richie’s Number System Richie established a very strange number system. According to her claim for different combination of 0 and 2 you will ...Read More » • ### Srabon wanted to pass The result of math class test came out. Fariha’s mark was an even number. Srabon got a prime!! Nabila got ...Read More » • ### Become Normal!! Robi is a very serious student. On the first day of this year his seriousness for study was 1 hour. ...Read More » • ### Sakib Knows The Number! Ragib: I got digits of a 2 digit number Sakib: Is it an odd? Ragib: Yes. Moreover, the sum of ...Read More » • ### Maths Genious Riddle If u r genius solve it:- 40 * 14 = 11 30 * 13 = 12 20 * 12 = ...Read More » • ### Calling 2 as 10 Riddle When do we call “10” while looking at number “2”?Read More »
1,343
4,841
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4
4
CC-MAIN-2022-33
longest
en
0.902043
http://mathhelpforum.com/algebra/204412-linear-optimization.html
1,508,792,976,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187826642.70/warc/CC-MAIN-20171023202120-20171023222120-00506.warc.gz
212,312,433
10,586
1. ## Linear optimization A pension fund manager decides to invest a total of at most $39 million in U.S. treasury bonds paying 4% annual interest and in mutual funds paying 8% annual interest. He plans to invest at least$5 million in bonds and at least $10 million in mutual funds. Bonds have an initial fee of$100 per million dollars, while the fee for mutual funds is $200 per million. The fund manager is allowed to spend no more than$5000 on fees. How much should be invested in each to maximize annual interest? What is the maximum annual interest? How would i set up the max and min and then eventually graph it? and thus solve the problem Thank you 2. ## Re: Trignomy word problem Hello, Niaboc! I'll set it up . . . A pension fund manager decides to invest a total of at most $39 million in Treasury Bonds paying 4% annual interest and in Mutual Funds paying 8% annual interest. He plans to invest at least$5 million in Trasury Bonds and at least $10 million in Mutual Funds. Treasury Bonds have an initial fee of$100 per million dollars, while the fee for Mutual Funds is $200 per million. The fund manager is allowed to spend no more than$5000 on fees. How much should be invested in each to maximize annual interest? What is the maximum annual interest? Let $x$ = amount invested in Treasury Bonds (in millions of dollars): $x\ge\,0$ Let $y$ = amount invested in Mutual Funds (in millions of dollars): . $y \,\ge\,0$ Total invested, $39 million: . $x + y \:\le\:39$ Invest at least$10 million in Mutual Funds: . $x \,\ge\,10$ Invest at least $5 million in Treasure Bonds: . $y \,\ge\,5$ Fee for Treasury Bonds: $100x$ Fee for Mutual Funds: $200y$ Maximum fee,$5000: . $100x + 200y \,\le\,5000$ Maximize interest: . $I \:=\:0.04x + 0.08y$
464
1,759
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 11, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4
4
CC-MAIN-2017-43
longest
en
0.929081
http://www.businessplanhut.com/calculating-break-even-point-formulas-and-examples
1,508,331,364,000,000,000
text/html
crawl-data/CC-MAIN-2017-43/segments/1508187822966.64/warc/CC-MAIN-20171018123747-20171018143747-00789.warc.gz
421,602,203
8,986
Calculating the Break-Even Point - Formulas and Examples Three (3) Components of the Break-even Point Formula The three components needed to determine a company's break-even point in units are FIXED COSTS, VARIABLE COST PER UNIT, and SELLING PRICE PER UNIT. Below discusses each component. COMPONENT 1   -  FIXED COSTS Fixed Costs are costs or expenses that do not fluctuate with the production or sale of one "additional" unit. In other words, fixed costs are costs that do not increase when a company makes or sells one additional product. If The Cigar Company sold a box of cigars to you, what costs or expenses would not increase for them? The Company's advertising, office rent, leasing expense, telephone expense, utilities expenses, bank charges, interest expenses, printing of cheques, depreciations, and salaries would not increase and therefore would be considered fixed costs. Moreover, these expenses would not increase when The Cigar Company produces or sells one additional product (box of cigars). In other words, these costs are relatively fixed or constant over a one year period. Usually, but not in all cases, fixed costs will be a business's operating expenses (marketing and administration expenses) shown on the income statement. If you can not decide whether a cost or expense is a fixed cost, ask yourself the following question. If I sell or produce one additional product (your Product) will the cost of the item in question, increase? Let's look at a few examples, while assuming you are the owner of The Cigar Company. 1. If I sell one additional box of cigars will rent expense increase? No!!! A business does not have to rent another office every time it sells a product. If it did, we wouldn't see too many businesses in existence. Rent is always a fixed cost. 2. If I sell one additional box of cigars will telephone expense increase? No!!! Telephone costs are generally always considered a fixed cost. 3. If I sell one additional box of cigars, will salaries increase? No, but there is one exception. If the worker is paid a commission for every product he/she sells, then the commission can be considered a variable cost, and not a fixed cost. Some business owners, however, will consider commissions paid to workers as a fixed cost. Their reasoning is that commissions will be a fixed cost over a long period (I.E. over a one year period). Also, since a business will forecast sales for the upcoming year, for example, they will have a rough idea of what will be paid out in commission and therefore such costs are treated as fixed. For businesses paying commissions, we recommend they be considered a variable cost and NOT a fixed cost. 4. If I sell one additional box of cigars will advertising increase? No!!! Advertising is always considered a fixed cost over the break-even period. The break-even period could be one week, one month, six months, but most break-evens are calculated over a one year period. 5. If I sell one additional box of cigars will office supplies expense increase? No!!! Office supplies expense is generally always a fixed cost because for each cigar box you sell, you do not have to buy more office supplies. As a company sells many products (not just one) however, they will need to purchase additional office supplies. Therefore, office supplies are always considered fixed over a break-even period. In summary, a company's marketing & administrative expenses (operating expenses on the income statement), in most cases, will be its fixed costs. Let's now define variable costs. COMPONENT 2  -  VARIABLE COSTS PER UNIT Variable costs are costs or expenses that do fluctuate with the production or the sale of one "additional" unit. Variable costs may include purchases of raw materials, purchases of products for retail sales, shipping charges of raw materials/products, direct labor costs, sales force commissions on a per sale basis, and other costs that a company may incur when selling or producing one additional product or unit. Variable Costs must be calculated on a per unit (product) basis. For example, The Cigar Company buys the cigars and sells them to its customers (the company does not produce of manufacture the cigars, rather they are purchased from a manufacturer or a wholesaler, finished and ready for resale).  Therefore, The Cigar Company's only variable cost per unit would be the cost to buy one box of cigars plus the cost of shipping each box of cigars. Recall in our example, the variable cost per cigar box is \$20.00. This \$20.00 includes the cost to purchase one box of cigars and the average shipping cost for each box of cigars. Moreover, the cost per box of cigars might be \$18.00, while the shipping cost per box of cigars might be \$2.00. Therefore, the total variable cost for each box of cigars would be \$20.00 (\$18.00 + \$2.00). If you sell two or more products having different per unit variable costs, then you will have to use the weighted average product cost approach to determine your break-even point. For example, lets assume The Cigar Company sells two brand-name boxes of cigars; the Cuban Cigar and the "infamous" American Cigar. A box of Cuban Cigars cost \$20.00 while a box of American Cigars cost \$15.00 to buy and have shipped. What is the company's single variable cost per unit? A single variable cost per unit can not be established since the company has two variable costs (\$20.00 and \$15.00). Therefore, the company will have to calculate a Weighted Average Product Cost that consists of one value. We will examine how to determine a weighted average product cost when we discuss how to determine a break-even point for a company selling multiple products. In summary, variable costs on a per unit basis for a retailer or service provider will always include the cost, on average, to purchase one product (cigar box) plus the cost, on average, to ship one product (cigar box). The variable costs on a per unit basis for a manufacturer might include the cost, on average, to purchase raw materials to make one unit, the average cost to ship the raw materials, average direct labor costs to produce one finished product, and any shipping costs incurred when selling the product to wholesalers, retailers or service providers. In a nutshell, variable costs per unit are the costs incurred to produce or sell one unit/ product. Now lets examine the third component of the break-even formula; namely, the selling price per unit. COMPONENT 3   -  SELLING PRICE PER UNIT The selling price per unit is the third component needed for the break-even calculation. The selling price per unit is the price at which a company sells each of its products or services. A company selling only one product will have only one selling price and this price will be used in the break-even formula. A company selling two or more products, however, will have a selling price for each product. Businesses selling multiple products will be required to calculate a weighted average selling price before a break-even point can be determined. For example let's assume your company sells two types of computers - a low quality computer and a high quality computer. The low end computer sells for \$1,200 and the high end sells for \$3,000. What is the company's single selling price? A single selling price can not be established since the company has two selling prices (\$1,200 and \$3,000). Therefore, the company will have to calculate a Weighted Average Selling Price that reduces the two selling prices down to one selling price. Determining a weighted average selling price for multiple products will be discussed later. In summary, the selling price used to determine a company's break-even point is simply the price at which the company plans to sell each product. If a company sells more than one product, it will have to calculate a weighted average selling price. Categories: Financial
1,633
7,913
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.265625
3
CC-MAIN-2017-43
longest
en
0.928255
https://boards.fool.com/turbotax-treatment-of-gain-on-sale-of-home-34783955.aspx?sort=whole
1,624,121,350,000,000,000
text/html
crawl-data/CC-MAIN-2021-25/segments/1623487648373.45/warc/CC-MAIN-20210619142022-20210619172022-00079.warc.gz
136,888,507
30,323
Message Font: Serif | Sans-Serif No. of Recommendations: 0 My wife passed away 2 1/2 years ago (important: more than two years.) I anticipate selling my home which I/we lived in for 26 years, in July. I had an appraisal done shortly after she passed, because it is my understanding that "her" cost basis is 1/2 of that appraised value; regardless of the original purchase price and the cost of any improvements we made over the years. What I call "her" cost basis would be the half of the house that I inherited from her. For "my" half, I take 1/2 the original purchase price plus 1/2 the cost of any IRS-approved improvements we made (finished basement, screened-in porch). And then there is the sales price. I take that amount and subtract out any fees I pay to the buyer and seller agents, and also any IRS-approved work I have done in order to sell - painting, new carpet, etc. Here's my question. For tax/capital gain purposes, I've always thought of the two halves as separate. I calculate the profit (capital gain) on the half I inherited from my wife, and separately calculate the profit (capital gain) on "my" half. Then, since it's been more than two years since my wife passed, for her half I do not get to use the \$250,000 exclusion. But I do get the \$250,000 exclusion for "my" half. So assume the profit on "her" half is \$30,000, and the profit on "my" half is \$200,000. Because I think of them as separate, I've thought of this as a \$30,000 long-term capital gain. No gain on my half because the profit is less than the \$250,000 exclusion. But when I punch this information into TurboTax, it says \$0 gain. It never asked about my wife's passing, so (I assume) it's just combining the two profits, coming up with \$230,000, and applying my exclusion. Is that the correct way to treat the gain? And thus my "two halves" thinking has been incorrect all along? And finally, if this IS the correct way, then I don't really have to report anything at all, since there is no gain, right? Thanks! m No. of Recommendations: 0 Then, since it's been more than two years since my wife passed, for her half I do not get to use the \$250,000 exclusion. But I do get the \$250,000 exclusion for "my" half. Total layperson here, but is that really the way it works? I would have expected that you simply have the stepped up basis on the half you inherited, and the fact you've lived there in 2 of the last 5 years gets you a \$250k exclusion filing single on any gain from your combined/adjusted basis. Hopefully one of the real experts will chime in. I'm curious to see... No. of Recommendations: 0 Is that the correct way to treat the gain? Yes. And thus my "two halves" thinking has been incorrect all along? It's not completely wrong. It's only wrong in one minor way - with a major impact. You did all of the thinking about the tax basis (the "cost") of each half correctly. (And explained quite nicely. Well done!) But when you get to the end, it is all yours. You get to use your \$250k exclusion on the entire house, not just half of it. I don't really have to report anything at all, since there is no gain, right? To be honest, I get a bit lazy and report it anyway. Lazy, in that I have to do all of the work adding up all of the various costs and bits of information to determine if there is a taxable gain or not. Once I've done all that work, I'm putting on the tax return to justify my charge to the client for doing the work. I believe the IRS has said if there is no taxable gain after the exclusion, then don't report it. But I have also heard of taxpayers getting letters from the IRS asking them to explain why they failed to report the sale of their home. If the sale price of the house - before deducting commissions and other costs - is less than \$250k, then I'd be fine with not reporting. If necessary, you can show the IRS you qualify for the \$250k exclusion and the entire proceeds are therefore not taxable. Other than that, what harm is there in reporting? You've done the work, and all you actually end up reporting is the sale price, cost basis, and exclusion. Plus purchase and sale dates. --Peter No. of Recommendations: 0 I had an appraisal done shortly after she passed, because it is my understanding that "her" cost basis is 1/2 of that appraised value; regardless of the original purchase price and the cost of any improvements we made over the years. What I call "her" cost basis would be the half of the house that I inherited from her. Depends on the state and how the title was held. It is possible that the entire property received the new basis. You need local tax advice to know. No. of Recommendations: 1 I believe the IRS has said if there is no taxable gain after the exclusion, then don't report it. I sold a house in 2019 after my wife died. I used TurboTax for my 2019 taxes. TurboTax has a worksheet for the sale of a house and one for the cost basis. This information goes into a Form 8949 and from there into Schedule D. From there it goes to Form 1040. No. of Recommendations: 2 I had an appraisal done shortly after she passed, because it is my understanding that "her" cost basis is 1/2 of that appraised value; regardless of the original purchase price and the cost of any improvements we made over the years. What I call "her" cost basis would be the half of the house that I inherited from her. For "my" half, I take 1/2 the original purchase price plus 1/2 the cost of any IRS-approved improvements we made (finished basement, screened-in porch). That's correct if you don't live in a community property state. If you live in a community property state, the entire basis is stepped up to the value at her time of death. Then you would add any improvements you made since her death to that basis. For tax/capital gain purposes, I've always thought of the two halves as separate. I calculate the profit (capital gain) on the half I inherited from my wife, and separately calculate the profit (capital gain) on "my" half. Then, since it's been more than two years since my wife passed, for her half I do not get to use the \$250,000 exclusion. But I do get the \$250,000 exclusion for "my" half. That's not correct. What you are calling "her" basis became "your" basis when she died, so it's all "your" basis now. So assume the profit on "her" half is \$30,000, and the profit on "my" half is \$200,000. Because I think of them as separate, I've thought of this as a \$30,000 long-term capital gain. No gain on my half because the profit is less than the \$250,000 exclusion. Nope. You have a total gain of \$230k on "your" basis, which is all excludable, since it's under \$250k - assuming that you meet the other requirements of living in the property and owning it for 2 out of the past 5 years, and never having used it for business or rental, so that you have depreciation that needs to be recaptured. Is that the correct way to treat the gain? And thus my "two halves" thinking has been incorrect all along? Correct - it's not "two halves". And finally, if this IS the correct way, then I don't really have to report anything at all, since there is no gain, right? Unless there is a bidding war and your house sells for at least \$20k more than you anticipate, that's correct. AJ No. of Recommendations: 0 Thanks AJ, and others for your responses! A great help. CheerSRX No. of Recommendations: 0 Should a widow or widower get their homes appraised shortly after their spouses passing to get an accurate cost basis for the inherited part? What if you didn't get an appraisal? nag No. of Recommendations: 2 That's what was recommended to me by my lawyer - ASAP get the appraisal, so you can do the proper calculation, down the road. No idea how one handles that if no appraisal was done. I suppose the local city/county keeps records of sales, if one can access those. I know here in Northern Virginia I can pull up complete sales records, online, for every home in the county. Whether the IRS would accept that information.... No. of Recommendations: 2 Should a widow or widower get their homes appraised shortly after their spouses passing to get an accurate cost basis for the inherited part? What if you didn't get an appraisal? nag It is possible to obtain a retroactive appraisal. Records are available. Probably not quite as accurate but doable and maybe more expensive. No. of Recommendations: 1 That's what was recommended to me by my lawyer - ASAP get the appraisal, so you can do the proper calculation, down the road. No idea how one handles that if no appraisal was done. I suppose the local city/county keeps records of sales, if one can access those. I know here in Northern Virginia I can pull up complete sales records, online, for every home in the county. Whether the IRS would accept that information.... --------------------------- ....depends on to what extent you're looking at truly comparable properties. And in some places IRS will consider property tax valuations, depending on how current the municipality keeps their valuations. In Wisconsin, the property tax bills are required to state not only the assessed value on which the tax is based but also the *estimated* fair market value, which is usually stated as derived as an estimated percentage for the city/village as a whole. With that info available, an IRS auditor will usually take it; especially if the first \$250,000 or \$500,000 of gain is going to be exempt anyway. In the case of property subject to probate, you can use that value for the probate proceedings, unless it's unusually far off. And in an estate, a sale soon after the death isn't get you much of a gain anyway. A loss is more likely, due to closing costs and other expenses related to the sale. Bill No. of Recommendations: 1 It is possible to obtain a retroactive appraisal. Records are available. Probably not quite as accurate but doable and maybe more expensive. My guess is that the further back in the past, the more the appraiser will charge. So, if you didn't get the appraisal done at the time of death, you can get it done now and tuck it into your files along with the deed and your records of capital improvements and whatever else you'll pull out when you sell. It might not matter. My dad sold his last house for \$90k over what he & Mom had bought it for, which is well under the \$250k exclusion. (I did a linear interpolation to figure out a number to give his CPA, in case she needed one. It wasn't accurate, because housing price appreciation isn't linear, but it didn't have to be.) No. of Recommendations: 1 ...a sale soon after the death isn't get you much of a gain anyway... Yeah, I wouldn't bother with an appraisal in that case. But I think the question is what a widow should do if she keeps the house for years, but didn't get an appraisal done back when her husband died; and expects to sell for more than \$250k over what they'd bought it for. Answer: hire an appraiser who can do an appraisal for past dates. Either now, or down the road when she sells. If she doesn't sell, it's moot, because her heirs will get a stepped-up basis. But it's not always possible to predict whether you'll be able to "go out feet first," as much as you might like to. No. of Recommendations: 1 The sale price can be used for evaluation when a sale is complete within 6 months of death. We made the time limit on one estate (trust) but for the other probate court required an appraisal because it was almost a year. Fortunately, the appraiser saw the property after it was emptied and with new paint and flooring. The appraisal would have been much lower if he had seen it sooner. No. of Recommendations: 0 And in some places IRS will consider property tax valuations, depending on how current the municipality keeps their valuations. When I had to go through probate (DYI with help from Probate Court) they had me get the property tax report from the town which does list an 'Appraised Value'. The report is dated approx a month after my husband's passing. While it's a tad bit low, in my opinion, could I just use that? Do I have this part right? .5 of Appraised Value + .5 original purchase price + .5 cost of major improvements = If so, there's no way I'd see (in my time) a gain of 250k over the house's adjusted cost basis, but at least I'd have paperwork to put in with the house deed so it's handy. nag No. of Recommendations: 0 Also, does this mean that the IRS form 2119 from back in 1989 when we bought the house no longer applies? It lists a new adjusted basis of our new home (when we bought it). I've been hanging onto that doc, but if I now have a new cost basis...it might not matter? nag No. of Recommendations: 2 Do I have this part right? .5 of Appraised Value + .5 original purchase price + .5 cost of major improvements = Close: .5 of Appraised Value at the time of deceased spouse's death + .5 original purchase price + .5 cost of major improvements made before deceased spouse died + 1.0 of major improvements made since deceased spouse died = with the caveat that 'major improvements' can be somewhat a term of art. AJ No. of Recommendations: 4 Also, does this mean that the IRS form 2119 from back in 1989 when we bought the house no longer applies? It lists a new adjusted basis of our new home (when we bought it). I've been hanging onto that doc, but if I now have a new cost basis...it might not matter? It does matter. For a home that you have a Form 2119 for, you need to use that as the original basis, rather than the original purchase price of the home. AJ No. of Recommendations: 0 Not sure to start a new thread or not, but I'll try not to. I'd like to put to bed the stepped up basis in my house due to my husbands passing. Just get the paperwork together and put it aside for whenever I sell. So I purchased a home by myself. I sold the home and filed form 2119, adjusted basis of new main home. The new main home was purchased and put in both my and my husband (to be) names. He passes away years later. Since I have the basis of my single purchase of a home...then going to a joint ownership, I'm confused about how to manage the first basis. I was not married and the cost basis on the first house I owned was 100k. It was my single cost basis prior to joint ownership. It doesn't feel right that I should half that? It was my cost basis, not my deceased husband's. Can you tell I'm confused and just want to tuck this away with the deed in case I sell? I'm thinking My original adjusted basis 100k .5 appraised value at date of passing xxxk .5 improvement costs xxk ________________________________________________ new cost basis in house Appreciate any thoughts... nag No. of Recommendations: 0 Let us assume that you inherited in full the house after your husband's passing = since half the house was his. Joint ownership Then, if I remember right, you only get taxed on \$250,000 INCREASE (gain) in price as a single person (\$500K for a couple). Are you even over that threshold? t. No. of Recommendations: 3 It was my single cost basis prior to joint ownership. It doesn't feel right that I should half that? It was my cost basis, not my deceased husband's. Can you tell I'm confused and just want to tuck this away with the deed in case I sell? Under current laws (subject to change at the whim of Congress): If your house was in a community property state, you would get a step up in basis to the full value of the house when your husband died. If your house was not in a community property state, then you would get a step up in basis on half of the house, like this: Basis for house at his death = original basis for house (in this case, \$100k), plus all improvements to that point - let's say they are \$50k = \$150k basis in the house at the time of his death. Your half of this basis is \$75k and his half was also \$75k Let's say the value of the house at the time of his death is \$400k, so your half and his half were each \$200k Your new basis as of his death would be his \$200k half of the home, plus your \$75k half of the original basis = \$275k in basis. So, even though your half of the basis was only \$75k when your husband died, you didn't 'lose' any of the original basis or the improvements that you and your husband put in while he was alive - they are part of the \$200k step up in basis that you received when he died. FYI - If you sell the house within 2 years of his death, you should still be entitled to exempt up to \$500k in gains. If you wait for more than 2 years, you will only be able to exempt \$250k in gains. However, with a basis of \$275k, that means that net of selling costs and any other improvements you do to the house after his death, the house would have to sell for more than \$525k for you have to pay capital gains taxes. AJ No. of Recommendations: 2 It was my single cost basis prior to joint ownership. It doesn't feel right that I should half that? It was my cost basis, not my deceased husband's. Can you tell I'm confused and just want to tuck this away with the deed in case I sell? I think your confusion can be set aside, as follows: You are correct that when you purchased the house, the basis was all yours. When you added your husband to the deed, you made a tax-free spousal gift of half the value (and half the basis) to him. Therefore, you are entitled to a step-up in basis upon his death, according to the (non-)community property rules that govern your location. Ira No. of Recommendations: 0 AJ and Ira, Thank you so much for helping me understand this. I really appreciate it. nag
4,157
17,625
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.640625
3
CC-MAIN-2021-25
latest
en
0.966313
https://mathandmultimedia.com/tag/experimental-probability-activity/
1,716,144,192,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971057819.74/warc/CC-MAIN-20240519162917-20240519192917-00370.warc.gz
337,626,218
11,744
## Experimental and Theoretical Probability 5 This is the fifth and the final part of the Experimental and Theoretical Probability Series.  In this post, we are going to summarize what we have discussed in the previous four posts, and we are going to talk about some  real-life applications of experimental and theoretical probability. Standard Cubical Dice Experimental Probability, as we have discussed in the fourth part of this series, may be obtained by conducting experiments and recording the results. It is the ratio of the number of times an  event occurs to the total number of trials. In the first part of this series, we experimented rolling to dice 1000 times (via a spreadsheet) and we tallied the sums.  We recorded the that sum 2 occurred 29 times out of 1000 trials. We can say that the experimental probability of getting a 2 from that particular experiment is 29/1000. » Read more ## Experimental and Theoretical Probability Part 4 This is the fourth part of the Experimental and Theoretical Probability Series. Click the following to view the other parts of this series: Part I, Part II, Part III. *** In the previous posts in this series, we have experimented with dice by rolling two of them and tallying the results.  We have observed some patterns; the sum frequencies are not the same, and we have discovered that it has something to do with the number of ways a sum could be obtained. On the one hand, we did the three experiments because we wanted which sum would occur most (or least) often. We wanted to get the experimental probability of each sum. The experimental probability of an event  is the ratio of the number of times the event occurs to the total number of trials. In the second column of the table, we rolled a four (that is, getting a sum of four) 76 times out of  1000 trials; therefore, the experimental probability of rolling a four in that particular experiment was 76/1000 or 7.6%. » Read more ## Experimental and Theoretical Probability Part 3 This is the third part of the Experimental and Theoretical Probability Series. In the second part of this series, we have observed in three different experiments that if two dice are rolled, it seems that the probability of getting the sums are not equal. Not only that, we have seen several consistent patterns; for example, 2 and 12 got the least number of rolls; while, 6,7, and 8 got the most. To investigate this observation, we examine how to get a sum of 2, 12, and 6 first when we roll two dice, and then investigate other sums later.  Recall that in the first part of this series, we experimented with two dice, one colored blue and the other red.  To distinguish which number belongs to which dice, we color the numbers blue and red to denote blue and red dice. » Read more 1 2
620
2,793
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.34375
4
CC-MAIN-2024-22
latest
en
0.946118
https://svn.geocomp.uq.edu.au/escript/trunk/doc/examples/helmholtz.py?r1=1384&amp;r2=108&amp;pathrev=2483
1,556,209,598,000,000,000
text/html
crawl-data/CC-MAIN-2019-18/segments/1555578727587.83/warc/CC-MAIN-20190425154024-20190425175117-00058.warc.gz
555,094,301
2,863
# Diff of /trunk/doc/examples/helmholtz.py trunk/esys2/doc/user/examples/helmholtztest.py revision 108 by jgs, Thu Jan 27 06:21:59 2005 UTC temp_trunk_copy/doc/examples/helmholtz.py revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC # Line 1  Line 1 1  # \$Id\$  # \$Id\$ 2  from mytools import Helmholtz  from esys.escript import * 3  from esys.escript import Lsup  from esys.escript.linearPDEs import LinearPDE 4  from esys.finley import Rectangle  from esys.finley import Rectangle 5  #... set some parameters ...  #... set some parameters ... 6  kappa=1.  kappa=1. 7  omega=0.1  omega=0.1 8  eta=10.  eta=10. 9  #... generate domain ...  #... generate domain ... 10  mydomain = esys.finley.Rectangle(l0=5.,l1=1.,n0=50, n1=10)  mydomain = Rectangle(l0=5.,l1=1.,n0=50, n1=10) 11  #... open PDE and set coefficients ...  #... open PDE and set coefficients ... 12  mypde=Helmholtz(mydomain)  mypde=LinearPDE(mydomain) 13    mypde.setSymmetryOn() 14  n=mydomain.getNormal()  n=mydomain.getNormal() 15  x=mydomain.getX()  x=mydomain.getX() 16  mypde.setValue(kappa,omega,omega*x[0],eta,kappa*n[0]+eta*x[0])  mypde.setValue(A=kappa*kronecker(mydomain),D=omega,Y=omega*x[0], \ 17                   d=eta,y=kappa*n[0]+eta*x[0]) 18  #... calculate error of the PDE solution ...  #... calculate error of the PDE solution ... 19  u=mypde.getSolution()  u=mypde.getSolution() 20  print "error is ",Lsup(u-x[0])  print "error is ",Lsup(u-x[0]) # output should be similar to "error is 1.e-7" 21    # output should be similar to "error is 1.e-7" 22    saveVTK("x0.xml",sol=u) 23 Legend: Removed from v.108 changed lines Added in v.1384
606
1,630
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.84375
3
CC-MAIN-2019-18
latest
en
0.217084
https://testbook.com/question-answer/directions-study-the-following-information-to-ans--63e405aae5e25c8dc684a068
1,716,466,857,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058625.16/warc/CC-MAIN-20240523111540-20240523141540-00859.warc.gz
487,615,862
48,661
# DIRECTIONS: Study the following information to answer the given questions. There are 8 friends A, B, C, D, E, F, G and H seated in a circle facing the centre. AC, DG, HE and FB are seated adjacent to each other. A is also seated adjacent to H. B is 2nd to the right of H. E is 3rd to the right of C.Who is 2n d to the right of A? This question was previously asked in Maha TAIT Official Paper (Held On 12 Dec 2017 Shift 2) View all MAHA TAIT Papers > 1. B 2. E 3. F 4. Cannot be determined Option 2 : E Free MAHA TAIT: Mini Full Test 1 1.5 K Users 50 Questions 50 Marks 50 Mins ## Detailed Solution As per the given information, There are 8 friends A, B, C, D, E, F, G and H seated in a circle facing the centre. • B is 2nd to the right of H. •  A is also seated adjacent to H. There are two possibilities: • AC, DG, HE and FB are seated adjacent to each other. • E is 3rd to the right of C. Here, Case II will be eliminated as it contradicts the given statement. Thus, the final arrangement is: Clearly, 'E' is 2nd to the right of A. Hence, the correct answer is "E".
334
1,082
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.375
3
CC-MAIN-2024-22
latest
en
0.923053
https://discuss.codecademy.com/t/the-loop-method/63609
1,537,955,411,000,000,000
text/html
crawl-data/CC-MAIN-2018-39/segments/1537267164469.99/warc/CC-MAIN-20180926081614-20180926102014-00288.warc.gz
484,664,037
4,192
The loop method #1 I don,t know what i did wrong can I have help? i += 0..20 loop do i += 1 print "#{i}" break if i > 5 end #2 This is the main problem,' `i += 0..20` keep it simple, `i = 20` just set a starting point and have your loop code do the rest. also change this, to, `i-=1` Because you want to loop down and not up. And do not change the if statement or you'll run the risk of creating an endless loop s0 leave the `break if` statement as is, `break if i <= 0` #3 If you want to loop going up until 20,the code is like this: i = 0 loop do i += 1 print i break if i >= 20 end i starts at zero. you loop through it and everytime you loop you add 1 [.. i += 1..] print i break if i >=20 i hope this helps.
232
729
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.84375
3
CC-MAIN-2018-39
latest
en
0.866545
https://wwrenderer.libretexts.org/render-api?sourceFilePath=Library/UVA-FinancialMath/setFinancialMath-Sect43-BookValue/math114-43-11.pg&problemSeed=1234567&courseID=anonymous&userID=anonymous&course_password=anonymous&answersSubmitted=0&showSummary=1&displayMode=MathJax&language=en&outputFormat=nosubmit
1,721,722,420,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763518029.81/warc/CC-MAIN-20240723072353-20240723102353-00427.warc.gz
528,211,726
2,893
Suppose that a 12-year bond with a face value of 2500 dollars is redeemable at twice par and pays semiannual coupons that increase by 1.5 percent per coupon. If the last coupon is for 95 dollars and the yield rate is 7.1 percent convertible semiannually, what is the book value of the bond immediately after the 7th coupon is paid?
82
331
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.5625
3
CC-MAIN-2024-30
latest
en
0.922851
https://chouprojects.com/how-to-round-up-to-the-next-half/
1,721,760,312,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763518059.67/warc/CC-MAIN-20240723163815-20240723193815-00067.warc.gz
145,478,433
24,864
Published on Written by Jacky Chou # How To Round Up To The Next Half In Excel ## Key Takeaway: • Understanding half values in Excel: Half values in Excel refer to 0.5 increments, which are commonly used in rounding up or down decimal values. For example, 1.5 is considered a half value. • Using the ROUND function in Excel: The ROUND function is a built-in Excel function that can be used to round up or down decimal values. By specifying the number of digits and using the “0.5” option, Excel can round up to the next half value. • Examples of rounding up to the next half in Excel: To round up to the next half in Excel, simply use the ROUND function and specify the appropriate digits and “0.5” option. Examples include rounding up 0.8 to 1, 1.7 to 2, and 2.3 to 2.5. Struggling to get the correct results in Excel? You can easily round halves up with a simple formula. Finding the right result has never been quicker or easier! Let’s learn how to round up to the next half in Excel. ## Round up to the Next Half in Excel To get to the next half in Excel? Learn about half values. Use the ROUND function. That’s the basics. It can help you round up. Image credits: chouprojects.com by James Duncun ### Understanding Half Values in Excel To work efficiently in Excel, it is crucial to understand the concept of rounding half values. It involves rounding numbers up or down to the nearest half value while maintaining their original worth. Example: Original Number: 3.5 Rounded Half Value: 4 To understand this concept better, let’s take a look at the following table that demonstrates the different possible outcomes when rounding half values in Excel. ValueRounded Half ValueFormula Used 1.31.5=ROUNDUP(A2*2,0)/2 2.63=ROUNDUP(A3) 33=ROUNDUP(A4) 4.54.5=ROUND(A5*2,0)/2 55=ROUNDUP(A6) It’s essential to note that different formulas may be used depending on whether you want to round up or down to the nearest half value for optimal results. It is also wise to know that you can use the ‘CEILING‘ function instead of ‘ROUNDUP‘ as both work similarly when cutting corners and rounding off fractional differences. Pro Tip: Knowing how to adjust between rounded half values without changing your calculations will save time and ensure accuracy while working in Excel. Excel’s ROUND function may not solve all your problems, but it’ll at least round up your numbers to the next level…or half level. ### Using ROUND Function in Excel To round up numbers to the nearest half in Excel, you can use the ROUND function. The function is a built-in formula that rounds numbers to a specified number of digits. Using this function, you can easily round a number up or down to the nearest half. Follow these three simple steps to use the ROUND Function in Excel: 1. Select a cell where you want the rounded value of your number to display. 2. Enter the following formula in the cell: ” =ROUND(number,1) ” without quotations, and replace “number” with the cell containing your original value. 3. Press enter; now, you will see your original value rounded to the nearest half in decimals Besides performing basic rounding tasks according to mathematical conventions- rounding up for 5 or more- The ROUND Function has some quirks involving negatives or zeroes that make it worth taking note of them. To clarify these points, when negative values are involved, rounded values are less than their non-rounded counterparts. When zero-data occurs, The round-function will return either 0 or -0 depending on whether deducted fraction at least equals 0.5 or not. If you want complete control over your result’s format instead of changing or keeping existing styles applied by other formats such as currency style; you can change it manually from below “Number formatting” options on Home-tab. Round-functions have many creative uses based on commonsense like facilitating banking transactions with calculating service charges and providing fair commission distributions etc. Finally, a math trick that won’t make you feel like you need a degree in rocket science. ## Examples of Rounding Up to the Next Half in Excel Round up to the next half in Excel? Familiarize yourself with a few formulas! We’ve got examples to make it easier. Round up to 0.5, 1.5, and 2.5. Understand and apply the formulas in your own Excel sheets. Simple! Image credits: chouprojects.com by James Duncun ### Rounding Up to the Next Half of 0.5 Rounding up to the next half number in Excel involves a precise formula that adjusts numbers to the nearest 0.5. It is a straightforward way of ensuring accurate data presentation, especially in finance and statistics. Here’s a simple three-step guide to round up numbers to the next half in Excel: 1. Identify the cell or column range containing the relevant numbers. 2. Add “=CEILING(A2,0.5)” in the first empty cell adjacent to the column or cell containing figures that need rounding up. 3. Drag down the formula towards the end of your table or entire column. When working with multiple decimal places, it is crucial to highlight the cells or range before proceeding with Step 2 above. For best results when using this technique, adjust your cell formats to display decimals accurately and add low-level formatting for optimal precision. Remember that when you apply this formula, Excel replaces all values with rounded-up data. Therefore, ensure data accuracy before proceeding. Fun fact – The famous spreadsheet program got its name from “excellence” due to its ability to handle complex calculations compared to other available tools at its launch in 1985. Round up to the next half or risk being half-assed in your calculations – Excel has your back. ### Rounding Up to the Next Half of 1.5 When dealing with decimal values in Excel, rounding up to the next half can be a useful tool. This process involves rounding up a number to the nearest multiple of 0.5, essentially rounding to the nearest half. Here is a simple 5-step guide on how to go about it: 1. Select the cell or cells that contain the value(s) you want to round up. 2. Click on the ‘Home’ tab located at the top of your Excel window. 3. Look for and click on the ‘Number Format’ drop-down menu. 4. From there, choose ‘More Number Formats’ then select ‘Custom’. 5. In the ‘Type’ field, type “#/2” and click “OK.” This setting will cause any number you enter into this selected cell range to automatically round up (or down if less than .25) to the nearest .5. It’s important to note that this method may result in values that go beyond your desired decimal range (e.g., if you want a number rounded to one decimal place, it may get rounded up to two). Therefore, double-checking your work is essential. Using this method not only provides an efficient way of achieving accuracy with decimal numbers but also allows for more uniformity and presentability in data presentation. In applying this concept elsewhere, rather than “Rounding Up,” consider using other terms such as “Approximating Decimal Values.” Regardless of what wordage is used, performing these steps yields efficient results while maintaining data precision and consistency. Why settle for half measures? Round up to the next half in Excel and leave behind your decimal doubts. ### Rounding Up to the Next Half of 2.5 When dealing with numerical figures in Excel, rounding up values to the nearest half of 2.5 may be necessary for specific calculations. This involves adjusting the figure to the next highest half value, such as rounding up 1.3 to 1.5 or 4.7 to 5. To round up to the next half of 2.5 in Excel, follow these three steps: 1. Select the cell or range of cells that contain the numbers you wish to round up. 2. Click on the ‘Home’ tab and then click on the ‘Number’ dropdown menu. 3. Select ‘More Number Formats’ and then choose ‘Custom’ from the list. Enter `#.#0"½"` into the Type field and click ‘OK’. The selected values will now be rounded up to the next half number. It is important to note that this method rounds up all numbers in a specific cell or range of cells, not just an individual number. Additionally, it is possible to use other variations of rounding formulas like ROUNDUP function or CEILING.MATH function depending on your data sets rather than using custom formatting. History reports show rounding dates back over two thousand years with Babylonians using it primarily for money purposes when dividing coins. Egyptians also had a similar concept, and it became more widespread throughout history across different countries and cultures as people needed tools for calculation accuracy. ## Some Facts About How to Round Up to the Next Half in Excel: • ✅ Excel offers a function called ROUNDUP that can be used to round up to the next half. (Source: ExcelJet) • ✅ To round up to the next half, simply input the number and divide it by 0.5 in the ROUNDUP function. (Source: Excel Easy) • ✅ If the number is already a half, ROUNDUP will round it up to the next whole number. (Source: Microsoft) • ✅ To round up to the nearest whole number, use the ROUND function instead of ROUNDUP. (Source: Excel Campus) • ✅ It is important to be mindful of whether you need to round up or round down, as rounding up may not always be necessary or appropriate. (Source: AccountingTools) ## FAQs about How To Round Up To The Next Half In Excel ### How do I round up to the next half in Excel? To round up to the next half in Excel, you can use the ROUNDUP function along with some simple calculations. First, multiply your value by 2, then round up using the ROUNDUP function. Finally, divide the result by 2 to get the rounded up value to the nearest half. Here’s an example: =ROUNDUP(A1*2,0)/2 where A1 is the cell containing the original value. ### Can I round up to the nearest quarter instead of half? Yes, you can use the same formula as explained above for rounding up to the nearest quarter in Excel. Simply replace the 2 in the formula with 4. Here’s an example: =ROUNDUP(A1*4,0)/4 where A1 is the cell containing the original value. ### Is there a way to display the rounded up value in a different cell? Yes, you can use a simple cell reference to display the rounded up value in a different cell. Here’s an example: =ROUNDUP(A1*2,0)/2 in cell B1 will round up the value in cell A1 and display the result in B1. ### Can I round up multiple values at once using a formula? Yes, you can use an array formula to round up multiple values at once in Excel. Here’s an example: =ROUNDUP(A1:A5*2,0)/2 where A1:A5 are the cells containing the original values. ### What if I want to round up to the next whole number instead of half? To round up to the next whole number in Excel, simply use the ROUNDUP function without multiplying or dividing by any value. Here’s an example: =ROUNDUP(A1,0) where A1 is the cell containing the original value. ### Is there an easier way to round up to the next half in Excel? Yes, you can use the MROUND function to round up to the next half in Excel. Simply use the formula =MROUND(A1, 0.5) where A1 is the cell containing the original value. ## Related Articles ### How To Separate Text In Excel: A Step-By-Step Guide Key Takeaway: Separating text in Excel can help organize and ... ### How To Shift Cells Down In Excel: A Step-By-Step Guide Key Takeaway: Method 1: Cut and Insert Cells: This method ... ### How To Set Print Area In Excel: Step-By-Step Guide Key Takeaway: Understanding Print Area in Excel: Print Area is ...
2,596
11,489
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.9375
4
CC-MAIN-2024-30
latest
en
0.802323
http://openstudy.com/updates/4d9e3df58f378b0b6b45e317
1,513,020,488,000,000,000
text/html
crawl-data/CC-MAIN-2017-51/segments/1512948513866.9/warc/CC-MAIN-20171211183649-20171211203649-00574.warc.gz
211,130,536
8,416
• anonymous I submitted the following and it is wrong. I think I expressed the interval notation wrong, but I'm not sure. This is what I have: x/5-(1-x)/2>x/2-3 2x-5+5x>5x-3(10) 2x>-25 x>-25/2 (∞,-25/2) Mathematics • Stacey Warren - Expert brainly.com Hey! We 've verified this expert answer for you, click below to unlock the details :) SOLVED At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Looking for something else? Not the answer you are looking for? Search for more explanations.
323
1,132
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.6875
3
CC-MAIN-2017-51
latest
en
0.342435
http://wiki.stat.ucla.edu/socr/index.php?title=AP_Statistics_Curriculum_2007_IntroDesign&diff=4160&oldid=4159
1,537,537,818,000,000,000
text/html
crawl-data/CC-MAIN-2018-39/segments/1537267157203.39/warc/CC-MAIN-20180921131727-20180921152127-00134.warc.gz
277,104,625
9,628
# AP Statistics Curriculum 2007 IntroDesign (Difference between revisions) Revision as of 02:04, 17 June 2007 (view source)IvoDinov (Talk | contribs)← Older edit Revision as of 02:09, 17 June 2007 (view source)IvoDinov (Talk | contribs) m Newer edit → Line 15: Line 15: * '''Blocking''': Blocking is related to randomization. The difference is that we use blocking when we know ''a priori'' of certain effects of the observational units on the response measurements (e.g., when studying the effects of hormonal treatments on humans, gender plays a significant role). We arrange units into groups (blocks) that are similar to one another when we design an experiment in which certain unit characteristics are known to affect the response measurements. Blocking reduces known and irrelevant sources of variation between units and allows greater precision in the estimation of the source of variation in the study. * '''Blocking''': Blocking is related to randomization. The difference is that we use blocking when we know ''a priori'' of certain effects of the observational units on the response measurements (e.g., when studying the effects of hormonal treatments on humans, gender plays a significant role). We arrange units into groups (blocks) that are similar to one another when we design an experiment in which certain unit characteristics are known to affect the response measurements. Blocking reduces known and irrelevant sources of variation between units and allows greater precision in the estimation of the source of variation in the study. - * '''Orthogonality''': Orthogonality allows division of complex relations, variation into separate (independent/orthogonal) contrasts, or factors, that can be studies efficiently and autonomously. Often, these contrasts may be represented by vectors where sets of orthogonal contrasts are uncorrelated and may be independently distributed. Independence implies that each orthogonal contrast provides complementary information to other contrasts (i.e., other treatments). The goal is to completely decompose the variance or the relations of the observed measurements into independent components (e.g., like [http://en.wikipedia.org/wiki/Taylor_expansion Taylor expension] allows polynomial desomposition of smooth functions, where the polynomial base functions are easy to differentiate, integrate, etc.) This will, of course, allow easier interpretation of the statistical analysis and the findings of the study. + * '''Orthogonality''': Orthogonality allows division of complex relations, variation into separate (independent/orthogonal) contrasts, or factors, that can be studies efficiently and autonomously. Often, these contrasts may be represented by vectors, where sets of orthogonal contrasts are uncorrelated and may be independently distributed. Independence implies that each orthogonal contrast provides complementary information to other contrasts (i.e., other treatments). The goal is to completely decompose the variance or the relations of the observed measurements into independent components (e.g., like [http://en.wikipedia.org/wiki/Taylor_expansion Taylor expansion] allows polynomial decomposition of smooth functions, where the polynomial base functions are easy to differentiate, integrate, etc.) This will, of course, allow easier interpretation of the statistical analysis and the findings of the study. ===Model Validation=== ===Model Validation=== ## General Advance-Placement (AP) Statistics Curriculum - Design and Experiments ### Design and Experiments Design of experiments refers of the blueprint for planning a study or experiment, performing the data collection protocol and controlling the study parameters for accuracy and consistency. Design of experiments only makes sense in studies where variation, chance and uncertainly are present and unavoidable. Data, or information, is typically collected in regard to a specific process or phenomenon being studied to investigate the effects of some controlled variables (independent variables or predictors) on other observed measurements (responses or dependent variables). Both types of variables are associated with specific observational units (living beings, components, objects, materials, etc.) ### Approach The following are the most common components used in Experimental Design. • Comparison: To make inference about effects, associations or predictions, one typically has to compare different groups subjected to distinct conditions. This allows contrasting observed responses and underlying group differences which ultimately may lead to inference on relations and influence between controlled and observed variables. • Randomization: The second fundamental design principle is randomization. It requires that we make allocation of (controlled variables) treatments to units using some random mechanism. This will simply guarantees that effects that may be present is the units, but not incorporated in the model, are equidistributed amongst all groups and are therefore unlikely to significantly effect our group comparisons at the end of the statistical inference or analysis (as these effects, if present, will be similar within each group). • Replication: All measurements we make, observations we acquire or data we collect is subject to variation, as there are no completely deterministic processes. As we try to make inference about the process that generated the observed data (not the sample data itself, even though our statistical analysis are data-driven and therefore based on the observed measurements), the more data we collect (unbiasly) the stronger our inference is likely to be. Therefore, repeated measurements intuitively would allow is to tame the variability associated with the phenomenon we study. • Blocking: Blocking is related to randomization. The difference is that we use blocking when we know a priori of certain effects of the observational units on the response measurements (e.g., when studying the effects of hormonal treatments on humans, gender plays a significant role). We arrange units into groups (blocks) that are similar to one another when we design an experiment in which certain unit characteristics are known to affect the response measurements. Blocking reduces known and irrelevant sources of variation between units and allows greater precision in the estimation of the source of variation in the study. • Orthogonality: Orthogonality allows division of complex relations, variation into separate (independent/orthogonal) contrasts, or factors, that can be studies efficiently and autonomously. Often, these contrasts may be represented by vectors, where sets of orthogonal contrasts are uncorrelated and may be independently distributed. Independence implies that each orthogonal contrast provides complementary information to other contrasts (i.e., other treatments). The goal is to completely decompose the variance or the relations of the observed measurements into independent components (e.g., like Taylor expansion allows polynomial decomposition of smooth functions, where the polynomial base functions are easy to differentiate, integrate, etc.) This will, of course, allow easier interpretation of the statistical analysis and the findings of the study. ### Model Validation All of the components in the approach/methods section need to be validated but the major one is the independence assumption. ### Examples & Hands-on activities • A study of aortic valve-sparing repair*. • This study sought to establish whether there was a difference in outcome after aortic valve repair with autologous pericardial leaflet extension in acquired versus congenital valvular disease. One 128 patients underwent reparative aortic valve surgery at UCLA from 1997 through 2005 for acquired or congenital aortic valve disease. The acquired group (43/128) (34%) had a mean age of 56.4 $\pm$ 20.3 years (range, 7.8—84.6 years) and the congenital group (85/128) (66%) had a mean age of 16.9 $\pm$19.2 years (range, 0.3—82 years). The endpoints of the study were mortality and reoperation rates. • In this case the units are heart disease patients. These were split into two groups (acquired or congenital) and locked by gender (male/female). The treatment allied on the two groups was aortic valve repair with autologous pericardial leaflet extension.
1,594
8,356
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 2, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.0625
4
CC-MAIN-2018-39
longest
en
0.943981
https://kalkicode.com/bitwise-sieve
1,713,607,953,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296817576.41/warc/CC-MAIN-20240420091126-20240420121126-00323.warc.gz
300,240,699
11,373
Posted on by Kalkicode Code Mathematics # Bitwise Sieve The Bitwise Sieve is a variant of the Sieve of Eratosthenes, a classical algorithm used to find all prime numbers up to a given limit. The Bitwise Sieve optimizes the space usage by representing numbers using bits in an array, which significantly reduces the memory requirement compared to a traditional array. ## Problem Statement The problem is to efficiently find all prime numbers within a given range [2, n] using the Bitwise Sieve algorithm. ## Example Let's take an example with n = 25. 1. Initialize an array called `sieve` with bits, where each bit corresponds to a number. A set bit indicates the number is composite (not prime), and a clear bit indicates the number is prime. 2. Start with the first prime number, 2. 3. For each prime number `p`, mark all multiples of `p` as composite starting from `p * p`, as all smaller multiples would have been marked by previous primes. 4. Repeat this process for all primes less than or equal to the square root of `n`. ## Idea to Solve The Bitwise Sieve algorithm aims to eliminate memory overhead by representing numbers as bits in an array. Instead of using an array where each element represents a number, the algorithm uses a bit array where each bit represents a number. This way, the memory required is greatly reduced, especially when working with large ranges. ## Pseudocode ``````function non_prime(num, position): return (num & (1 << position)) function update_status(num, position): return (num | (1 << position)) function bitwise_sieve(n): if n <= 1: return space = (n >> 5) + 2 sieve[space] for i = 3 to sqrt(n) step 2: slot = i >> 5 position = i & 31 if non_prime(sieve[slot], position) == 0: for j = i * i to n step (i << 1): slot = j >> 5 position = j & 31 sieve[slot] = update_status(sieve[slot], position) print("Prime numbers from 2 to", n) print("[ 2") for i = 3 to n step 2: slot = i >> 5 position = i & 31 if non_prime(sieve[slot], position) == 0: print(i) print("]")`````` ## Algorithm Explanation 1. The algorithm defines two helper functions, `non_prime` and `update_status`, which operate on the bits in the sieve array. 2. The `bitwise_sieve` function initializes the sieve array and iterates through odd numbers starting from 3 up to the square root of `n`. 3. For each prime number found, it marks its multiples as non-prime in the sieve array. 4. The algorithm then prints the prime numbers in the given range. ## Code Solution Here given code implementation process. ``````// C Program // Print Prime numbers using // Bitwise Sieve #include <stdio.h> int non_prime(int num, int position) { return (num & (1 << position)); } int update_status(int num, int position) { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n void bitwise_sieve(int n) { if (n <= 1) { //When n are invalid to prime number return; } int space = (n >> 5) + 2; //This are used to detect prime numbers int sieve[space]; // Loop controlling variables int i = 0; int j = 0; //define some auxiliary variable int slot = 0; int position = 0; for (i = 3; i * i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { for (j = i * i; j <= n; j += (i << 1)) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = update_status(sieve[slot], position); } } } printf("\n Prime of (2 - %d) are \n", n); //Display first element printf(" [ 2"); for (i = 3; i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { //When [i] is a prime number printf(" %d", i); } } printf(" ] \n"); } int main() { bitwise_sieve(25); bitwise_sieve(101); bitwise_sieve(200); return 0; }`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 11 13 17 19 23 25 29 31 35 37 41 43 47 49 53 55 59 61 67 77 79 83 85 89 91 95 97 101 ] Prime of (2 - 200) are [ 2 3 11 13 17 19 23 25 29 31 35 37 41 43 47 49 53 55 59 61 67 77 79 83 85 89 91 95 97 101 103 107 109 113 115 119 125 127 131 139 145 151 157 163 175 181 ]`````` ``````// Java Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { public int non_prime(int num, int position) { return (num & (1 << position)); } public int update_status(int num, int position) { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n public void bitwise_sieve(int n) { if (n <= 1) { //When n are invalid to prime number return; } int space = (n >> 5) + 2; //This are used to detect prime numbers int[] sieve = new int[space]; // Loop controlling variables int i = 0; int j = 0; //define some auxiliary variable int slot = 0; int position = 0; for (i = 3; i * i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { for (j = i * i; j <= n; j += (i << 1)) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = update_status(sieve[slot], position); } } } System.out.print("\n Prime of (2 - " + n + ") are \n"); //Display first element System.out.print(" [ 2"); for (i = 3; i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { //When [i] is a prime number System.out.print(" " + i); } } System.out.print(" ] \n"); } public static void main(String[] args) { BitwiseSieve obj = new BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); } }`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````//Include header file #include <iostream> using namespace std; // C++ Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { public: int non_prime(int num, int position) { return (num & (1 << position)); } int update_status(int num, int position) { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n void bitwise_sieve(int n) { if (n <= 1) { //When n are invalid to prime number return; } int space = (n >> 5) + 2; //This are used to detect prime numbers int sieve[space]; // Loop controlling variables int i = 0; int j = 0; //define some auxiliary variable int slot = 0; int position = 0; for (i = 3; i *i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (this->non_prime(sieve[slot], position) == 0) { for (j = i *i; j <= n; j += (i << 1)) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = this->update_status(sieve[slot], position); } } } cout << "\n Prime of (2 - " << n << ") are \n"; //Display first element cout << " [ 2"; for (i = 3; i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (this->non_prime(sieve[slot], position) == 0) { //When [i] is a prime number cout << " " << i; } } cout << " ] \n"; } }; int main() { BitwiseSieve obj = BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); return 0; }`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 7 11 13 23 29 47 53 55 59 61 67 71 79 83 85 89 95 97 101 ] Prime of (2 - 200) are [ 2 3 7 11 13 23 29 47 53 55 59 61 67 71 79 83 85 89 95 97 101 103 107 109 113 115 125 127 131 139 151 157 181 199 ]`````` ``````//Include namespace system using System; // C# Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { public int non_prime(int num, int position) { return (num & (1 << position)); } public int update_status(int num, int position) { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n public void bitwise_sieve(int n) { if (n <= 1) { //When n are invalid to prime number return; } int space = (n >> 5) + 2; //This are used to detect prime numbers int[] sieve = new int[space]; // Loop controlling variables int i = 0; int j = 0; //define some auxiliary variable int slot = 0; int position = 0; for (i = 3; i * i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { for (j = i * i; j <= n; j += (i << 1)) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = update_status(sieve[slot], position); } } } Console.Write("\n Prime of (2 - " + n + ") are \n"); //Display first element Console.Write(" [ 2"); for (i = 3; i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve[slot], position) == 0) { //When [i] is a prime number Console.Write(" " + i); } } Console.Write(" ] \n"); } public static void Main(String[] args) { BitwiseSieve obj = new BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); } }`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````<?php // Php Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { public function non_prime(\$num, \$position) { return (\$num & (1 << \$position)); } public function update_status(\$num, \$position) { return (\$num | (1 << \$position)); } //Find all prime numbers which have smaller and equal to given number n public function bitwise_sieve(\$n) { if (\$n <= 1) { //When n are invalid to prime number return; } \$space = (\$n >> 5) + 2; //This are used to detect prime numbers \$sieve = array_fill(0, \$space, 0); // Loop controlling variables \$i = 0; \$j = 0; //define some auxiliary variable \$slot = 0; \$position = 0; for (\$i = 3; \$i * \$i <= \$n; \$i = \$i + 2) { //get slot and position \$slot = \$i >> 5; \$position = \$i & 31; if (\$this->non_prime(\$sieve[\$slot], \$position) == 0) { for (\$j = \$i * \$i; \$j <= \$n; \$j += (\$i << 1)) { //get slot and position \$slot = \$j >> 5; \$position = \$j & 31; \$sieve[\$slot] = \$this->update_status(\$sieve[\$slot], \$position); } } } echo "\n Prime of (2 - ". \$n .") are \n"; //Display first element echo " [ 2"; for (\$i = 3; \$i <= \$n; \$i = \$i + 2) { //get slot and position \$slot = \$i >> 5; \$position = \$i & 31; if (\$this->non_prime(\$sieve[\$slot], \$position) == 0) { //When [i] is a prime number echo " ". \$i; } } echo " ] \n"; } } function main() { \$obj = new BitwiseSieve(); //Test Case \$obj->bitwise_sieve(25); \$obj->bitwise_sieve(101); \$obj->bitwise_sieve(200); } main();`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````// Node Js Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { non_prime(num, position) { return (num & (1 << position)); } update_status(num, position) { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n bitwise_sieve(n) { if (n <= 1) { //When n are invalid to prime number return; } var space = (n >> 5) + 2; //This are used to detect prime numbers var sieve = Array(space).fill(0); // Loop controlling variables var i = 0; var j = 0; //define some auxiliary variable var slot = 0; var position = 0; for (i = 3; i * i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (this.non_prime(sieve[slot], position) == 0) { for (j = i * i; j <= n; j += (i << 1)) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = this.update_status(sieve[slot], position); } } } process.stdout.write("\n Prime of (2 - " + n + ") are \n"); //Display first element process.stdout.write(" [ 2"); for (i = 3; i <= n; i = i + 2) { //get slot and position slot = i >> 5; position = i & 31; if (this.non_prime(sieve[slot], position) == 0) { //When [i] is a prime number process.stdout.write(" " + i); } } process.stdout.write(" ] \n"); } } function main() { var obj = new BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); } main();`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````# Python 3 Program # Print prime number by using # Bitwise Sieve class BitwiseSieve : def non_prime(self, num, position) : return (num & (1 << position)) def update_status(self, num, position) : return (num | (1 << position)) # Find all prime numbers which have smaller and equal to given number n def bitwise_sieve(self, n) : if (n <= 1) : # When n are invalid to prime number return space = (n >> 5) + 2 # This are used to detect prime numbers sieve = [0] * space # define some auxiliary variable slot = 0 position = 0 # Loop controlling variables i = 3 j = 0 while (i * i <= n) : # get slot and position slot = i >> 5 position = i & 31 if (self.non_prime(sieve[slot], position) == 0) : j = i * i while (j <= n) : # get slot and position slot = j >> 5 position = j & 31 sieve[slot] = self.update_status(sieve[slot], position) j += (i << 1) i = i + 2 print("\n Prime of (2 - ", n ,") are \n", end = "") # Display first element print(" [ 2", end = "") i = 3 while (i <= n) : # get slot and position slot = i >> 5 position = i & 31 if (self.non_prime(sieve[slot], position) == 0) : # When [i] is a prime number print(" ", i, end = "") i = i + 2 print(" ] \n", end = "") def main() : obj = BitwiseSieve() # Test Case obj.bitwise_sieve(25) obj.bitwise_sieve(101) obj.bitwise_sieve(200) if __name__ == "__main__": main()`````` #### Output `````` Prime of (2 - 25 ) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101 ) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200 ) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````# Ruby Program # Print prime number by using # Bitwise Sieve class BitwiseSieve def non_prime(num, position) return (num & (1 << position)) end def update_status(num, position) return (num | (1 << position)) end # Find all prime numbers which have smaller and equal to given number n def bitwise_sieve(n) if (n <= 1) # When n are invalid to prime number return end space = (n >> 5) + 2 # This are used to detect prime numbers sieve = Array.new(space) {0} # define some auxiliary variable slot = 0 position = 0 # Loop controlling variables i = 3 j = 0 while (i * i <= n) # get slot and position slot = i >> 5 position = i & 31 if (self.non_prime(sieve[slot], position) == 0) j = i * i while (j <= n) # get slot and position slot = j >> 5 position = j & 31 sieve[slot] = self.update_status(sieve[slot], position) j += (i << 1) end end i = i + 2 end print("\n Prime of (2 - ", n ,") are \n") # Display first element print(" [ 2") i = 3 while (i <= n) # get slot and position slot = i >> 5 position = i & 31 if (self.non_prime(sieve[slot], position) == 0) # When [i] is a prime number print(" ", i) end i = i + 2 end print(" ] \n") end end def main() obj = BitwiseSieve.new() # Test Case obj.bitwise_sieve(25) obj.bitwise_sieve(101) obj.bitwise_sieve(200) end main()`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ] `````` ``````// Scala Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { def non_prime(num: Int, position: Int): Int = { return (num & (1 << position)); } def update_status(num: Int, position: Int): Int = { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n def bitwise_sieve(n: Int): Unit = { if (n <= 1) { //When n are invalid to prime number return; } var space: Int = (n >> 5) + 2; //This are used to detect prime numbers var sieve: Array[Int] = Array.fill[Int](space)(0); //define some auxiliary variable var slot: Int = 0; var position: Int = 0; // Loop controlling variables var i: Int = 3; var j: Int = 0; while (i * i <= n) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve(slot), position) == 0) { j = i * i; while (j <= n) { //get slot and position slot = j >> 5; position = j & 31; sieve(slot) = update_status(sieve(slot), position); j += (i << 1); } } i = i + 2; } print("\n Prime of (2 - " + n + ") are \n"); //Display first element print(" [ 2"); i = 3; while (i <= n) { //get slot and position slot = i >> 5; position = i & 31; if (non_prime(sieve(slot), position) == 0) { //When [i] is a prime number print(" " + i); } i = i + 2; } print(" ] \n"); } } object Main { def main(args: Array[String]): Unit = { var obj: BitwiseSieve = new BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); } }`````` #### Output `````` Prime of (2 - 25) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ``````// Swift Program // Print prime number by using // Bitwise Sieve class BitwiseSieve { func non_prime(_ num: Int, _ position: Int) -> Int { return (num & (1 << position)); } func update_status(_ num: Int, _ position: Int) -> Int { return (num | (1 << position)); } //Find all prime numbers which have smaller and equal to given number n func bitwise_sieve(_ n: Int) { if (n <= 1) { //When n are invalid to prime number return; } let space: Int = (n >> 5) + 2; //This are used to detect prime numbers var sieve: [Int] = Array(repeating: 0, count: space); //define some auxiliary variable var slot: Int = 0; var position: Int = 0; // Loop controlling variables var i: Int = 3; var j: Int = 0; while (i * i <= n) { //get slot and position slot = i >> 5; position = i & 31; if (self.non_prime(sieve[slot], position) == 0) { j = i * i; while (j <= n) { //get slot and position slot = j >> 5; position = j & 31; sieve[slot] = self.update_status(sieve[slot], position); j += (i << 1); } } i = i + 2; } print("\n Prime of (2 - ", n ,") are \n", terminator: ""); //Display first element print(" [ 2", terminator: ""); i = 3; while (i <= n) { //get slot and position slot = i >> 5; position = i & 31; if (self.non_prime(sieve[slot], position) == 0) { //When [i] is a prime number print(" ", i, terminator: ""); } i = i + 2; } print(" ] \n", terminator: ""); } } func main() { let obj: BitwiseSieve = BitwiseSieve(); //Test Case obj.bitwise_sieve(25); obj.bitwise_sieve(101); obj.bitwise_sieve(200); } main();`````` #### Output `````` Prime of (2 - 25 ) are [ 2 3 5 7 11 13 17 19 23 ] Prime of (2 - 101 ) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ] Prime of (2 - 200 ) are [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ]`````` ## Resultant Output Explanation The output displays the prime numbers within the specified ranges. For example, for `bitwise_sieve(25)`, the prime numbers from 2 to 25 are [2, 3, 5, 7, 11, 13, 17, 19, 23]. ## Time Complexity The time complexity of the Bitwise Sieve algorithm is O(n log log n), where n is the upper limit of the range. This is because the algorithm eliminates the multiples of each prime number up to the square root of n. The space complexity is reduced to O(n/32), which represents the size of the sieve array in terms of bits. ## Comment Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible. Categories Relative Post
8,301
21,940
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.125
4
CC-MAIN-2024-18
latest
en
0.783559
https://discussmain.com/q/530905
1,603,553,051,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107883636.39/warc/CC-MAIN-20201024135444-20201024165444-00301.warc.gz
302,016,030
2,445
# In a bakery spent 24 kg of cottage cheese for baking of cheesecakes it is one 3 (one third) part of all cottage cheese which was in a bakery. spent 36 more kg of cottage cheese for baking of Easter cakes. how many kg of cottage cheese remained in a bakery? Help mi! Problem 4 Classes! 295 1) 24 ยท 3=72 (kg) - all cottage cheese in a bakery 2) 36+24=60 (kg) - cottage cheese spent 3) 72-60=12 (kg) - cottage cheese remained in Answer's bakery: 12 kg 196
135
456
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.6875
4
CC-MAIN-2020-45
latest
en
0.929687
https://www.ics.uci.edu/~goodrich/teach/ics160e/hw/proj2/
1,529,637,716,000,000,000
text/html
crawl-data/CC-MAIN-2018-26/segments/1529267864343.37/warc/CC-MAIN-20180622030142-20180622050142-00452.warc.gz
842,906,801
1,650
## ICS 160E / EECS 114 - Programming Project 2, 50 Points Due: Friday, May 6, 2005, at 11:59pm, using the Checkmate Submission System. Write a Java program that can play tic-tac-toe effectively. To do this, you will need to create a game tree T, which is a tree where each node corresponds to a game configuration, which in this case is a representation of the tic-tac-toe board. The root node corresponds to the initial configuration. For each internal node v in T, the children of v correspond to the game states we can reach from v's game state in a single legal move for the appropriate player, A (the first player) or B (the second player). Nodes at even depths correspond to moves for A and nodes at odd depths correspond to moves for B. External nodes are either final game states or are at a depth beyond which we don't wish to explore. We score each external node with a value that indicates how good this state is for player A. In large games, like chess, we have to use a heuristic scoring function, but for small games, like tic-tac-toe, we can construct the entire game tree and score external nodes as +1, 0, -1, indicating whether player A has a win, draw, or lose in that configuration. A good algorithm for choosing moves is \emph{minimax}. In this algorithm, we assign a score to each internal node v in T, such that if v represents A's turn, we compute v's score as the maximum of the scores of v's children (which corresponds to A's optimal play from v). If an internal node v represents B's turn, then we compute v's score as the minimum of the scores of v's children (which corresponds to B's optimal play from v). Note: you may use the following class in your program: You may read expressions from System.in and output to System.out or use a GUI.
417
1,773
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.828125
3
CC-MAIN-2018-26
latest
en
0.924968
https://web2.0calc.com/questions/math-question-please-help_13
1,603,956,737,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107903419.77/warc/CC-MAIN-20201029065424-20201029095424-00440.warc.gz
600,425,679
6,777
+0 +2 96 4 +253 Sherman goes golfing every 6th day and Brad goes golfing every 7th day. If Sherman and Brad both went golfing today, how many days until they will go golfing on the same day again? (Btw, I'm new to this website and I aleady like it very much!) Jul 7, 2020 edited by MathWizPro  Jul 7, 2020 #1 +781 +2 They will golf on the same day in lcm(6, 7)=42 days. Jul 7, 2020 #2 +1 6 times 7 = 42 Remeber LCM Jul 7, 2020 #3 +253 +1 Jul 7, 2020 edited by MathWizPro  Jul 7, 2020 edited by MathWizPro  Jul 7, 2020 #4 +781 +1 You're welcome. :) gwenspooner85  Jul 7, 2020
242
588
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.96875
3
CC-MAIN-2020-45
latest
en
0.930234
https://www.physicsforums.com/threads/special-relativity-and-universe-expansion.53897/
1,481,215,298,000,000,000
text/html
crawl-data/CC-MAIN-2016-50/segments/1480698541864.24/warc/CC-MAIN-20161202170901-00452-ip-10-31-129-80.ec2.internal.warc.gz
983,188,296
15,005
# Special relativity and Universe expansion. 1. Nov 23, 2004 ### mprm86 I have heard that the Universe is expanding, and the longer is the distance between two bodies, so the greater will be the speed of expansion. So, my question is: If two bodies were far enough, so tehy could reach c or even go faster? (i guess there is no limit for Universe expansion). I know I´m not a genius, and i havent discovered some paradox or somewhat, so, help me please and explain me what really happens. Thanks. :tongue2: 2. Nov 23, 2004 ### meteor Hi, bienvenido don't mix the concepts Special Relativity and Universe expansion, because Special Relativity is a theory that has as foreground a Minkowski space, that is a non-expanding space. The expansion can be modelled with General Relativity, that has Special Relativity as a special case. In GR, there are objects receding faster than c, because with Hubble Law v=H*D where D is proper distance, H the hubble parameter, you can obtain recession velocities v greater than c. But there's no paradox because in the frame of reference of the observer there's no superluminal velocity observed. They are receding with spacetime, but their peculiar velocity inside spacetime remains subluminal 3. Nov 24, 2004 ### AVNguyen I think there is some thing wrong with that. There are 3 versions of the expansion of the Universe according to Friedmann.1 of them states that we begin with Big BAng and finish with Big Crunch.Therefore, we definitely have the limit of the expansion(if the theory is right.) 4. Nov 24, 2004 ### Alkatran Picture it this way: A 2d world on an expanding sphere. According to any person on that world, everything else is getting farther away. Someone who starts off moving at 5 kph relative away from some other person, and doesn't accelerate afterwards, will observer the relative speed as actually increasing! :surprised (at least until they went all the way around the sphere and were actually moving towards)
465
1,980
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.796875
3
CC-MAIN-2016-50
longest
en
0.949574
http://mathhelpforum.com/business-math/84278-really-need-help-solving-problem.html
1,524,499,553,000,000,000
text/html
crawl-data/CC-MAIN-2018-17/segments/1524125946077.4/warc/CC-MAIN-20180423144933-20180423164933-00541.warc.gz
204,708,348
9,500
## Really Need help solving this problem A state gives a credit against its income tax equal to 50% of any donation to a child welfare agency (subject to a limit of $50 credit per person). Mr. Jones (in the 15% federal tax bracket) and Mr. Smith (in the 35% federal tax bracket) each give$100 to eligible agencies. 1) How much wil state tax liabilities change for each as a result of their donation? 2) Sate income tax payments and contributions to charitible agencies are both deductible from the base used to compute federal liability. how much will federal tax liability change for Mr. Jones and Mr. Smith as a result of their donation? 3) Considering both changes in federal and state liability, what is the net after tax cost of Mr. Jones and Mr. Smith's donations? (hint: substract the changes in state and federal liability from \$100) 4) Suspose the state program changed from a credit to a deduction. If the state tax rate werea a flat 3%, how much would state liability change for Mr. Jones and Mr. SMith. 5) From the previous computations, which approach (credit or deduction) do you suppose charitible organizations in the state would favor and why?
261
1,167
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.53125
3
CC-MAIN-2018-17
latest
en
0.958696
https://documen.tv/question/the-ph-of-a-solution-with-a-h-of-110-9-is-23938385-80/
1,726,795,593,000,000,000
text/html
crawl-data/CC-MAIN-2024-38/segments/1725700652073.91/warc/CC-MAIN-20240919230146-20240920020146-00155.warc.gz
188,419,688
15,943
## the PH of a solution with a [H+] of 1×10^9 is ? Question the PH of a solution with a [H+] of 1×10^9 is ? in progress 0 3 years 2021-07-25T22:45:43+00:00 1 Answers 9 views 0 ## Answers ( ) 1. Answer: 9 Explanation: pH = -log[H+] = -log(1×10^9) = 9
107
257
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.390625
3
CC-MAIN-2024-38
latest
en
0.745755
https://cpt.hitbullseye.com/ITC/ITC-Aptitude-Test.php
1,670,207,065,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446711001.28/warc/CC-MAIN-20221205000525-20221205030525-00296.warc.gz
214,451,495
31,691
# Sample Aptitude Questions of ITC Views:84572 1. If √1+x/961=32/31, then the value of x is 1. 63 2. 61 3. 65 4. 64 Answer : Option A. √1+ x/961= (32/31)2, Squaring both sides, ⇒ 1+ x/961 =  (32/31)2 = 1024/961 Therefore, x/961 = 1024/961 -1 = 1024-961 /961 = 63/961 ⇒ x = 63 2. a and b are odd numbers, then which of the following is even? 1. a + b + ab 2. a + b-1 3. a + b + 1 4. a + b + 2ab Answer : Option D. ⇒ The sum of two odd number is even. The same is the case with their product. ∴ a + b + 2ab = Even number 1. 216-1 is divisible by 1. 11 2. 13 3. 17 4. 19 Answer : Option C. 216 - 1 = (28)2 -1 = (28 + l) (28 - l) = (256 + 1) (256 - 1) = 257 × 255 which is exactly divisible by 17. 2. The single discount equal to three consecutive discounts of 10%, 12% and 5% is 1. 26.27% 2. 24.76% 3. 9% 4. 11% Answer : Option B. Single equivalent discount for 10% and 12%. ⇒ (12 -10 -12*10 /100)% = 20.8% Single equivalent discount for 20.8% and 5%. ⇒(20.8 -5 -20.8*5/100)% = 20.8% = 24.76% 3. If x : y = 5 : 6, then (3x2 - 2y2): (y2 - x2) is 1. 7:6 2. 11:3 3. 3:11 4. 6:7 Answer : Option C. x/y= 5/6 ⇒ 3x2 - 2y2 /y2 - x2 =3 .( x2/y2 )-2 /1-(x2/y2) ⇒ 3*25/36 -2 /1 -25/36 =75 -72 /36 -25 = 3 /11 4. An alloy contains copper, zinc and nickel in the ratio of 5 : 3 : 2. The quantity of nickel in kg that must be added to 100 kg of this alloy to have the new ratio 5 : 3 : 3 is 1. 8 2. 10 3. 12 4. 15 Answer : Option B. Let x kg of nickel be mixed. 20+x/100+x= 3/11 ⇒ 220 + 11x = 300 + 3x ⇒ 11x - 3x = 300-220 ⇒ 8x = 80 ⇒ x = 10 kg. 5. The ratio of the ages of Ram and Rahim 10 years ago was 1 : 3. The ratio of their ages five years hence will be 2 : 3. Then the ratio of their present ages is 1. 1:2 2. 3:5 3. 3:4 4. 2:5 Answer : Option B. Let the ages of Ram and Rahim 10 years ago be x and 3x years respectively. After 5 years from now, x+15/3x+15=2/3 ⇒ 6x + 30 = 3x + 45 ⇒ 3x = 45-30 = 15 ⇒ x = 5 ∴ Radio of their present ages = (x+ 10) : (3x + 10) = 15 : 25 = 3 : 5 6. The ratio between two numbers is 2 : 3. If each number is increased by 4, the ratio between them becomes 5 : 7. The difference between the numbers is 1. 8 2. 6 3. 4 4. 2 Answer : Option A. Let the numbers be 2x and 3x. ∴ (2x+4)/(3x+4) = 5/7 ⇒ x = 28 – 20 = 8 = Required difference 7. Monthly incomes of A and B are in the ratio of 4 : 3 and their expenses bear the ratio 3:2. Each of them saves Rs. 6,000 at the end of the month, then the monthly income of A is 1. Rs. 12,000 2. Rs. 24,000 3. Rs. 30,000 4. Rs. 60,000 Answer : Option B. Let the monthly incomes of A and B be Rs. 4x and Rs. 3x respectively and their expenditures be Rs. 3y and Rs. 2y respectively. ∴ 4x – 3y = 6000 and 3x – 2y = 6000 ⇒ 4x – 3y = 3x – 2y ⇒ x = y ∴ 4x – 3y = 6000 ⇒ x = 6000 ⇒ A’s monthly income = 4x = Rs. 24000 8. The average of three consecutive odd numbers is 12 more than one third of the first of these numbers. What is the last of the three numbers? 1. 15 2. 17 3. 19
1,295
2,936
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.765625
4
CC-MAIN-2022-49
longest
en
0.761256
https://www.natureof3laws.co.in/uncertainty-in-measurement-chemistry-class-11-ncert/
1,717,003,319,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971059384.83/warc/CC-MAIN-20240529165728-20240529195728-00825.warc.gz
795,013,449
54,980
# Uncertainty in measurement chemistry, class 11 NCERT Knowledge Increases By Sharing... While studying chemistry, we often have to deal with experimental data and theoretical calculations. There are significant ways to be comfortable with the numbers and confidently present the data as quickly as possible. In this article, we will discuss uncertainty in measurements chemistry class 11 in detail, so let’s get started… Inside Story ## Scientific notation Because chemistry is the study of atoms and molecules, which have tiny masses and exist in extremely large numbers, a chemist must deal with numbers of up to 602,200,000,000,000,000,000,000 molecules of 2g hydrogen gas or as small as 0.0000000000000000000000000000000166 g mass of an H atom. Similarly, other constants such as Planck’s constant, the speed of light, particle charges, etc. contain numbers in the order of magnitude mentioned above. It might seem like fun for a moment to write or count numbers with so many zeros, but it presents a real challenge to perform simple mathematical operations like addition, subtraction, multiplication, or division of such numbers. You can enter any two numbers of the above type and try any of the operations that you want to take on as a challenge and you will really appreciate the difficulty of dealing with such numbers. This problem is solved by using scientific notation for such numbers, that is, exponential notation, in which any number can be represented in the form of $N\times 10^n$, where $n$ is an exponent that has positive or negative values, and $N$ is a number (called the digit term) ranging from 1,000 to 9.999…. Therefore we can write 232.508 as $2.32508 \times 10^2$ in scientific notation. Note that when writing, the decimal had to be shifted two places to the left, as did the exponent (2) of 10 in scientific notation. Likewise, 0.00016 can be written as $6\times 10^{–4}$. Here the decimal point is to be shifted four places to the right and (-4) is the exponent in scientific notation. When performing mathematical operations with numbers expressed in scientific notation, the following points should be kept in mind. ### Multiplication and division Below are two operations that follow the same rules which are there for exponential numbers, i.e. For these two operations, first, the numbers are written in such a way that they have the same exponent. After that, the coefficients (digit terms) are added or subtracted as the case may be. Thus, for adding $6.65 \times 10^{4}$ and $8.95 \times 10^{3}$, the exponent is made the same for both the numbers. Thus, we get $(6.65 \times 10^4) + (0.895 × 10^4)$ Then, these numbers can be added as follows $(6.65 + 0.895) \times 10^4 = 7.545 × 10^4$ Similarly, the subtraction of two numbers can be done as shown below: \begin{aligned}(2.5 & \times 10^{–2} ) – (4.8 \times 10^{–3})\\ &= (2.5 \times 10^{–2}) – (0.48 \times 10^{–2})\\ &= (2.5 – 0.48) \times 10^{–2} \\&= 2.02 \times 10^{–2} \end{aligned} ## Significant figures Any experimental measurement involves some uncertainty due to the limitations of the measurement instrument and the skill of the person making the measurement. For example, the mass of an object is determined using a platform scale and is 9.4g. When measuring the mass of this object on an analytical balance gives a mass of 9.4213g. The mass determined with an analytical balance is slightly larger than the mass determined with a platform scale. Therefore, digit 4 after the decimal point in the platform scale measurement is uncertain. Uncertainties in experimental or calculated values ​​are indicated by specifying the number of significant numbers. Significant numbers are significant digits that are known with certainty plus one that is estimated or uncertain. The uncertainty is given by writing the definite digits and the last uncertain digit. So if we write a result as 11.2 ml, we say that 11 is true and 2 is uncertain, and the uncertainty would be $\pm 1$ in the last digit. Unless otherwise stated, an uncertainty of $\pm 1$ in the last digit is always understood. ### Rules for determining significant figures There are specific rules for determining the number of significant digits. These are listed below: • All non-zero digits are significant. For example, at 285 cm there are three significant digits and at 0.25 mL there are two significant digits. • Zeros before the first non-zero digit are not significant. This zero indicates the position of the decimal point. Therefore 0.03 has one significant digit and 0.0052 has two significant digits. • Zeros between two non-zero digits are significant. Therefore, 2.005 has four significant digits. • Zeros appear at the end or to the right of a number significant as long as they are to the right of the decimal point. For example, 200g has three significant digits. But, otherwise, trailing zeros are not significant if there is no decimal point. For example, 100 has only one significant digit, but 100. has three significant digits and 100.0 has four significant digits. Such numbers are better presented in scientific notation. We can express the number 100 as $1\times 10^2$ for one significant figure, $1.0\times 10^2$ for two significant, and $1.00\times 10^2$ for three significant figures. • Counting the number of objects, for example, 2 balls or 20 toffees, has infinite significant digits because they are exact numbers that can be represented by writing an infinite number of zeros after setting a decimal i.e., 2 = 2.000000… or 20 = 20.000000… For numbers in scientific notation, all digits are significant, e.g $4.01 \times 10^2$ has three significant digits, and $8.256 \times 10^{-3}$ has four significant digits. However, one always wants the results to be precise and accurate, precision and precision are often mentioned when we talk about measurements. ### Precision and accuracy Precision refers to the closeness of multiple measurements for the same quantity. Accuracy is the agreement of a given value with the true value of the result. Example: The true value of a result is 2.00g and student “A” takes two measurements and reports the results as 1.95g and 1.93g. These values ​​are accurate as they are close, but not exact. Another student “B” repeats the experiment and gets 1.94g and 2.05g as the result of two measurements. These observations are neither precise nor exact. If the third student “C” repeats these measurements and reports 2.01g and 1.99g as the result, these values ​​are precise and accurate. ### Addition and subtraction of significant figures In addition to significant figures, the result cannot have more digits to the right of the decimal point than any of the original numbers $$\begin{array}12.11\\18.0\\1.012\\\hline{31.122}\end{array}$$ Here 18.0 has only one decimal place and the result only has to be specified up to one decimal place, i.e. 31.1 ### Multiplication and division of significant figures These operations require the result to be given with no more significant digits than the measurement with fewer significant digits. 5×1.25 = 3.125, Since 2.5 has two significant digits, the result cannot have more than two significant digits therefore 3.1, Although the result is constrained to the required number of significant digits, as in the previous mathematical operation, the following points must be considered rounding Numbers. • If the rightmost digit to be omitted is more than 5, the last number is increased by one. For example 1.386. If we have to remove 6, we have to round it to 1.39. • If the rightmost digit to remove is less than that 5, the previous number does not change. For example 4.334, if 4 is to be removed then the result is rounded 4.33. • If the rightmost digit to be omitted is 5, then the last number is not changed if it is an even number but increased by one if it is an odd number. For example, if we want to round 6.35 by removing 5, we need to increase 3 to 4, which is 6.4 the result. However, if 6.25 is to be rounded, it is rounded to 6.2. ### Dimensional Analysis When calculating, it is often necessary to convert units from one system to another. The method used to do this is called the factor label method or the unit factor method or dimensional analysis. This is shown below. Stay tuned with Laws Of Nature for more useful and interesting content. YesNo Knowledge Increases By Sharing...
1,994
8,404
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.15625
4
CC-MAIN-2024-22
latest
en
0.931411
http://mathhelpforum.com/advanced-statistics/138299-constructing-confidence-interval.html
1,481,319,824,000,000,000
text/html
crawl-data/CC-MAIN-2016-50/segments/1480698542828.27/warc/CC-MAIN-20161202170902-00440-ip-10-31-129-80.ec2.internal.warc.gz
170,283,928
9,916
# Thread: constructing a confidence interval 1. ## constructing a confidence interval among 500 marriage license applications chosen at random, there were 48 in which the woman was at least 1 year older than the man, and among 400 marriage license applications chosen at random 6 years later, there were 68 in which the woman was at least 1 year older than the man. Construct a 99% confidence interval for the difference between the corresponding true proportions of marriage license applications in which the woman was at least 1 year older than the man. Could use some assistance on this. Thank you for anyone who can help me. 2. $(.096 -.17)\pm z_{.005}\sqrt{ {(.096)(1-.096)\over 500}+ {(.17)(1-.17)\over 400}}$ where $z_{.005}=2.5776$ from http://bayes.bgsu.edu/nsf_web/jscrip...ormal_icdf.htm
204
803
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 2, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.921875
3
CC-MAIN-2016-50
longest
en
0.941243
https://quiz.syskool.com/2012/09/science-quiz-questions-along-with.html
1,686,245,926,000,000,000
text/html
crawl-data/CC-MAIN-2023-23/segments/1685224655092.36/warc/CC-MAIN-20230608172023-20230608202023-00161.warc.gz
538,712,454
29,699
# Science Quiz - Questions Along with Answers 1. Elasticity of various materials is controlled by its (a) Ultimate tensile stress (b) Proof stress (c) Stress at yield point (d) Stress at elastic limit 2. Ratio of direct stress to volumetric strain in case of a body subjected to three mutually perpendicular stress of equal intensity, is (a) Young’s modulus (b) Bulk modulus (c) Modulus of rigidity (d) None of the above 3. Moment diagram for a cantilever beam carrying linearly varying load from zero at free end to maximum at supported end will be (a) Rectangle (b) Triangle (c) Parabola (d) Cubic parabola 4. A large cylindrical vessel was sealed in summer. What is likely to happen to it in winter (a) Nothing (b) Explode (c) Buckle and collapse (d) Become lighter 5. In thick cylinders, the stress can be uniformly distributed over the thickness by the method of pre-stressing as (a) Self-hooping (b) Constructing laminated cylinders (c) Shrinking hollow cylinder over main cylinder (d) Any one of the above 6. Ratio if lateral strain to linear strain elastic limit, is known as (a) Young’s modulus (b) Bulk modulus (c) Modulus of rigidity (d) Poisson’s ratio 7. Maximum shear stress in Mohr’s circle is equal to (b) Diameter of circle (c) Centre of circle from y-axis (d) Chord of circle 8. In cantilever, irrespective of the type of loading, maximum bending moment and maximum shear force occur at (a) Free end (c) Fixed end (d) Middle 9. If a material expands freely due to heating it will develop (a) Thermal stresses (b) Tensile stress (c) No stress (d) Bending 10. Poisson’s ratio is defined as the ratio of (a) Longitudinal stress and longitudinal strain (b) Longitudinal stress and lateral stress (c) Lateral stress and longitudinal stress (d) Lateral stress and lateral strain 11. Change in the unit volume of a material under tension with increase in its Poisson’s ratio will (a) Increase (b) Decrease (c) Remain same (d) Unpredictable 12. In the tensile test, the phenomenon of slow extension of the material i.e. stress increasing with the time at a constant load is called (a) Creeping (b) Yielding (c) Breaking (d) Plasticity 13. For steel, the ultimate strength in shear as comapred to in tension is nearly (a) Same (b) Half (c) One-third (d) Two-third 14. Value of Poisson’s ratio for steel is between (a) 0.01 to 01 (b) 0.23 to 0.27 (c) 0.25 to 0.33 (d) 0.4 to 0.6 15. Percentage reduction in the area of a cast iron specimen during tensile test would be of the order of (a) More than 50% (b) 25-50% (c) 10-25% (d) Negligible 16. In a tensile test, near the elastic limit zone (a) Tensile strain increases more quickly (b) Tensile strain decreases more quickly (c) Tensile strain increases in proportion to the stress (d) Tensile strain decreases in proportion to the stress 17. The property of a material by virtue of which it can be beaten or rolled into plates is called (a) Malleability (b) Ductility (c) Plasticity (d) Elasticity 18. In the buckling load for a given material depends on (a) Slenderness ratio and area of cross-section (b) Poisson’s ratio and modulus of elasticity (c) Slenderness ratio and modulus of elasticity (d) Slendemess ratio, area of cross-section and modulus of elasticity 19. The stress developed in a material at breaking point in extension is called (a) Breaking stress (b) Fracture stress (c) Yield point stress (d) Ultimate tensile stress 20. In a tensile test on mild steel specimen, the breaking stress as compared to ultimate tensile stress is (a) More (b) Less (c) Same (d) More/less depending on composition 21. Two beams have same depth but one beam has double the width of the other. The elastic strength of double width beam compared to other beam will be (a) Same (b) Half (c) Double (d) One-fourth 22. When a rectangular beam is loaded longitudinally, shear develops on (a) Top fibre (b) Middle fibre (c) Bottom fibre (d) Every horizontal plane 23. For a cantilever beam of uniform width in plan and loaded by a concentrated load at the end, profile of the shape of the beam in elevation, in  order that beam is of uniform strength, should be (a) Uniform depth (b) Triangular (c) Parabola (d) Cubic parabola 24. Poisson ’s ratio determined by taking reading when load is applied gradually compared to that taken with load applied at a faster rate would be (a) Same (b) Different (c) More or less same (d) Depends on other factors
1,189
4,422
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2023-23
latest
en
0.720344
https://xianblog.wordpress.com/2017/01/09/empirical-bayes-reference-priors-entropy-em/
1,679,304,893,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296943471.24/warc/CC-MAIN-20230320083513-20230320113513-00487.warc.gz
1,212,224,101
18,897
## empirical Bayes, reference priors, entropy & EM Klebanov and co-authors from Berlin arXived this paper a few weeks ago and it took me a quiet evening in Darjeeling to read it. It starts with the premises that led Robbins to introduce empirical Bayes in 1956 (although the paper does not appear in the references), where repeated experiments with different parameters are run. Except that it turns non-parametric in estimating the prior. And to avoid resorting to the non-parametric MLE, which is the empirical distribution, it adds a smoothness penalty function to the picture. (Warning: I am not a big fan of non-parametric MLE!) The idea seems to have been Good’s, who acknowledged using the entropy as penalty is missing in terms of reparameterisation invariance. Hence the authors suggest instead to use as penalty function on the prior a joint relative entropy on both the parameter and the prior, which amounts to the average of the Kullback-Leibler divergence between the sampling distribution and the predictive based on the prior. Which is then independent of the parameterisation. And of the dominating measure. This is the only tangible connection with reference priors found in the paper. The authors then introduce a non-parametric EM algorithm, where the unknown prior becomes the “parameter” and the M step means optimising an entropy in terms of this prior. With an infinite amount of data, the true prior (meaning the overall distribution of the genuine parameters in this repeated experiment framework) is a fixed point of the algorithm. However, it seems that the only way it can be implemented is via discretisation of the parameter space, which opens a whole Pandora box of issues, from discretisation size to dimensionality problems. And to motivating the approach by regularisation arguments, since the final product remains an atomic distribution. While the alternative of estimating the marginal density of the data by kernels and then aiming at the closest entropy prior is discussed, I find it surprising that the paper does not consider the rather natural of setting a prior on the prior, e.g. via Dirichlet processes. ### One Response to “empirical Bayes, reference priors, entropy & EM” 1. […] empirical Bayes, reference priors, entropy & EM […] This site uses Akismet to reduce spam. Learn how your comment data is processed.
486
2,365
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.609375
3
CC-MAIN-2023-14
latest
en
0.895934
https://kunduz.com/physics/rotation/questions/
1,674,769,108,000,000,000
text/html
crawl-data/CC-MAIN-2023-06/segments/1674764494826.88/warc/CC-MAIN-20230126210844-20230127000844-00020.warc.gz
367,934,947
34,893
Physics Rotation A net torque applied to an object causes a linear acceleration of the object the object to rotate at a constant rate the moment of inertia of the object to change the angular velocity of the object to change Physics Rotation produces more torque: applying the force at an angle of 45° on a wrench that is 0.25 m long or applying the force at an angle of 120° on a wrench that is 0.15 m long? Physics Rotation A child attempts to use a wrench to remove a nut on a bicycle. Removing the nut requires a torque of 20 Nm. The maximum force the child can exert at 80° to the wrench is 40 N. What length of wrench will be needed? A. 0.1 m B. 0.05 m C. 0.2 m D. 0.5 m Physics Rotation A constant torque of 84 N-m applied to a 0.70-kg solid homogeneous disk causes it to rotate about a vertical axis passing through its center, as shown. The diameter of the disk is 4 meters. Find the angular acceleration produced by the torque. Physics Rotation 57. (II) A person of mass 75 kg stands at the center of a rotating merry-go-round platform of radius 3.0 m and moment of inertia 820 kg m². The platform rotates without friction with angular velocity 0.95 rad/s. The person walks radially to the edge of the platform. (a) Calculate the angular velocity when the person reaches the edge. (b) Calculate the rotational kinetic energy of the system of platform plus person before and after the person's walk. Physics Rotation 22. A solid ball of mass 1.0 kg and radius 10 cm rolls with a forward speed of 10 m/s when it comes to a hill. There is enough friction on the hill to keep the ball from slipping as it rolls up. (a) How high vertically up the hill can the ball roll before coming to rest? (b) How high vertically could the ball go if the hill were totally frictionless? (c) How is it that the ball can go higher with friction than without friction? Physics Rotation Two flywheels of negligible mass and different radii are bonded together and rotate about a common axis (see below). The smaller flywheel of radius 30 cm has a cord that has a pulling force of 50 N on it. What pulling force needs to be applied to the cord connecting the larger flywheel of a radius of 50 cm such that the combination does not rotate? F = ? Round your answer to 2 decimal places. Physics Rotation 6. A force of 75 N is applied to a wrench in a counterclockwise direction at 60 to the handle, 12 cm from the centre of a bolt. a) Calculate the magnitude of the torque? b) In what direction does the bolt move? Can you please explain part b) in detail? Is the direction counterclockwise or anticlockwise? Physics Rotation 21. A hoop with a mass of 2.75 kg is rolling without slipping along a horizontal surface with a speed of 4.5 m/s when it starts down a ramp that makes an angle of 25° below the horizontal. What is the rotational kinetic energy of the hoop after it has rolled 3.0 m down as measured along the surface of the ramp? O 62 J O 34 J O This question cannot be answered without knowing the radius of the hoop. O 45 J O 22 J Physics Rotation A straight rod of length 'a' is made of an unusual material having mass per unit length u(x)=2x, where is measured from the centre of the rod. The moment of inertia about an axis perpendicular to the rod and passing through one end of the rod is given by (a)λa4/16 (b)3λa4/16 (c)λa4/32 (d)3λa4/32 Physics Rotation An 85.5 kg astronaut is training for accelerations that he will experience upon reentry. He is placed in a centrifuge (r = 12.0 m) and spun at a constant angular velocity of 18.4 rpm. Answer the following: (a) What is the angular velocity of the centrifuge in rad / s? (b) What is the linear velocity of the astronaut at the outer edge of the centrifuge? (c) What is the centripetal acceleration of the astronaut at the end of the centrifuge? (d) How many g's does the astronaut experience? (e) What is the centripetal force experienced by the astronaut? Physics Rotation The energy E of a rotating object varies directly as the product of its angular mass I and angular velocity w, and inversely as the square of its radius r. The energy E is 100 J for a angular mass of 2kg m^2, radius 0.5m and angular velocity 10 rad per second. Find the energy for the angular mass 1 kgm^2, radius 0.3 m and angular velocity 5 rad per second. Physics Rotation The period of the mathematical pendulum for a small amplitude (use formula for T0) is 3 seconds on Earth. What is the period of this pendulum (the same length) on the Moon? The acceleration due to gravity on the Moon is 1.6 m/s^2 Physics Rotation An athlete whirls a 7.17 kg hammer tied to the end of a 1.4 m chain in a simple horizontal circle where you should ignore any vertical deviations. The hammer moves at the rate of 1.26 rev/s. What is the centripetal acceleration of the hammer? Assume his arm length is included in the length given for the chain. Answer in units of m/s². Physics Rotation Human centrifuges are used to train military pilots and astronauts in preparation for high-g maneuvers. A trained, fit person wearing a g-suit can withstand accelerations up to about 9g (88.2 m/s2) without losing consciousness. (a) If a human centrifuge has a radius of 3.77 m, what angular speed (in rad/s) results in a centripetal acceleration of 9g? rad/s (b) What linear speed (in m/s) would a person in the centrifuge have at this acceleration? m/s Physics Rotation Learning Goal: To understand the meaning of the variables that appear in the equations for rotational kinematics with constant angular acceleration. Rotational motion with a constant nonzero acceleration is not uncommon in the world around us. For instance, many machines have spinning parts. When the machine is turned on or off, the spinning parts tend to change the rate of their rotation with virtually constant angular acceleration. Many introductory problems in rotational kinematics involve motion of a particle with constant nonzero angular acceleration. The kinematic equations for such motion can be written as θ = θo+wot+1/2at² and w=wo + at Here, the meaning of the symbols is as follows: θ is the angular position of the particle at time t. . θo is the initial angular position of the particle. w is the angular velocity of the particle at time t. wo is the initial angular velocity of the particle α is the angular acceleration of the particle Part C True or false: The quantity represented by wo is a function of time (i.e., is not constant). true false Part D True or false: The quantity represented by w is a function of time (i.e., is not constant). true false
1,603
6,555
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.75
4
CC-MAIN-2023-06
latest
en
0.889317
https://nrich.maths.org/public/leg.php?code=31&cl=3&cldcmpid=5827
1,568,933,848,000,000,000
text/html
crawl-data/CC-MAIN-2019-39/segments/1568514573759.32/warc/CC-MAIN-20190919224954-20190920010954-00043.warc.gz
584,594,250
9,467
# Search by Topic #### Resources tagged with Addition & subtraction similar to 9 Weights: Filter by: Content type: Age range: Challenge level: ### Football Sum ##### Age 11 to 14 Challenge Level: Find the values of the nine letters in the sum: FOOT + BALL = GAME ### Have You Got It? ##### Age 11 to 14 Challenge Level: Can you explain the strategy for winning this game with any target? ### Cayley ##### Age 11 to 14 Challenge Level: The letters in the following addition sum represent the digits 1 ... 9. If A=3 and D=2, what number is represented by "CAYLEY"? ### Got it for Two ##### Age 7 to 14 Challenge Level: Got It game for an adult and child. How can you play so that you know you will always win? ##### Age 11 to 14 Challenge Level: If you take a three by three square on a 1-10 addition square and multiply the diagonally opposite numbers together, what is the difference between these products. Why? ### Consecutive Negative Numbers ##### Age 11 to 14 Challenge Level: Do you notice anything about the solutions when you add and/or subtract consecutive negative numbers? ### Weights ##### Age 11 to 14 Challenge Level: Different combinations of the weights available allow you to make different totals. Which totals can you make? ### Pole Star Sudoku 2 ##### Age 11 to 16 Challenge Level: This Sudoku, based on differences. Using the one clue number can you find the solution? ### Making Maths: Double-sided Magic Square ##### Age 7 to 14 Challenge Level: Make your own double-sided magic square. But can you complete both sides once you've made the pieces? ### Two and Two ##### Age 11 to 14 Challenge Level: How many solutions can you find to this sum? Each of the different letters stands for a different number. ### Number Daisy ##### Age 11 to 14 Challenge Level: Can you find six numbers to go in the Daisy from which you can make all the numbers from 1 to a number bigger than 25? ### Aba ##### Age 11 to 14 Challenge Level: In the following sum the letters A, B, C, D, E and F stand for six distinct digits. Find all the ways of replacing the letters with digits so that the arithmetic is correct. ### Number Pyramids ##### Age 11 to 14 Challenge Level: Try entering different sets of numbers in the number pyramids. How does the total at the top change? ### Always the Same ##### Age 11 to 14 Challenge Level: Arrange the numbers 1 to 16 into a 4 by 4 array. Choose a number. Cross out the numbers on the same row and column. Repeat this process. Add up you four numbers. Why do they always add up to 34? ### Tis Unique ##### Age 11 to 14 Challenge Level: This addition sum uses all ten digits 0, 1, 2...9 exactly once. Find the sum and show that the one you give is the only possibility. ### Pair Sums ##### Age 11 to 14 Challenge Level: Five numbers added together in pairs produce: 0, 2, 4, 4, 6, 8, 9, 11, 13, 15 What are the five numbers? ### Eleven ##### Age 11 to 14 Challenge Level: Replace each letter with a digit to make this addition correct. ### Top-heavy Pyramids ##### Age 11 to 14 Challenge Level: Use the numbers in the box below to make the base of a top-heavy pyramid whose top number is 200. ### Pyramids ##### Age 11 to 14 Challenge Level: What are the missing numbers in the pyramids? ### Clocked ##### Age 11 to 14 Challenge Level: Is it possible to rearrange the numbers 1,2......12 around a clock face in such a way that every two numbers in adjacent positions differ by any of 3, 4 or 5 hours? ### Calendar Capers ##### Age 11 to 14 Challenge Level: Choose any three by three square of dates on a calendar page... ### Crossed Ends ##### Age 11 to 14 Challenge Level: Crosses can be drawn on number grids of various sizes. What do you notice when you add opposite ends? ### Got it Article ##### Age 7 to 14 This article gives you a few ideas for understanding the Got It! game and how you might find a winning strategy. ### Chameleons ##### Age 11 to 14 Challenge Level: Whenever two chameleons of different colours meet they change colour to the third colour. Describe the shortest sequence of meetings in which all the chameleons change to green if you start with 12. . . . ### Countdown ##### Age 7 to 14 Challenge Level: Here is a chance to play a version of the classic Countdown Game. ### More Children and Plants ##### Age 7 to 14 Challenge Level: This challenge extends the Plants investigation so now four or more children are involved. ### More Plant Spaces ##### Age 7 to 14 Challenge Level: This challenging activity involves finding different ways to distribute fifteen items among four sets, when the sets must include three, four, five and six items. ### Card Trick 2 ##### Age 11 to 14 Challenge Level: Can you explain how this card trick works? ### Cunning Card Trick ##### Age 11 to 14 Challenge Level: Delight your friends with this cunning trick! Can you explain how it works? ### Constellation Sudoku ##### Age 14 to 18 Challenge Level: Special clue numbers related to the difference between numbers in two adjacent cells and values of the stars in the "constellation" make this a doubly interesting problem. ### Magic Squares for Special Occasions ##### Age 11 to 16 This article explains how to make your own magic square to mark a special occasion with the special date of your choice on the top line. ### Arrange the Digits ##### Age 11 to 14 Challenge Level: Can you arrange the digits 1,2,3,4,5,6,7,8,9 into three 3-digit numbers such that their total is close to 1500? ### Nice or Nasty for Two ##### Age 7 to 14 Challenge Level: Some Games That May Be Nice or Nasty for an adult and child. Use your knowledge of place value to beat your opponent. ### Subtraction Surprise ##### Age 7 to 14 Challenge Level: Try out some calculations. Are you surprised by the results? ### Cubes Within Cubes ##### Age 7 to 14 Challenge Level: We start with one yellow cube and build around it to make a 3x3x3 cube with red cubes. Then we build around that red cube with blue cubes and so on. How many cubes of each colour have we used? ### Digit Sum ##### Age 11 to 14 Challenge Level: What is the sum of all the digits in all the integers from one to one million? ### Alphabet Soup ##### Age 11 to 14 Challenge Level: This challenge is to make up YOUR OWN alphanumeric. Each letter represents a digit and where the same letter appears more than once it must represent the same digit each time. ### Postage ##### Age 14 to 16 Challenge Level: The country Sixtania prints postage stamps with only three values 6 lucres, 10 lucres and 15 lucres (where the currency is in lucres).Which values cannot be made up with combinations of these postage. . . . ### Making Sense of Positives and Negatives ##### Age 11 to 14 This article suggests some ways of making sense of calculations involving positive and negative numbers. ### Adding and Subtracting Positive and Negative Numbers ##### Age 11 to 14 How can we help students make sense of addition and subtraction of negative numbers? ### The Patent Solution ##### Age 11 to 14 Challenge Level: A combination mechanism for a safe comprises thirty-two tumblers numbered from one to thirty-two in such a way that the numbers in each wheel total 132... Could you open the safe? ### Countdown Fractions ##### Age 11 to 16 Challenge Level: Here is a chance to play a fractions version of the classic Countdown Game. ### First Connect Three ##### Age 7 to 14 Challenge Level: Add or subtract the two numbers on the spinners and try to complete a row of three. Are there some numbers that are good to aim for? ### Score ##### Age 11 to 14 Challenge Level: There are exactly 3 ways to add 4 odd numbers to get 10. Find all the ways of adding 8 odd numbers to get 20. To be sure of getting all the solutions you will need to be systematic. What about. . . . ### Like Powers ##### Age 11 to 14 Challenge Level: Investigate $1^n + 19^n + 20^n + 51^n + 57^n + 80^n + 82^n$ and $2^n + 12^n + 31^n + 40^n + 69^n + 71^n + 85^n$ for different values of n. ### As Easy as 1,2,3 ##### Age 11 to 14 Challenge Level: When I type a sequence of letters my calculator gives the product of all the numbers in the corresponding memories. What numbers should I store so that when I type 'ONE' it returns 1, and when I type. . . . ### And So on and So On ##### Age 11 to 14 Challenge Level: If you wrote all the possible four digit numbers made by using each of the digits 2, 4, 5, 7 once, what would they add up to? ### Magic Squares ##### Age 14 to 18 An account of some magic squares and their properties and and how to construct them for yourself. ### Kids ##### Age 11 to 14 Challenge Level: Find the numbers in this sum
2,110
8,749
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.96875
4
CC-MAIN-2019-39
latest
en
0.851641
http://www.coderanch.com/t/541247/java/java/List-contiguous-numbers
1,467,148,240,000,000,000
text/html
crawl-data/CC-MAIN-2016-26/segments/1466783397111.67/warc/CC-MAIN-20160624154957-00116-ip-10-164-35-72.ec2.internal.warc.gz
460,368,249
10,524
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum! # List of contiguous numbers Pankaj Kumarkk Ranch Hand Posts: 112 Hi, I am trying to solve a problem and am not able to find out how to approach this. If anybody can give any pointers then it will be helpful. Problem: You have a list of n numbers and from this list find combination of a contiguous set which has largest sum e.g list 1,2,3 answer: 1,2,3 (as sum of 1,2,3 is 6 which is largest possible for a set of contiguous numbers) list 1,5,-10,2,5 answer: 2,5 (as 7 is largest sum possible for a set of contiguous numbers) fred rosenberger lowercase baba Bartender Posts: 12124 30 to paraphrase my friend Campbell... 1) Get a pencil, some paper, and most importantly, a large eraser 2) Write down on the paper how YOU would solve the problem if you had to do it by hand. 3) revise it until it is crystal clear to anyone who reads it what the steps should be. Don't even THINK about writing Java code until you have completed the above steps. To be more specific, how do you KNOW that 2,5 is the largest possible sum of contiguous number? I don't believe it is. Prove it to me. Andrey Kozhanov Ranch Hand Posts: 79 1. If all numbers in your list are positive, then larger sum will have the whole list; 2. If all numbers in your list are negative, then larger sum will be maximum element in the list; 3. If there are as positive as negative numbers in the list. Denote positive numbers as P, and negative numbers as N. Then our list will look like that (in terms of java regular expressions): [PN]{n}, where 'n' is length of the list (list 1,2,3 = PPP; list 1,5,-10,2,5 = PPNPP). This notation shows, that the whole list is divided into groups of interchanging positive and negative numbers. Note that largest sum could be as single positive group, as sequence of positive-negative-positive groups. For example list 8,9,-2,3 (PPNP) - largest sum has the whole list. Let's 'roll up' our list by writing in the new list sums of numbers in positive and negative groups. For list 1,5,-10,2,5 it will be 6,-10,7 (PPNPP -> PNP). Note, that as we are searching for largest contiguous sum, we may not consider (i.e. just eliminate from list) negative numbers in the beginning and in the end of the list, if any, because adding them to the whole sum could only decrease it. So for list -1,2,3,-4,-5,1,4,-9 new list will be 5,-9,5. New list always starts with positive number and ends with positive number. Let's write new list like this: PN PN ... PN P. Sum every PN pair and write this sum and last P number to the new list. Continue 'rolling up' the list until you have single positive number. This number will be your larges sum. And if you now 'unroll' this number back to the list, you will have your contiguous set with largest sum. Examples: 1. [1,5],[-10],[2,5]; Roll up (PPNPP -> PNP): [6, -10], 7; (PN P list) Roll up: -4, 7. Remove -4 from the beginning of the list, recieving single number 7 - our desired sum. Unrolling: 7 is 2 + 5 => our largest set is [2,5] 2. [8,9],[-2],[3]; Roll up (PPNP -> PNP): [17, -2], [3]; Roll up: 15, 3; Roll up: 18; So sum is 18, unrolling it back: 18 = 15 + 3 = (17 - 2) + 3 = ((8 + 9) - 2) + 3 => our largest sum is the whole list. 3. [3],[-2,-5],[2],[-10],[10,7],[-4,-3],[6,5],[-8],[9]; Roll up (PNNPNPPNNPPNP -> PNPNPNPNP): [3,-7],[2,-10],[17,-7],[11,-8],[9]; Roll up: -4,-8,10,3,9; Removing negative numbers from the beginning of the list - 10,3,9 Roll up: 22 is our desired sum; Unrolling: 22 = 10 + 3 + 9 = (17 - 7) + (11 - 8) + 9 = ((10 + 7) - ((-4) + (-3))) + ((6 + 5) - 8) + 9; largest set is 10,7,-4,-3,6,5,-8,9 4. 8,-5,4,3,4,-5,-5,4,6,-3; Roll up: 8,-5,11,-10,10,-3. Removing -3 from the end of the list and rolling up again. Roll up: 3,1,10. Our desired sum is 14, unrolling: 14 = 3 + 1 + 10 = (8 - 5) + (11 - 10) + 10 = (8 - 5) + ((4 + 3 + 4) - ((-5) + (-5))) + (4 + 6); largest set is 8,-5,4,3,4,-5,-5,4,6; Pankaj Kumarkk Ranch Hand Posts: 112 Hi Andrey Kozhanov, Thanks for the great algorithm. Really interesting and creative way to approach the problem. I would also like to learn "how to create a algorithm" for problems. Would you suggest any book or resources which will help me get better at tacking problems and coming up with good algorithms. These days I am going to through "Introduction to Algorithms 2nd ed - T. Cormen, C. Leiserson, R. Rivest, C. Stein" for same. Is there any other thing you would suggest. Thanks, Satish Andrey Kozhanov Ranch Hand Posts: 79 Satish Kumarkk wrote:Would you suggest any book or resources which will help me get better at tacking problems and coming up with good algorithms Well, the only book devoted to algorithms i know is 'The art of computer programming' by Donald Knuth. And when i could not find any suitable algorithm i just create my own using logic and common sence.
1,500
4,867
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.796875
4
CC-MAIN-2016-26
latest
en
0.924236
https://www.slideserve.com/Lucy/basic-flow-measurement
1,534,437,760,000,000,000
text/html
crawl-data/CC-MAIN-2018-34/segments/1534221211126.22/warc/CC-MAIN-20180816152341-20180816172341-00581.warc.gz
980,041,931
20,753
Basic Flow Measurement 1 / 50 # Basic Flow Measurement - PowerPoint PPT Presentation Basic Flow Measurement. Contents. Introduction Types of Flows Basic Requirements for Flow Measurement Definition of Quantities to be Measured Types of Measurement Types of Flow Meters Selection of Flow Meters Flow Measurement Information Questions &amp; Answers. Introduction. I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described. ## PowerPoint Slideshow about 'Basic Flow Measurement' - Lucy Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - Presentation Transcript Contents • Introduction • Types of Flows • Basic Requirements for Flow Measurement • Definition of Quantities to be Measured • Types of Measurement • Types of Flow Meters • Selection of Flow Meters • Flow Measurement Information Introduction Since 1989 there were at least 23 distinct type of technologies available for the measurement of flow in closed conduit. Flow meters selection are part of the basic art of the instrument engineer, and while only handful of these technologies contribute to the majority of installations. And wide product knowledge is essential to find the most cost effective solution to any flow measurement application. Types of FlowsReynolds Number The performance of flowmeters is also influenced by a dimensionless unit called the Reynolds Number. It is defined as the ratio of the liquid's inertial forces to its drag forces. The Reynolds number is used for determined whether a flow is laminar or turbulent. Laminar flow within pipes will occur when the Reynolds number is below the critical Reynolds number of 2300 and turbulent flow when it is above 2300. The value of 2300 has been determined experimentally and a certain range around this value is considered the transition region between laminar and turbulent flow. Or ѵs = Mean Fluid Velocity, η - (Absolute) Dynamic fluid Viscosity v = Kinematics Fluid Viscosity (ν = η/ρ) ρ = Fluid Density L = Characteristic Length (Equal to diameter, 2r if a Cross Section is Circular) Basic Requirements for Flow Measurement • Ability to Calibrate • Ability to Integrate Flow Fluctuation • Easy Integration with Piping System • High Accuracy • High Turn-Down Ratio • Low Cost • Low Sensitivity to Dirt Particles • Low Pressure Loss • No Moving Parts • Resistant to Corrosion and Erosion Definition of Quantities to be measuredVolume Flow Rate The definition of volume flow rate is the volume of fluid that flows past a given cross sectional area per second. Therefore, V = Aѵ V = Volume Flow Rate A = Cross Section Area Ѵ = Velocity of Fluid Standard SI Unit is m3/hr Other Common Units :1L/s = 103 cm3/s = 10-3 m3/s1gal/s = 3.788 L/s = 0.003788 m3/s1cf/min = 4.719x10-4 m3/s Definition of Quantities to be MeasuredMass Flow Rate The definition of mass flow rate is the number of kilograms of mass flow that flows past a given cross sectional area per second. Therefore, m = ρV = ρAѵ m = Mass Flow Rate ρ = Specific Density V = Volume Flow Rate A = Cross Section Area Ѵ = Velocity of Fluid Standard SI Unit is kg/hr Types of MeasurementDirect Rate Measurement Required large device if the volume rates are high. And in case a smaller device is used then the measured values will not be accurate. Fluctuations in the measuring values due to the opening/closing of valves during start/stop of the measurements. Devices that measure the volume/mass of the fluid and the timing may not be concurrent. Type of MeasurementIndirect Rate Measurement For many practical applications, indirect measuring techniques are employed using various kind of principles. Here are some of the basic working principles: Differential Pressure Force on Bodies in the Flow Heat Transfer Corriolis Force Magneto-Inductive Frequency of Vortices Ultrasonic Type of Flowmeters Correlation Method Corriolis Elbow Tap “Elbow Meter” Electro-Magnetic Flow Nozzles Flow Tube Nutating Disk Orifices Oval Gear Pitot Tube Positive Mass Reciprocating Piston Rotary Vane Swirl Target Thermal Dispersion Turbine Ultrasonic Doppler Ultrasonic Transit Time Variable Area Venturi Tube Vortex Weir & Flume Basic Equation v = Fluid Velocity Q = Volume Flow Rate A = Cross Sectional Area of Pipe m = Mass Flow Rate k = Constant h = Differential Pressure p = Density of Fluid The (lateral) pressure exerted by an incompressible fluid varies inversely with the square of the speed of the fluid. Basic Equation A) Liquid Volumetric B) Gas Volumetric C) Liquid/Gas Mass QA = Flow (m3/hr) QB = Flow (Nm3/hr) at 0 0C & 1.013 bara QC = Flow (kg/hr) S = Specific Gravity (Air = 1) D = Density at actual conditions (kg/m3) A = Pipe Internal C.S.A (cm2) Tf = Actual Temperature (0C) Pf = Actual Pressure (bara) K = TORBAR Coefficient (See Table) The orifice, nozzle and venturi flow meters use the Bernoulli’s Equation to calculate the fluid flow rate by using the pressure difference between an obstruction in the flow. Type of FlowmetersBernoulli’s Equation For Pitot Tube: P + ½ρѵ2 + ρgh = Constant If no change in the elevation, ρgh = 0 = z And point 2 is stagnation point, i.e. ѵ2 = 0 P = Static Pressure ρ = Density of Fluid v = Velocity of Fluid g = Gravitational Acceleration (9.81m/s2) h = Height Type of FlowmetersThermal Mass Q = WCp (T2-T1) and therefore W = Q/Cp (T2-T1) Q = Heat Transfer W = Mass Flow Rate Cp = Specific Heat of Fluid T1 = Temperature Upstream T2 = Temperature Downstream Type of FlowmetersTurbine Working Principle Reluctance The coil is a permanent magnet and the turbine blades are made of a material attracted to magnets. As each blade passes the coil, a voltage is generated in the coil. Each pulse represents a discrete volume of liquid. The number of pulses per unit volume is called the meter's K-factor. Inductance A permanent magnet is embedded in the rotor, or the blades of the rotor are made of permanently magnetized material. As each blade passes the coil, it generates a voltage pulse. In some designs, only one blade is magnetic and the pulse represents a complete revolution of the rotor. Capacitive Capacitive sensors produce a sine wave by generating an RF signal that is amplitude-modulated by the movement of the rotor blades. Hall-Effect Hall-effect transistors also can be used. These transistors change their state when they are in the presence of a very low strength (on the order of 25 gauss) magnetic field. Type of FlowmetersElectromagnetic The operation of magnetic flow meters is based on Faraday's law of electromagnetic induction. Magflow meters can detect the flow of conductive fluids only. Early magflow meter designs required a minimum fluidic conductivity of 1-5 microsiemens per centimeter for their operation. The newer designs have reduced that requirement a hundredfold to between 0.05 and 0.1. E = BDV/C E = Induced Voltage B = Magnetic Field Strength D = Inner Diameter of Pipe V = Average Velocity C = Constant Type of FlowmetersElectromagnetic The magnetic flow meter’s coil can be powered by either alternating or direct current. In AC excitation, line voltage is applied to the magnetic coils and as a result, the flow signal (at constant flow) will also look like a sine wave. The amplitude of the wave is proportional to velocity. Addition to the flow signal, noise voltages can be induced in the electrode loop. Out-of-phase noise is easily filtered, but in-phase noise requires that the flow be stopped (with the pipe full) and the transmitter output set to zero. The main problem with ac magflow meter designs is that noise can vary with process conditions and frequent re-zeroing is required to maintain accuracy. And as for DC excitation designs, a low frequency (7-30 Hz) dc pulse is used to excite the magnetic coils. When the coils are pulsed on the transmitter reads both the flow and noise signals. In between pulses, the transmitter sees only the noise signal. Therefore, the noise can be continuously eliminated after each cycle. Type of FlowmetersElectromagnetic • Today, DC excitation is used in about 85% of installations while AC types claim the other 15% when justified by the following conditions: • When air is entrained in large quantities in the process stream. • When the process is slurry and the solid particle sizes are not uniform. • When the solid phase is not homogeneously mixed within the liquid. • When the flow is pulsating at a frequency under 15 Hz. Type of FlowmetersElectromagnetic E = Induced Voltage B = Magnetic Field Strength D = Inner Diameter of Pipe V = Average Velocity C = Constant E = BDV/C C is a constant to take care of the engineering proper units Type of FlowmetersCorriolis The principle of angular momentum can be best described by Newton’s 2nd Law of angular motion and the definitions using these following notations: Newton’s 2nd Law of angular motion states that γ = Iα and defines that H = Iω and since by definition I = mr2 Then γ = mr2α and then H = mr2ω Sinceα = ω/t then becomes γ = mr2 * ω/t and solving mass flow rate, m/t we get m/t = γ/r2ω also divide H = mr2ω by t then H/t = m/t * r2ω H = Angular Momentum I = Moment of Inertia ω = Angular Velocity Y = Torque α = Angular Acceleration r = Torque of Gyration m = Mass t = Time Type of FlowmetersPositive Displacement Positive displacement meters provide high accuracy, ±0.1% of actual flow rate in some cases and good repeatability as high as 0.05% of reading. Accuracy is not affected by pulsating flow unless it entrains air or gas in the fluid. PD meters do not require a power supply for their operation and do not require straight upstream and downstream pipe runs for their installation. Typically, PD meters are available 1” up to 12” in size and can operate with turndowns as high as 100:1, although ranges of 15:1 or lower are much more common. Slippage in the flowmeter is reduced and metering accuracy is therefore increased as the viscosity of the process fluid increases. The process fluid must be clean. Particles greater than 100 microns in size must be removed by filtering. PD meters operate with small clearances between their precision-machined parts; wear rapidly destroys their accuracy. For this reason, PD meters are generally not recommended for measuring slurries or abrasive fluids. In clean fluid services, however, their precision and wide rangeability make them ideal for custody transfer and batch charging. They are most widely used as household water meters. Millions of such units are produced annually at a unit cost of less than US\$50. In industrial and petrochemical applications, PD meters are commonly used for batch charging of both liquids and gases. Type of FlowmetersVortex • Types of Working Principles • Vortex Shedding • Vortex Precession • Fluidic Oscillation (Coanda Effect) Type of FlowmetersVortex Vortex shedding frequency is directly proportional to the velocity of the fluid in the pipe and therefore to volumetric flow rate. The shedding frequency is independent of fluid properties such as density, viscosity, conductivity, etc., except that the flow must be turbulent for vortex shedding to occur. The relationship between vortex frequency and fluid velocity is: St = f (d/v) Q = AV = (AfdB)/St Q = fK St = Strouhal Number f = Vortex Shedding Frequency d = Width of the Bluff Body A = Cross Sectional Area V = Average Fluid Velocity B = Blockage Factor K = Meter Coefficient Type of FlowmetersVortex The value of the Strouhal number is determined experimentally, and is generally found to be constant over a wide range of Reynolds numbers. The Strouhal number represents the ratio of the interval between vortex shedding (l) and bluff body width (d), which is about six. The Strouhal number is a dimensionless calibration factor used to characterize various bluff bodies. If their Strouhal number is the same, then two different bluff bodies will perform and behave similarly. Type of FlowmetersVortex Shedding St = Strouhal Number f = Vortex Shedding Frequency d = Width of the Bluff Body A = Cross Sectional Area V = Average Fluid Velocity B = Blockage Factor K = Meter Coefficient Q = AV = (AfdB)/St Type of FlowmetersUltrasonic • Ultrasonic waves travel in the same manner as light or microwaves however being an • Elastic waves, they can propagates through any substance like solid, liquid and • gases. And by utilizing the properties of ultrasonic waves, clamp on flowmeters with • unique feature of being able to measure fluid flow in the pipe externally was • developed. • Generally, ultrasonic flowmeters works in 2 different kind of principles: • Doppler Effect Ultrasonic Flowmeter • The Doppler Effect Ultrasonic Flowmeter uses reflected ultrasonic sound to measure the fluid velocity. By measuring the frequency shift between the ultrasonic frequency source, the receiver and the fluid carrier. In this the relative motion are measured. The resulting frequency shift is named the ”Doppler Effect”. • Transit Time Difference Ultrasonic Flowmeter • With the Time of Flight Ultrasonic Flowmeter the time for the sound to travel between a transmitter and a receiver is measured. This method is not dependable on the particles in the fluid. Type of FlowmetersUltrasonic Upstream Sensor Kdt TL Vf = D Q θf Cf Cross Sectional Area Average Velocity on C.S.A Downstream Sensor τ/2 τ/2 T1 ҴD2 1 D ΔT 4 K sin2θf (T0 - Ҭ)2 T2 Q = x x x Average Velocity on Propagation Path Q = Flow Rate D = Inner Pipe Diameter K = Conversion Factor of Average Velocity Θf = Incident angle into liquid T1 & T2= Transit time T0 = Transit time between sensors when flow is at rest ≒ (T1+ T2 )/2 Ҭ = Transit time in pipe walls and sensors = ΔT = T2-T1 Note that ultrasonic waves are carried with the motion of fluid Flow Measurement Information
3,415
14,327
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.578125
3
CC-MAIN-2018-34
latest
en
0.86777
https://oeis.org/A187518
1,624,374,475,000,000,000
text/html
crawl-data/CC-MAIN-2021-25/segments/1623488517820.68/warc/CC-MAIN-20210622124548-20210622154548-00612.warc.gz
394,809,286
3,618
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!) A187518 Number of (n+1)X(n+1) 0..3 arrays with the array of 2X2 subblock determinants antisymmetric and no off-diagonal 2X2 subblock determinant zero 0 64, 450, 4200, 73764, 2048596, 129034386, 13881494364 (list; graph; refs; listen; history; text; internal format) OFFSET 1,1 COMMENTS Column 3 of A187521 LINKS EXAMPLE Some solutions for 4X4 ..0..0..1..0....0..1..0..1....2..2..2..3....3..2..3..3....2..2..3..2 ..2..2..2..1....0..3..3..2....2..2..1..0....3..2..1..3....2..2..1..2 ..2..3..3..3....1..1..1..1....1..2..1..3....1..2..1..1....0..2..1..1 ..1..1..0..0....0..3..2..2....0..3..0..0....3..0..1..1....2..3..2..2 CROSSREFS Sequence in context: A181210 A092211 A130812 * A221070 A297844 A233304 Adjacent sequences:  A187515 A187516 A187517 * A187519 A187520 A187521 KEYWORD nonn AUTHOR R. H. Hardin Mar 10 2011 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified June 22 10:56 EDT 2021. Contains 345375 sequences. (Running on oeis4.)
476
1,348
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.71875
3
CC-MAIN-2021-25
latest
en
0.623695
https://netlib.org/lapack/explore-html-3.3.1/da/dd2/dckcsd_8f.html
1,669,857,328,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446710777.20/warc/CC-MAIN-20221130225142-20221201015142-00823.warc.gz
445,805,914
5,229
LAPACK 3.3.1 Linear Algebra PACKage # dckcsd.f File Reference Go to the source code of this file. ## Functions/Subroutines INTEGER DCKCSD (NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH, MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK, WORK, RWORK, NIN, NOUT, INFO) subroutine DLACSG (M, P, Q, THETA, ISEED, X, LDX, WORK) ## Function Documentation INTEGER DCKCSD ( INTEGER NM, INTEGER,dimension( * ) MVAL, INTEGER,dimension( * ) PVAL, INTEGER,dimension( * ) QVAL, INTEGER NMATS, INTEGER,dimension( 4 ) ISEED, DOUBLE PRECISION THRESH, INTEGER MMAX, DOUBLE PRECISION,dimension( * ) X, DOUBLE PRECISION,dimension( * ) XF, DOUBLE PRECISION,dimension( * ) U1, DOUBLE PRECISION,dimension( * ) U2, DOUBLE PRECISION,dimension( * ) V1T, DOUBLE PRECISION,dimension( * ) V2T, DOUBLE PRECISION,dimension( * ) THETA, INTEGER,dimension( * ) IWORK, DOUBLE PRECISION,dimension( * ) WORK, DOUBLE PRECISION,dimension( * ) RWORK, INTEGER NIN, INTEGER NOUT, INTEGER INFO ) Definition at line 1 of file dckcsd.f. Here is the call graph for this function: Here is the caller graph for this function: subroutine DLACSG ( INTEGER M, INTEGER P, INTEGER Q, DOUBLE PRECISION,dimension( * ) THETA, INTEGER,dimension( 4 ) ISEED, DOUBLE PRECISION,dimension( ldx, * ) X, INTEGER LDX, DOUBLE PRECISION,dimension( * ) WORK ) Definition at line 242 of file dckcsd.f. Here is the call graph for this function: Here is the caller graph for this function:
441
1,425
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.5625
3
CC-MAIN-2022-49
latest
en
0.521768
https://www.crackap.com/ap/physics-1/question-290-answer-and-explanation.html
1,611,183,995,000,000,000
text/html
crawl-data/CC-MAIN-2021-04/segments/1610703522133.33/warc/CC-MAIN-20210120213234-20210121003234-00324.warc.gz
753,497,709
3,731
# AP Physics 1 Question 290: Answer and Explanation ### Test Information Question: 290 8. As a pendulum swings back and forth, it is affected by two forces: gravity and tension in the string. Splitting gravity into component vectors, as shown above, produces mg sinθ (the restoring force) and mg cosθ. Which of the following correctly describes the relationship between the magnitudes of tension in the string and mg cosθ? • A. Tension > mg cosθ • B. Tension = mg cosθ • C. Tension < mg cosθ • D. The relationship depends on the position of the ball.
138
554
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2021-04
latest
en
0.843603
https://www.abcteach.com/directory/subjects-math-multiplication-652-7-0
1,495,494,392,000,000,000
text/html
crawl-data/CC-MAIN-2017-22/segments/1495463607242.32/warc/CC-MAIN-20170522230356-20170523010356-00411.warc.gz
834,769,551
73,206
You are an abcteach Member, but you are logged in to the Free Site. To access all member features, log into the Member Site. # Multiplication FILTER THIS CATEGORY: = Preview Document = Member Site Document • Math worksheet. Students use the grid to calculate the product. • This activity combines spatial patterning skills with multiplication facts. • A set of three color illustrated posters of multiplication story problems with Euro coins. • How many miles from Bobby's school to the car wash? Read the legend and practice counting by 3s, 5s, and 10s. • "Cross out all multiples of seven". Three math problems to solve using hundred square (10 x 10) forms. Answers included. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • One table blank, for answers only; one table with the questions. • [member-created with abctools] From "2x0" to "2x12". These multiplication skills strips are great for word walls. • [member-created with abctools] From "10x0" to "10x12". These multiplication skills strips are great for word walls. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • A poster solving a multiplication word problem using Canadian money. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Sample of our Animal Tracks Math series, coincides with interactive on member site. • This lesson is designed to help students begin counting while viewing objects in groups. Three sets of four; includes teaching suggestions and answer sheets. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x8) • 3x3=9. Use as a worksheet, or laminate, use for learning center or bulletin board • Great for practice. Use alone, or link all the bookmarks together on a ring. • This activity combines spatial patterning skills with multiplication facts. • Sydney got twenty-one e-mails on Monday, nineteen on Tuesday, thirty-seven on Wednesday, eight on Thursday, and twenty-three on Friday. How many e-mails did she get on Monday, Tuesday, Wednesday, and Friday, combined? Six word problems. • Students fill in 64 missing products on a 9x9 multiplication grid. • Great for practice. Use alone, or link all the bookmarks together on a ring. • factors up to ten • Brooke has eleven flowers. She has more tulips than roses. What are the possible combinations of tulips and roses, if she only has these two types of flowers? Six word problems. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Students fill in 15 missing products on a 5x5 multiplication grid. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x7) • One page with nine illustrated black and white bunny-themed multiplication flashcards (x9) • Answers to the word problems from sets A-U, grouped by page. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • up to 10x10 • up to 10x10 • Paige, Cassandra, and Katie earned \$12.45 by working for a neighbor. Assuming they worked equal amounts, what would each girl’s share be? Six word problems. • Good how-to reference poster for multiplying negative integers. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Students fill in 10 missing products on a 5x5 multiplication grid. • A page of rules and a page of practice for scientific notation, including; multiplication, numbers, with an answer sheet. • 3x3=9. Laminate, use for learning center or bulletin board. • Worksheets for practicing multiplication by 10, 11 and 12. • These fish-themed pages serve as a colorful guide for word problems, displaying the mathematical symbol (x) that accompany the most common Multiplication Keywords. • from 1x1 to 12x12 • Mr. Wilder is taller than Ms. White. Mr. Singer is shorter than Ms. White. Ms. Jackson is taller than Ms. White, but she is not the tallest teacher. Put all of these teachers in order according to their height. Six word problems. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x5) • Joseph has two cousins. The sum of their ages is 18 years. One cousin is four years older than the other. Mrs. Smith guessed that the ages were 7 and 11. Was her guess correct? Six word problems. • 3x3=9. Use as a worksheet, or laminate, use for learning center or bulletin board • Great for practice. Use alone, or link all the bookmarks together on a ring. • Our math "machines" make multiplication drills fun. Cut out the two shapes and practice simple multiplication. With multiplicands up to 10. • Students fill in 48 missing products on a 9x9 multiplication grid. • Students fill in 40 missing products on a 10x10 multiplication grid. • There are pictures of snakes in three overlapping circles. There are ten snakes in circle A, twenty snakes in circle B, and thirteen snakes in circle C. Six of the snakes are in both circles A and B. Five of the snakes are in both circles B and C. How many snakes are there in all? Six word problems. • Great for practice. Use alone, or link all the bookmarks together on a ring. • 5 pages of worksheets to practice multiplication up to 10, plus answers. • [member-created with abctools] Practice multiplying by 2 by matching equations with answers with these fun flash cards. • Jordan has eight apples. Cameron has half as many apples as Jordan. Natalie has three-quarters as many apples as Cameron. How many apples does each person have? How many do they have altogether? Six word problems. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Students fill in 10 missing products on a 5x5 multiplication grid. • Kyle had four bags of candy that he bought for \$1.50 per bag. Each bag has six pieces of candy in it. How many more bags does he need to buy to give each of his twenty-five classmates one piece? How much will it cost altogether? Six word problems. • Heather says, "I have two numbers in mind. When I subtract the smaller from the larger, the difference is seven. When I multiply the two numbers, the product is eighteen. What are my two numbers?" Six word problems. • 5 pages of worksheets to practice multiplication up to 10, plus answers. • factors up to ten • Five pages of examples of word problems converted to equations. • "The quilt took 3630 hours to complete. How many weeks would it have taken her to complete the quilt if she worked 2 hours a day, 5 days a week?" Math questions with a patchwork quilt theme. • up to 10x10 • One page with nine illustrated black and white bunny-themed multiplication flashcards (x4) • One page with nine illustrated black and white bunny-themed multiplication flashcards (x1) • Dylan poured punch at the class party. There are twenty-five people in Dylan’s class. He gave each person 100 ml of punch. How many liters of punch did the class need for the party? Six word problems. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Single digits, unlike fractions; 5 pages. • By 10, by 9, by 5, by 3, and by chunks. This unit contains tricks for multiplication and for checking your work. A playful (and very useful) approach to multiplication. This unit is presented at three levels of varying complexity. • up to 10x10 • Dakota went to the store. He bought three note pads for \$.75 each, four pencils at 2 for \$.35 and one candy bar, which was being sold at 3 for \$1.80. How much money did he spend? How much did he get back from the \$10.00 he gave the clerk? Six word problems. • A one page math lesson on the Properties of Equality includes: Addition Property of Equality, Multiplication Property of Equality, Reflexive Property of Equality, Symmetric Property of Equality, and the Transitive Property of Equality. It is followed by two pages of equations for practice. • Four pages of decimal multiplication with twenty equations per page. Products include 1-5 decimal places. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x6) • Create a story problem for this answer: "Morgan caught four turkeys." Six word problems. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Single digits, common denominators; 5 pages. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • [member-created with abctools] Trace and cut out. This train-shaped shapebook is a fun way for students to learn to count to 100 by 10s. Makes a great shapebook or bulletin board decoration. • Gray Scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Students fill in 40 missing products on a 10x10 multiplication grid. • A one page explanation of the rules of using exponents, followed by a practice sheet and an answer page. • Robert went to the store with \$10.00. He bought a notebook, three pencils and two erasers. He came home with \$2.89. How much money did he spend? Six word problems. • "How many e-mails does he forward in one week altogether?" One page; 12 word problems with contemporary themes. • factors up to ten • I see 2 rows; I see 4 in each row. One page worksheet. • Color each section of the caterpillar for each fact memorized. From 6x1 to 10x10. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • A poster about the Properties of Equality includes: Addition Property of Equality, Multiplication Property of Equality, Reflexive Property of Equality, Symmetric Property of Equality, and the Transitive Property of Equality. • John finished a bicycle race in second place. The first four people crossed the finish line at: one-twenty, a quarter after one, five minutes to one and 1:07. What time did John cross the finish line? Six word problems. • 3x3=9. Laminate, use for learning center or bulletin board • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • Master the multiplication tables with these wacky flashcard-holding animals (a different animal for each set). Up to 12 x 12. • A set of three posters featuring multiplication word problems with U. S. currency. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Factoring practice worksheet - Students will write all the factors for a particular number. • Book comprehension and vocabulary enhancement for this installment of Marc Brown's popular "Arthur" series. Arthur has trouble with truth in advertising. • Cindy had a summer job bathing dogs. She earned \$5.25 for every dog she bathed. She bathed 17 dogs every week. How many dogs did she bathe in two weeks? • Abigail saw the same number of pigs and chickens at the farm. She counted twelve legs. How many were pig legs and how many were chicken legs? Six word problems. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Students are asked to find the factors and prime numbers. Answer pages are included. • Cody had nineteen pieces of candy. He gave five away. Then he ate six pieces. He traded four pieces for a baseball card. How many pieces of candy does he have left? Six word problems. • Jennifer wants to buy a new hockey puck that costs \$5.25. She has \$2.30. She can earn 50 cents an hour by raking leaves. How many hours will she have to work to get the money she needs? Six word problems. • 4 pages of worksheets to practice single digit multiplication. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • By 10, by 9, by 5, by 3, and by chunks. This unit contains tricks for multiplication and for checking your work. A playful (and very useful) approach to multiplication. This unit is presented at three levels of varying complexity. • "Tracy collects forty-eight icicles for her science class. They are twenty-five inches long on average. What is the total length of the icicles Tracy collects?" Five winter-themed multiplication word problems. • Students fill in 48 missing products on a 9x9 multiplication grid. • 3 pages; large spaces to solve problems • If Landon gave away seven rabbits, how many would he have left? (by 5s) • "There are two boys in every row on Bruce’s bus. How many boys are there in two rows?" Five school-themed math problems using skip counting. • Andrea brought seventy-five Valentines candies to school. If there are twenty-eight students in her class, how many candies can each student have if Andrea wants them all to have the same amount? Will there be any left over? Six word problems. • Amanda had \$3.00. She bought a hot dog for \$1.35, chips for 35 cents, and a drink for 85 cents. Did she have enough money? Did she have money left over? If so, how much? Six word problems. • [member-created using abctools] Write a multiplication equation with prime numbers that equals the given number. (answers included) Common Core: 6.NS.4 • Clearly explains how to multiply partial products, followed by a page of practice. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Mixed multiplication practice to six. • “A group of migrating blue whales travels twenty-six miles per day. How far do they travel in eight days?” Five multiplication word problems with an endangered animal theme. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • "When you read PRODUCT... multiply!" Five posters of guidelines to help with reading word problems as equations. • Students fill in 80 missing products on a 10x10 multiplication grid. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Gray scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • [created with abctools] One-page worksheet to practice multiplication up to 9 x 9. • 4 pages of worksheets to practice single-digit multiplication. Fill in the missing factors. • 4 pages of worksheets to practice 1-digit multiplication. • Students write multiplication problems (with sums up to 40). When the answer to the problem is called, they cover the square. A fun variation on a popular favorite. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • "Eddie can pick and clean ten pumpkins per hour. How many can he do in four hours? How many in five? How many in six?" Five Thanksgiving-themed skip counting (by tens) word problems. • Ten great colorful pages of materials for a math-themed mini office. Words and symbols, mnemonic devices, "how to" tips for math operations, and much more. Common Core: Math: 3.0A.5 3.0A.6, 4.OA.1 • All the word problems from sets A-U, unnumbered and unformatted; these can be cut into strips and glued into math journals for daily practice. Answers are provided. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • [member-created document] This sample was made with the abcteach Shape Book tool. Helps students remember the order of operations in algebra. • "Cowboy Jake is afraid of rattlesnakes. He sees a lot of them on the ranch where he lives. In fact, he sees an average of thirty every year. About how many has he seen in the nine years he has lived on the ranch?" • Students provide missing products for twelve basic multiplication facts (pumpkins theme) 3 pages. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x3) • Students can practice doubles and halves with this one-page worksheet. • Easy one page instructions for how to multiply fractions. • "Mr. Vogel is a farmer. He raised twenty turkeys this year. He sold eighteen and kept two as pets. He charged sixteen dollars per turkey. What was the total selling price?" Five Thanksgiving-themed multiplication word problems. • With dots at the top of each flashcard for visual representation. • Two pages of decimal multiplication with six word problems per page. Products include decimals to the tenths and hundredth places. • Simple poster explains how to multiply decimals. Common Core: 6.NS.3 • Two pages of decimal multiplication with twenty equations per page. Products include decimals to the tenths and hundredths places. • 11 pages of worksheets for practicing multiplication up to 9. • Worksheet practicing rounding numbers to the nearest 100 and estimating the sums. Common Core: 4.NBT.A.3 • Great for practice. Use alone, or link all the bookmarks together on a ring. • Single digits, unlike fractions; 5 pages. • 5 pages of worksheets to practice 2-digit multiplication, plus answers. • "Greg and his friends are making Thanksgiving decorations. Each child makes five. How many do four children make? How many do five make? How many do six make?" Five Thanksgiving-themed skip counting (by fives) word problems. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Four pages of worksheets for practicing multiplication by 0, 1, and 2. With answers and cute illustrations. • "Mike's hockey team has scored an average of four goals in each of their last ten games. How many goals have they scored in all?" Five winter-themed multiplication word problems. • Gray Scale multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. • Jacob loves school, but he hates multiplication. A realistic fiction reading comprehension. • Single digits, common denominators; 5 pages. • Draw an arrow from the heart with the problem to the heart with the correct answer. • "Lisa bought 5 pencils at the school store. The cost of each pencil is 33 cents. How much did Lisa pay for her purchase?" One page, five problems. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Mixed multiplication practice to nine. • [member-created with abctools] 27 pages of worksheets introducing multiplication to 12. • By 10, by 9, by 5, by 3, and by chunks. This unit contains tricks for multiplication and for checking your work. A playful (and very useful) approach to multiplication. This unit is presented at three levels of varying complexity. • Explains factors and gives students the chance to practice their knowledge. • Directions for regrouping in addition, subtraction, and multiplication. One page for each skill, plus examples. • Great for practice. Use alone, or link all the bookmarks together on a ring. • Worksheets to practice 2-digit multiplication. Five pages plus answers. • Ten great pages of materials for a math-themed mini office. Words and symbols, mnemonic devices, "how to" tips for math operations, and much more. Common Core: Math: 3.0A.5 3.0A.6, 4.OA.1 • A great poster or notebook liner for quick reference. • Worksheet for practicing multiplication up to 9. Black and white, bug graphics. • 5 pages of worksheets to practice 2-digit multiplication, plus answers. • This lesson is designed to help students practice multiplication skills. Combine groups of threes and fives with ones to complete a chart; includes teaching suggestions and answer sheets. • Practice multiplication skills with this fun game. • Explains common factors and gives students a chance to practice their knowledge. • "There are three rows of pencils. Each row has four pencils. How many colored pencils does Yoko have?" Five school-themed multiplication problems. • 10 pages of worksheets to practice 2-digit multiplication, plus answers. • Mixed multiplication practice to eight. • 5 pages of worksheets to practice 1-digit multiplication. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • “A herd of grazing Bactrian camels walks three miles per hour. How far do the camels walk in five hours?” Five multiplication word problems with an endangered animal theme. • Students provide missing products for twelve basic multiplication facts (footballs theme) 3 pages • Six pages of multiplication problems, from 1x1 to 12x12, in random order. • Color each section of the caterpillar for each fact memorized. From 1x1 to 5x10. • "Smith & Smith Ghost Eradication Services is a company that removes ghosts from haunted houses. If each haunted house has an average of three ghosts, how many ghosts can be removed in a month?" Five Halloween themed multiplication word problems. • Colorful multiplication table bookmarks to use alone or in conjunction with the interactive multiplication games. Complete set, x1 through x12. • One page with nine illustrated black and white bunny-themed multiplication flashcards (x2) • 5 pages of worksheets to practice single digit multiplication, plus answers. • "Dot-to-dot multiplication." Practice multiplication skills by finding and extending patterns, and then writing appropriate equations. • Worksheets to practice 3-digit multiplication. 5 pages plus answers. • Explains multiples and gives students the chance to practice their knowledge. • Write one factor on the inner circle and other factors on the middle circle. Write the answers on the outer circle. Although designed as a fun drill for multiplication tables, these math circles also work for addition, subtraction, and division problems. • 21 pages of word problems; six problems per page. Pages are lettered. Some sets of questions contain a "brain teaser". • 5 pages of worksheets to practice 2-digit multiplication, plus answers. • Create a story problem for this answer: Jacob had four caramel apples left over. Six word problems. • 3 pages of worksheets for practicing multiplication by 1, 2, and 3. Equations inside balloon graphics. • 4 pages of worksheets to practice 1-digit multiplication. • Students create two multiplication and two division facts to describe an array. Two sets of ten arrays. • Students provide missing products for twelve basic multiplication facts (autumn leaves) 3 pages. • In and Out boxes to practice multiplication with numbers ranging from 1-20. • 6 pages of worksheets to practice multiplication to 12x12, with answer sheets. • Worksheet for practicing multiplication up to 9. Inside bug graphics. • "Four witches meet at Halloween. Each one brings four black cats with her. How many black cats are at the meeting?" • 3 pages of worksheets to practice 2-digit multiplication, plus answers. • Worksheets for practicing multiplication by 9. Five pages, with cute illustrations and answers. • Math circles with numbers already inserted to practice all facts from 1 to 10. Students fill in the answers. Can be used for either addition or multiplication. • Using teacher-created dice, students use this simple game to practice multiplication with factors between four and nine. • "Bud is helping his mother bake an apple pie for Thanksgiving dinner. He peels the apples. It takes him two minutes to peel an apple. How long does it take him to peel seven apples?" Five Thanksgiving-themed multiplication word problems. • Six pages of multiplication problems, from 1x1 to 12x12, in random order. In columns, twenty-four questions per page. • Make 8 copies of the kites and bows. Write an "answer" to a math problem on each kite. Write various combinations of math problems (that match up with each answer) on the bows. • Four colorful pages of materials for a fraction-themed mini office: greatest common factor & least common denominator; finding equivalents; reducing, adding, subtracting, multiplying, and dividing fractions; converting improper fractions to mixed numbers; clever mnemonic devices. • A blackline house for multiplication and division "fact families" to live in. • Michael had nineteen balloons. Eight of them were red, four were blue, two were yellow, and the rest were green. How many were green? Six word problems. • Four pages of materials for a fraction-themed mini office: greatest common factor & least common denominator; finding equivalents; reducing, adding, subtracting, multiplying, and dividing fractions; converting improper fractions to mixed numbers; clever mnemonic devices. • Gina bought 3 tickets to the Christmas movie. Each ticket cost \$4.00. How much did she spend? • Explains common multiples and gives students a chance to practice their understanding. • Find the factors; three page packet. Created with abctools. • Cut out the factor squares, cut apart the answer boxes, place the correct answer box in the correct square. • A one page lesson on the Properties of Addition & Multiplication includes: commutative property, associative property, distributive property, identity property, and zero property. It is followed by two pages of practice equations. Common Core: Math: 3.0A.5 3.0A.6, 4.OA.1 • "Mary did six exercises and studied three pages a day. By the end of one week, how many exercises had she done, and how many pages had she studied?" One page of word problems, with addition, subtraction, and multiplication. • Multiplication chart grid 10x10 for reference and practice. • Horizontal format, missing digit, single digit multiplication worksheet. • Worksheets to practice 3-digit multiplication. 5 pages plus answers. • Bingo cards with simple multiplication problems. • Directions for regrouping in addition, subtraction, and multiplication. One page for each skill, plus examples. • 4 pages of worksheets for practicing multiplication by 3, 4 and 5, with answers and cute illustrations. • Formatted like a standardized test, this 10 page document tests math skills such as addition, multiplication, percentages, shapes, division, probability, graph-reading, area, perimeter, units of measurement, place value and more. These are approximately the skills tested in fourth grade, although state standards vary widely. • Formatted like a standardized test, this 6 page document tests math skills such as addition, place value, subtraction, multiplication, patterns, shapes, and more. These are approximately the skills tested in second grade, although state standards vary widely. • Formatted like a standardized test, this 7 page document tests math skills such as addition, multiplication, units of measurement, percentages, shapes, division, area, perimeter, and more. These are approximately the skills tested in fifth grade, although state standards vary widely. Common Core: Geometry 6.G.A1, 5.G.B3, 4.MD.3 • Formatted like a standardized test, this 6 page document tests math skills such as place value, addition, subtraction, rounding, multiplication, division and more. These are approximately the skills tested in third grade, although state standards vary widely. Common Core: 4.NBT.A.3
6,054
28,385
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.546875
4
CC-MAIN-2017-22
longest
en
0.856606
http://mzsvfu.ru/index.php/mz/article/view/numerical-modeling-of-thermoelasticity-problems-for-constructions-with-inner-heat-source
1,600,713,668,000,000,000
text/html
crawl-data/CC-MAIN-2020-40/segments/1600400202007.15/warc/CC-MAIN-20200921175057-20200921205057-00408.warc.gz
83,841,343
10,670
# Numerical modeling of thermoelasticity problems for constructions with inner heat source • Vasilyeva Maria V., vasilyevadotmdotv@gmail.com M. K. Ammosov North-Eastern Federal University, Institute of Mathematics and Informatics, 42 Kulakovsky Street, Yakutsk 677000, Russia • Zakharov Petr E., zapetch@gmail.com M. K. Ammosov North-Eastern Federal University, Institute of Mathematics and Informatics, 42 Kulakovsky Street, Yakutsk 677000, Russia • Sivtsev Petr V., sivkapetr@mail.ru M. K. Ammosov North-Eastern Federal University, Institute of Mathematics and Informatics, 42 Kulakovsky Street, Yakutsk 677000, Russia • Spiridonov Denis A., d.stalnov@mail.ru M. K. Ammosov North-Eastern Federal University, Institute of Mathematics and Informatics, 42 Kulakovsky Street, Yakutsk 677000, Russia Keywords: thermoelasticity problems, thermal expansion, heat transfer, linear elasticity problem, plasticity models, nonlinear problems, finite element method, mathematical modeling ### Abstract We consider the numerical simulation of the thermomechanical state of a structure consisting of a heat source, a gas gap and a shell. The mathematical model is described by a nonlinear system of equations for temperature and displacements. The heat is released in the subdomain of the heat source. The resulting displacements due to the temperature gradient are calculated in the heat source region and separately in the shell, and can be described by both linear elasticity models and nonlinear plasticity models. The numerical implementation is based on the finite element method. The results of numerical modeling of a nonlinear model problem in two- and three-dimensional domains are presented. ### References [1] Newman C., Hansen G., Gaston D., “Three dimensional coupled simulation of thermomechanics, heat, and oxygen diffusion in UO2 nuclear fuel rods”, J. Nuclear Materials, 392:1 (2009), 6–15 [2] Williamson R. L., Hales J. D., Novascone S. R., Tonks M. R., Gaston D. R., Permann C. J., Andrs D., Martineau R. C., “Multidimensional multiphysics simulation of nuclear fuel behavior”, J. Nuclear Materials, 423:1 (2012), 149–163 [3] Kang C. H., Lee S. U., Yang D. Y., Kim H. C., Yang Y. S., “3D FE simulation of the nuclear fuel rod considering the gap conductance between the pellet and cladding”, Proc. KNS Fall Meeting (Kyungju, Rep. Korea, Oct. 23-25, 2013), KNS, Daejeon, Rep. Korea, 2013 [4] Kang C. H., Lee S. U., Yang D. Y., Kim H. C., Yang Y. S., “3D finite element analysis of a nuclear fuel rod with gap elements between the pellet and the cladding”, J. Nuclear Sci. Technology, 53:2 (2016), 232–239 [5] Philip B., Berrill M. A., Allu S., Hamilton S. P., Sampath R. S., Clarno K. T., Dilts G. A., “A parallel multi-domain solution methodology applied to nonlinear thermal transport problems in nuclear fuel pins”, J. Comput. Phys., 286 (2015), 143–171 [6] Ramirez J. C., Stan M., Cristea P., “Simulations of heat and oxygen diffusion in UO2 nuclear fuel rods”, J. Nuclear Materials, 359:3 (2006), 174–184 [7] Mihaila B., Stan M., Ramirez J., Cristea P., “Simulations of coupled heat transport, oxygen diffusion, and thermal expansion in UO2 nuclear fuel elements”, J. Nuclear Materials, 394:2 (2009), 182–189 [8] Brown D. L., Vasilyeva M. A., “A generalized multiscale finite element method for poroelasticity problems II: Nonlinear coupling”, J. Comput. Appl. Math., 297 (2016), 132–146 [9] Brown D. L., Vasilyeva M. A., “A generalized multiscale finite element method for poroelasticity problems I: Linear problems”, J. Comput. Appl. Math., 294 (2016), 372–388 [10] Hales J. D. et al., BISON theory manual. The equations behind nuclear fuel analysis, Idaho Nat. Lab., 2013 [11] Rashid Y., Dunham R., Montgomery R., Fuel analysis and licensing code: FALCON MOD01., EPRI Rep. EPRI, 2004 [12] Veshchunov M. S. et al., “Code Package SVECHA: Modeling of core degradation phenomena at severe accidents”, Proc. 7th Int. Topical Meeting on Nuclear Reactor Thermal Hydraulics, NURETH-7 (Saratoga Springs, NY, Sept. 10-15, 1995), 1995, 1914 [13] Berdyshev A. V., Boldyrev A. V., Palagin A., Shestak V., Veshchunov M. S., “SVECHA/QUENCH code for the modeling of reflooding phenomena in severe accidents conditions”, Proc. 9th Int. Topical Meeting on Nuclear Reactor Thermal Hydraulics, NURETH-9 (San Francisco, CA), 1999 [14] Hagrman D. L., Reymann G. A., MATPRO-VERSION 11. Handbook of materials properties for use in the analysis of light water reactor fuel rod behavior, Idaho Nat. Eng. Lab., Idaho Falls (USA), 1979 [15] Hales J. D. et al., “Asymptotic expansion homogenization for multiscale nuclear fuel analysis”, Comput. Materials Sci., 99 (2015), 290–297 [16] Vabishchevich P. N., Vasilyeva M. V., and Kolesov A. E., “Splitting scheme for poroelasticity and thermoelasticity problems”, Comput. Math. Math. Phys., 54:8 (2014), 1305–1315 [17] Geuzaine C. and Remacle J.-F., Software GMSH, http://geuz.org/gmsh [18] Logg A., Mardal K. A., Wells G., Automated solution of differential equations by the finite element method: The FEniCS book, Springer Sci. & Business Media, New York, 2012 [19] Samarskij A. A. and Vabishhevich P. N., Vychislitel'naia Teploperedacha, Editorial URSS, Moscow, 2003 [20] Vasilyeva M. V. and Stal'nov D. A., “Mathematical modeling of the thermomechanical state of a heat-inducing element”, Vestn. SVFU, 2016, no. 1, 45–59 [21] Vabishhevich P. N. and Vasilyeva M. V., “Numerical modeling for thermoelasticity problems”, Vestn. SVFU, 10:3 (2013), 5–9 [22] Sivtsev P. V., Vabishchevich P. N., Vasilyeva M. V., “Numerical simulation of thermoelasticity problems on high performance computing systems”, Proc. Int. Conf. Finite Difference Methods, Springer, Berlin, 2014, 364–370 [23] Simo J. C., Hughes T. J. R., Computational inelasticity, Interdiscip. Appl. Math., 7, Springer, New York, 1998 [24] De Souza Neto E., Peric D., Owen D. R. J., Computational methods for plasticity: Theory and applications, John Wiley & Sons, New York, 2008 How to Cite Vasilyeva, M., Zakharov, P., Sivtsev, P. and Spiridonov, D. (&nbsp;) “Numerical modeling of thermoelasticity problems for constructions with inner heat source”, Mathematical notes of NEFU, 24(3), pp. 52-64. doi: https://doi.org/10.25587/SVFU.2018.3.10889. Issue Section Mathematical Modeling
1,839
6,279
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.734375
3
CC-MAIN-2020-40
latest
en
0.774048
https://practicaldev-herokuapp-com.global.ssl.fastly.net/anasrin/simple-2-joint-inverse-kinematic-with-isosceles-triangle-1lb9
1,713,380,986,000,000,000
text/html
crawl-data/CC-MAIN-2024-18/segments/1712296817171.53/warc/CC-MAIN-20240417173445-20240417203445-00308.warc.gz
430,330,460
21,626
## DEV Community anasrin Posted on • Originally published at anasrar.github.io # Simple 2-joint inverse kinematic with isosceles triangle ## Math Formula Formula to get height of isosceles triangle from one side a and base b, you can use it to find the elbow position. $h(a,b) = \sqrt{a^2-\frac{b^2}{4}}$ TypeScript version. function getHeight(a: number, b: number){ return Math.sqrt((a ** 2) - ((b ** 2) / 4)); } ## Application Let's say you have shoulder p1, hand p2, and a is half length of your arm. You want to find where the elbow position is. \begin{aligned} a &= 10\\ b &= |(\bold{p_2} - \bold{p_1})|\\ \bold{\hat{c}} &= \frac{\bold{p_2} - \bold{p_1}}{b}\\ \bold{d} &= \bold{\hat{c}}h(a,b)\\ \bold{k} &= \bold{p_1} + \bold{\hat{c}}\frac{b}{2} + \begin{bmatrix} d_1 \cos(90\degree) - d_2 \sin(90\degree) \\ d_1 \sin(90\degree) + d_2 \cos(90\degree) \end{bmatrix} \end{aligned} TypeScript version (vector library using vecti). import { Vector } from "vecti"; const p1 = new Vector(10, 10); const p2 = new Vector(150, 150); const a = 100; const b = p2.subtract(p1).length(); const c = p2.subtract(p1).normalize(); const d = c.multiply(getHeight(a, b)); const k = p1.add(c.multiply(b / 2)).add(d.rotateByDegrees(90)); // because SVG and Canvas using top to bottom you can use -90, you can also use this to switch direction
449
1,341
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 2, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.875
4
CC-MAIN-2024-18
latest
en
0.564732
https://www.physicsforums.com/threads/fixed-tube-sheet-shell-and-tube-heat-exchanger.189936/
1,540,174,431,000,000,000
text/html
crawl-data/CC-MAIN-2018-43/segments/1539583514443.85/warc/CC-MAIN-20181022005000-20181022030500-00385.warc.gz
1,017,708,953
13,113
# Fixed-Tube-Sheet Shell and tube Heat Exchanger 1. Oct 8, 2007 ### sdlee Hi guys, I've been on a few message boards looking for a solution to my problem, but no one has really been able to help me yet. Here is the problem: Question=================== Hi all, this is my first post/thread, just starting out as a second year chemical engineer and I seem to have found myself in need of some help. Basically, I'm designing (basic) a heat exchanger where I'm heating a nickel slurry with steam at atmospheric conditions from 25 deg C to 63 deg C. I have the correct heat duty of 12235187 kJ/hr through using Q=m*Cp*∆T m = 4165.19 kmol/hr * 77.302 kJ/K.kmol (avg cp) Now that I have the heat duty that is required to heat up the nickel slurry, I am unable to understand how to get the mass flow rate of the steam required to do this. I was aiming to have the steam enter at 100 deg C and leave at 65 deg C, is this reasonable? How do I work back from the heat duty required using the temperatures mentioned to work out the mass flow rate of the steam? I know that I need to take into consideration condensation and other factors, but I'm just not sure what to do. Any help would be appreciated. Thanks so much for your help. I'm not too sure yet what the steam pipe diameter will be, but I'm designing a fixed-tube-sheet 1 shell 2 pass HE. If you were to give your expert opinion, what would have the steam coming in at pressure-wise? I have assumed that the nickel slurry is moving through the HE at atmospheric conditions. Assuming that your steam supply is entering the heat exchanger dry saturated and exhausting to an atmospheric condenser (ie the steam is at least 100 deg C) the heat extracted from the condensing steam will be 2,256 kJ/kg (from steam tables). Thanks so much for your help Ynot, but why do we use the evaporation value from the steam tables instead of the steam? You can ignore any further heat gain in dropping the condensate temperature to off set against any thermal losses. A heat load of 12,235,187 kJ/hr will require 12,235,187 / 2,235 = 5,474 kJ/hr steam, or 5.5 tonnes/hour. If higher pressure steam is available it may be better to design around a higher steam temperature/pressure. I'm planning on using a fixed-tube-sheet exchanger with the slurry tube-side and the steam shell-side. If the slurry is at atm pressure, what would you recommend as a good operating pressure for the steam to reduce the size of the shell? thanks again, steve. 2. Oct 16, 2007 ### Astronuc Staff Emeritus It'll depend on the heat exchanger design and whether or not it is parallel or counter flow. basically one needs two equations, one for each flow, and the heat transfer rate is related to the mass flow rate and change in specific enthalpy, e.g. $\dot{m}c_p\Delta{T}$ for each flow.
695
2,823
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.78125
3
CC-MAIN-2018-43
latest
en
0.95642
https://qanda.ai/id/solver/popular-problems/1011535
1,653,566,053,000,000,000
text/html
crawl-data/CC-MAIN-2022-21/segments/1652662604794.68/warc/CC-MAIN-20220526100301-20220526130301-00285.warc.gz
525,639,982
16,752
# Hasil perhitungan rumus Rumus Jawaban $$x ^ { 2 } - 2 x - 5 = 0$$ $\begin{array} {l} x = 1 + \sqrt{ 6 } \\ x = 1 - \sqrt{ 6 } \end{array}$ $\color{#FF6800}{ x } ^ { \color{#FF6800}{ 2 } } \color{#FF6800}{ - } \color{#FF6800}{ 2 } \color{#FF6800}{ x } \color{#FF6800}{ - } \color{#FF6800}{ 5 } = \color{#FF6800}{ 0 }$ Ubahlah persamaan kuadrat pada sisi kiri menjadi bentuk kuadrat sempurna $\left ( \color{#FF6800}{ x } \color{#FF6800}{ - } \color{#FF6800}{ 1 } \right ) ^ { \color{#FF6800}{ 2 } } \color{#FF6800}{ - } \color{#FF6800}{ 5 } \color{#FF6800}{ - } \color{#FF6800}{ 1 } ^ { \color{#FF6800}{ 2 } } = \color{#FF6800}{ 0 }$ $\left ( x - 1 \right ) ^ { 2 } \color{#FF6800}{ - } \color{#FF6800}{ 5 } \color{#FF6800}{ - } \color{#FF6800}{ 1 } ^ { \color{#FF6800}{ 2 } } = 0$ Pindahkan konstanta ke sisi kanan dan ubahlah tandanya $\left ( x - 1 \right ) ^ { 2 } = \color{#FF6800}{ 5 } \color{#FF6800}{ + } \color{#FF6800}{ 1 } ^ { \color{#FF6800}{ 2 } }$ $\left ( x - 1 \right ) ^ { 2 } = 5 + \color{#FF6800}{ 1 } ^ { \color{#FF6800}{ 2 } }$ Hitung kuadratnya $\left ( x - 1 \right ) ^ { 2 } = 5 + \color{#FF6800}{ 1 }$ $\left ( x - 1 \right ) ^ { 2 } = \color{#FF6800}{ 5 } \color{#FF6800}{ + } \color{#FF6800}{ 1 }$ Tambahkan $5$ dan $1$ $\left ( x - 1 \right ) ^ { 2 } = \color{#FF6800}{ 6 }$ $\left ( \color{#FF6800}{ x } \color{#FF6800}{ - } \color{#FF6800}{ 1 } \right ) ^ { \color{#FF6800}{ 2 } } = \color{#FF6800}{ 6 }$ Pecahkanlah persamaan kuadrat menggunakan akar kuadrat $\color{#FF6800}{ x } \color{#FF6800}{ - } \color{#FF6800}{ 1 } = \pm \sqrt{ \color{#FF6800}{ 6 } }$ $\color{#FF6800}{ x } \color{#FF6800}{ - } \color{#FF6800}{ 1 } = \pm \sqrt{ \color{#FF6800}{ 6 } }$ Temukanlah nilai $x$ $\color{#FF6800}{ x } = \pm \sqrt{ \color{#FF6800}{ 6 } } \color{#FF6800}{ + } \color{#FF6800}{ 1 }$ $\color{#FF6800}{ x } = \pm \sqrt{ \color{#FF6800}{ 6 } } \color{#FF6800}{ + } \color{#FF6800}{ 1 }$ Pisahkanlah jawabannya $\begin{array} {l} \color{#FF6800}{ x } = \color{#FF6800}{ 1 } \color{#FF6800}{ + } \sqrt{ \color{#FF6800}{ 6 } } \\ \color{#FF6800}{ x } = \color{#FF6800}{ 1 } \color{#FF6800}{ - } \sqrt{ \color{#FF6800}{ 6 } } \end{array}$ Coba lebih banyak fitur lain dengan app QANDA! Cari dengan memfoto soalnya Bertanya 1:1 ke guru TOP Rekomendasi soal & konsep pembelajaran oleh AI
1,084
2,323
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.6875
5
CC-MAIN-2022-21
latest
en
0.101069
https://www.cleariitmedical.com/2021/07/moving-charges-and-magnetism-quiz-2.html
1,709,006,846,000,000,000
text/html
crawl-data/CC-MAIN-2024-10/segments/1707947474670.19/warc/CC-MAIN-20240227021813-20240227051813-00307.warc.gz
708,618,436
123,696
# MOVING CHARGES AND MAGNETISM JEE Advanced Physics Syllabus can be referred by the IIT aspirants to get a detailed list of all topics that are important in cracking the entrance examination. JEE Advanced syllabus for Physics has been designed in such a way that it offers very practical and application-based learning to further make it easier for students to understand every concept or topic by correlating it with day-to-day experiences. In comparison to the other two subjects, the syllabus of JEE Advanced for physics is developed in such a way so as to test the deep understanding and application of concepts. Q1. Two particles A and B of masses mA and mB, respectively, and having the same charge are moving in a plane. A uniform magnetic field exists perpendicular to this plane. The speeds of the particles are vA and vB, respectively and the trajectories are as shown in figure. Then •   mAvA < mBvB •  mA vA>mB vB •  mA<mb •  mA=mB and vA=vB Solution Q2.An electron is accelerated from rest through a potential difference V. This electron experiences a force F in a uniform magnetic field. On increasing the potential difference to V', the force experienced by the electron in the same magnetic field becomes 2F. Then, the ratio (V^'/V) is equal to •  1/4 •  2/1 •  1/2 •  4/1 Solution Q3.  A charged particle moving along +ve x-direction with a velocity v enters a region where there is a uniform magnetic field B_0 (-k ̂ ), from x=0 to x=d. The particle gets deflected at an angle θ from its initial path. The specific charge of the particle is •   (v cos⁡θ)/Bd •  (v tan⁡θ)/Bd •  v/Bd •  (v sin⁡θ)/Bd Solution Q4. A long cylindrical wire of radius ‘a’ carries a current i distributed uniformly over its cross section. If the magnetic fields at distances r<a and R<a from the axis have equal magnitude, then •  a=(R+r)/2 •  a=√Rr •  a=Rr/R+r •  a=R^2/r Solution Q5. A Q5.charged particle moves with velocity v =ai ̂+dj ̂ in a magnetic field B =Ai ̂+Dj ̂. The force acting on the particle has magnitude F. Then, •  F=, if aA=-dD •  F∝(a^2+b^2 )^(1/2)×(A^2+D^2 )^(1/2) Solution Q6. A very thin metallic wires placed along X-and Y-axes carry equal currents as shown in figure AB and CD are lines at 45° with the axes. The magnetic fields will be zero on the line •  AB •  CD • Segment OB only of line AB •  Segment OC only of line CD Solution Q7.A long insulated copper wire is closely wound as a spiral of N turns. The spiral has inner radius a and outer radius b. The spiral lies in the X-Y plane and a steady current I flows through the wire. The Z-component of the magnetic field at the centre of the spiral is •  (μ_0 NI)/(2(b-a)) ln⁡(b/a) •  (μ_0 NI)/(2(b-a)) ln⁡((b+a)/(b-a)) •  (μ_0 NI)/2b ln⁡(b/a) •  (μ_0 NI)/2b ln⁡((b+a)/(b-a)) Solution Q8.An electron is projected at an angle θ with a uniform magnetic field. If the pitch of the helical path is equal to its radius, then the angle of projection is •  tan^(-1)⁡Ï€ •  Ttan^(-1)⁡2Ï€ •  cot^(-1)⁡Ï€ •  cot^(-1)⁡2Ï€ Solution Q9.An infinitely long conductor PQR is bent to form a right angle as shown in figure. A current I flows through PQR. The magnetic field due to this current at the point M is H_1. Now, another infinitely long straight conductor QS is connected to Q so that current is I/2 in QR as well as in QS, the current in PQ remaining unchanged. The magnetic field at M is now H_2. The ratio H_1/H_2 is given by •  1/2 •  1 •  2/3 •  2 Solution Q10. A small block of mass m, having charge q, is placed on a frictionless inclined plane making an angle θ with the horizontal. There exists a uniform magnetic field B parallel to the inclined plane but perpendicular to the length of spring. If m is slightly pulled on the incline in downward direction, the time period of oscillation will be (assume that the block does not leave contact with the plane) •  2Ï€√(m/K) •  2Ï€√(2m/K) •  2Ï€√(qB/K) • 2Ï€√(qB/2K) Solution #### Written by: AUTHORNAME AUTHORDESCRIPTION ## Want to know more Please fill in the details below: ## Latest NEET Articles\$type=three\$c=3\$author=hide\$comment=hide\$rm=hide\$date=hide\$snippet=hide Name ltr item BEST NEET COACHING CENTER | BEST IIT JEE COACHING INSTITUTE | BEST NEET & IIT JEE COACHING: Moving Charges and Magnetism-Quiz-2 Moving Charges and Magnetism-Quiz-2
1,306
4,311
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.546875
4
CC-MAIN-2024-10
latest
en
0.860721
http://www.neutroninterferometry.com/weak-measurements/violation-of-the-quantum-pigeonhole-principle-in-neutron-optics
1,702,023,355,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100739.50/warc/CC-MAIN-20231208081124-20231208111124-00607.warc.gz
73,845,758
11,352
# Violation of the classical Pigeonhole Principle in Neutron Optics September 8, 2017 2:16 pm The pigeonhole principle, first stated by Dirichlet in 1834 and therefore also reffered to as Dirichlet’s box principle or Dirichlet‘s drawer principle (“Schubfachprinzip”), states the following: “If you put three pigeons in two pigeonholes, at least two of the pigeons end up in the same hole.” In our neutron interferometric experiment 1 the role of the two holes or boxes  is replaced by the two spin eigenstates and . Using our neutron optical approach for weak measurements of the (see here for details) allows for an experimental violation of the classical pigeonhole principle  – demonstrating the quantum pigeonhole effect 2. Our pre-selected (initial) product state of the three neutron spins is given by , with  and the post-selected (final) product state of spins is , with (see here for details of the theory). A product operator for any two spins of the three spins, has a spectral decomposition as , where , which accounts for projections onto the same state  (and therefore for correlation of the two spins and ) and for projections onto different states (anti-correlation). A simple calculation reveals and . Applying the AharonovBergmannLebowitz (ABL) formula 3, which gives the probability of obtaining a particular strong measurement outcome , between a preparation and a postselection , where the outcome corresponds to a projection operator . The ABL formula can be expressed in terms of weak values as with , which gives and and finally yields . This pairwise constraint is the quantum pigeonhole effect, with the spin eigenstates correspond to two boxes in which pigeons may be placed – the pigeonhole principle states that if pigeons are placed in two boxes, then at least one box must contain multiple pigeons. However, the constraint for all pairs implies that, regardless of how many pigeons are placed in the two boxes, no two pigeons are ever in the same box! The experiment was carried out at the neutron interferometer instrument S18 at the high-flux reactor of the Institute Laue-Langevin (ILL) in Grenoble, France, a schematical illustration is depicted above. In our setup we measure the weak value of the neutron spin in the -direction applying an interferometer. The neutron’s path is used as a pointer to measure both the real and imaginary parts of , which has already been successfully used to completely determine weak values of massive systems 4. In our setup two magnetically birefringent prisms (Polarizer) split the unpolarized beam in two sub-beams, one with the neutron spin aligned parallel to the positive z-direction and one aligned antiparallel. Even though the angular separation is just four seconds of arc (exaggerated in illustration), only the beam with spin up component fulfills Bragg’s condition at the interferometer’s first plate. The other spin-down sub-beam passes through the first plate of the interferometer unaffected and does not further contribute to the experiment since it is absorbed by a small Cadmium slab. next the coil DC-Coil 1 rotates the initial spin form to due to Larmor precession within the coils’s magnetic field pionting in -direction in inducing a spin-rotation, therby completing the spin preselection, preparating the state . At the first interferometer plate, the beam is coherently split by amplitude division. In each path a spin rotator coil (in a Helmholtz configuration) produces a weak magnetic field in the – direction, causing (weak) entanglement between the spin and path degrees of freedom of each neutron. Between the second and final interferometer plate, a sapphire phase shifter is inserted, which in combination with a Cadmium beam block mounted on a rotational stage provides full control over the neutron’s path for the pointer readout (phase shifter changees the path state in the equatorial plane of the Bloch sphere, while the beam block permits access to the path eigenstates at the poles). At the third interferometer plate, the two paths are recombined and DC coil 2, in combination with a array allows for post-selection of the spin state . Finally the neutrons are detected by . The measured values of are used to construct the pairwise anti-correlations . In general the weak value of a product of operators is not equal to the product of weak values of the operators. However, if initial and final states are given by product states, as it the the case ion our experiment holds. In addition, according to the ABL rule, we have . Our final experimental results are plotted above. All  pairs violate the classical pigeonhole principle, which is clearly illustrated by our experiment, demonstrating the quantum pigeonhole effect.
1,011
4,739
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.6875
3
CC-MAIN-2023-50
latest
en
0.903554
https://afteracademy.com/blog/remove-nth-node-from-end-of-list/
1,675,088,743,000,000,000
text/html
crawl-data/CC-MAIN-2023-06/segments/1674764499819.32/warc/CC-MAIN-20230130133622-20230130163622-00328.warc.gz
110,894,186
14,592
## Remove Nth Node From End of List Difficulty: Medium #### Understanding the problem Problem Description: You are given a linked list, write a program to remove the nth node from the end of the list and return the head. Problem Note: • It is guaranteed that n ≤ length of linked list • Try to do this in one iteration. Example 1 ``````Input: 2->6->1->9, n=2 Output: 2->6->9`````` Example 2 ``````Input: 1->2->3->4, n=4 Output: 2->3->4`````` Example 3 ``````Input: 4->9->1->2, n=1 Output: 4->9->1`````` The node structure given to you will be→ ``````class ListNode { int val; ListNode next; ListNode(int x) { val = x } }`````` #### Solutions We will be discussing three different solutions 1. Using Auxillary Space — By saving each node in an array 2. Making two passes through the list — remove the ``` length- nth ``` from the beginning. 3. Making one pass through the list — Using fast and slow pointers. #### 1. Using Auxillary Space If we could save all the nodes in the array then, we could just remove the pointer of the (length-n-1)th node next to its next.next. In this way the nth node would be removed. Pseudo Code ``````ListNode removeNthFromEnd(ListNode head, int n) { ListNode list[] while(curr!=null){ list.append(curr) curr = curr.next } int size = size(list) if(size > 1){ if(size > n){ ListNode prev = list[size-n-1] ListNode next = null if(n > 1){ next = list[size-n+1] } prev.next = next; } else { } } return null }`````` Complexity Analysis Time Complexity — O(n) Space Complexity — O(n) Critical Ideas to Thnik • Why we are storing each node in an array? • What will we return if the given value of n is 1? • Why did we set the list[size-n-1]th node next pointer with list[size-n+1] ? #### 2. Making two passes through the list You can conclude from the previous approach that we don’t actually need to store the nodes in the array as we only need the ``` length — n ``` th node. So, we could say that the problem is simply reduced to: Remove the ( L n +1) th node from the beginning in the list, where L is the list length. Solution Step • Create a “dummy” node, which points to the list head. • On the first pass, we find the list length L . • Set a pointer to the dummy node and start to move it through the list until it comes to the ``` ( L − n )th ``` node. • Relink the ``` next ``` pointer of the ``` ( L − n )th ``` node to the ``` ( L − n +2)th ``` node. Pseudo Code ``````ListNode removeNthFromEnd(ListNode head, int n) { int end_index = 0 while(curr) { end_index += 1 curr = curr->next; } index_to_remove = end_index - n i = 0 ListNode prev = nullptr while(i < index_to_remove) { prev = curr curr = curr.next i += 1 } } else if(prev) { prev.next = curr.next } delete curr }`````` Complexity Analysis Time complexity : O ( L ) where L is the length of the linked list. Space complexity : O(1) Critical Ideas to Think • What information about the list does the first pass give us? • What does the prev pointer represent here? • Can you dry run the above pseudo code with the above examples? #### 3. Making a single pass through the list We could optimize the above approach where we only need a one-time traversal of the linked list. We could create two pointers, namely slow and a fast pointer pointing to the nodes that are n nodes apart from each other. The fast pointer advances the list by n +1 steps from the beginning, while the slow pointer starts from the beginning of the list separating them by n nodes. We maintain this constant gap by advancing both pointers together until the fast pointer arrives past the last node. The slow pointer will be pointing at the n th node counting from the last. We relink the next pointer of the node referenced by the second pointer to point to the node’s next to the next node. Solution steps • Create a fast and slow pointer pointing to n-1th and 0th node of the linked list • Start iterating over the linked list while updating the slow and fast pointers to its next. • When the loop terminates, then the fast pointer would be pointing to the last node and slow would be pointing to n-1th from the last node. • Set the next of slow pointer to its next of next Pseudo Code ``````ListNode* removeNthFromEnd(ListNode* head, int n) { ListNode dummy ListNode slow = dummy fast = fast.next } while(fast->next!=NULL){ slow = slow.next fast = fast.next } //slow points to the node before target slow->next = slow->next->next return dummy->next }`````` Complexity Analysis Time complexity : O ( L ) where L is the length of the linked list. Space complexity : O(1) Critical Ideas to Think • What did we initialize the fast and slow pointers with and why? • How does the algorithm work if the given value of n is 1? • Can you dry run this algorithm for the above example and point out the difference between the single pass and double pass algorithms?
1,268
4,859
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.921875
4
CC-MAIN-2023-06
latest
en
0.776037
www.webhelperapp.com
1,674,983,032,000,000,000
text/html
crawl-data/CC-MAIN-2023-06/segments/1674764499710.49/warc/CC-MAIN-20230129080341-20230129110341-00152.warc.gz
1,062,354,640
38,711
# Master Trigonometry and Calculus in MATLAB Description In this short course, students will masterMATLAB Introductory Course. They will get familiar with the basic features of calculus and trigonometry bycoding in MATLAB. They will also master coding in MATLAB Introductory Course using 3D coding and some pre-calculus concepts. Many math codes have discussed by coding in MATLAB in this course. We will also discuss the math code of different graphics in MATLAB. MATLAB is the software that is prominent in many engineering branches including mathematics. But in this course, we are specially going to master trigonometry by coding in MATLAB along with geometrical optimization of some linear and non-linear programming. The explanations will be on slides and then the same code will be discussed on MATLAB software. This is a short course in MATLAB and I have tried my best to make this course useful for the students. They will learn a lot from this course. It is not like I have wasted a time without any reason anywhere in the course. All the necessary explanations have been done in this course. I have tried to explain more and more concepts in this 3 hours course. The same material people offer in 20-30 hours course but I am presenting this course concept just in 3 hours. Students don't have the time to take 34 hours or more long courses to master MATLAB. The world is more comprehension-ed rather than typical. So that is why I am offering significant content for better learning experiences. The course is very unique due to its contents and variety. We will start from the very basics and will end on the pro level. The main thing in this course is coding by using MATLAB. More than 200 codes are there in this course and each code has a specific physical orientation as well. Since optimization plays a great role in MATLAB. So, many graphics have discussed in this course. We plot many basics functions of mathematics by coding in MATLAB. Another characteristic of this course is that it will enhance your aptitude ability with the logic of mathematical analysis. We can easily check the behavior of some mathematical functions by coding in MATLAB that may be difficult by doing other approaches. Sketching, plotting, and graphing are amazing in MATLAB. We can even find the solution of many abstract equations with their plotting in seconds. In everyday mathematics, we focus on by hand calculations and there are many chances that the calculations may go away from the track but in MATLAB you will find the exact solution of everything and there will be no doubt in every calculation that will be done through MATLAB. MONEY BACK GUARANTEE It is not like that I have wasted the time anywhere in the course. I am giving you the genuine course contents presentations. So I promise you that you will not waste your money. Also, Udemy has a 30-day money-back guarantee and if you feel that the course is not like what you were looking for, then you can take your money back. CONTENTS OFFERED IN THIS COURSE • Solution of linear and nonlinear equations by coding in MATLAB • Matrices operations in MATLAB • Solving Polynomials by Using MATLAB • Solving and plotting trigonometric functions by coding in MATLAB • MATLAB coding of logarithmic and exponential functions • MATLAB coding for 3D curves • And all fundamental concepts of calculus Here are some reviews of my courses by the students. 1- Brava Man:  Superb course!! The instructor is very knowledgeable and presents the Quantum Physics concepts in a detailed and methodical way. We walked through aspects like doing research and implementation via examples that we can follow in addition, to actual mathematical problems we are presented to solve. 2- Manokaran Masikova: This is a good course to learn about quantum mechanics from basic and he explained with example to understand the concept. 3- Dr. B Baskaran: very nice to participate in the course and very much interesting and useful also. 4- Mashrur Bhuiyan: Well currently I am an Engineering student and I forgot the basics of my calculus. but this course helped me to get a good understanding of differentiation and integration. Overall all of the teaching methods are good. 5- Kaleem Ul Haq: Really a great explanation and each step has explained well. I am enjoying this course. He is a familiar instructor in calculus. I have seen many lectures of this instructor before taking this course. Thanks for reading the description of this course. Hope you will join me in this course. Have a nice day and wish you good luck. GET COURSE
937
4,586
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2023-06
longest
en
0.934055
https://www.coursehero.com/file/3033922/MarketingHw4-Final/
1,516,691,511,000,000,000
text/html
crawl-data/CC-MAIN-2018-05/segments/1516084891750.87/warc/CC-MAIN-20180123052242-20180123072242-00769.warc.gz
859,077,239
25,014
MarketingHw4-Final # MarketingHw4-Final - Homework#4 Smart Baby Name Sean Lyden... This preview shows pages 1–2. Sign up to view the full content. Name: Sean Lyden 1. Breakeven Manufacturer's Price Fixed Costs \$6,059,000.00 Known Variable Costs per unit \$57.28 Royalty % 3.50% Commission % 5.00% Breakeven Quantity 554,500 Unit Price x 554,500=6,059,000/(x - 57.28 - .035x - .05x) 554,500=6,059,000/(.915x-57.28) 554,500(.915x - 57.28)= 6,059,000 507,367.5x=37,820,760 Unit Price \$74.54 2. Breakeven Retail Price Markup on Selling Price = (x - COGS)/ x Selling Price x Markup on Selling Price % 27.00% COGS \$74.54 .27=(x - 74.55)/x .27x=x - 74.55 -.73x=-74.55 Selling Price \$102.11 Selling Price= Cost of Goods Sold/ (1 - %Markup on Selling 3. Profit Goal Price Percent Profit 7.50% Profit Goal= Profit Goal Quantity * Unit Price * Percent Prof Profit goal = PGQ * Unit Price * .075 BEQ=Fixed Costs/ (Unit Price - Unit Variable Costs) BEQ=Fixed Costs/ [Unit Price - Unit Variable Costs in \$ - (%Royalty * Unit Price) - (%Commission * Unit Price) Fixed Costs= Sales Manager's Salary + Advertising Expenses + Executive Salaries and Overhead Expenses Known Variable Costs per Unit = Packaging per unit + Electronics per Unit + Production Labor per Unit Unit Price= (Fixed Costs/Breakeven Quantity) + Unit VC in \$ + (%Commission and %Royalty * Unit Price) PGQ= (Fixed Costs + Profit Goal)/[(1 - Royalty PGQ[(1- R&C%)Unit Price - Unit VC in \$]=Fixed This preview has intentionally blurred sections. Sign up to view the full version. View Full Document This is the end of the preview. Sign up to access the rest of the document. {[ snackBarMessage ]} ### Page1 / 4 MarketingHw4-Final - Homework#4 Smart Baby Name Sean Lyden... This preview shows document pages 1 - 2. Sign up to view the full document. View Full Document Ask a homework question - tutors are online
548
1,877
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.703125
3
CC-MAIN-2018-05
latest
en
0.683102
https://iwant2study.org/ospsgx/index.php/interactive-resources/physics/02-newtonian-mechanics/09-oscillations/79-shm16
1,679,855,149,000,000,000
text/html
crawl-data/CC-MAIN-2023-14/segments/1679296946445.46/warc/CC-MAIN-20230326173112-20230326203112-00220.warc.gz
391,209,630
28,247
SHM16 ### 1.2.10 Example The graph of velocity against displacement of a body is shown below. a)     Explain why there are two values of velocity for zero displacement. b)    Explain why there are two values of displacement for zero velocity. c)    Using the maximum value of the velocity, determine the period of oscillation. [when x =0, v =8(moving right) or -8(moving left),when v =0 , x = -2(at left) or 2(at right),1.6] ## Hint: ### 1.2.10.1 Suggested Solution: a)    An oscillating body moves through the equilibrium position (zero displacement) alternately in opposite directions. b)    An oscillating body has zero velocity when its displacement is maximum which occurs at the  maximum amplitude positions. Hence, there are 2 values of displacement. c)    vo = xo ω (8.0) = (2.0) ω ω = 4.0 rad/s thus $T=\frac{2\pi }{\omega }$  T  = 1.57 s = 1.6 s   (to 2 s.f.) ### Translations Code Language Translator Run ### Software Requirements SoftwareRequirements Android iOS Windows MacOS with best with Chrome Chrome Chrome Chrome support full-screen? Yes. Chrome/Opera No. Firefox/ Samsung Internet Not yet Yes Yes cannot work on some mobile browser that don't understand JavaScript such as..... cannot work on Internet Explorer 9 and below ### Credits This email address is being protected from spambots. You need JavaScript enabled to view it. ### end faq http://iwant2study.org/lookangejss/02_newtonianmechanics_8oscillations/ejss_model_SHM16/SHM16_Simulation.xhtml Rating 5.00 (3 Votes)
403
1,516
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 1, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.359375
3
CC-MAIN-2023-14
longest
en
0.715339
https://www.jiskha.com/display.cgi?id=1357417495
1,516,538,807,000,000,000
text/html
crawl-data/CC-MAIN-2018-05/segments/1516084890582.77/warc/CC-MAIN-20180121120038-20180121140038-00017.warc.gz
943,088,531
4,166
# solving equations by sibstitution posted by . -2x+6y=6 -7x+8y=-5 • solving equations by sibstitution - multiply the top by positive 8 and multiply the bottom by negative 6. then cancel out the y's and solve for x. plug x back into anyone and solve for y. • solving equations by sibstitution - hmm. sounds like elimination to me. For substitution, pick either equation and solve for x (or y): -2x+6y=6 6y = 2x+6 y = x/3 + 1 Now substitute that into the other equation: -7x+8y = -5 -7x + 8(x/3 + 1) = -5 -7x + 8x/3 + 8 = -5 -13x/3 = -13 x = 3 so, y = x/3+1 = 2 be sure to plug (3,2) into the original equations to make sure you (or I!) didn't make a mistake. ## Similar Questions 1. ### Solving Equations with variable on Both Sides I need help solving this. I've never been really good with fractions, so, that's probably why.: 3p/8 + 7p/16 - 3/4 = 1/4 + p/16 + 1/2 2. ### algebra attn Reiny Thanks for your help with the solving of the three equations! Yes, it was a typo. I just finished solving it a long way, solving for the 1st 2 equations then the 2nd and 3rd and plugging in variables...etc. etc. Your way gave the same … 3. ### MATH I've been having problems with solving equations that involve fractions with the following problem can I get some help for solving equations that involve fractions? Produce an example of a system of equations to your fellow students and allow them to respond on which method (graphing, substitution, elimination, matrices) they would choose for solving your systems of equations. Be sure to reply … 5. ### Chemistry When solving Hess law problems,do we need to use all the equations given to get the Htotal or just choose the relevant equations that are related to the final equation required? 6. ### Algebra SOLVING LINEAR EQUATIONS AND INEQUALITIES Please help Im am Grade 5 and my teacher is letting me do this. 1. Solve the solution by using elimination and substitution 3/x - 2/y = 14 6/x + 3/y = 7 2. Solve by eliminating x (this is solving 3 linear equations) then substitute … 7. ### Algebra I DONT KNOW HOW TO DO 3 VARIABLES Solving Linear Equations and Inequalities Solve by eliminating x (this is solving 3 linear equations) then substitute to the other two equation x + y + 5z =2 (1) 4x - 3y + 5z =3 (2) 3x - 2y + 5z=1 (3) my teacher gave me the answer … 8. ### Algebra Solving Linear Equations and Inequalities Solve by eliminating x (this is solving 3 linear equations) then substitute to the other two equation x + y + 5z =2 (1) 4x - 3y + 5z =3 (2) 3x - 2y + 5z=1 (3) my teacher gave me the answer … 9. ### ALGEBRA Can some give me the answers to lesson 9 solving equations unit test. Algebra 1A unut 3 solving equations. 10. ### Math How is solving a rational equation different from solving linear equations like 3x+5=7x-2? More Similar Questions
824
2,829
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.875
4
CC-MAIN-2018-05
latest
en
0.94308
https://livemcqs.com/2021/11/11/multiple-choice-questions-on-vectors-and-scalars-pdf/
1,685,839,070,000,000,000
text/html
crawl-data/CC-MAIN-2023-23/segments/1685224649348.41/warc/CC-MAIN-20230603233121-20230604023121-00619.warc.gz
411,457,026
31,718
# 50+ Scalars and Vectors MCQs and Answers Scalars and Vectors MCQs and Answers are the most important topics for various entrance exam like NEET, AIIMS, JEE. These Multiple Choice Questions On Vectors And Scalars PDF are easy to answer and easier to attempt. You don’t really need to refer other sources or books to solve these questions. Today we will cover the Scalars and Vectors MCQs and Answers which covers terms like scalar product, inner product, vector product, triple scalar product, dot product and many other terms. We also published the most important Questions and Answers on Motion In A Plane MCQ For NEET with Answers. You can Check it. ## Multiple Choice Questions On Vectors And Scalars PDF a) Force b) Pressure c) Velocity d) All of these a) Displacement b) Velocity c) Acceleration d) All of these #### 3. The operation used to obtain a scalar from two vectors is ______ a) Cross product b) Dot product c) Simple product d) Complex product #### 4. The operation which does not give you a vector as an output from two vector inputs is ______ a) Dot product b) Cross product d) Vector subtraction #### 5. What is a scalar? a) A quantity with only magnitude b) A quantity with only direction c) A quantity with both magnitude and direction d) A quantity without magnitude #### 6. What is a vector quantity? a) A quantity with only magnitude b) A quantity with only direction c) A quantity with both magnitude and direction d) A quantity without direction #### 7. The vector obtained by addition of two vectors is termed as ______ a) New vector b) Resultant vector c) Derived vector d) Sum vector #### 8. Which one of the following operations is valid? a) Vector multiplied by scalar c) Vector subtracted from scalar d) Vector divided by vector #### 9. Mass is a ____ a) Scalar quantity b) Vector quantity c) Relative quantity d) Dependent quantity a) Displacement b) Velocity c) Acceleration d) Pressure
473
1,968
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.84375
4
CC-MAIN-2023-23
latest
en
0.86514
https://www.geeksforgeeks.org/parsing-string-of-symbols-to-expression/?ref=rp
1,695,430,255,000,000,000
text/html
crawl-data/CC-MAIN-2023-40/segments/1695233506429.78/warc/CC-MAIN-20230922234442-20230923024442-00614.warc.gz
885,534,563
49,309
Open In App # Parsing String of symbols to Expression Given an expression as a string str consisting of numbers and basic arithmetic operators(+, -, *, /), the task is to solve the expression. Note that the numbers used in this program are single-digit numbers and parentheses are not allowed. Examples: Input: str = “3/3+4*6-9” Output: 16 Since (3 / 3) = 1 and (4 * 6) = 24. So the overall expression becomes (1 + 24 – 9) = 16 Input: str = “9*5-4*5+9” Output: 16 Approach: A Stack class is created to store both numbers and operators (both as characters). The stack is a useful storage mechanism because, when parsing expressions, the last item stored needs to be accessed frequently; and a stack is a last-in-first-out (LIFO) container. Besides the Stack class, a class called express(short for expression) is also created, representing an entire arithmetic expression. Member functions for this class allow the user to initialize an object with an expression in the form of a string, parse the expression, and return the resulting arithmetic value. Here’s how an arithmetic expression is parsed. A pointer is started at the left and is iterated to look at each character. It can be either a number(always a single-digit character between 0 and 9) or an operator (the characters +, -, *, and /). If the character is a number, it is pushed onto the stack. The first operator encountered is also pushed into the stack. The trick is subsequent operators are handled. Note that the current operator can’t be executed because the number that follows it hasn’t been read yet. Finding an operator is merely the signal that we can execute the previous operator, which is stored on the stack. That is, if the sequence 2+3 is on the stack, we wait until we find another operator before carrying out the addition. Thus, whenever the current character is an operator (except the first), the previous number (3 in the preceding example) and the previous operator (+) are popped off the stack, placing them in the variables lastval and lastop. Finally, the first number (2) is popped and the arithmetic operation is carried on the two numbers (obtaining 5). However, when * and / which have higher precedence than + and – are encountered, the expression can’t be executed. In the expression 3+4/2, the + cant be executed until the division is performed. So, the 2 and the + are put back on the stack until the division is carried out. On the other hand, if the current operator is a + or -, the previous operator can be executed. That is when the + is encountered in the expression 4-5+6, it’s all right to execute the -, and when the – is encountered in 6/2-3, it’s okay to do the division. Table 10.1 shows the four possibilities. Below is the implementation of the above approach: ## CPP // C++ implementation of the approach#include #include using namespace std; // Length of expressions in charactersconst int LEN = 80; // Size of the stackconst int MAX = 40; class Stack {private:    // Stack: array of characters    char st[MAX];     // Number at top of the stack    int top; public:    Stack()    {        top = 0;    }     // Function to put a character in stack    void push(char var)    {        st[++top] = var;    }     // Function to return a character off stack    char pop()    {        return st[top--];    }     // Function to get the top of the stack    int gettop()    {        return top;    }}; // Expression classclass Express {private:    // Stack for analysis    Stack s;     // Pointer to input string    char* pStr;     // Length of the input string    int len; public:    Express(char* ptr)    {        pStr = ptr;        len = strlen(pStr);    }     // Parse the input string    void parse();     // Evaluate the stack    int solve();}; void Express::parse(){     // Character from the input string    char ch;     // Last value    char lastval;     // Last operator    char lastop;     // For each input character    for (int j = 0; j < len; j++) {        ch = pStr[j];         // If it's a digit then save        // the numerical value        if (ch >= '0' && ch <= '9')            s.push(ch - '0');         // If it's an operator        else if (ch == '+' || ch == '-'                 || ch == '*' || ch == '/') {             // If it is the first operator            // then put it in the stack            if (s.gettop() == 1)                 s.push(ch);             // Not the first operator            else {                lastval = s.pop();                lastop = s.pop();                 // If it is either '*' or '/' and the                // last operator was either '+' or '-'                if ((ch == '*' || ch == '/')                    && (lastop == '+' || lastop == '-')) {                     // Restore the last two pops                    s.push(lastop);                    s.push(lastval);                }                 // In all the other cases                else {                     // Perform the last operation                    switch (lastop) {                     // Push the result in the stack                    case '+':                        s.push(s.pop() + lastval);                        break;                    case '-':                        s.push(s.pop() - lastval);                        break;                    case '*':                        s.push(s.pop() * lastval);                        break;                    case '/':                        s.push(s.pop() / lastval);                        break;                    default:                        cout << "\nUnknown oper";                        exit(1);                    }                }                s.push(ch);            }        }        else {            cout << "\nUnknown input character";            exit(1);        }    }} int Express::solve(){    // Remove the items from stack    char lastval;    while (s.gettop() > 1) {        lastval = s.pop();        switch (s.pop()) {         // Perform operation, push answer        case '+':            s.push(s.pop() + lastval);            break;        case '-':            s.push(s.pop() - lastval);            break;        case '*':            s.push(s.pop() * lastval);            break;        case '/':            s.push(s.pop() / lastval);            break;        default:            cout << "\nUnknown operator";            exit(1);        }    }    return int(s.pop());} // Driver codeint main(){     char string[LEN] = "2+3*4/3-2";     // Make expression    Express* eptr = new Express(string);     // Parse it    eptr->parse();     // Solve the expression    cout << eptr->solve();     return 0;} ## Java import java.util.Stack; public class ExpressionEvaluation {         public static int evaluate(String expression) {        // Create a stack to hold operands        Stack operands = new Stack();                 // Create a stack to hold operators        Stack operators = new Stack();                 for (int i = 0; i < expression.length(); i++) {            char ch = expression.charAt(i);                         // If the current character is a whitespace, skip it            if (ch == ' ') {                continue;            }                         // If the current character is a digit, push it to the operand stack            if (Character.isDigit(ch)) {                int num = 0;                while (i < expression.length() && Character.isDigit(expression.charAt(i))) {                    num = num * 10 + Character.getNumericValue(expression.charAt(i));                    i++;                }                i--;                operands.push(num);            }                         // If the current character is an operator, push it to the operator stack            else if (ch == '+' || ch == '-' || ch == '*' || ch == '/') {                while (!operators.empty() && hasPrecedence(ch, operators.peek())) {                    operands.push(applyOperation(operators.pop(), operands.pop(), operands.pop()));                }                operators.push(ch);            }        }                 while (!operators.empty()) {            operands.push(applyOperation(operators.pop(), operands.pop(), operands.pop()));        }                 return operands.pop();    }         public static boolean hasPrecedence(char op1, char op2) {        if ((op1 == '*' || op1 == '/') && (op2 == '+' || op2 == '-')) {            return false;        }        else {            return true;        }    }         public static int applyOperation(char op, int b, int a) {        switch (op) {            case '+':                return a + b;            case '-':                return a - b;            case '*':                return a * b;            case '/':                if (b == 0) {                    throw new UnsupportedOperationException("Cannot divide by zero");                }                return a / b;        }        return 0;    }         public static void main(String[] args) {        String expression = "2+3*4/3-2";        System.out.println(evaluate(expression));    }} ## Python3 # Python implementation of the approachimport sys # Size of the stackMAX = 40 class Stack:    def __init__(self):        # Stack: array of characters        self.st = [0] * MAX                 # Number at top of the stack        self.top = 0     # Function to put a character in stack    def push(self, var):        self.top += 1        self.st[self.top] = var     # Function to return a character off stack    def pop(self):        topval = self.st[self.top]        self.top -= 1        return topval     # Function to get the top of the stack    def gettop(self):        return self.top # Expression classclass Express:    def __init__(self, ptr):               # Stack for analysis        self.s = Stack()                 # Pointer to input string        self.pStr = ptr                 # Length of the input string        self.len = len(self.pStr)     # Parse the input string    def parse(self):        # Last value        lastval = 0        # Last operator        lastop = 0         # For each input character        for j in range(self.len):            ch = self.pStr[j]             # If it's a digit then save the numerical value            if ch >= '0' and ch <= '9':                self.s.push(int(ch) - int('0'))             # If it's an operator            elif ch == '+' or ch == '-' or ch == '*' or ch == '/':                 # If it is the first operator then put it in the stack                if self.s.gettop() == 1:                    self.s.push(ch)                 # Not the first operator                else:                    lastval = self.s.pop()                    lastop = self.s.pop()                     # If it is either '*' or '/' and the last operator was either '+' or '-'                    if (ch == '*' or ch == '/') and (lastop == '+' or lastop == '-'):                        # Restore the last two pops                        self.s.push(lastop)                        self.s.push(lastval)                     # In all the other cases                    else:                                               # Perform the last operation                        if lastop == '+':                            self.s.push(self.s.pop() + lastval)                        elif lastop == '-':                            self.s.push(self.s.pop() - lastval)                        elif lastop == '*':                            self.s.push(self.s.pop() * lastval)                        elif lastop == '/':                            self.s.push(self.s.pop() / lastval)                        else:                            print("\nUnknown operator")                            sys.exit(1)                     self.s.push(ch)             else:                print("\nUnknown input character")                sys.exit(1)     # Evaluate the stack    def solve(self):               # Remove the items from stack        lastval = 0        while self.s.gettop() > 1:            lastval = self.s.pop()            lastop = self.s.pop()             # Perform operation, push answer            if lastop == '+':                self.s.push(self.s.pop() + lastval)            elif lastop == '-':                self.s.push(self.s.pop() - lastval)            elif lastop == '*':                self.s.push(self.s.pop() * lastval)            elif lastop == '/':                self.s.push(self.s.pop() / lastval)            else:                print("\nUnknown operator")                sys.exit(1)         return int(self.s.pop()) # Driver codeif __name__ == "__main__":       # Make expression    string = "2+3*4/3-2"    eptr = Express(string)         # Parse it    eptr.parse()         # Solve the expression    print(eptr.solve())     # This code is contributed by sdeadityasharma ## C# // C# implementation of the approachusing System;using System.Collections.Generic; public class ExpressionEvaluation {   public static int evaluate(string expression)  {    // Create a stack to hold operands    Stack operands = new Stack();     // Create a stack to hold operators    Stack operators = new Stack();     for (int i = 0; i < expression.Length; i++) {      char ch = expression[i];       // If the current character is a whitespace,      // skip it      if (ch == ' ') {        continue;      }       // If the current character is a digit, push it      // to the operand stack      if (Char.IsDigit(ch)) {        int num = 0;        while (i < expression.Length               && Char.IsDigit(expression[i])) {          num = num * 10            + (int)Char.GetNumericValue(            expression[i]);          i++;        }        i--;        operands.Push(num);      }       // If the current character is an operator, push      // it to the operator stack      else if (ch == '+' || ch == '-' || ch == '*'               || ch == '/') {        while (operators.Count > 0               && hasPrecedence(ch,                                operators.Peek())) {          operands.Push(applyOperation(            operators.Pop(), operands.Pop(),            operands.Pop()));        }        operators.Push(ch);      }    }     while (operators.Count > 0) {      operands.Push(applyOperation(operators.Pop(),                                   operands.Pop(),                                   operands.Pop()));    }     return operands.Pop();  }   public static bool hasPrecedence(char op1, char op2)  {    if ((op1 == '*' || op1 == '/')        && (op2 == '+' || op2 == '-')) {      return false;    }    else {      return true;    }  }   public static int applyOperation(char op, int b, int a)  {    switch (op) {      case '+':        return a + b;      case '-':        return a - b;      case '*':        return a * b;      case '/':        if (b == 0) {          throw new InvalidOperationException(            "Cannot divide by zero");        }        return a / b;    }    return 0;  }   public static void Main(string[] args)  {    string expression = "2+3*4/3-2";    Console.WriteLine(evaluate(expression));  }} // This code is contributed by Chetan Bargal ## Javascript // JavaScript implementation of the approach // Size of the stackconst MAX = 40; class Stack {constructor() {// Stack: array of charactersthis.st = Array(MAX).fill(0);// Number at top of the stackthis.top = 0;} // Function to put a character in stackpush(value) {this.top += 1;this.st[this.top] = value;} // Function to return a character off stackpop() {let topval = this.st[this.top];this.top -= 1;return topval;} // Function to get the top of the stackgettop() {return this.top;}} // Expression classclass Express {constructor(ptr) {// Stack for analysisthis.s = new Stack();// Pointer to input stringthis.pStr = ptr;// Length of the input stringthis.len = this.pStr.length;} // Parse the input stringparse() {// Last valuelet lastval = 0;// Last operatorlet lastop = 0;// For each input characterfor (let j = 0; j < this.len; j++) {  let ch = this.pStr[j];     // If it's a digit then save the numerical value  if (ch >= '0' && ch <= '9') {    this.s.push(parseInt(ch) - parseInt('0'));  }  // If it's an operator  else if (ch == '+' || ch == '-' || ch == '*' || ch == '/') {    // If it is the first operator then put it in the stack    if (this.s.gettop() == 1) {      this.s.push(ch);    }    // Not the first operator    else {      lastval = this.s.pop();      lastop = this.s.pop();      // If it is either '*' or '/' and the last operator was either '+' or '-'      if ((ch == '*' || ch == '/') && (lastop == '+' || lastop == '-')) {        // Restore the last two pops        this.s.push(lastop);        this.s.push(lastval);      }      // In all the other cases      else {        // Perform the last operation        if (lastop == '+') {          this.s.push(this.s.pop() + lastval);        }        else if (lastop == '-') {          this.s.push(this.s.pop() - lastval);        }        else if (lastop == '*') {          this.s.push(this.s.pop() * lastval);        }        else if (lastop == '/') {          this.s.push(this.s.pop() / lastval);        }        else {          console.log("\nUnknown operator");          process.exit(1);        }      }      this.s.push(ch);    }  }  else {    console.log("\nUnknown input character");    process.exit(1);  }}}// Evaluate the stacksolve() {// Remove the items from stacklet lastval = 0;while (this.s.gettop() > 1) {lastval = this.s.pop();let lastop = this.s.pop();// Perform operation, push answerif (lastop == '+') {this.s.push(this.s.pop() + lastval);}else if (lastop == '-') {this.s.push(this.s.pop() - lastval);}else if (lastop == '*') {this.s.push(this.s.pop() * lastval);} else if (lastop == '/') {this.s.push(this.s.pop() / lastval);} else {console.log("\nUnknown operator");process.exit(1);}} return parseInt(this.s.pop());}} // Driver codelet st;st = "2+3*4/3-2";let eptr = new Express(st);eptr.parse();console.log(eptr.solve()); // This code is contributed by japmeet01 Output: 4 Time Complexity: O(N). Auxiliary Space: O(N).
4,615
17,969
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.078125
3
CC-MAIN-2023-40
latest
en
0.92496
http://acmg.seas.harvard.edu/people/faculty/djj/book/bookchap2.html
1,621,379,667,000,000,000
text/html
crawl-data/CC-MAIN-2021-21/segments/1620243989874.84/warc/CC-MAIN-20210518222121-20210519012121-00334.warc.gz
2,787,721
6,810
##### CHAPTER 2. ATMOSPHERIC PRESSURE ###### 2.1 MEASURING ATMOSPHERIC PRESSURE The atmospheric pressure is the weight exerted by the overhead atmosphere on a unit area of surface. It can be measured with a mercury barometer, consisting of a long glass tube full of mercury inverted over a pool of mercury: Figure 2-1 Mercury barometer When the tube is inverted over the pool, mercury flows out of the tube, creating a vacuum in the head space, and stabilizes at an equilibrium height h over the surface of the pool. This equilibrium requires that the pressure exerted on the mercury at two points on the horizontal surface of the pool, A (inside the tube) and B (outside the tube), be equal. The pressure PA at point A is that of the mercury column overhead, while the pressure PB at point B is that of the atmosphere overhead. We obtain PA from measurement of h: (2.1) where rHg = 13.6 g cm-3 is the density of mercury and g = 9.8 m s-2 is the acceleration of gravity. The mean value of h measured at sea level is 76.0 cm, and the corresponding atmospheric pressure is 1.013x105 kg m-1 s-2 in SI units. The SI pressure unit is called the Pascal (Pa); 1 Pa = 1 kg m-1 s-2. Customary pressure units are the atmosphere (atm) (1 atm = 1.013x105 Pa), the bar (b) (1 b = 1x105 Pa), the millibar (mb) (1 mb = 100 Pa), and the torr (1 torr = 1 mm Hg = 134 Pa). The use of millibars is slowly giving way to the equivalent SI unit of hectoPascals (hPa). The mean atmospheric pressure at sea level is given equivalently as P = 1.013x105 Pa = 1013 hPa = 1013 mb = 1 atm = 760 torr. ###### 2.2 MASS OF THE ATMOSPHERE The global mean pressure at the surface of the Earth is PS = 984 hPa, slightly less than the mean sea-level pressure because of the elevation of land. We deduce the total mass of the atmosphere ma: (2.2) where R = 6400 km is the radius of the Earth. The total number of moles of air in the atmosphere is Na = ma/Ma = 1.8x1020 moles. ###### Exercise 2-1. Atmospheric CO2 concentrations have increased from 280 ppmv in preindustrial times to 365 ppmv today. What is the corresponding increase in the mass of atmospheric carbon? Assume CO2 to be well mixed in the atmosphere. Answer. We need to relate the mixing ratio of CO2 to the corresponding mass of carbon in the atmosphere. We use the definition of the mixing ratio from equation (1.3) , where NC and Na are the total number of moles of carbon (as CO2) and air in the atmosphere, and mC and ma are the corresponding total atmospheric masses. The second equality reflects the assumption that the CO2 mixing ratio is uniform throughout the atmosphere, and the third equality reflects the relationship N = m/M. The change DmC in the mass of carbon in the atmosphere since preindustrial times can then be related to the change DCCO2 in the mixing ratio of CO2. Again, always use SI units when doing numerical calculations (this is your last reminder!): ###### 2.3 VERTICAL PROFILES OF PRESSURE AND TEMPERATURE Figure 2-2 shows typical vertical profiles of pressure and temperature observed in the atmosphere. Pressure decreases exponentially with altitude. The fraction of total atmospheric weight located above altitude z is P(z)/P(0). At 80 km altitude the atmospheric pressure is down to 0.01 hPa, meaning that 99.999% of the atmosphere is below that altitude. You see that the atmosphere is of relatively thin vertical extent. Astronomer Fred Hoyle once said, "Outer space is not far at all; it's only one hour away by car if your car could go straight up!" Figure 2-2 Mean pressure and temperature vs. altitude at 30oN, March Atmospheric scientists partition the atmosphere vertically into domains separated by reversals of the temperature gradient, as shown in Figure 2-2 . The troposphere extends from the surface to 8-18 km altitude depending on latitude and season. It is characterized by a decrease of temperature with altitude which can be explained simply though not quite correctly by solar heating of the surface (we will come back to this issue in chapters 4 and 7). The stratosphere extends from the top of the troposphere (the tropopause) to about 50 km altitude (the stratopause) and is characterized by an increase of temperature with altitude due to absorption of solar radiation by the ozone layer ( problem 1. 3 ). In the mesosphere, above the ozone layer, the temperature decreases again with altitude. The mesosphere extends up to 80 km ( mesopause) above which lies the thermosphere where temperatures increase again with altitude due to absorption of strong UV solar radiation by N2 and O2. The troposphere and stratosphere account together for 99.9% of total atmospheric mass and are the domains of main interest from an environmental perspective. ###### Exercise 2-2 What fraction of total atmospheric mass at 30oN is in the troposphere? in the stratosphere? Use the data from Figure 2-2 . Answer. The troposphere contains all of atmospheric mass except for the fraction P(tropopause)/P(surface) that lies above the tropopause. From Figure 2-2 we read P(tropopause) = 100 hPa, P(surface) = 1000 hPa. The fraction Ftrop of total atmospheric mass in the troposphere is thus The troposphere accounts for 90% of total atmospheric mass at 30oN (85% globally). The fraction Fstrat of total atmospheric mass in the stratosphere is given by the fraction above the tropopause, P(tropopause)/P(surface), minus the fraction above the stratopause, P(stratopause)/P(surface). From Figure 2-2 we read P(stratopause) = 0.9 hPa, so that The stratosphere thus contains almost all the atmospheric mass above the troposphere. The mesosphere contains only about 0.1% of total atmospheric mass. ###### 2.4 BAROMETRIC LAW We will examine the factors controlling the vertical profile of atmospheric temperature in chapters 4 and 7. We focus here on explaining the vertical profile of pressure. Consider an elementary slab of atmosphere (thickness dz, horizontal area A) at altitude z: Figure 2-3 Vertical forces acting on an elementary slab of atmosphere The atmosphere exerts an upward pressure force P(z)A on the bottom of the slab and a downward pressure force P(z+dz)A on the top of the slab; the net force, (P(z)-P(z+dz))A, is called the pressure-gradient force. Since P(z) > P(z+dz), the pressure-gradient force is directed upwards. For the slab to be in equilibrium, its weight must balance the pressure-gradient force: (2.3) Rearranging yields (2.4) The left hand side is dP/dz by definition. Therefore (2.5) Now, from the ideal gas law, (2.6) where Ma is the molecular weight of air and T is the temperature. Substituting (2.6) into (2.5) yields: (2.7) We now make the simplifying assumption that T is constant with altitude; as shown in Figure 2-2 , T varies by only 20% below 80 km. We then integrate (2.7) to obtain (2.8) which is equivalent to (2.9) Equation (2.9) is called the barometric law. It is convenient to define a scale height H for the atmosphere: (2.10) leading to a compact form of the Barometric Law: (2.11) For a mean atmospheric temperature T = 250 K the scale height is H = 7.4 km. The barometric law explains the observed exponential dependence of P on z in Figure 2-2 ; from equation (2.11) , a plot of z vs. ln P yields a straight line with slope -H (check out that the slope in Figure 2-2 is indeed close to -7.4 km). The small fluctuations in slope in Figure 2-2 are caused by variations of temperature with altitude which we neglected in our derivation. The vertical dependence of the air density can be similarly formulated. From (2.6) , ra and P are linearly related if T is assumed constant, so that (2.12) A similar equation applies to the air number density na. For every H rise in altitude, the pressure and density of air drop by a factor e = 2.7; thus H provides a convenient measure of the thickness of the atmosphere. In calculating the scale height from (2.10) we assumed that air behaves as a homogeneous gas of molecular weight Ma = 29 g mol-1. Dalton's law stipulates that each component of the air mixture must behave as if it were alone in the atmosphere. One might then expect different components to have different scale heights determined by their molecular weight. In particular, considering the difference in molecular weight between N2 and O2, one might expect the O2 mixing ratio to decrease with altitude. However, gravitational separation of the air mixture takes place by molecular diffusion, which is considerably slower than turbulent vertical mixing of air for altitudes below 100 km ( problem 4. 9 ). Turbulent mixing thus maintains a homogeneous lower atmosphere. Only above 100 km does significant gravitational separation of gases begin to take place, with lighter gases being enriched at higher altitudes. During the debate over the harmful effects of chlorofluorocarbons (CFCs) on stratospheric ozone, some not-so-reputable scientists claimed that CFCs could not possibly reach the stratosphere because of their high molecular weights and hence low scale heights. In reality, turbulent mixing of air ensures that CFC mixing ratios in air entering the stratosphere are essentially the same as those in surface air. ###### Exercise 2-3 The cruising altitudes of subsonic and supersonic aircraft are 12 km and 20 km respectively. What is the relative difference in air density between these two altitudes? Answer. Apply (2.12) with z1 = 12 km, z2 = 20 km, H = 7.4 km: The air density at 20 km is only a third of that at 12 km. The high speed of supersonic aircraft is made possible by the reduced air resistance at 20 km. ###### 2.5 THE SEA-BREEZE CIRCULATION An illustration of the Barometric Law is the sea-breeze circulation commonly observed at the beach on summer days ( Figure 2-4 ). Consider a coastline with initially the same atmospheric temperatures and pressures over land (L) and over sea (S). Assume that there is initially no wind. In summer during the day the land surface is heated to a higher temperature than the sea. This difference is due in part to the larger heat capacity of the sea, and in part to the consumption of heat by evaporation of water. Figure 2-4 The sea-breeze circulation As long as there is no flow of air between land and sea, the total air columns over each region remain the same so that at the surface PL(0) = PS(0). However, the higher temperature over land results in a larger atmospheric scale height over land (HL > HS), so that above the surface PL(z) > PS(z) ( Figure 2-4 ). This pressure difference causes the air to flow from land to sea, decreasing the mass of the air column over the land; consequently, at the surface, PL(0) < PS(0) and the wind blows from sea to land (the familiar "sea breeze"). Compensating vertical motions result in the circulation cell shown in Figure 2-4 . This cell typically extends ~10 km horizontally across the coastline and ~1 km vertically. At night a reverse circulation is frequently observed (the land breeze) as the land cools faster than the sea.
2,630
11,019
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.25
3
CC-MAIN-2021-21
latest
en
0.859585
https://www.mail-archive.com/sympy@googlegroups.com/msg31843.html
1,540,181,181,000,000,000
text/html
crawl-data/CC-MAIN-2018-43/segments/1539583514497.14/warc/CC-MAIN-20181022025852-20181022051352-00107.warc.gz
989,282,604
3,540
# [sympy] Rewrite trigonimetric terms like sin(Pi*h/2) for integer h as -(-1^(h-1))*mod(h,2)? ```Dear all, first, thanks to all the contributors for providing such a great and free tool.``` ``` For x-ray structure factor calculations, I end up with huge sums of trigonometric terms that I want to simplify knowing that the arguments of the trigonometric functions contain summands being multiples of Pi and Pi/2. In general, the step I am missing is to get from sin(Pi*h/2) for integer h to -(-1^(h-1))*mod(h,2) with integer h. The simplification should also simplify sin(Pi*h/2+x) to a sum of sin(x) and cos(x) depending on the phase Pi*h/2 with h integer. Then I would collect all the sin and cos terms... Is that doable with sympy? I would be very thankful for a hint how to proceed... Below is a working code that results in the following expression (h,k,l) integer that should be simplified (d real) into something f1(h,k,l)*sin(2pi(dh-dk))+f2(h,k,l)*sin(2pi(dh+dk))+... import sympy as sp from numpy import * import matplotlib.pyplot as plt sp.init_printing(use_latex=True) u=sp.symbols('u',positive=True) d=sp.symbols('d',positive=True) h=sp.symbols('h',integer=True) k=sp.symbols('k',integer=True) l=sp.symbols('l',integer=True) #h=sp.Integer(2) #k=sp.Integer(1) #l=sp.Integer(1) onehalf=sp.Integer(1)/sp.Integer(2) x=sp.symarray('x',8) y=sp.symarray('y',8) z=sp.symarray('z',8) # Wyckoff 8 h sites x[0:4]=([u,-u,-u+onehalf,u+onehalf]) y[0:4]=([u+onehalf,-u+onehalf,u,-u]) z[0:4]=([0,0,0,0]) [x[4:8],y[4:8],z[4:8]]=[x[0:4]+onehalf,y[0:4]+onehalf,z[0:4]+onehalf] s=sp.Integer(0) for j in range (0,8): s=s+sp.exp(-sp.Integer(2)*sp.I*sp.pi*(x[j]*h+y[j]*k+z[j]*l)) s=s.subs(u,sp.Integer(1)/sp.Integer(4)-d) s= (sp.expand_complex(s).simplify()) s Thank you for reading Best, Michael -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email
661
1,977
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.671875
4
CC-MAIN-2018-43
latest
en
0.726182
https://www.physicsforums.com/threads/potential-energy-gravity-spring.135408/
1,545,195,992,000,000,000
text/html
crawl-data/CC-MAIN-2018-51/segments/1544376831334.97/warc/CC-MAIN-20181219045716-20181219071716-00490.warc.gz
959,261,533
13,438
# Homework Help: Potential Energy (gravity & spring) 1. Oct 8, 2006 ### sebmista alright guys I've been going at this problem for a while I can't seem to figure it out. Here it is A flea is able to jump straight up about 0.40 m. It has been said that if a flea were as big as a human, it would be able to jump over a 100 story building! When an animal jumps, it converts work done in contracting muscles into gravitational potential energy (with some steps in between). The maximum force exerted by a muscle is proportional to its cross-sectional area, and the work done by the muscle is this force times the length of contraction. If we magnified a flea by a factor of 550, the cross section of its muscle would increase by 550^2 and the length of contraction would increase by 550. How high would this "superflea" be able to jump? (Don't forget that the mass of the "superflea" increases as well.) So this is the set up I've come up with... The initial gravity PE is 0 and the Initial and Final Kinetic energies are 0 as well... The final spring energy is 0 too so I'm left with 1/2kx^2 initial = mgy final y = .40 but I'm left with 3 other unknowns... If i knew them I could just multiply them all by 550 right? HELP 2. Oct 8, 2006 ### OlderDan The values of the unknowns are not really important. Make some reasonable assumptions for the mass of the flea and the area and contraction lengths of the muscles and see if you can do the problem. 3. Oct 8, 2006 ### sebmista Hmmm... Ok so then I do the following estimations... m = .000001 kg area = 1 millimeters (10^-3) contraction = .000001 micrometer (10^-6) so then it would be m = .000001 x 550 = .5.5e-4 kg area = .001 x 550^2 = 302.5 meters ???? this seems weird... contraction = .000001 x 550 = 5.5e-4 meters Am I going in the right direction? 4. Oct 8, 2006 ### OlderDan area would be square millimeters, not just milimeters, but the numerical part is OK Since the numbers do not reallly matter, you could use simpler ones. It will be best if you express things in mks units. The mass in kg is good. The area should be some number of meters squared. If you square your 1mm that would be .0000001 m^2. Your contraction number is OK if expressed in meters, but your number is incredibly small. 1mm or .001m would be fine and easier to keep track of. The important thing is the information that work done in contracting the muscle is the same as the gravitational potential energy achieved when jumping. From the information given that work is proportional to the are times the length of the muscle. Can you write an equation that expresses that relationship? And what happens to the mass of the flea if all the lengths are multiplied by 550?
698
2,717
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.75
4
CC-MAIN-2018-51
latest
en
0.948449
https://it.scribd.com/document/75171918/Lecture-4-5-6-Ratio-Analysis
1,579,360,321,000,000,000
text/html
crawl-data/CC-MAIN-2020-05/segments/1579250592636.25/warc/CC-MAIN-20200118135205-20200118163205-00397.warc.gz
503,174,664
88,788
Sei sulla pagina 1di 28 # FinancialStatementsAnalysis RATIOANALYSIS ## INTRODUCTION TO RATIO ANALYSIS Ratio analysis compares one figure with another to place it in context and asses its relative importance. It helps analyse date and aids decision making.It is part of the decision making process: Set Objectives ## review implement Select course of action A ratio: Is the mathematical relationship between two quantities in the form of a fraction or percentage. Ratio analysis: is essentially concerned with the calculation of relationships which after proper identification and interpretation may provide information about the operations and state of affairs of a business enterprise. The analysis is used to provide indicators of past performance in terms of critical success factors of a business. This assistance in decision-making reduces reliance on guesswork and intuition and establishes a basis for sound judgement. Note: A ratio on its own has little or no meaning at all. Significance of Using Ratios The significance of a ratio can only truly be appreciated when: 1. It is compared with other ratios in the same set of financial statements. 2. It is compared with the same ratio in previous financial statements (trend analysis). 3. It is compared with a standard of performance (industry average). Such a standard may be either the ratio which represents the typical performance of the trade or industry, or the ratio which represents the target set by management as desirable for the business. Financial ratio analysis is a fascinating topic to study because it can teach us so much about accounts and businesses. When we use ratio analysis we can work out how profitable a business is, we can tell if it has enough money to pay its bills and we can even tell whether its shareholders should be happy! 1 Ratio analysis can also help us to check whether a business is doing better this year than it was last year; and it can tell us if our business is doing better or worse than other businesses doing and selling the same things. In addition to ratio analysis being part of an accounting and business studies syllabus, it is a very useful thing to know anyway! The overall layout of this section is as follows: We will begin by asking the question, What do we want ratio analysis to tell us? Then, what will we try to do with it? This is the most important question, funnily enough! The answer to that question then means we need to make a list of all of the ratios we might use: we will list them and give the formula for each of them. Once we have discovered all of the ratios that we can use we need to know how to use them, who might use them and what for and how will it help them to answer the question we asked at the beginning? At this stage we will have an overall picture of what ratio analysis is, who uses it and the ratios they need to be able to use it. All that's left to do then is to use the ratios; and we will do that step- by-step, one by one. By the end of this section we will have used every ratio several times and we will be experts at using and understanding what they tell us. What do we want ratio analysis to tell us? What do the users of accounts need to know? What do we want ratio analysis to tell us? The key question in ratio analysis isn't only to get the right answer: for example, to be able to say that a business's profit is 10% of turnover. We have to start working on ratio analysis with the following question in our heads: What are we trying to find out? Isn't this just blether, won't the exam just ask me to tell them that profit is 10% of turnover? Well, yes, but then they want to know that you are a good student who understands what it means to say that profit is 10% of turnover. We can use ratio analysis to try to tell us whether the business 1. 2. 3. 4. 5. 6. 7. is profitable has enough money to pay its bills could be paying its employees higher wages is paying its share of tax is using its assets efficiently has a gearing problem is a candidate for being bought by another company or investor 2 The Ratios We can simply make a list of the ratios we can use here but it's much better to put them into different categories. If we look at the questions in the previous section, we can see that we talked about profits, having enough cash, efficiently using assets - we can put our ratios into categories that are designed exactly to help us to answer these questions. The categories we want to use, section by section, are: 1. 2. 3. 4. 5. 6. Profitability: has the business made a good profit compared to its turnover? Return Ratios: compared to its assets and capital employed, has the business made a good profit? Liquidity: does the business have enough money to pay its bills? Asset Usage or Activity: how has the business used its fixed and current assets? Gearing: does the company have a lot of debt or is it financed mainly by shares? Investor or Shareholder Not everyone needs to use all of the ratios we can put in these categories so the table that we present at the start of each section is in two columns: basic and additional. The basic ratios are those that everyone should use in these categories whenever we are asked a question about them. We can use the additional ratios when we have to analyse a business in more detail or when we want to show someone that we have really thought carefully about a problem. What do the Users of Accounts Need to Know? The users of accounts that we have listed will want to know the sorts of things we can see in the table below: this is not necessarily everything they will ever need to know, but it is a starting point for us to think about the different needs and questions of different users. Interest Group What do the Users of Accounts Need to Know? Ratios to watch Investors to help them determine whether they should buy shares in the business, hold on to the shares they already own or sell the shares they already own. They also want to assess the ability of the business to pay dividends. ## Return on Capital Employed Lenders to determine whether their loans and interest will be paid when due Gearing ratios Managers might need segmental and total information to see how they fit into the overall picture Profitability ratios Employees information about the stability and profitability of their employers to assess the ability of the business to provide remuneration, retirement benefits and employment opportunities ## Suppliers and other trade creditors businesses supplying goods and materials to other businesses will read their accounts to see that they don't have problems: after all, any supplier wants to know if his customers are going to pay their bills! Liquidity Customers the continuance of a business, especially when they have a long term involvement with, or are dependent on, the business Profitability Governments and their the allocation of resources and, therefore, the agencies activities of business. To regulate the activities of business, determine taxation policies and as the basis for national income and similar statistics Profitability Local community Financial statements may assist the public by providing information about the trends and recent developments in the prosperity of the business and the range of its activities as they affect their area ## This could be a long and interesting list Financial analysts they need to know, for example, the accounting concepts employed for inventories, depreciation, bad debts and so on ## Possibly all ratios Environmental groups many organisations now publish reports specifically aimed at informing us about how they are working to keep their environment clean. ## Expenditure on anti-pollution measures Researchers researchers' demands cover a very wide range of lines of enquiry ranging from detailed statistical analysis of the income statement and balance sheet data extending over many years to the qualitative analysis of the wording of the statements ## Possibly all ratios TYPES OF RATIO There are a number of types of ratios of interest to the various stakeholders of a business. The main classifications of ratios are as follows: Profitability Ratios Measure the relationship between gross/net profit and sales, assets and capital employed. These are sometimes referred to as being performance ratios. Profitability ratios measure the profitability of the organization. Gross profit, Net profit, Return on capital employed, Return on Investment, Earnings per share Activity Ratios These measure how efficiently an organisation uses its resources. These are sometimes referred to as asset utilisation ratios. Stock turnover, asset turnover, collection period, payment period Liquidity Ratios These investigate the short-term and long-term financial stability of the firm by examining the relationships between assets and liabilities. These are sometimes also called solvency ratios. Acid test, current ratio (quick ratio) This group of ratios is concerned with analysing the returns for shareholders. These examine the relationship between the number of shares issued, dividend paid, value of the shares, and company profits. For obvious reasons these are quite often categorised as shareholder ratios. Dividend yield, dividend per share, price/earnings ratio, dividend cover Investment Ratios Gearing Examines the relationship between internal sources and external sources of finance. It is therefore concerned with the long-term financial position of the company. Equity ratio, debt ratio, debt/equity ratio 1. PROFITABILITY RATIOS Profitability is the ability of a business to earn profit over a period of time. Although the profit figure is the starting point for any calculation of cash flow, as already pointed out, profitable companies can still fail for a lack of cash. Note: Without profit, there is no cash and therefore profitability must be seen as a critical success factors. A company should earn profits to survive and grow over a long period of time. Profits are essential, but it would be wrong to assume that every action initiated by management of a company should be aimed at maximising profits, irrespective of social consequences. Profitability is a result of a larger number of policies and decisions. The profitability ratios show the combined effects of liquidity, asset management (activity) and debt management (gearing) on operating results. The overall measure of success of a business is the profitability which results from the effective use of its resources. For most private business enterprises one of their main objectives is to make a profit. However, it is not sufficient just to measure the amount of profit made. (a) ## Gross Profit Margin This ratio examines the relationship between the profits made on trading activities only (gross profit) against the level of turnover/sales made. Normally the gross profit has to rise proportionately with sales. It can also be useful to compare the gross profit margin across similar businesses although there will often be good reasons for any disparity. It is given by the formula ## gross profit x 100 turnover (sales) expressed as a percentage Interpretation: Obviously the higher the profit margin a business makes the better. However, the level of gross profit margin made will vary considerably between different markets. For example the amount of gross profit percentage put on clothes, (especially fashion items), is far higher than that put on food items. So any result gained must be looked at in the context of the industry in which the firm operates. Analysis: This ratio is used to determine the amount of profit remaining from each sales dollar after subtracting the cost of goods sold. Example: a gross profit margin of 0.05 indicates that 5% of sales revenue is left to use for purposes other than the cost of goods sold. Measures the margin of profitability on sales throughout the year. This is the main indicator when measuring the efficiency of the operation, a very good indicator of the business's ability to withstand falling prices, rising costs or declining sales. A normal figure for a manufacturing industry would be between 6% and 8%, while high volume/low margin activities like food retailing can run very satisfactorily at around 3%. Retailers generally will have a lower profit margin than most industries. Highest margins of all are usually experienced in service industries where margins above 10% are enjoyed. The percentage should be relatively constant and any reason for decline investigated. Reasons for change could be a reduction in selling prices or increase in cost of sales. (b) ## Net Profit Margin This is a widely used measure of performance and is comparable across companies in similar industries. The fact that a business works on a very low margin need not cause alarm because there are some sectors in the industry that work on a basis of high turnover and low margins, for examples supermarkets and motorcar dealers. What is more important in any trend is the margin and whether it compares well with similar businesses. As opposed to gross profit margin this ratio measures the relationship between the net profit (profit made after all other expenses have been deducted) and the level of turnover or sales made. It is given by the formula: ## net profit x 100 turnover (sales) expressed as a percentage Interpretation As with gross profit, a higher percentage result is preferred. This is used to establish whether the firm has been efficient in controlling its expenses. It should be compared with previous years results and with other companies in the same industry to judge relative efficiency. The net profit margin should also be compared with the gross profit margin. For if the gross profit margin has improved but the net profit margin declined, this shows that profits made on trading are becoming better, however the expenses incurred in the running of the business are also increasing but at a faster rate than profits. Thus efficiency is declining. 7 Analysis: The net profit margin is calculated by taking the net earnings available to common stockholders and dividing it by sales. This ratio is used to determine the amount of net profit for each dollar of sales that remains after subtracting all expenses. Companies with profit margins of less than 5% tend to either be in very competitive sectors or they may be doing badly. Be careful with these companies. A small economic downturn can reduce sales leaving the company making losses. The profit margin is likely to be higher when: there is limited competition there is strong brand loyalty lower unit costs high price (e.g. orice inelastic product or exclusive item) Gross profit is turnover (also called sales or revenues) minus cost of sales (i.e. overhead costs have not been deducted) Net profit is turnover (=sales=revenue) minus cost of sales and overhead costs If the gross profits are rising over time but the net profit is falling that is due to increasing overheads (c) ## Return on Capital Employed (ROCE) This is sometimes referred to as being the primary ratio and is considered to be one of the most important ratios available. This ratio measures the efficiency of funds invested in the business at generating profits. This ratio is actually different for different types of business; this is due to the fact that the various types of business can all raise their capital in different ways. This ratio shows the profit attributable to the amount invested by the owners of the business. It also shows potential investors into the business what they might hope to receive as a return. The stockholders equity includes share capital, share premium, distributable and non-distributable reserves. Once again this is expressed as a percentage. ROCE = net profit before tax and interest x 100 total capital employed Total Capital = ordinary share capital + preference share capital + Reserves + Debentures +Long-term loans For each type of company the idea is to try to determine how much profit has been made for distribution from the total amount of assets employed by that business. This is why we ignore tax and interest charges when calculating ROCE for a limited company. These items will fluctuate at the whim of agencies such as the government and the Bank of England. Therefore if we were to measure profit after tax and interest we would get significant variations in our results. These would not reflect changes in the performance of the business, but external factors. Interpretation: As with the other ratios examined so far the higher the value of the ratio the better. A higher percentage can provide owners with a greater return. Inevitably this figure needs to be compared with previous years and other companies to determine whether this years result is satisfactory or not. Furthermore, the percentage result arrived at for ROCE for a given organisation needs to be compared with the percentage return offered by interest-bearing accounts at banks and building societies. Ideally the ROCE should be higher than any return that could be gained from interest-earning accounts. Analysis : Return on capital employed (ROCE) ratio measures whether or not a company is generating adequate profits in relation to the funds invested in it and is a key indicator of investment performance. A business could have difficulty servicing its borrowings if a low return is being earned for any length of time. In manufacturing we would expect to see figures in excess of 10% rising to over 25% at the top end. In retail lower figures would be experienced, ranging between 5% and 15%. Construction figures show an average of about 7% increasing to over 35% for the top performers. ## High ROCE can be achieved by Increasing sales Increasing profit margins ROCE is likely to be lower if the markets are in decline Unit costs are increasing and the firm cannot increase price Sales are falling The return on capital employed is likely to be higher when: The market is growing The firm is inceasing its efficiency Demand is high (d) ## Return on Investment (ROI) Income is earned by using the assets of a business productively. The more efficient the production, the more profitable the business. The rate of return on total assets indicates the degree of efficiency with which management has used the assets of the enterprise during an accounting period. This is an important ratio for all readers of financial statements. Investors have placed funds with the managers of the business. The managers used the funds to purchase assets which will be used to generate returns. If the return is not better than the investors can achieve elsewhere, they will instruct the managers to sell the assets and they will invest elsewhere. The managers lose their jobs and the business liquidates. ROI = After Tax Earnings : Total Assets (e) Earnings per Share (EPS) Whatever income remains in the business after all prior claims, other than owners claims (i.e. ordinary dividends) have been paid, will belong to the ordinary shareholders who can then make a decision as to how much of this income they wish to remove from the business in the form of a dividend, and how much they wish to retain in the business. The shareholders are particularly interested in knowing how much has been earned during the financial year on each of the shares held by them. For this reason, an earning per share figure must be calculated. Clearly then, the earning per share calculation will be: EPS = Net Income after Tax Preference Dividend : No. of Issued ordinary Shares Additional Information : The ROA ratio is calculated by taking the net earnings available to common stockholders (net income) and dividing it by total assets. This ratio is used to determine the amount of income each dollar of assets generates. Example: an ROA ratio of 0.0568 indicates that each dollar of company assets produced income of almost \$0.06. The ROE ratio is calculated by taking the net earnings available to common stockholders and dividing it by common stockholders' equity. This ratio is used to determine the amount of income produced for each dollar that common stockholders have invested. Example: An ROE ratio of 0.0869 indicates that the company returned 8.69% for every dollar invested by common stockholders. 10 2. LIQUIDITY RATIOS Liquidity refers to the ability of a firm to meet its short-term financial obligations when and as they fall due. The main concern of liquidity ratio is to measure the ability of the firms to meet their short-term maturing obligations. Failure to do this will result in the total failure of the business, as it would be forced into liquidation. These ratios are concerned with the examination of the financial stability of the organisation. They are mainly concerned with the organisations working capital and whether or not it is being managed effectively. Working capital is needed by all organisations in order for them to be able to finance their day-to-day activities. Too little and the company may not be able to pay all its debts. Too much and they may not be making most efficient use of their resources. 1. The Current Ratio The Current Ratio expresses the relationship between the firms current assets and its current liabilities. Current assets normally includes cash, marketable securities, accounts receivable and inventories. Current liabilities consist of accounts payable, short term notes payable, short-term loans, current maturities of long term debt, accrued income taxes and other accrued expenses (wages). Current Ratio = current assets: current liabilities Interpretation: The rule of thumb says that the current ratio should be at least 2, that is the current assets should meet current liabilities at least twice. Analysis For example: a current ratio of 2.57 indicates that the company has \$2.57 worth of current assets for every \$1.00 of current liabilities. One of the most universally known ratios, which reflect the Working Capital situation, indicates the ability of a company to pay its short-term creditors from the realisation of its current assets and without having to resort to selling its fixed assets to do so. Ideally the figure should always be greater than 1, which would indicate that there are sufficient assets available to pay liabilities, should the need arise. The higher the figure the better. For those industries such as transport where the majority of assets are tangible fixed assets, then a figure of 0.6 would be acceptable. In retail and manufacturing we would expect figures between 1.1 to 1.6; in wholesale and construction 1.1 to 1.5 and motor vehicles 1.2 to 1.6. Generally where credit terms and large stocks are normal to the business, the current ratio will be higher than, for example, a retail business where cash sales are the norm. 11 2. ## The Acid Test This ratio is sometimes also called the quick ratio or even the liquid ratio. It examines the businesss liquidity position by comparing current assets and liabilities but it omits stock from the total of current assets. This ratio is used to determine the company's ability to repay current liabilities after the least liquid of its current assets is removed from the equation. It examines the ability of the business to cover its short-term obligations from its quick assets only (i.e. it ignores stock).] This therefore provides a much more accurate measure of the firms liquidity.The reason for this is stock is the most illiquid current asset, i.e. it is the hardest to turn into cash without a loss in its value. With the omission of stock therefore we are able to perform a calculation that directly relates cash and near cash equivalents, (cash, bank and debtors) to short-term debts. Measures assets that are quickly converted into cash and they are compared with current liabilities. This ratio realizes that some of current assets are not easily convertible to cash e.g. inventories. It is given by the formula Acid Test = current assets stock: current liabilities Interpretation: Again conventional wisdom states that an ideal result for this ratio should be approximately 1.1:1 Thus showing that the organisation has 1.10 to pay every 1.00 of debt. Therefore the company can pay all its debts and has a ten- percent safety margin as well. A result below this e.g. 0.8:1 indicates that the firm may well have difficulties meeting short-term payments. Clearly this ratio will be lower than the current ratio, but the difference between the two (the gap) will indicate the extent to which current assets consist of stock. Analysis : Example: a quick ratio of 2.48 indicates that the company could pay off 248% of its current liabilities by liquidating all current assets other than inventory. This ratio indicates the ability of a company to pay its debts as they fall due. It is generally considered to be a more accurate assessment of a company's financial health than the current ratio as it excludes stock, thus reducing the risk of relying on a ratio that may include slow moving or redundant stock. Figures of this ratio are lower than the current ratio. Supermarkets can, for example, easily survive on ratios as low as 0.4 with cash being received for goods sold, before the goods are actually paid for. Plant hire contractors would also expect ratios as low as 0.6 to 0.8. Clothing retailers also operate at very low levels, with average figures being between 0.2 and 0.6 and retail as a whole between 0.3 and 0.7. In manufacturing figures between 0.7 and 1.1 are seen as acceptable and for wholesalers 0.7 to 1.0. Construction should operate at between 0.6 and 1.0. Do not want the acid test ratio to be too high because: This could mean too many debtors(i.e too much money outstanding); this may lead to bad debts and /or cashflow problems Could mean too much cash; cash represents idle money which could be earning a higher return elsewhere Do not want acid test ratio to be too low because: could mean liquidity problems i.e. may not be able to pay current liabilities 12 3. ACTIVITY RATIOS Activity ratios or financial efficiency ratios are concerned with how well an organisation manages its resources. Primarily they investigate how well the management controls the current situation of the firm. They consider stock, debtors and creditors. This area of ratios is linked therefore with the management of working capital. If a business does not use its assets effectively, investors in the business would rather take their money and place it somewhere else. In order for the assets to be used effectively, the business needs a high turnover. Unless the business continues to generate high turnover, assets will be idle as it is impossible to buy and sell fixed assets continuously as turnover changes. Activity ratios are therefore used to assess how active various assets are in the business. (a) Stock Turnover This ratio measures the number of times in one year that a business turns over its stock of goods for sale. From this figure we can also establish the average length of time (in days) that stock is held by the company. This ratio measures the stock in relation to turnover in order to determine how often the stock turns over in the business. It indicates the efficiency of the firm in selling its product. It is calculated by dividing he cost of goods sold by the average inventory. It is given by the formula Stock Turnover = cost of goods sold average stock where average stock = (opening stock + closing stock) 2 Interpretation: This ratio can only really be interpreted with knowledge of the industry in which the firm operates. For example, we would expect a greengrocer to turnover his or her stock virtually every day, as their goods have to be fresh. Therefore, we would expect to see a result for stock turnover of approximately 250 to 300 times per year. This allows for closures and holidays and the fact that some produce will last longer than one day. Conversely if we were examining the accounts of a second hand car sales business we would maybe expect them to turn over their entire stock of cars and replace with new ones maybe about once a month, therefore we would see a result of 12 times. Note: Increased turnover can be just as dangerous as reduced turnover if the business does not have the working capital to support the turnover increase. As turnover increases more working capital and cash is required and if not, overtrading occurs. expressed as however many times 13 As usual we can undertake a comparison with previous years or other similar sized firms in the same market. As a general rule though the higher the rate of stock turnover the better. It is possible to convert this ratio from showing the number of times an organisation turns over stock to showing the average number of days stock is held. It is given by the formula: Stock Turnover = average stock cost of goods sold x 365 expressed as days Interpretation: The high stock turnover ratio would also tend to indicate that there was little chance of the firm holding damaged or obsolete stock. It is also possible to express stock turnover in terms of weeks or months, by multiplying by 52 or 12 as appropriate. Analysis : A high ratio indicates that the company has inventory that sells well, while a low ratio means that the company has inventory that does not sell well. Example: an inventory turnover ratio of 66.67 indicates that inventory was sold 66.67 times during the year. Measures the number of times a company converts its stock into sales during the year. When examining this ratio it should be borne in mind that different companies will have varying levels of stock turnover depending on what they produce and the industry they operate in. Low figures are generally poor as they indicate excessively high or low moving stocks. At one end of the scale, and apart from advertising agencies and other service industries, ready mixed concrete companies probably have one of the better stock/turnover figures. At the other end companies that maintain depots of finished goods and replacement parts will have much poorer figures. For example, a manufacturing company with stock/turnover ratio of around 25 - 30 would be reasonable, decreasing with the larger and more complex the goods being made. For retail and wholesale, average figures would be lower at around 9 - 10. For construction, average stock/turnover figures would be around 16 and for industries such as transport, where overall stock figures are low, it would produce results of around 80 - 90. 14 (b) ## Debtors Collection Period This particular ratio is designed to show how long, on average, it takes the company to collect debts owed by customers. Customers who are granted credit are called debtors. The formula for this ratio is: Debtor collection period = debtors credit sales Often the figure for credit sales is not actually provided on the profit and loss account. In this case the sales/turnover figure should be substituted and used instead. Interpretation: Different industries allow different amounts of time for debtors to settle invoices. Standard credit terms are usually for 30,60,90 and 120 days. The debt collection period figure should therefore be compared against the official number of days the organisation allows for settlement. For this ratio the shorter the debt collection period the better. The shorter the average collection period, the better the quality of debtors, as a short collection period implies the prompt payment by debtors. The average collection period should be compared against the firms credit terms and policy to judge its credit and collection efficiency. An excessively long collection period implies a very liberal and inefficient credit and collection performance. The delay in collection of cash impairs the firms liquidity. On the other hand, too low a collection period is not necessarily favourable, rather it may indicate a very restrictive credit and collection policy which may curtail sales and hence adversely affect profit. x 365 expressed as days Analysis: Example: an average collection period ratio of 65.70 indicates that on average it takes 65.70 days for customers to pay off their account balances. Measures the length of time a company takes to collect its debts and is measured in days. In general terms the figure indicates the effectiveness of the company's credit control department in collecting monies outstanding. Apart from strictly cash businesses like supermarkets with virtually zero debtors, normal payment terms are at the end of the month following delivery, giving an average credit of between 6 and seven weeks. Clothing retailers show some of the lowest figures with averages of around 7 days. In manufacturing average figures are around 63 days, with 42 being experienced at the top end and 84 days at the lower end. Average for wholesalers is around 56 days, whilst in construction the figures are lower, at around 45 days. Generally the average figure is around 30 days. In the construction industry the average is around 31 days, rising to 54 days at the bottom end and down to 17 days at the top. For wholesalers the average rises to 37 days, with top and bottom figures being 18 and 61 days respectively. For retail the average figure drops to 23 days with 40 days being in the bottom sector. For food retailers as low as 8 - 12 days is the norm. In manufacturing averages tend to be around 37 days, with the worst performers rising to 55 days and the best showing creditor days of around 22 days. 15 (c) Asset turnover This ratio measures a businesss sales in relation to the assets it uses to generate these sales. The formula to calculate this ratio is Asset turnover ## sales net assets This formula measures the efficiency with which businesses use their assets. An increasing ratio over time generally indicates that the firm is operating with greater efficiency. A fall in the ratio can be caused by a decline in sales or an increase in assets employed. Interpretation: The results of asset turnover ratios vary enormously. A supermarket may have a high figure as it has relatively few assets in relation to sales. A shipbuilding firm is likely to have a much lower ratio because it requires many more assets.Increased turnover can be just as dangerous as reduced turnover if the business does not have the working capital to support the turnover increase. As turnover increases more working capital and cash is required and if not, overtrading occurs. Analysis : Example: a total asset turnover ratio of 0.68 indicates that the dollar amount of sales was 68% of all assets. The asset turnover indicates how effectively a company utilises its investment in assets. It is a measure of how efficient the company has been in generating sales from the assets at its disposal. A low figure would suggest either poor trading performance (which can be evaluated by the profit margin, sales per employee figures) or an over investment in costly fixed assets. The construction industry shows a mean asset turnover ratio of 1.6, with the poorer performers averaging 0.6 and the better companies showing an average of 2.6. The retail sector has an average asset turnover of 1.9, with poorer performers in the sector averaging 0.8 and the better ones showing an average of 3.2. 4. ## Creditors Payment Period This ratio measures the length of time it takes a company to pay its creditors. This particular ratio is designed to show how long, on average, it takes the company to pay debts owed to suppliers. Suppliers who are grant credit are called creditors. The formula for this ratio is: Debtor collection period = creditors x 365 expressed as days Credit purchases 16 Interpretation : Generally the average figure is around 30 days. Analysis : In the construction industry the average is around 31 days, rising to 54 days at the bottom end and down to 17 days at the top. For wholesalers the average rises to 37 days, with top and bottom figures being 18 and 61 days respectively. For retail the average figure drops to 23 days with 40 days being in the bottom sector. For food retailers as low as 8 - 12 days is the norm. In manufacturing averages tend to be around 37 days, with the worst performers rising to 55 days and the best showing creditor days of around 22 days. 17 5. GEARING The ratios indicate the degree to which the activities of a firm are supported by creditors funds as opposed to owners. The relationship of owners equity to borrowed funds is an important indicator of financial strength. The debt requires fixed interest payments and repayment of the loan and legal action can be taken if any amounts due are not paid at the appointed time. A relatively high proportion of funds contributed by the owners indicates a cushion (surplus) which shields creditors against possible losses from default in payment. Note: The greater the proportion of equity funds, the greater the degree of financial strength. Financial leverage will be to the advantage of the ordinary shareholders as long as the rate of earnings on capital employed is greater than the rate payable on borrowed funds. The following ratios can be used to identify the financial strength and risk of the business. (a) The Equity Ratio The equity ratio is calculated as follows: (this ratio is multiplied by 100 to bring it to a percentage) Equity Ratio = Ordinary Shareholders Interest : Total Assets Interpretation: A high equity ratio reflects a strong financial structure of the company. A relatively low equity ratio reflects a more speculative situation because of the effect of high leverage and the greater possibility of financial difficulty arising from excessive debt burden. (b) ## The Debt Ratio This is the measure of financial strength that reflects the proportion of capital which has been funded by debt, including preference shares. This ratio is calculated as follows: Debt Ratio = Total Debt : Total Assets Interpretation: With higher debt ratio (low equity ratio), a very small cushion has developed thus not giving creditors the security they require. The company would therefore find it relatively difficult to raise additional financial support from external sources if it wished to take that route. The higher the debt ratio the more difficult it becomes for the firm to raise debt. Debt Ratio is complementary to the equity ratio as long as total debt plus equity gives 100% of the total assets 18 Analysis: An increasing ratio would indicate that borrowing is making a higher contribution to the capital base of the business than shareholders funds. This may cause problems, particularly if profit margins are also in decline. The manufacturing sector shows an average total debt ratio 1.4, with the lower quartile companies averaging around 3.4 and the upper quartile showing a ratio of 0.4. The retail sector shows an average of 1.1, with the better performers in retail averaging 0.2: the construction industry averages around 1.5, with the upper quartile averaging around 0.25. Debt ratios measure the amount of debt an organization is using and the ability of the organization to pay off the debt. These include the debt to total assets ratio and the times interest earned ratio. (c) The Debt / EquityRatio This ratio indicates the extent to which debt is covered by shareholders funds. It reflects the relative position of the equity holders and the lenders and indicates the companys policy on the mix of capital funds. The debt to equity ratio is calculated as follows: Debt to Equity Ratio = Total debt : Total Equity Gearing is quite often included in the classification of liquidity ratios as this ratio focuses on the longterm financial stability of an organisation. It measures the proportion of capital employed by the business that is provided by long-term lenders as against the proportion that has been invested by the owners. Thus, we can see how much of an organisation has been financed by debt. It is given by the formula: Gearing = long term liabilities + preference shares x 100 total capital employed ## Once again this is expressed as a percentage. Total Capital = ordinary share capital + preference share capital + Reserves + Debentures + Long-term loans Long term liabilities = Long-term loans + debentures Interpretation: The gearing ratio shows how risky an investment a company is. If loans represent more than 50% of capital employed, the company is highly geared. Such a company has to pay interest on its borrowings before it can pay dividends to shareholders or retain profits for reinvestment. High gearing figures indicate a high degree of risk. As ordinary shareholders should enjoy a greater rate of return from lower geared companies. Low geared companies i.e. those under 50% should provide therefore a lower risk investment opportunity, they should also be able to negotiate loans much more easily than a highly geared company as they are not already carrying a high proportion of debt. 19 Analysis : Gearing is a comparison between the amount of borrowings a company has to its shareholders funds (net worth). The result of the calculation will show as a percentage the proportion of capital available within the company in relation to that owed to sources outside the company. Lower figures are more acceptable, showing that the company is predominantly financed by equity whilst high gearing shows an over reliance on borrowings for a significant proportion of the company's capital requirements. High gearing is significantly more dangerous at times of high or rising interest rates and also low profitability. Businesses that rely on a great deal of tangible assets (such as heavy manufacturing) or have to replace fixed assets more frequently than other industries are expected to have higher gearing figures. The transport industry shows an average gearing level of 150%, with the poorer performers suffering levels up to 380%. The service sector has an average gearing level of 100%, with the upper quartile of companies showing negative gearing (i.e. surplus of cash over borrowing). The construction industry, where borrowing is usually taken out against work in progress as well as tangible fixed assets such as plant and machinery, shows an average of 130% gearing, with the better performers averaging 30% and the poorer performing businesses showing gearing levels in excess of 400%. HIGH GEARING Advantages: borrowing may have enabled profitable projects to be undertaken borrowing can be a cheaper source of finance than shares Disadvantages may involve risk-if profits are low the firm may struggle to repay interest 6.may be difficult to borrow more finance INVESTMENT RATIOS Increasing gearing can be risky for firms because of the interest payments BUT if a firm refuses to borrow it may miss out on market opportunities. Increasing gearing is acceptable provided the profits earned more than cover the interest payments. So the firm needs to consider cover as well as the gearing ratio. A typical reaging ratio for UK firms is around 50% However firms are more likely to be highly geared : in the early years (as they borrow to set up and expand) if interest rates are low (so firms exploit this by borrowing and fixing interest rates) if the owners are reluctant to lose control by bringing in outside finance Shareholders and potential shareholders are primarily concerned with assessing the level of return they might gain from an investment in a particular company. These ratios are necessary as the value of shares can vary quite considerably. These ratios indicate the relationship of the firms share price to dividends and earnings. Note that when we refer to the share price, we are talking about the Market value and not the Nominal value as indicated by the par value. 20 For this reason, it is difficult to perform these ratios on unlisted companies as the market price for their shares is not freely available. One would first have to value the shares of the business before calculating the ratios. Market value ratios are strong indicators of what investors think of the firms past performance and future prospects. (a) ## Dividend Per Share (DPS) This is an important shareholders ratio. It simply the total dividend declared by a company divided by the number of shares the business has issued. Dividend per share = total dividends number of issued shares Results of this ratio are expressed as a number of pence per share. Interpretation: A higher figure is generally preferable to a lower one as this provides the shareholder with a larger return on his or her investment. However, some shareholders are looking for long-term investments and may prefer to have a lower DPS now in the hope of greater returns in the future and a rising share price. (b) Dividend yield This is the dividend per share (for the entire year) expressed as a percentage of the market price of the share. The dividend yield ratio indicates the return that investors are obtaining on their investment in the form of dividends. This yield is usually fairly low as the investors are also receiving capital growth on their investment in the form of an increased share price. It is interesting to note that there is strong correlation between dividend yields and market prices. Invariably, the higher the dividend, the higher the market value of the share. The dividend yield ratio compares the dividend per share against the price of the share Dividend yield = dividend per share x 100 market share price Results for this ratio can fluctuate regularly even daily as they depend upon the firms share price. A rising share price will cause the dividend yield to fall. This ratio is most valuable to investors relying upon an annual income from the purchases of shares. Normally a very high dividend yield signals potential financial difficulties and possible dividend payout cut. The dividend per share is merely the total dividend divided by the number of shares issued. The price per share is the market price of the share at the end of the financial year. Interpretation: This ratio is expressed as a percentage. Obviously higher percentages are preferred. The current rates of interest paid on savings accounts provide a useful comparison, although the latter carry no 21 risk (of capital loss). Hence many investors would expect dividend yield to exceed the current rate of interest. (c) Price/Earning Ratio (P/E ratio) P/E ratio is a useful indicator of what premium or discount investors are prepared to pay or receive for the investment. The higher the price in relation to earnings, the higher the P/E ratio which indicates the higher the premium an investor is prepared to pay for the share. This occurs because the investor is extremely confident of the potential growth and earnings of the share. The price-earning ratio is calculated as follows: P/E Ratio = Market Price per share : Current earnings per share High P/E generally reflects lower risk and/or higher growth prospects for earnings. (d) Dividend Cover This ratio measures the extent of earnings that are being paid out in the form of dividends, i.e. how many times the dividends paid are covered by earnings (similar to times interest earned ratio discussed above). A higher cover would indicate that a larger percentage of earnings are being retained and re-invested in the business while a lower dividend cover would indicate the converse. 22 ## LIMITATIONS OF RATIO ANALYSISLIMITATIONS OF RATIO ANALYSIS 1. Many ratios are calculated on the basis of the balance-sheet figures. These figures are as on the balance-sheet date only and may not be indicative of the year-round position. 2. Comparing the ratios with past trends and with competitors may not give a correct picture as the figures may not be easily comparable due to the difference in accounting policies, accounting period etc. 3. It gives current and past trends, but not future trends. 4. Impact of inflation is not properly reflected, as many figures are taken at historical numbers, several years old. 5. There are differences in approach among financial analysts on how to treat certain items, how to interpret ratios etc. 6. The ratios are only as good or bad as the underlying information used to calculate them. 1. Accounting Information * Different Accounting Policies The choices of accounting policies may distort inter company comparisons. Example - IAS 16 allows valuation of assets to be based on either revalued amount or at depreciated historical cost. The business may opt not to revalue its asset because by doing so the depreciation charge is going to be high and will result in lower profit. * Creative accounting The businesses apply creative accounting in trying to show the better financial performance or position which can be misleading to the users of financial accounting. Like the IAS 16 mentioned above, requires that if an asset is revalued and there is a revaluation deficit, it has to be charged as an expense in income statement, but if it results in revaluation surplus the surplus should be credited to revaluation reserve. So in order to improve on its profitability level the company may select in its revaluation programme to revalue only those assets which will result in revaluation surplus leaving those with revaluation deficits still at depreciated historical cost. 2. Information problems * Ratios are not definitive measures Ratios need to be interpreted carefully. They can provide clues to the companys performance or financial situation. But on their own, they cannot show whether performance is good or bad. Ratios require some quantitative information for an informed analysis to be made. * Outdated information in financial statement The figures in a set of accounts are likely to be at least several months out of date, and so might not give a 23 proper indication of the companys current financial position. * Historical costs not suitable for decision making IASB Conceptual framework recommends businesses to use historical cost of accounting. Where historical cost convention is used, asset valuations in the balance sheet could be misleading. Ratios based on this information will not be very useful for decision making. * Financial statements contain summarised information Ratios are based on financial statements which are summaries of the accounting records. Through the summarisation some important information may be left out which could have been of relevance to the users of accounts. The ratios are based on the summarised year end information which may not be a true reflection of the overall years results. * Interpretation of the ratio It is difficult to generalise about whether a particular ratio is good or bad. For example a high current ratio may indicate a strong liquidity position, which is good or excessive cash which is bad. Similarly Non current assets turnover ratio may denote either a firm that uses its assets efficiently or one that is under capitalised and cannot afford to buy enough assets. 3. ## Comparison of performance over time * Price changes Inflation renders comparisons of results over time misleading as financial figures will not be within the same levels of purchasing power. Changes in results over time may show as if the enterprise has improved its performance and position when in fact after adjusting for inflationary changes it will show the different picture. * Technology changes When comparing performance over time, there is need to consider the changes in technology. The movement in performance should be in line with the changes in technology. For ratios to be more meaningful the enterprise should compare its results with another of the same level of technology as this will be a good basis measurement of efficiency. * Changes in Accounting policy Changes in accounting policy may affect the comparison of results between different accounting years as misleading. The problem with this situation is that the directors may be able to manipulate the results through the changes in accounting policy. This would be done to avoid the effects of an old accounting policy or gain the effects of a new one. It is likely to be done in a sensitive period, perhaps when the businesss profits are low. * Changes in Accounting standard Accounting standards offers standard ways of recognising, measuring and presenting financial transactions. Any change in standards will affect the reporting of an enterprise and its comparison of results over a number of years. * Impact of seasons on trading As stated above, the financial statements are based on year end results which may not be true reflection of results year round. Businesses which are affected by seasons can choose the best time to produce financial 24 statements so as to show better results. For example, a tobacco growing company will be able to show good results if accounts are produced in the selling season. This time the business will have good inventory levels, receivables and bank balances will be at its highest. While as in planting seasons the company will have a lot of liabilities through the purchase of farm inputs, low cash balances and even nil receivables. 4. Inter-firm comparison * Different financial and business risk profile No two companies are the same, even when they are competitors in the same industry or market. Using ratios to compare one company with another could provide misleading information. Businesses may be within the same industry but having different financial and business risk. One company may be able to obtain bank loans at reduced rates and may show high gearing levels while as another may not be successful in obtaining cheap rates and it may show that it is operating at low gearing level. To un informed analyst he may feel like company two is better when in fact its low gearing level is because it can not be able to secure further funding. * Different capital structures and size Companies may have different capital structures and to make comparison of performance when one is all equity financed and another is a geared company it may not be a good analysis. * Impact of Government influence Selective application of government incentives to various companies may also distort intercompany comparison. One company may be given a tax holiday while the other within the same line of business not, comparing the performance of these two enterprises may be misleading. * Window dressing These are techniques applied by an entity in order to show a strong financial position. For example, MZ Trucking can borrow on a two year basis, K10 Million on 28th December 2003, holding the proceeds as cash, then pay off the loan ahead of time on 3rd January 2004. This can improve the current and quick ratios and make the 2003 balance sheet look good. However the improvement was strictly window dressing as a week later the balance sheet is at its old position. Ratio analysis is useful, but analysts should be aware of these problems and make adjustments as necessary. Ratios analysis conducted in a mechanical, unthinking manner is dangerous, but if used intelligently and with good judgement, it can provide useful insights into the firms operations. 25 26 27 28
10,862
55,406
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.4375
3
CC-MAIN-2020-05
latest
en
0.941146
http://clarkgrubb.com/bounds-limits
1,576,424,366,000,000,000
text/html
crawl-data/CC-MAIN-2019-51/segments/1575541308604.91/warc/CC-MAIN-20191215145836-20191215173836-00078.warc.gz
29,967,736
2,080
# Totally Ordered Set A set is totally ordered if • ifor any pair of elements in the set a and b, either ab or ba (totality) • if ab and bc, then ac (transitivity) • if ab and ba, then a = b (antisymmetry) If a set is totally ordered, then any subset is also totally ordered. If a set E is totally ordered, then we might want to find least element or greatest element in it. That is, we seek elements in E such that • min(E) ≤ a for all aE • max(E) ≥ a for all aE Such elements might not exist. For example, the set of integers under the customary order does not have a smallest or largest element. Finite, nonempty, totally ordered sets always have least and greatest elements, however. The antisymmetry property guarantees the uniqueness of a least element or a greatest element if it exists. A set is well-ordered if every non-empty set has a least element. The natural numbers are well-ordered; the integers, rationals, and real numbers are not. If X is totally ordered and EX, then an upper bound (resp. lower bound) of E is an element xX such that • ax (resp. ax) for all aE. An upper bound or lower bound might not exist, in which case E is said to be unbounded. Even if the upper bound or lower bound exists, it might not be unique. An upper bound or lower bound might or might not be in the set E. At most one upper bound and one lower bound can be in the set E. Although upper bounds and lower bounds are not necessarily unique, the least upper bound and greatest lower bound are unique if they exist. They can fail to exist even if there are upper bounds and lower bounds. A totally ordered set is complete if every nonempty set with an upper bound has a least upper bound. • inf, sup # Sequence • limit (sequence) # Function • limit (function) • right limit, left limit • nets
431
1,808
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.546875
4
CC-MAIN-2019-51
latest
en
0.879493
https://ourlittlesmarties.com/what-determines-the-direction-of-a-pwc-will-travel/
1,720,830,292,000,000,000
text/html
crawl-data/CC-MAIN-2024-30/segments/1720763514459.28/warc/CC-MAIN-20240712224556-20240713014556-00075.warc.gz
368,034,889
19,379
# What Determines the Direction of a Pwc Will Travel There are a few factors that determine the direction a personal watercraft (PWC) will travel. The most important factor is the weight distribution of the rider. If the rider is not balanced on the PWC, it will travel in the direction that they are leaning. Another factor is the wind. If there is a strong wind blowing in one direction, it can push the PWC off course. Finally, waves can also affect the direction of a PWC. If there are large waves, they can push the PWC in different directions. There are a few things that contribute to the direction a PWC will travel. The most important factor is the weight distribution of the rider. If the rider is evenly balanced on the PWC, it will travel straight. However, if the rider leans to one side or the other, the PWC will follow that lead and turn in that direction. Additionally, wind direction can also affect which way a PWC turns. Another big factor in determining which way a PWC will go is throttle input. If you give the PWC too much throttle, it will spin out; not enough throttle and it won’t move. You have to find that happy medium to keep it going straight. Lastly, waves can also play a role in which way a PWC travels. If you’re hitting waves at an angle, they can cause you to veer off course. So, there are a few things to keep in mind when trying to determine which way your PWC will go! ## What Direction Do You Roll a Pwc? Assuming you are talking about a personal watercraft (PWC), most PWCs are designed to be rolled in the direction opposite of how they are being ridden. So, if you are riding the PWC and it tips over, you would roll it in the direction away from you. ### What Direction Will a Pwc Travel If the Throttle is Cut to Idle? When the throttle is cut to idle on a PWC, the PWC will travel in a straight line. If the PWC is not moving forward, it will eventually come to a stop. ### What is Needed for Steering Control on a Pwc? Personal watercraft (PWC) are fun and convenient vessels that many people enjoy using for recreation. While they are easy to operate, there are some basic things you need to know in order to ensure safe and successful steering control. Here is what you need to know about steering a PWC: The Basics of PWC Steering Most PWCs are designed with handlebar-style controls, similar to what you would find on a motorcycle. The throttle is located on the right handle grip, while the brake and reverse levers are located on the left. To turn the PWC, simply twist the handlebars in the desired direction. Many newer models also come equipped with electronic speed control (ESC), which can be activated by a button or lever on the handlebars. ESC helps to automatically maintain a consistent speed, even when going up or down hills, making it easier for novice riders to stay in control. Tips for Safe Steering Control As with any vehicle, it is important to practice safe driving habits when operating a PWC. Here are some tips to help you steer safely: -Be aware of your surroundings at all times and avoid crowded areas where collision risks are high. -Never ride under the influence of drugs or alcohol. -Start off slowly until you get comfortable with how the PWC handles. -Be cautious when making turns and avoid sharp turns that could cause you to lose control or tip over. Following these simple tips will help you enjoy your time on the water while staying safe at all times! ### What Happens to the Pwc When the Steering Control is Turned to the Right? When the steering control is turned to the right, the PWC will turn to the right. This is because when the steering control is turned, it rotates the propeller, which causes the water to flow in a different direction and pushes the PWC in the opposite direction. ### Which Operation on a Pwc Requires More Than Idle Speed? There are a few different types of operation on a personal watercraft (PWC) that require more than idle speed. These include: • Starting the engine: In order to start the engine, you will need to provide enough throttle to turn over the engine. This usually requires around 1/3 throttle. • Accelerating: Once the engine is running, you will need to increase the throttle in order to accelerate. The amount of throttle required will depend on how fast you want to go. • Turning: When turning, you will need to provide extra throttle in order to maintain your speed and prevent the PWC from bogging down. The amount of throttle required will depend on how sharp the turn is and how much speed you are carrying. • Riding in rough water: Rough water can cause your PWC to porpoise (jump up and down) or even flip over if you’re not careful. In these conditions, it is important to maintain a steady throttle input and avoid any sudden changes. ## You are Operating a Pwc. What Will Happen If You Shut off the Engine? If you’re operating a personal watercraft (PWC), it’s important to know what will happen if you shut off the engine. Depending on the make and model of your PWC, as well as the water conditions, shutting off the engine may cause the PWC to stop abruptly or even capsize. In general, it’s best to avoid shutting off the engine while underway, unless absolutely necessary. If you do need to turn it off, be sure to do so gradually and carefully. Here are some things to keep in mind: – On most PWCs, if you shut off the engine while underway, the craft will immediately lose power and begin to slow down. Depending on your speed and the water conditions, this can be dangerous – especially if there are other boats or obstacles nearby. – If you’re in choppy waters or waves, shutting off the engine can cause your PWC to suddenly lose stability and possibly capsize. This is especially true for smaller craft like jet skis. – In calm waters, however, shutting off the engine shouldn’t pose too much of a problem – just be prepared for your PWC to slowly drift until you restart the engine or paddle to shore. ### What Should a Pwc Operator Do to Minimize the Risk of Accident Or Injury? There are a few key things that PWC operators can do to minimize the risk of accident or injury: 1. Always wear a life jacket. This will help keep you afloat if you fall off your PWC and will also provide some protection if you hit something while operating. 2. Avoid operating in crowded areas. This will help reduce the chances of collision with other vessels or objects. 3. Follow all posted speed limits and rules of the road. Operating at high speeds greatly increases the chances of an accident or injury occurring. 4. Make sure your PWC is in good working condition before heading out on the water. This includes checking the engine, steering, and braking systems to ensure they are all functioning properly. ### What is the Most Important Thing to Remember About Steering a Pwc? When operating a personal watercraft (PWC), the most important thing to remember is to always keep your hands on the handlebars. This will help you maintain control of the PWC and avoid any potential accidents. Additionally, be sure to stay aware of your surroundings at all times and be cautious of other boats or swimmers in the area. By following these simple tips, you can help ensure a safe and enjoyable experience while out on the water! ## Conclusion PWCs, or personal watercrafts, are small boats that are propelled by a jet of water. They are popular for recreation and racing, and can travel at high speeds. But what determines the direction a PWC will travel? The answer lies in the design of the PWC itself. The hull (the body of the boat) is usually wider at the back than it is at the front. This gives the PWC more stability when going straight, but makes it more difficult to turn. There are also fins on the bottom of most PWCs. These help to keep the PWC going in a straight line, but can also make it easier to turn if they are turned in the right direction. So, when you’re riding a PWC, remember that its design will affect which way it wants to go!
1,743
8,044
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.046875
3
CC-MAIN-2024-30
latest
en
0.94619
https://ch.mathworks.com/matlabcentral/cody/problems/2607-generate-square-wave/solutions/2504798
1,596,837,750,000,000,000
text/html
crawl-data/CC-MAIN-2020-34/segments/1596439737225.57/warc/CC-MAIN-20200807202502-20200807232502-00343.warc.gz
258,672,610
15,873
Cody # Problem 2607. Generate Square Wave Solution 2504798 Submitted on 9 Jun 2020 This solution is locked. To view this solution, you need to provide a solution of the same size or smaller. ### Test Suite Test Status Code Input and Output 1   Fail len = 10; num_cycle = 5; duty = 0.5; y_correct = [1 0 1 0 1 0 1 0 1 0]; assert(isequal(genSq(len,num_cycle,duty),y_correct)) Unrecognized function or variable 'Number_of_Cycle'. Error in genSq (line 3) duty = duty * len/Number_of_Cycle; Error in Test1 (line 5) assert(isequal(genSq(len,num_cycle,duty),y_correct)) 2   Fail len = 20; num_cycle = 4; duty = .2; y_correct = [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0]; assert(isequal(genSq(len,num_cycle,duty),y_correct)) Unrecognized function or variable 'Number_of_Cycle'. Error in genSq (line 3) duty = duty * len/Number_of_Cycle; Error in Test2 (line 5) assert(isequal(genSq(len,num_cycle,duty),y_correct)) 3   Fail len = 10; num_cycle = 1; duty = 1; y_correct = ones(1,10); assert(isequal(genSq(len,num_cycle,duty),y_correct)) Unrecognized function or variable 'Number_of_Cycle'. Error in genSq (line 3) duty = duty * len/Number_of_Cycle; Error in Test3 (line 5) assert(isequal(genSq(len,num_cycle,duty),y_correct)) 4   Fail len = 10; num_cycle = 1; duty = 0; y_correct = zeros(1,10); assert(isequal(genSq(len,num_cycle,duty),y_correct)) Unrecognized function or variable 'Number_of_Cycle'. Error in genSq (line 3) duty = duty * len/Number_of_Cycle; Error in Test4 (line 5) assert(isequal(genSq(len,num_cycle,duty),y_correct)) 5   Pass txt = fileread('genSq.m'); assert(isempty(strfind(txt,'for'))); assert(isempty(strfind(txt,'while'))); assert(isempty(strfind(txt,'if')));
555
1,686
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.34375
3
CC-MAIN-2020-34
latest
en
0.525215
https://www.physicsforums.com/threads/normal-numbers.64842/
1,477,245,378,000,000,000
text/html
crawl-data/CC-MAIN-2016-44/segments/1476988719397.0/warc/CC-MAIN-20161020183839-00428-ip-10-171-6-4.ec2.internal.warc.gz
963,291,172
15,556
# Normal Numbers 1. Feb 24, 2005 ### NateTG This is all really hard stuff, and speculation. Normal numbers are irrational numbers that have the property that all the digits in their decimal expression are equally distributed. http://mathworld.wolfram.com/NormalNumber.html An example of a normal 10-number might be: 0.123456789101112131415161718192021222324252627... Clearly whether a number is normal can depend on the base that it is represented in, so it makes sense to refer to b-normal numbers where b is the base. An absolutely normal number is a number that is normal in any fixed base. If a number is $p$-normal for all primes, is it necessarily absolutely normal? If a number is $n^i$-normal for some whole number $n$ is it absolutely normal? If a number is $p$-normal and $q$-normal is it also $pq$-normal? What about the converse?
211
848
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.1875
3
CC-MAIN-2016-44
longest
en
0.88909
https://help.scilab.org/docs/5.5.1/ru_RU/svplot.html
1,618,156,809,000,000,000
text/html
crawl-data/CC-MAIN-2021-17/segments/1618038064520.8/warc/CC-MAIN-20210411144457-20210411174457-00297.warc.gz
410,793,250
7,342
Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange Change language to: English - Français - Português - 日本語 - See the recommended documentation of this function Справка Scilab >> CACSD > Plot and display > svplot # svplot singular-value sigma-plot ### Calling Sequence `[SVM]=svplot(sl,[w])` ### Arguments sl `syslin` list (continuous, discrete or sampled system) w real vector (optional parameter) ### Description computes for the system `sl=(A,B,C,D)` the singular values of its transfer function matrix: ```G(jw) = C(jw*I-A)B^-1+D or G(exp(jw)) = C(exp(jw)*I-A)B^-1+D or G(exp(jwT)) = C(exp(jw*T)*I-A)B^-1+D``` evaluated over the frequency range specified by `w`. (T is the sampling period, `T=sl('dt')` for sampled systems). `sl` is a `syslin` list representing the system `[A,B,C,D]` in state-space form. `sl` can be continuous or discrete time or sampled system. The `i`-th column of the output matrix `SVM` contains the singular values of `G` for the `i`-th frequency value `w(i)`. `SVM = svplot(sl)` is equivalent to `SVM = svplot(sl,logspace(-3,3)) (continuous)` `SVM = svplot(sl,logspace(-3,%pi)) (discrete)` ### Examples ```x=logspace(-3,3); y=svplot(ssrand(2,2,4),x); clf();plot2d1("oln",x',20*log(y')/log(10)); xgrid(12) xtitle("Singular values plot","(Rd/sec)", "Db");```
437
1,351
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.59375
3
CC-MAIN-2021-17
longest
en
0.520551
https://learninfinite.com/how-to-compare-n-and-r-in-python/
1,708,966,329,000,000,000
text/html
crawl-data/CC-MAIN-2024-10/segments/1707947474661.10/warc/CC-MAIN-20240226162136-20240226192136-00588.warc.gz
373,992,314
20,380
# How to Compare n and r in Python? To compare two values `n` and `r` in Python, you can use comparison operators. Here’s an example of how you can do it: ``````n = 10 r = 5 if n > r: print("n is greater than r") elif n < r: print("n is less than r") else: print("n is equal to r")`````` In this example, we compare `n` and `r` using the greater than (`>`) and less than (`<`) operators. If `n` is greater than `r`, the first condition is true and the corresponding message is printed. If `n` is less than `r`, the second condition is true. If both conditions are false, it means `n` and `r` are equal, and the else block is executed, printing the message “n is equal to r.” You can modify the values of `n` and `r` in the example to compare any other pair of numbers.
220
773
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.953125
3
CC-MAIN-2024-10
latest
en
0.897633
https://economics.stackexchange.com/questions/4546/does-risk-aversion-of-utility-function-cause-the-existence-of-positive-interest
1,716,620,677,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058789.0/warc/CC-MAIN-20240525065824-20240525095824-00324.warc.gz
197,282,516
39,520
# Does risk aversion of utility function cause the existence of positive interest rate? In standard macro model, it is usually time preference that causes positive interest rate. But is there anything to do with risk aversion of utility function that causes existence of positive interest rate? Yes and no; it depends on which interest rate you look at. You are right in that risk aversion affects interest rates, but the direction can go both ways. In what follows I look at an economy with risky (stochastic) and non risky assets and risk averse agents. For the thought experiment, we increase the volatility of the risky asset, "increasing its riskiness". ### Risky Asset Despite having the same expected return, due to Jensen's inequality, the risky asset gives less utility to the agents. The risky asset will need to pay a higher interest, a risk premium, to attract investors. ### Safe Asset We have increased the aggregate risk of the economy by making the stochastic asset more volatile. Agent's added utility from insurance (through safe assets) has increased. Demand for safe assets at the old interest increases. Holding the supply of safe assets fixed, this means that the safe asset's interest rate will go down. To understand this fully, you might want to write down a two period model with two different assets, one standard normal with standard deviation $\sigma$ and one deterministic. Examine how interest rates for both assets change if you increase $\sigma$. • I think stochastic agent death can also influence the safe asset rate. This can be through a lower beta but I don't think it has to. It depends on what the utility of being dead is. – BKay Feb 26, 2015 at 15:12 Another way to look at it is this. The utility function of the representative agent affects the SDF, but we have some conditions that the resulting SDF must satisfy in typical economies. A stochastic discount factor (SDF) exists if and only if there is no arbitrage. (It is unique when markets are complete.) A key point is that a SDF must is a strictly positive process. Recall the definition of a SDF. A stochastic discount factor is an adapted stochastic process $\pi$ where $\pi_0 = 1$; $\pi_t > 0$ for all $t$; for each time $t$, $\pi_t$ has finite variance; for any basic asset $$P_{it} = E_t \left [ \sum_{s=t+1}^T D_{is} \frac{\pi_s}{\pi_t} \right ],$$ for all $t \in \mathcal T$. Now, this gives us the relationship $1 = E_t\left [ \frac{\pi_{t+1}}{\pi_t} R_{t+1} \right ]$. Then, the risk-free rate is just \begin{align} E_t\left [ \frac{\pi_{t+1}}{\pi_t} R_{t}^f \right ] = 1\\ R_t^f = \frac{1}{E_t\left [ \pi_{t+1}/\pi_t \right ]}. \end{align} So, in some ways, we can just say that the positivity of the risk-free rate is just due to the assumption of no arbitrage.
690
2,785
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 1, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2024-22
latest
en
0.945082
https://tex.stackexchange.com/questions/289589/writing-a-nice-function
1,660,230,321,000,000,000
text/html
crawl-data/CC-MAIN-2022-33/segments/1659882571472.69/warc/CC-MAIN-20220811133823-20220811163823-00041.warc.gz
505,684,749
65,139
# Writing a nice function How to write a function mapping like this: MWE \documentclass{standalone} \usepackage{amsmath,amssymb} \begin{document} $\begin{matrix} f'\colon & A \to \mathbb{R} \\ & x\mapsto f(x)=x^2 \end{matrix}$ \end{document} It is not alignment well. and it must be like • Please complete the code rather than posting mere fragments, which are of much less help. How should it look? Don't use in LaTeX. – cfr Jan 27, 2016 at 3:35 • I believe tex.stackexchange.com/a/32024/21344 has the answer you seek. :-) Jan 27, 2016 at 3:55 (The following code uses math examples you posted initially.) Depending on the type of alignment you want, one of the following two solutions may work for you. \documentclass{article} \usepackage{array} \begin{document} If you want flush-left alignment: $f\colon \begin{array}{>{\displaystyle}l} X \rightarrow Y \\ x\mapsto f(x)=\frac{x-1}{2} \end{array}$ \bigskip If the arrows have to be aligned vertically: $f\colon \begin{array}{>{\displaystyle}r @{} >{{}}c<{{}} @{} >{\displaystyle}l} X &\rightarrow& Y \\ x &\mapsto& f(x)=\frac{x-1}{2} \end{array}$ \end{document} Addendum: To align the first row of the array with f\colon, provide the [t] placement option after \begin{array} \documentclass{article} \usepackage{array} \begin{document} If \verb+f\colon+ should be on the same line as \verb+X\to Y+: $\setlength\arraycolsep{0pt} f\colon \begin{array}[t]{ >{\displaystyle}r >{{}}c<{{}} >{\displaystyle}l } X &\to& Y \\ x &\mapsto& f(x)=\frac{x-1}{2} \end{array}$ \end{document} • can it be improved for f and X \to Y in the same line? – L F Jan 27, 2016 at 3:58 • @LuisFelipe - Sure: Just insert [t] after \begin{array}, i.e., write \begin{array}[t]{...}. – Mico Jan 27, 2016 at 4:00
580
1,749
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.734375
3
CC-MAIN-2022-33
latest
en
0.582226
http://blog.mathsbank.co.uk/2011/06/happy-tau-day.html
1,531,918,090,000,000,000
text/html
crawl-data/CC-MAIN-2018-30/segments/1531676590169.5/warc/CC-MAIN-20180718115544-20180718135544-00384.warc.gz
53,130,751
13,253
## Tuesday, 28 June 2011 ### Happy Tau Day Happy Tau Day! Happy what day? Tau is a mathematical constant, whose value is 6.28... . Is that ringing any bells? Correct: OK, so tau being 6.28 explains why 28th June is Tau Day (blame the Americans - they write their dates backwards). But why do we need a new mathematical constant, especially one that is simply double another one? Some maths teachers and academics have been in favour of using tau instead of pi in maths teaching, particularly in early years. It's because 2 pi seems to crop up a lot, probably more often than a single pi, particularly in geometry and trigonometry. For example, the circumference of a circle is given by: If tau were widely adopted, this would be replaced by: Personally, I'm not convinced. Tau would certainly be useful in a number of formulae and mathematical solutions. But I think students would end up using a half of tau just as often as they currently use 2 pi. And if we went to a system where both constants were in use, would this not just add to the confusion, rather than alleviate it? Finally there are thousands of years of pi tradition. The ancient Greeks obsessed over pi, just as much as modern mathematicians do. What do you think of tau?
280
1,248
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.640625
3
CC-MAIN-2018-30
longest
en
0.979049
http://mathforum.org/kb/message.jspa?messageID=9585889
1,521,430,052,000,000,000
text/html
crawl-data/CC-MAIN-2018-13/segments/1521257646213.26/warc/CC-MAIN-20180319023123-20180319043123-00334.warc.gz
184,933,788
6,803
Search All of the Math Forum: Views expressed in these public forums are not endorsed by NCTM or The Math Forum. Notice: We are no longer accepting new posts, but the forums will continue to be readable. Topic: professors of Stanford endorsing proof of Goldbach to arxiv Replies: 20   Last Post: Sep 5, 2014 4:14 AM Messages: [ Previous | Next ] plutonium.archimedes@gmail.com Posts: 18,572 Registered: 3/31/08 Proof of the Conjecture-- subtract two perfect squares yields all the primes beyond 3 #2020 Correcting Math Posted: Sep 5, 2014 4:14 AM On Friday, September 5, 2014 2:51:29 AM UTC-5, Archimedes Plutonium wrote: > Alright, what I am going to try to do is walk the reader or student through how a mathematician forms a conjecture and then tests it, and finally looks for, and finds a proof. The proof part is the most difficult. > > > > Let me start the proof. And with my experience of proofs, I find geometry is the best means of a math proof, for the mind is better equipped to deal in geometry than to deal in pushing around numbers of algebra. Algebra is best for calculating people, not proving people. Unless the conjecture is wholly based in algebra, then geometry is of little use. > > > > So how would I make this conjecture be geometrical? > > > > Conjecture: by adding or subtracting two perfect squares, all the primes are yielded. > > > > Examples: 1+1=2, 4-1=3, 4+1=5, 16-9=7, 36-25=11, 9+4=13, etc etc > > > > So the start of this proof for me is to turn it, or translate it into geometry, because the mind, the mind of most humans sees things easiest as a geometry a shape, rather than sees quantity or algebra. > > > > So, I say to myself, how are primes turned into geometry? And I remember the Ancient Greeks had something called "polygonal numbers" such as the perfect-squares made of dots: > > > > . for 1 > > > > :: for 4 > > > > . . . > > . . . > > . . . for 9 > > > > . . . . > > . . . . > > . . . . > > . . . . for 16 > > > > Now notice something really nice about those geometry perfect squares, that you can add or subtract dots such as for example I subtract 9 from 16 I have remaining: > > > > . > > . > > . > > . . . . and notice it is 7, a prime so that 16-9=7 > > > > So here I have geometry and perfect squares and a means of extracting primes from subtraction. > > > > Now notice somthing neat about this L shaped figure of perfect squares when you remove enough of the dots to leave behind a L shaped figure. > > > > For 4-1=3 we have > > > > : : > > > > becomes > > . > > . . and the prime 3 > > > > Now notice that when you have the L shaped figure from a perfect square that the sum of the L dots is always a odd number and that beyond 2 as prime all the primes are odd numbers. > > > > So that, as we construct all the perfect squares and remove all the dots except for the L shaped skeleton we get many odd numbers. > > > > In fact, we generate All the Odd numbers starting with 3 from the L shaped figure of perfect squares. > > > > So, that gives us a big clue as to where the proof is to be found, that since all Perfect Squares have all the odd numbers nested inside them in the L-shaped figure and the L shaped figure is obtained by subtraction, we need only include addition for a headstart on a proof of the conjecture. > > As soon as I closed the computer, I realized I needed no addition and that subtraction suffices to yield all the primes. But I better check this out first and test it. If the perfect squares as represented by squares of dots such as 9 is: . . . . . . . . . Now if I subtract 4 from 9 I have remaining the L shaped figure of 5 dots. Since the L shaped figure represents all Odd Numbers from 3 and beyond then all the primes are in that representation. And if I remove a perfect square to leave behind the L-shaped figure, means that I capture every odd number and the primes-- all the primes after 2 are among them. But let me test and check to see if correct, for it is late at night and often prone to error. AP
1,056
4,008
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.484375
3
CC-MAIN-2018-13
longest
en
0.896752
https://socratic.org/questions/5872d1177c01492f00a3e18e
1,586,374,524,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585371821680.80/warc/CC-MAIN-20200408170717-20200408201217-00037.warc.gz
682,496,625
6,291
# Question 3e18e $143.75 #### Explanation: The problem tells you that Mrs. Margul wants to leave a 15% tip to her hairdresser, so the first thing to do here is to use this information to calculate the value of the tip. Now, a color(blue)(15)color(darkgreen)(%) tip basically means that Mrs. Margul will pay color(blue)($15) for every color(darkgreen)($100) in her bill. In essence, you can treat a percentage as a conversion factor to take you from the value of the bill to the value of the tip or vice versa. In this case, the bill is $125, so Mrs. Margul will have to add a tip of $125 color(red)(cancel(color(black)("bill"))) * color(blue)("$15 tip")/(color(darkgreen)("$100" color(red)(cancel(color(black)("bill"))))) = "$18.75 tip" "total bill" = $125 +$18.75 = \$143.75#
225
777
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 8, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.375
4
CC-MAIN-2020-16
latest
en
0.846628
https://anyassignment.com/samples/ravel-demand-forecasting-for-gold-coast-7559/
1,632,603,653,000,000,000
text/html
crawl-data/CC-MAIN-2021-39/segments/1631780057775.50/warc/CC-MAIN-20210925202717-20210925232717-00093.warc.gz
148,249,418
18,076
# Ravel Demand Forecasting for Gold Coast Assignment Words: 2173 The land use analysis brings together consideration for both physical development as well as the social characteristics of the urbanize area from which it is being examined. The use of maps and satellite images related to the given land area was used to analyses the current land and the transportation network. It can also be said that the satellite images gave one, the ability to identify land uses by being able to easily Justify the difference between industrial, residential, recreational and commercial areas within the given land mass. Transportation planning (TAP) is a major part of engineering as it gives insight into the way citizen travel from one area to another and allows for the identification of roads that will need to be expanded in order to accommodate traffic flow. The planning of a road network is the key to fulfill the demand and supply of society in any given area and it is important to plan ahead for future developments to ensure the road network is adequate. order now Transportation planning uses analytical tools to analyze, forecast and evaluate transportation between zones via major links and nodes linking the network together. The aim is to negative effects on the road network such as congestion, accidents and environmental pollution due to poor planning. Transportation planning requires a four step procedure. The following are key roles performed in this report in order to generate trip production and attraction. 1. 1 Step 1: Trip generation Trip generation is the prediction of the traffic demands, trips, within the area. During this step it calculates; the number of travelers leaving and entering a zone. The number of travelers leaving and entering is trip production and trip attraction respectively, this data is presented in a table for easy accessibility. . 2 Step 2: Trip distribution This step allows the calculation of trips from an origin I, to destination J. This data is then presented in an O-D matrix. Although trip origins and destination traveling to and from are of the same location, its trip production and attraction are not always teen same. 3 step 3′ Moe sconce The analysis of mode choice determines the type of transport used in each area. It also measures the proportion of travelers taking different modes of transportation. Modes of transportation can be divided into private and public transport, which include walking, driving by car or even public buses. In this report however, the mode of transport was car vehicles. 1. 4 Step 4: Traffic Assignment Traffic assignment is also known as route assignment or route choice. It is selection of routes which run between the origin and destination in a table. . 5 Study area The given land area features a diverse grouping of land which has many different uses. The main classification of land can be defined as industrial, commercial, residential and recreational. The given study area also holds many different schools, churches, petrol stations, golf courses, hospitals and universities. It can be said that al these different uses effect the production and attraction of each zone and with correct analysis gives insight into the road networks strain during peak hour flows throughout the day. The roads throughout the study area consist of bitumen for which the analysis will only consider roads with a speed limit of km/her and above. The reason for this investigation in primarily to give insight into whether or not the road network of the Gold Coast will be able to sustain the traffic flow in the future, due to the inflation of residence moving to the urbanize area. The future plan will e advised and will most likely give a proposal for new roads or wider roads to be created within the road network to increase traffic flow and meet the supply and demand requirements of the Gold Coast. It can also be inferred that a growth of public transportation may be advised such as subways, trams, busses and trains in order to reduce the strain on the road network and take the travelers underground or on rails in masses to reduce the trip generation on the study areas traffic network. 1. 6 Objective and Organization The objective of this assignment is to give an insight into the study of traffic analysis ND how it is critical in the design of the given study area to accommodate travel demands in year 2032. It is a necessity to have adequate road networks that can sustain traffic in order to allow the growth and expansion of the Gold Coast population. The aim of this assignment also, is to give the reader an understanding of transportation planning and its key role in creating a city where transportation is a life line. Organization of the project will involve the analysis of the land and its separation into zones which will then allow for the centuries, nodes, links and injectors to be placed in order to associate the land area into a production and attraction table all throughout chapter 2 to 5. This will produce trip generation to be entered into a software package called Visit’ which will result in an O-D matrix. Hence evaluation and analysis will be made in regards to the study area. 2. 0 Traffic Analysis Zone 2. 1 Dividing zones and method used for zoning This part of the report will further discuss the method used for zoning and how it can assist in the traffic analysis. The main reason for the need to divide the study area mailer before proceeding onto the four step methodology is so that the number of trips for each land use in an area can be determined. With the number of trips conclave, teen travel mean AT can road can De totaled tongue Velum, wanly eliminates the variability of different traffic generation rates found in each zone. This logic can be interpreted through the usage of the trip generation rate summary table’ provided in appendix, through land use analysis. For example, if 200 houses are found in each zone and there are 20 zones, as a result, there will be more zones to analyses Just for one land use which is a tedious process. In this report however, zoning was first done by breaking down the map through identifying the major and minor roads which runs horizontally and vertically throughout the map. It is then being broken down further if a zone seemed important enough to be analyses on its own. With that, land use analysis can be done throughout each zone. For instance, zone 11 has Smith Street motorway and Olsen Avenue as its major roads while having Engrave Avenue and Kumar Avenue as its minor roads contributing to the outline of the zone as shown in figure 1 . Figure 1 shows a sample of zone 11 divided by major and minor roads As mentioned n the previous paragraph, an area may generally consist of commercial retail, residential, financial institution, hospital and many others. These are broad categories which are further sub-divided. For example, residential land use can involve single family detached (urbanize or urbanize), estate housing or even high rise building with more or less than 20 dwelling units. From figure 2 dense areas usually appear to be of residential land use. Also, other accessible land uses such as schools, universities, office buildings, retail and recreation are most commonly located in suburban areas. With that each of these land uses will generate different peak hour morning and afternoon rate through land use analysis. Figure 2 satellite view showing different land uses in zone 1 1 2. 2 Special considerations for zoning In deciding a zone and in order to derive the travel demand for road networks, there are several important issues that must be addressed. The zones must be balanced. This meaner that when analyzing a particular zone, its surrounding zones need to be accounted for as well. This is because, travel demands of that particular area are also originated and destined to the surrounding area. With that, it introduces the need to account for external zones. External zones comprise of the same concept yet do not need scrutinizing like internal zones do. In this report, four external zones have been identified so as to create a balance in the travel demand of the study area. Further discussion of the analytical approach will be addressed in chapter 3. Another factor in which was being avoided, was the size of the zone. Large zones can distort relationships of the travel demands. This meaner that during an analysis of a large zone, one might miss out on several important land uses which generate travel emends towards the zone. Therefore, an ideal way to properly analyses zoning is to keep it within an average visible size and by paying attention to the dense areas as they produce the majority of the travel demands. Location of the centered of a particular zone is very essential in this case. In order to practice standardization Walton teen zones, centrals were located approximately at teen centre AT teen zone. I Nils was understood as trips were assumed to originate from that location outwards north, south, east and west towards its destination. However, some might argue that he zone centered should be placed on an origin which generates the most travel demand such as a residential housing area. Figure 3: Centuries and connectors of zone 1 1 2. 3 Results and comments In conclusion for this chapter, the study area has 15 internal zones and 4 external zones surrounding it. Figure 4 shows internal and external zones in which the study area was divided. As discussed earlier, the division of the zones was done by major and minor roads. After which, land use analysis was done on each zone to further analyses the travel demand. The division of zones was made by approximation and logical thinking of its land use. However, difficulty was faced when residential housing had to be identified. This was because it was impossible to identify each and every type of household in order to match up with the trip generation summary rate table. Therefore, the assumption for this was that strings of suburban houses were considered to be estate housings while in other non- developed areas were considered to be “single family detached, urbanize area”. Some others which do not fall within the two categories also include multiple dwelling units situated mostly in zones 6, 7, 8 and 9. Particularly addressing land uses in zone 1 1, a hospital is currently being built. Therefore in order to be one step ahead in calculating and accommodating the travel demand in the future, the Gold Coast hospital was identified. External zones were plotted approximately 10 to 20 kilometers outwards from the study area. The areas were carefully identified through analyzing the source of trip production as it will have an influence, big or small, towards the travel demand of the study area. The distance of zone 19 on the other hand was marked as an average trip from Brisbane to its suburbs, Brisbane to Penlight and Brisbane to Gold Coast and was calculated to be 38 kilometers. This assumption will be further discussed in chapter 4. Visit manual, the study area needs to be plotted with nodes, links, centered and connectors through zoning. Before generating the traffic demand, the area also needs production and attraction inputs which can be achieved through excel calculation. After which, the remaining of the four step procedure; trip distribution, mode choice and traffic assignment can further be implemented. This part of the report however, will discuss in great details of the process in which was undertaken to achieve the PIP values. Trip generation is basically the prediction of the number of trips to and from the zone centered. It is understood that when choosing a piece of land from the map, its residential area which usually can be spotted as a dense location from the ‘Google’ map, is the targeted zone to be analyses as it is the source of trip production. The zones were divided by identifying the main roads and were further divided by its land use for example; residential, parks, cemetery or industrial. The centered was placed by a rough estimation of the centre of the zone or where the traffic seemed dense. Thus, non-residential areas are called attraction zones implementing the term trip attraction’ when analyzing its travel demands. As stated in chapter 2, the methodology of estimating trip generation is done by studying various selections of areas having the same land use. For the given study area, below are teen steps proceeding In relying teen peak nor Ana ally PIP values AT teen year 2012 and 2032. Steps: In this report, trip generation are calculated based on its area either measured in square feet or acres by using ‘Google Maps Area Calculator Tool’. This tool allows accurate area calculation of a particular zone as shown in figure 5. Figure 5: Google Maps Area Calculator Tool showing the area for internal zone ## How to cite this assignment Choose cite format: Ravel Demand Forecasting for Gold Coast Assignment. (2021, Mar 25). Retrieved September 25, 2021, from https://anyassignment.com/samples/ravel-demand-forecasting-for-gold-coast-7559/
2,563
13,161
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2021-39
latest
en
0.940882
http://www.instructables.com/topics/how-do-you-get-from-Ampere-to-Ampere-hours/
1,524,457,006,000,000,000
text/html
crawl-data/CC-MAIN-2018-17/segments/1524125945724.44/warc/CC-MAIN-20180423031429-20180423051429-00001.warc.gz
447,624,570
6,544
125Views3Replies # how do you get from Ampere to Ampere hours? Answered i know, basically it's not too diffy. I checked wikipedia and in the end i get to Coulomb, but the information i need is: i wanna build these cat-ears: https://www.instructables.com/id/Animatronic-Cat-Ears and as material one needs a LiPo battery - the guy says "anything that will be able to supply 3A worth of current" and links to a 800mAh-battery at hobbyking. I first bought a battery with 4000mAh, say a battery that gives 4A per hour, but the one i got is quite heavy and i doubt that it's a good idea to use it in this light-weighted project - so how the hell did that guy get from a 800mAH-battery to the 3A worth of current? How do i calculate this way? Tags: ## 3 Replies 800mAH is .8AH. To get rid of amps we just divide: .8AH/3A=.267H, or 16 minutes. An 800mAH battery will put out 3A for sixteen minutes. 3 amps is a lot of current, especially for a controller circuit. Although I guess the motors will pull a lot of current. BTW, a 4AH batter means that you can pull 4 amps for an hour, not per hour. if you wanted to pull 16 amps out of that battery, it would last for 15 minutes. Good Luck. Luziviech (author)2012-10-03 yea thanx, guess that does it, thanx for the calculation. frollard (author)2012-10-03 So, ampere (often just referred to as amp) is a flowrate, it's a number of electrons-per-second (coloumb*second) an amp HOUR, is the total number of electrons that would flow over a given amount of time (an hour). Like how speed is distance/time, and if you multiply by an amount of time, you get just distance... The water analogy falls apart for lots of electronics but is good for explaining amps and volts when referring to DC: Think of a river flowing downstream. The flow rate or current (cubic meters per second) is like amps.  The total amount of water that goes by in an hour (just plain old cubic meters) is like amp-hours. Then consider a slow moving river, Not much vertical difference between start and end.  not much 'potential energy' difference...This is much like volts, specifically LOW voltage. how much the electrons (or water in this case) wants to get from point a to point b is good to represent voltage.  Again, the width and depth of the river gives a cross section, good for representing the flowrate, or amps. Now consider Niagara falls.  Large potential-energy difference between the top and the bottom (height)...the water at the top once it falls off the cliff is VERY excited to get to the bottom.  This is a good representation of HIGH voltage.  When it's a rainy season and the river is bursting its banks, the current will be high and the voltage will remain high.  When it's a drought, and only a trickle remains, there is still high voltage (potential), but not a lot of current. The problem arises when people use short-form or skip words when referring to different units. A battery has: • a capacity (total amount of energy) in Amp-hours • A voltage (total voltage potential of cells) in Volts • a discharge rate 'C' - the amount of amps you can pull out of the battery at any given time • various other specs like temperature tolerances, weight, etc that don't affect this math *much. So, a 4000mAh 7.2v battery with a rating of 20C supplies 7.2 volts, and is capable of supplying 4A*20 = 80 Amps If you draw 80 amps out of a 4000mAh battery (4Amp hours) it will last for 1 hour * (4amp hour/80amps) = 1 hour * (1/20) = 3 minutes. At absolute maximum discharge rate, the battery will last 3 minutes
912
3,555
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.5
4
CC-MAIN-2018-17
latest
en
0.937228
https://stats.stackexchange.com/questions/121628/correcting-multiple-marginals-in-a-subsample-of-a-survey
1,722,945,771,000,000,000
text/html
crawl-data/CC-MAIN-2024-33/segments/1722640484318.27/warc/CC-MAIN-20240806095414-20240806125414-00573.warc.gz
435,754,114
39,950
# Correcting multiple marginals in a subsample of a survey My question in short: How to assign weights to a subsample of a survey in order to fit multiple features simultaneously to their original marginals? ...and now the details: I have some data set X of n=10000 sample points with 100 features (age, gender, citysize, online-hours, number of siblings, ...). The sample is representative with respect to age, gender, and citysize (that is, the marginals of age, gender, and citysize give the real one). Now I partition the sample X into two parts X1 and X2, depending on some criterion. It turns out that, restricted to only X1 or X2 alone, the marginals age, gender, and citysize do no longer give the original distribution. I want to correct for this by assigning appropriate weights to the sample points, such that including the weights, all three representative factors (age, gender, and citysize) give again the original marginal distribution inside X1 and X2, respectively. This is fairly easy if you only correct for a single factor, say for the age=1,2,...,10: 1. create the age-histograms for X1 and X2, respectively (which deviate from the "true" histograms of X) 2. assign the weight X.agehist[i] / X1.agehist[i] to each sample in X1 of age i 3. assign the weight X.agehist[i] / X2.agehist[i] to each sample in X2 of age i Then, including the weights, the marginals of X1 and X2 give the same original distribution as the marginals of X. The problem now is, that I want to correct for multiple factors, so finding proper weights seems to be more tricky. Are there any standard techniques for doing so ? The procedure is called "calibration", and one special algorithm to perform it is called "raking". Essentially, you cycle over the margins adjusting each one until the weights converge. In R, it is implemented by rake() function in survey package. In Stata, I implemented it in ipfraking package.
451
1,920
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.75
3
CC-MAIN-2024-33
latest
en
0.916135
https://101papers.com/business-statistics-final-stat-230/
1,604,044,501,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107909746.93/warc/CC-MAIN-20201030063319-20201030093319-00450.warc.gz
187,018,505
11,780
# Business statistics final (stat 230) Please answer all 30 questions.  Make sure your answers are as complete as possible.  Show all of your work and reasoning.  In particular, when there are calculations involved, you must show how you come up with your answers with critical work and/or necessary tables.  Answers that come straight from program software packages will not be accepted. You must include the Honor Pledge on the title page of your submitted final exam.  Exam submitted without the Honor Pledge will not be accepted. Honor Pledge:  “I have completed this final examination myself, working independently and not consulting anyone except the instructor. I have neither given nor received help on this final examination.” Use the information below to answer Questions 1 through 3. Given a sample size of 34, with sample mean 660.3 and sample standard deviation 104.9, we perform the following hypothesis test.  Since n>30, this is a Z test. Null Hypothesis Alternative Hypothesis 1.      What is the test statistic? What is the p-value? 2.      At a 5% significance level (95% confidence level), what is the critical value(s) in this test?  Do we reject the null hypothesis? 3.      What are the border values of  between acceptance and rejection of this hypothesis? Questions 4 through 7 involve rolling of dice. 4.      Given a fair, six-sided die, what is the probability of rolling the die twice and getting a “1” each time? 5.      What is the probability of getting a “1” on the second roll when you get a “1” on the first roll? 6.      The House managed to load the die in such a way that the faces “2” and “4” show up twice as frequently as all other faces.  Meanwhile, all the other faces still show up with equal frequency.  What is the probability of getting a “5” when rolling this loaded die? 7.      Write the probability distribution for this loaded die, showing each outcome and its probability. Use the data in the table to answer Questions 8 through 9. 8.      Determine SSxx, SSxy, and SSyy. 9.      Find the equation of the regression line.  What is the predicted value when Use the data below to answer Questions 10 through 12. A group of students from three universities were asked to pick their favorite college sport to attend of their choice:  The results, in number of students, are listed as follows: Football Basketball Soccer Maryland 60 70 20 Duke 10 75 15 UCLA 35 65 25 Supposed that a student is randomly selected from the group mentioned above. 10.  What is the probability that the student is from UCLA or chooses football? 11.  What is the probability that the student is from Duke, given that the student chooses basketball? 12.  What is the probability that the student is from Maryland and chooses soccer? Use the information below to answer Questions 13 and 15. There are 4000 mangoes in a shipment.  It is found that it a mean weight of 15 ounces with a standard deviation of 2 ounces. 13.  How many mangoes have weights between 14 ounces and 16 ounces? 14.  What is the probability that a randomly selected mangoweighs less than 14 ounces? 15.  A quality inspector randomly selected 100 mangoes from the shipment. a.       What is the probability that the 100 randomly selected mangoes have a mean weight less than 14 ounces? b.      Do you come up with the same result in Question 14?  Why or why not? 16.  Suppose that in a box of 20 iPhone devices, there are 5 with defective antennas.  In a draw without replacement, if 3 iPhone devices are picked, what is the probability that all 3 have defective antennas? Use the information below to answer Questions 17 and 18. Benford’s law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit is distributed in a specific, non-uniform way shown in the following table. Leading Digit 1 2 3 4 5 6 7 8 9 Distribution of Leading Digit (%) 30.1 17.6 12.5 9.7 7.9 6.7 5.8 5.1 4.6 The owner of a small business would like to audit its account payable over the past year because of a suspicion of fraudulent activities.  He suspects that one of his managers is issuing checks to non-existing vendors in order to pocket the money.  There have been 790 checks written out to vendors by this manager.  The leading digits of these checks are listed as follow: Leading Digits 50 15 12 74 426 170 11 23 9 17.  Suppose you are hired as a forensic accountant by the owner of this small business, what statistical test would you employ to determine if there is fraud committed in the issuing of checks?  What is the test statistic in this case? 18.  What is the critical value for this test at the 5% significance level (95% confidence level)?  Do the data provide sufficient evidence to conclude that there is fraud committed? Hypothesis Test versus Confidence Interval – Questions 19 through 21 Random samples of size n1=55 and n2 = 65 were drawn from populations 1 and 2 , respectively.  The samples yielded Test Ho: (p1-p2) = 0 against Ha: (p1-p2) >0 using α = .05. 19.  Perform a hypothesis test of p1 = p2 with a 5% significance level (95% confidence level). 20.  Obtain a 95% confidence interval estimate of p1p2. 21.  Do you come up with the same conclusion for Question 19 and Question 20?  Why or why not? Hardness of Gem – Questions 22 and 23 Listed below are measured hardness indices from three different collections of gemstones. Collection Hardness Indices A 9.3 9.3 9.3 8.6 8.7 9.3 9.3 — — — — — — 9.91 0.10 B 8.7 7.7 7.7 8.7 8.2 9.0 7.4 7.0 — — — — — 8.03 0.60 C 7.2 7.9 6.8 7.4 6.5 6.6 6.7 6.5 6.5 7.1 6.7 5.5 7.3 6.82 0.34 You are also given that . 22.  What is the test statistic? 23.  Use a 5% significance level (95% confidence level) to test the claim that the different collections have the same mean hardness. 24.  The probability that an individual egg in a carton of eggs is cracked is 0.03.  You have picked out a carton of 1 dozen eggs (that’s 12 eggs) at the grocery store.  Determine the probability that at most one of the eggs in the carton are cracked. 25.  In a group lineup of 7 models in a commercial, 3 are male and 4 are female.  In how many ways can you arrange 3 models in a lineup if the first and the third must be a male but the second one must be a female? 26. Pair Sample from Population 1 (observation 1) Sample from Population 2 (observation 2) 1 7 4 2 3 1 3 9 7 4 6 2 5 4 4 6 8 7 The data for a random sample of six paired observations are shown in the table above. a)      Compute  and Sd b)      Express µd in terms of µ1 and µ2. c)      Form a 95% confidence interval for µd. d)     Test Ho: µd = 0 against Ha: µd ≠ 0. Use α = .05 27.  Peter, Paul, Mary, John and Martha are members of the pastoral council at a local                 church.  They are to be seated at one side of a long conference table in a pastoral council meeting. a)      How many possible ways can these 5 council members be seated? b)      How many possible sitting arrangements are there if only gender is considered in the process? 28.  How many social robots would need to be sampled in order to estimate the proportion of robots designed with legs, no wheels to within .075 of its true value with 99% confidence.  Given that a random sample of 106 robots showed that 63 were designed with legs, no wheels. 29.  Composite sampling is a way to reduce laboratory testing costs.  A public health department is testing for possible fecal contamination in public swimming pools. In this case, water samples from 5 pools are combined for one test, and further testing is performed only if the combined sample shows fecal contamination. Based on past experience, there is a 3% chance of finding fecal contamination in a public swimming area. What is the probability that a combined sample from 5 swimming pools has fecal contamination? Recall that P(A) +P(not A) = 1.0. 30  A random sample of five accidents resulted in the following number of persons injured: 18, 15, 12, 19, & 21. Using the .01 significance level, can we conclude the population mean is less than 20 for all accidents? a)      State Ho and Ha? b)      Test statistic = ? c)       Critical value = ? d)       Reject Ho: (yes or no) Basic features • Free title page and bibliography • Unlimited revisions • Plagiarism-free guarantee • Money-back guarantee On-demand options • Writer’s samples • Part-by-part delivery • Overnight delivery • Copies of used sources Paper format • 275 words per page • 12 pt Arial/Times New Roman • Double line spacing • Any citation style (APA, MLA, Chicago/Turabian, Harvard) # Our Guarantees 101papers.com is always working towards customer satisfaction. Our professional academic writers always aim at producing comprehensive papers that possess quality and originality at pocket-friendly prices. Students are assured that all their private information is safe with us. ### Money-Back Guarantee 101papers.com provides a system where students can request for money-back in case they cancel the order or in the rare instances of dissatisfaction. The refund policy adheres to the company’s term and conditions on money-back. ### Zero-Plagiarism Guarantee While providing the best professional essay writing services, we guarantee all our students of plagiarism-free papers. All papers produced by our professional academic writers are checked against all web resources and previously completed papers to avoid plagiarism. ### Free Revision Policy In our urge to provide the best professional essay writing services, we guarantee students of free revision policy. The free revision policy is a courtesy service where students can request for unlimited for their completed papers. We always aim at achieving 100% customer satisfaction rates. The free revision policy is one among many of our major advantages. At 101papers.com, every student is entitled to total security. Our professional academic writers are always committed to protecting all private information of our customers. We do not share any personal information with third parties. Additionally, we provide safe systems for all online transactions. ### Fair-Cooperation Guarantee Working with us is the greatest step towards achieving all your academic goals. We always deliver the best professional essay writing services as promised. We, therefore, expect all students to work cooperatively with us, as we work towards achieving our goal, your satisfaction. This way, all services will be delivered accurately and on time. ## Calculate the price of your order 550 words We'll send you the first draft for approval by September 11, 2018 at 10:52 AM Total price: \$26 The price is based on these factors:
2,602
10,738
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.453125
3
CC-MAIN-2020-45
latest
en
0.891931
http://gpuzzles.com/mind-teasers/car-meter-riddle/
1,490,899,012,000,000,000
text/html
crawl-data/CC-MAIN-2017-13/segments/1490218199514.53/warc/CC-MAIN-20170322212959-00305-ip-10-233-31-227.ec2.internal.warc.gz
147,388,697
10,740
• Views : 30k+ • Sol Viewed : 10k+ # Mind Teasers : Car Meter Riddle Difficulty Popularity Today my car meter reads as 72927 kms. I notes that this is a palindrome. How many minimum kms i need to travel so my car meter find another palindrom. Discussion Suggestions • Views : 60k+ • Sol Viewed : 20k+ # Mind Teasers : Impossible Maths Science Riddle Difficulty Popularity Cindy throws a ball from a 90 feet building. The ball is quite bouncy and when it hits the ground, it bounces back half way up. It keeps bouncing back to half way up. How many bounces will the ball take before it comes to a permanent halt? • Views : 50k+ • Sol Viewed : 20k+ # Mind Teasers : Movie Pictogram Rebus Difficulty Popularity Which movie name is hidden in the pictogram rebus below? • Views : 50k+ • Sol Viewed : 20k+ # Mind Teasers : Eight Eights Brain Teaser Difficulty Popularity Using eight eights and addition only, can you make 1000? • Views : 40k+ • Sol Viewed : 10k+ # Mind Teasers : Guess Game Logic Problem Difficulty Popularity In a guess game , five friends had to guess the exact numbers of balls in a box. Friends guessed as 31 , 35, 39 , 49 , 37, but none of guess was right.The guesses were off by 1, 9, 5, 3, and 9 (in a random order). Can you determine the number of balls in a box ? • Views : 80k+ • Sol Viewed : 20k+ # Mind Teasers : Who Are We Difficulty Popularity Without being called, we came out at night. Without being stolen, we get lost in the day. Who are we? • Views : 60k+ • Sol Viewed : 20k+ # Mind Teasers : Awesome Probability Logic Riddle Difficulty Popularity You need to divide 50 marbles(25-red and 25-blue) into two boxes such that the probability of picking red marble is maximized. Following conditions need to hold true : 1. None of box is empty 2. All the marbles must be in one of two boxes. • Views : 70k+ • Sol Viewed : 20k+ # Mind Teasers : Brothers Ias Smart question Difficulty Popularity Two brothers have developed differences among themselves and thus want to part ways. The problem is that they have one big land that is irregular in shape. Both of them want an equal share which is fairly impossible as there is no way that land could be divided in equal halves due to irregularity in the shape. The wisest man of the village is called who tells a way in which both of them will be happy even though the land might not be divided into exactly equal halves. What way did he suggest? • Views : 70k+ • Sol Viewed : 20k+ # Mind Teasers : Lateral Thinking Puzzle Difficulty Popularity Sachin new ferrari car has five wheels(two front wheels, two Rear wheels and one spare wheel). Real car Wheel will wear out in exact 21000 miles and front wheel will wear out after exact 29000 miles. What is the maximum distance sachin can cover. Note: unlimited numbers of changing the tyres can take place. • Views : 60k+ • Sol Viewed : 20k+ # Mind Teasers : Famous 13 Cave Logic Problem Difficulty Popularity A thief was running from the police after the biggest theft the town saw. He took his guard in one of the thirteen caves arranged in a circle. Each day, the thief moves either to the adjacent cave or stay in the same cave. Two cops goes there daily and have enough time to enter any two of the caves out of them. How will the cop make sure to catch the thief in minimum number of days and what are the minimum number of days? • Views : 60k+ • Sol Viewed : 20k+ # Mind Teasers : Trick Interesting Maths puzzle Difficulty Popularity There are three cars in a racing track. The track is made forming a perfect circle and is quite wide so that at one time, multiple cars can pass through it. The car which is leading is driving at 55 MPH and the slowest car is driving at 45 MPH. The car that is in middle of these two is driving in between the two speeds. For the time being you can say that the distance between the fastest car and the middle car is x miles and it is same between the middle car and the slowest car. Also, x is not equal to 0 or 1. The car keeps running till the leading car catches up with the slowest car and then every car stops. Given the case, do you think that at any point, the distance between any two pairs will again become x miles? Submit your Email Address to get latest post directly to your inbox. ### Latest Puzzles 31 March ##### Prime Number Puzzle Can you find out how many prime numbers ... 30 March ##### Farmer Shopkeeper QuickFire Riddle A farmer is constantly providing fruits ... 29 March ##### Cut The Cake - 8 Equal Pieces Riddle Can you cut the cake into 8 equal pieces... 28 March ##### Happy Birthday Rebus Riddle What does below rebus means ?... 27 March ##### Unique Words Riddle What is the unique property of the below... 26 March ##### Passcode Riddle You forgot the three digit code of your ... 25 March ##### 3+3!=8 MatchStick Equation Puzzle Can you move one matchstick to make belo...
1,223
4,932
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.609375
4
CC-MAIN-2017-13
latest
en
0.899476
https://people.cs.umass.edu/~barring/cs187f11/hw/1.html
1,670,082,455,000,000,000
text/html
crawl-data/CC-MAIN-2022-49/segments/1669446710933.89/warc/CC-MAIN-20221203143925-20221203173925-00364.warc.gz
501,663,269
1,949
# Homework Assignment #1 ### Due on paper in lecture, Monday 26 September 2011 Correction in purple added 18 September. Correction in brown added 18 September. • Question 1 (15): SPIRE is UMass' system for online course information and registration. Choose three of the eight aspects of software quality in L&C Chapter 1, and comment on how SPIRE is a good or bad piece of software with respect to those aspects. • Question 2 (10) Do Exercises 2.1 and 2.2 on pages 24-25 of L&C. (For example, the "order of" the function 2n + 6 is "O(n)".) • Question 3 (20) For each of the two code fragments in Exercises 2.4 and 2.5 on page 25 of L&C, give the order of the growth function and justify your answer. Correction: L&C meant to say "`count2=1`" instead of "`count2=0`". Solve the problem with this change in the code, and say what will happen to the method if this change is not made. • Question 4 (15) The statement "O(n2) + O(n2) = O(n2)" means "if f and g are each functions that are bounded above by quadratic functions, then f + g is also bounded above by a quadratic function". Explain why this is true. Then determine the order of "O(n)[O(n) + O(1)] + O(n) + O(n3)" and justify your answer. • Question 5 (20) Do Exercises 3.4 and 3.5 on page 66 of L&C. In Exercise 3.5, I earlier said "assume that each of the three parts starts over with the result of Exercise 3.4" but this makes no sense as (b) and (c) are the same commands. Assume that the operations of (a), (b), (c) take place sequentially in that order. • Question 6 (20) Write a Java static method `Integer[ ] rearrange (Integer [ ] input)` that will take any array of Integer objects as inputs and return an array of the same length containing the same objects but such that (a) all the even numbers come before the odd numbers, (b) all the original even numbers are in the same relative order, (c) all the original odd numbers are in reverse order relative to their position in "input". Use a `Stack<Integer>` object.
532
1,993
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.234375
3
CC-MAIN-2022-49
latest
en
0.902689
https://www.internet4classrooms.com/grade_level_help/compare_numbers_math_first_1st_grade.htm
1,716,442,009,000,000,000
text/html
crawl-data/CC-MAIN-2024-22/segments/1715971058611.55/warc/CC-MAIN-20240523050122-20240523080122-00233.warc.gz
712,189,778
8,273
@internet4classr I4C ## Order and compare (less than, greater than, or equal to) whole numbers to 100. 0106.2.5 1. Compare - 1-9, 1-20, 10-99, 100-999, customize the range of numbers - from FreeMathTest 1. Worksheets to print are also available supporting instruction of this topic 2. Compare It! - Students can practice comparing numbers, objects, or words using Greater Than, Less Than, Equal, Greater Than or Equal, Less Than or Equal, and Not Equal operators. You can have them compare words only, symbols only, or use both words and symbols. 3. Compare Numbers - choose the yellow button for numbers less than 100 4. Compare Numbers - short interactive lesson using place value and number blocks 5. Comparing Numbers Factsheets - five different topics provided by BBC's Skillswise 6. The 'Less than' Lake Maze - Help monster cross the lake by jumping from one stepping stone to the next. The next number on a stone must be smaller than the one before. 7. The 'More than' Marsh Maze - Help monster cross the marsh by jumping from one island to the next. The next number on an island must be more than the one before. 8. Number Track - (1-20) - three levels of difficulty depending on how many numbers you need to rut in order 9. Numbers to 100 - Click on the number grid where you think a particular number is located. Whole class activity or pairs 10. Ordering Numbers to One-Hundred - arrange numbers from least to greatest by clicking and dragging the numbers Internet4classrooms is a collaborative effort by Susan Brooks and Bill Byles.
365
1,547
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.6875
3
CC-MAIN-2024-22
latest
en
0.84737
https://ptolemy.berkeley.edu/projects/embedded/eecsx44/resources.html
1,603,520,903,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107882102.31/warc/CC-MAIN-20201024051926-20201024081926-00141.warc.gz
481,429,516
3,602
Workspaces ---- apbd asves asvpapers bear blast caltrop cases concurrency cosi dif diva dopcenter dopresence dopsysadmin eecsx44 elab embedded embeddedadmin giotto hyinfo m2t2 mescal metropolis mica mobies msgadmin murieh mvsis nephest ransom recons robosysadmin savg sec seminar smartnets video webmaster # Fall 2015 Contents Home Overview Logistics bCourses Course Development Wiki SVN # EECS 144/244 Resources Here are two introductory textbooks on Algorithms for further reference: This page lists a few basic algorithms and data structures that prove useful for constructing other algorithms and data structures. This page is a work in progress. ## Building Block Algorithms 1. Breadth-first search and Depth-first search 2. Dijkstra's algorithm: Find the least-weight path from a given node to all other nodes in a graph (directed or undirected) with edge weights that all have the same sign. 3. Bellman-Ford algorithm: Find the least-weight path from a given node to all other nodes in a directed graph with edge weights that can have different signs. Note that if there is a cycle with negative weights, then there is no least-weight path. This algorithm can detect such cycles. 4. Floyd-Warshall algorithm: Find the lengths (sum of weights) of the shortest path between all pairs of nodes in a graph with edge weights that can be positive or negative. ## Building Block Data Structures 1. Hash table: A collection of elements, each associated with a key, supporting efficient extraction of an element given only the key. 2. Priority queue: A queue of elements sorted by priority so that the highest-priority element can be extracted efficiently.
372
1,665
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.734375
3
CC-MAIN-2020-45
latest
en
0.835589
https://www.calculatoratoz.com/en/area-of-pentagon-given-side-calculator/Calc-5259
1,638,002,941,000,000,000
text/html
crawl-data/CC-MAIN-2021-49/segments/1637964358153.33/warc/CC-MAIN-20211127073536-20211127103536-00300.warc.gz
787,746,923
28,776
## Credits Walchand College of Engineering (WCE), Sangli Shweta Patil has created this Calculator and 1000+ more calculators! St Joseph's College (SJC), Bengaluru Mona Gladys has verified this Calculator and 1000+ more calculators! ## Area of Pentagon given side Solution STEP 0: Pre-Calculation Summary Formula Used area = 1.720*(Side)^2 A = 1.720*(S)^2 This formula uses 1 Variables Variables Used Side - The side is an upright or sloping surface of a structure or object that is not the top or bottom and generally not the front or back. (Measured in Meter) STEP 1: Convert Input(s) to Base Unit Side: 9 Meter --> 9 Meter No Conversion Required STEP 2: Evaluate Formula Substituting Input Values in Formula A = 1.720*(S)^2 --> 1.720*(9)^2 Evaluating ... ... A = 139.32 STEP 3: Convert Result to Output's Unit 139.32 Square Meter --> No Conversion Required 139.32 Square Meter <-- Area (Calculation completed in 00.016 seconds) ## < 5 Area and Perimeter of Pentagon Calculators Area of Pentagon given side and angle area = (5*Side^2)/4*tan(Angle) Go Area of Pentagon given side and apothem area = (5/2)*Side*Apothem Go Area of Pentagon given side area = 1.720*(Side)^2 Go Perimeter of Pentagon perimeter = (5*Side) Go ### Area of Pentagon given side Formula area = 1.720*(Side)^2 A = 1.720*(S)^2 ## How to calculate the Area of pentagon given only side of pentagon? a pentagon is any five-sided polygon or 5-gon. The sum of the internal angles in a simple pentagon is 540°. ## How to Calculate Area of Pentagon given side? Area of Pentagon given side calculator uses area = 1.720*(Side)^2 to calculate the Area, Area of Pentagon given side is defined as the amount of space occupied by a flat shape pentagon and generally measured in square units. Area and is denoted by A symbol. How to calculate Area of Pentagon given side using this online calculator? To use this online calculator for Area of Pentagon given side, enter Side (S) and hit the calculate button. Here is how the Area of Pentagon given side calculation can be explained with given input values -> 139.32 = 1.720*(9)^2. ### FAQ What is Area of Pentagon given side? Area of Pentagon given side is defined as the amount of space occupied by a flat shape pentagon and generally measured in square units and is represented as A = 1.720*(S)^2 or area = 1.720*(Side)^2. The side is an upright or sloping surface of a structure or object that is not the top or bottom and generally not the front or back. How to calculate Area of Pentagon given side? Area of Pentagon given side is defined as the amount of space occupied by a flat shape pentagon and generally measured in square units is calculated using area = 1.720*(Side)^2. To calculate Area of Pentagon given side, you need Side (S). With our tool, you need to enter the respective value for Side and hit the calculate button. You can also select the units (if any) for Input(s) and the Output as well. How many ways are there to calculate Area? In this formula, Area uses Side. We can use 5 other way(s) to calculate the same, which is/are as follows - • area = 1.720*(Side)^2 • area = (5*Side^2)/4*tan(Angle)
827
3,141
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.28125
4
CC-MAIN-2021-49
latest
en
0.788125
https://justaaa.com/economics/310444-poly-chem-plastics-is-considering-two-types-of
1,701,685,091,000,000,000
text/html
crawl-data/CC-MAIN-2023-50/segments/1700679100527.35/warc/CC-MAIN-20231204083733-20231204113733-00827.warc.gz
387,998,312
8,604
Question # Poly-Chem Plastics is considering two types of injection molding machines: hydraulic and electric. The hydraulic press... Poly-Chem Plastics is considering two types of injection molding machines: hydraulic and electric. The hydraulic press (HP) will have a first cost of \$545,000, annual costs of \$200,000, and a salvage value of \$70,000 after 5 years. Electric machine technology (EMT) will have a first cost of \$800,000, annual costs of \$98,000, and a salvage value of \$130,000 after 5 years. Use an AW-based equation to determine the ROR on the extra investment required for the EMT alternative. The ROR on the extra investment for the EMT alternative is _____%. Incremental initial cost (EMT - HP) = 800000 - 545000 = 255000 Incremental annual cost (EMT - HP) = 98000 - 200000 = -102000 (Annual savings) Incremental salvage value (EMT - HP) = 130000 - 70000 = 60000 Let i% be the incremental ROR, then EUAC = EUAB 255000*(A/P,i%,5) = 102000 + 60000*(A/F,i%,5) 255000*(A/P,i%,5) - 102000 - 60000*(A/F,i%,5) = 0 Dividing by 1000 102 + 60*(A/F,i%,5) - 255*(A/P,i%,5) = 0 using trail and error method When i =31%, value of 102 + 60*(A/F,i%,5) - 255*(A/P,i%,5) = 102 + 60*0.108469 - 255*0.418469 = 1.798467 When i =32%, value of 102 + 60*(A/F,i%,5) - 255*(A/P,i%,5) = 102 + 60*0.106402 - 255*0.426402 = -0.348376 using interpolation i = 31% + (1.798467-0)/(1.798467-(-0.348376))*(32%-31%) i = 31% + 0.8377% = 31.8377% ~ 31.84% #### Earn Coins Coins can be redeemed for fabulous gifts.
517
1,522
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.0625
4
CC-MAIN-2023-50
latest
en
0.688691
https://de.scribd.com/document/324336549/Complete-Notes-on-9th-Physics-by-Asif-Rasheed
1,604,016,849,000,000,000
text/html
crawl-data/CC-MAIN-2020-45/segments/1603107905965.68/warc/CC-MAIN-20201029214439-20201030004439-00320.warc.gz
275,432,711
106,915
Sie sind auf Seite 1von 55 1 CHILD CARE Higher Secondary School PHYSICS NOTES 1) PHYSICAL QUANTITIES & MEASURMENTS 2) KINEMATICS 3) DYNAMICS NOTES OF PHYSICS 9TH CLASS ENGLISH MEDIUM COMPLETE FIRST THREE CHAPTER PROBLEMS,SHORT AND LONG QUESTIONS CHILD CARE HIGHER SECONDARY SCHOOL Page 1 Define Physics? Unit No 1 2 Ans: The branch of science which deals with the study of matter and energy and their mutual relationship is called Physics. (2) Write names of the branches of Physics? Ans: (1) Mechanics (2) Heat & Thermodynamics (3) Sound (4) Light (5) Electromagnetism (6) Atomic and Molecular Physics (7) Nuclear Physics (8) Plasma Physics (9) Solid Physics Why do we study physics? We study physics to understand the laws of nature and how nature effects the human action. (3) Define Plasma? Ans: The state of matter at a very high temperature comprising the ions and electrons is called plasma. This is also called fourth state of matter (4) Name the branches of physics overlapping the other branches of science? Ans: (1) Astrophysics (2) Geophysics (3) Biophysics (7) Who studied the freely falling bodies? Ans: Galileo studied the freely falling bodies BRANCHES OF PHYSICS: Mechanics: It is the study of motion of objects, the causes and effect. Heat: It deals with the nature of heat, modes of transfer and effects of heat. Sound: It deals with the physical aspects of sound waves, their production, properties and applications. Light (Optics): Asif Rasheed BS (HONS) Physics 0344-7846394 Electricity and magnetism: Page It is the study of physical aspects of light, its properties, working and use of optical instruments. It is the study of the changes at rest and in motion, their effects and their relationships with magnetism. Atomic physics: It is the study of the structure and properties of atom. Nuclear physics: It deals with the properties and behaviour of nuclei and the particles within the nuclei. Plasma physics: It is the study of production, properties of the ionic state of matter The fourth state of matter. Geophysics: It is the study of the internal structure of the earth. System international units: A world-wide system of measurements is known as system international units (SI). In SI, the units of seven base quantities are meter, kilogram, second, ampere, Kelvin, candela and mole. vernier callipers: An instrument used to measure small lengths such as internal and external diameter or length of a cylinder etc is called vernier calipers. Least count of vernier calliper is 1/10 cm or 0.1 cm which is also called vernier constant. Screw gauge: A screw gauge is used to measure small lengths such as diameter of a wire, thickness of a metal sheet etc. The least count of micrometer screw gauge is 0.01 mm. Physical balance Physical balance is a modified type of a beam balance used to measure small masses by comparison with greater accuracy. CHILD CARE HIGHER SECONDARY SCHOOL Page MEASUREMENTS Why a standard unit is need to measure a quantity correctly. Ans: Various units have been in use in different times in different parts of the world. The fast means of communication systems have changed the world into a global village. Due to this reason an international system of units for mutual business became essential. The eleventh general conference of weights and measures recommended that all the countries of world should adopted a system of same kind of standard units, consisting of seven base units known as international system of units (SI) and derived units. Q: What is meant by base and derived units? Give three examples of derived units and explain how they are derived from base units. Ans: Base Units: The units of base quantities are called base units. OR the units used to express the base quantities are called base units. Examples: Kilogram (kg), meter (m), second (s), Ampere (A) Derived Units: The units of derived quantities which are derived from base units are called derived units. Examples: Unit of Area: m2. Unit of Volume: m3 Unit of Density: Kg m-3 Unit of speed: meter per second (ms-1), Unit of weight: Newton Unit of force: Newton, Unit of Pressure: Pascal Q : How they are derived from base units: These units are obtained by multiplication, division or both of base units. Unit of Area: length x breadth Unit of length x unit of breadth Meter x meter mxm : m2 Unit of Volume: length x breadth x height Asif Rasheed BS (HONS) Physics 0344-7846394 Page Unit of length x unit of breadth x unit of height Meter x meter x meter mxmxm : m3 Unit of Density: Mass Volume Unit of mass Unit of volume Q: What are the number of base units in System International (SI)? Ans. There are seven base units which are given below Number Physical Quantity Unit Symbol 1. Length Meter (m 2. Mass Kilogram(kg 3. Time Seconds (s 4. Electric current Ampere( A 5. Temperature Kelvin( K 6. Intensity of light Candela(cd 7. Amount of substance (Mole mol Q: Where multiples and sub-multiples of units are used? Describe some standard prefaces which are internationally used. Ans. Multiples and sub-multiples of units are used to make very large and very small mathematical calculations easier. The multiples and sub-multiples are obtained by multiplying or dividing with ten or power of tens. The terms used internationally for the multiples and sub-multiples for different units are called prefixes. Q: What is the use of vernier calipers? Ans A vernier calliper can be used to measure lengths accurately up to one tenth of a millimetre. Least Count/Vernier Constant Q1.7 What is meant by its vernier constant? Ans. The minimum length which can be measured accurately with the help of vernier scale or vernier calipers is called least count. Least count of vernier calliper is 1/10 mm or 0.1 cm which is also called vernier constant. Asif Rasheed BS (HONS) Physics 0344-7846394 Page Q: Explain the statement A micrometer screw gauge measures more accurately than a vernier caliper? Ans. The least count of micrometer screw gauge is 0.01 mm and that of Vernier calliper is 0.1. cm. So a micrometer screw gauge measures more accurately than a vernier calliper. Least Count: The minimum length which can be measured accurately is called least count of any measuring device. Significant figures: All accurately known digits and the first doubtful digit in an expression are called significant figures. It reflects the precision of a measured value of a physical quantity. RULES TO FIND THE SIGNIFICANT FIGURE IN A MEASUREMENT: (i) Digits other than zero are always significant. 27 have 2 significant digits. 275 have 3 significant digits. (ii) Zeroes between significant digits are also significant. 2705 have 4 significant digits. (iii) Final zero or zero after decimal are significant. 275.00 have 5 significant digits. (iv) Zero used for spacing the decimal points is not significant. Here zero is place holders only. 0.03 has 1 significant digit. 0.027 has 2 significant digits. (v) In whole numbers that end in 1 or more zero without a decimal point. These zeroes may or may not be significant. In such cases, it is not clear which zero serve to locate the position value and which are actually parts of measurements. In such a case, express the quantity using scientific notation to find the significant zero. APPLICATION OF PHYSICS Physics play an important role in our daily life. We hardly find a device where physics is not involved. Consider pulleys make it easy to left heavy loads. Electricity is not used only to get light and heat but also mechanical energy that derives fans electric motors ctc.Consider the means of transportation such as car and aeroplanes domestic appliances such as air conditioners refrigerators vacuum cleaners washing machine and micro wave ovens etc.Similarly the means of communication such as radio T V telephone are the result Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL Page of application of physics. These devices made our lives much comfortable and easier than the past. Q: 1.5 Ans : My age is sixteen years. Its value in seconds 16 x 365 x 24 x 60 x 60 = 504576000 seconds. Q1.6: What role SI units have played in the progress of science? Ans : SI units are very easy to use because their addition, multiplication and division is very easy . These can be written in terms of multiples of ten. 1.7 SEE ABOVE. Q1.8: what do you under stand by zero error of measuring instruments? Ans: When the zero of virnier scale is not coinciding with the zero of main scale, then instrument has zero error Q1.9: why is the use of zero error in a measuring instrument? Ans: By the use of zero error the observation taken can be correct, to get correct observations Q1.10: What is stop watch? What is the least count of mechanical stop watch you have use in laboratory? Ans: The stop watch is used to measure small intervals of time. Its least count is about 0.1 seconds. Q1.11: We need to measure extremely small interval of times? Ans: Small time interval are measured to calculate instantaneous time rate of change of variable. Q1.12: What is meant by significant figures of a measurement? Ans: All the accurately known digits and the first doubtful digit in an expression are known as significant figures. Q1.13: How is precision is related to the significant figures in a measured quantity? Ans: More is the number of significant figures, when the measuring instrument used has small value of its least count. The small value of least count the large is the value of precision. For example reading taken by screw gauge has more precision than reading taken by meter rod or verneir scale. CHAPTER: 1 Physical quantities and measurement (Problems) P1.1) Express the following quantities using prefixes. Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL Page Solution: (a)5000g As 1000g = 1kg so 5000/1000 =5kg Ans (b)2000000w As 106 = mega So 2000000 W 2 x 106 =2MW (c) 52 x 10-10 x kg since 1kg =1000g or103g =52 x 10-10 x 103g = 52 x 10-10+3g = 52 x 10-7g = 5.2 x 101 x 10-7g = 5.2 x 10-7+1g = 5.2 x 10-6g =5.2ug Ans -8 (d) 225 x 10 s =2.25 x 102 x 10-8s = 2.25 x 102-8s =2.25 x 10-6s = 2.25 us ANS P1.2) How do prefixes micro, nano and pico related to each other. As we know that, Micro =10-6 Nano = 10-9 Pico = 10-12 1 p= 1/1000n 1 p= 1/1000000 1 n= 1/1000 1 n = 1000 p 1 = 1000n 1 = 1000000p P1.3) Your hair grow at the rate of 1mm per day find their growth rate in nms-1. As milli = 10-3 Nano = 10-9 1m = 10-6 n OR 1m = 1000000n By multiplying m on both sides Asif Rasheed BS (HONS) Physics 0344-7846394 Page 1mm = 106 nm OR 1mm = 1000000nm As we know that One day = 24 hours One hour = 60 minutes One minutes = 60s So One day = 24 x60 x6 = 86400 s So the growth rate in nms-1 is = 1000000nm/86400s = 11.57nms-1 Ans::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::OR S=v xt v= S/t V= 1 X10-3 s/86400 s V= 1.157 x 10-8 ms-1 V=11.57 x 10-9 ms-1 Nano = 10-9 P1.4) Rewrite the followings in standard form: Solution: 27 (a)1168 x 10 Solution: 27 1168 x 10 3 27 1.168 x 10 x 10 1.168 x 10 3-27 24 1.168 x 10 ANS 5 (b)32 x 10 Solution: 1 5 3.2 x 10 x 10 3.2 x 10 1+5 6 3.2 x 10 25 (c) 725 x 10 5 3 7.25 x 10 x 10 g 2 2 7.25 x 10 x 10 x 10 -5+3 7.25 x 10 2-2g 0 7.25 x 10 CHILD CARE HIGHER SECONDARY SCHOOL Page 10 7.25g ANS 8 (d) 0.02 x 10 Solution: 0.02 x 10-2 x 10-8 2 x 10-2-8 (as we know that powers are added up) 2 x 10-10 ANS P1.5) Write the following quantities in scientific notation: Solution: (a) 6400km 6.4x103km ANS (b) 380000km 3.8x105 ANS (c) 300000000ms-1 3.108ms-1 (d) Seconds in a day: 24x60x60s=86400s 8.64x104s ANS P1.6) Question on book: As the zero of Vernier scale is on right so zero error will be positive and if its 4 th division is conceding with the main scale then the zero error=0.01x4=0.04 Zero error= +0.04cm And zero correction= -0.04cm P1.7) A screw gauge has 50 divisions on its circular scale. The pitch of the screw gauge is 0.5mm. What is its least count? Solution: Least count= pitch of screw gauge/no. of divisions in circular 0.5/50=0.01mm 0.01x10-3m 1x10-5m 1x10-5x100cm 1x10 -3cm 0.001cm ANS P1.8) Which of the following quantities have three significant figures? Solution: (a)3.006m (b)5.05x10-21kg Asif Rasheed BS (HONS) Physics 0344-7846394 Page 11 (c) 0.00309kg (d)301.0s P1.9) What are the significant figures in the following measurements? (a)1.009m (It carry all of them 4) (b)0.00450kg 0.00450 It has 3 significant figures (c) 1.66x10-27kg 1.66x10-27kg It has 3 significant figures. (d)2001s It has 4 significant figures. P.10) A chocolate wrapper is 6.7cm long, 5.4cm wide. Calculate its area up to reasonable number of significant figures. Solution: Area= length x width =6.7cm x 5.4cm = 36.18cm2 Area in significant figure= 36cm2 Unit # 2 Kinematics Define Mechanics and its types. The branch of physics, which deals with the study of motion of bodies, is called Mechanics. It has two types: I) Kinematics ii) Dynamics Define Types of Mechanics. Kinematics: It is study of motion of bodies without reference of force and mass. Dynamics: It is study of motion of bodies with reference of force and mass. Q2.3 (i) difference between rest and motion? Asif Rasheed BS (HONS) Physics 0344-7846394 in the state of rest. Page 12 Define Rest If a body does not change its position with respect to some observers then it is said to be Define Motion If a body is changing its position with respect of some observers then it is said to be in the state of motion. Name the types of motion a. Translatory Motion b. Linear motion c. Circular motion d. Random motion e. Rotatory Motion f. Vibratory Motion What is the motion butterfly? Executed by Flight of butterfly is irregular motion. Therefore its motion is called random motion. What is type of motion of free falling bodies? Freely falling bodies move downward in straight direction under the force of gravity. Therefore their motion is called linear motion. What is the type of motion of a man moving in circular track? His motion is circulatory motion. Q2.3 (iii)What is the difference between distance and displacement? Define Distance The path between two points is called distance. It is scalar quantity. Define Displacement The shortest distance between two points is called displacement. It is a vector quantity. Q2.3 (VI) what is the difference between Scalar and Vector? OR What are Scalar and Vector Quantities? Scalars are those quantities which are described by a number with suitable unit without direction. Vectors are those quantities which can be described by a number with suitable unit and with direction. Q2.3 (iv) What is the difference between Velocity and Speed? Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL Page 13 Define Velocity (Part of 2.4 The distance covered by a body in a unit time in a particular direction is called velocity. OR quantity. 1. Positive Acceleration If the velocity continuously increases then the acceleration will be positive. 2. Negative acceleration If the velocity continuously decreases then the acceleration will be negative. Define Uniform Speed If a body covers an equal distance in equal interval of time in a particular direction, the body is said to be uniform Velocity. Define variable velocity If a body does not cover an equal distance in equal interval of time in a particular direction, the body is said to be in variable velocity. Define relative velocity When two bodies are in motion then the velocity of one body relative to other is called relative velocity. Define Instantaneous velocity The velocity of a body at any instance of time is called instantaneous velocity. Define Average velocity Average velocity of a body can be obtained by dividing the total displacement with total time taken. Vav = Displacement/Time = d t Can a body moving with certain velocity in the direction of East can have acceleration in the direction of West? Ans: CHILD CARE HIGHER SECONDARY SCHOOL 14 Yes, if the velocity of the body decreases, then it will have acceleration in the Page opposite direction, that is, in the direction of west. Does speedometer of a car measures its velocity? It measures only speed but not velocity. Part of 2.4 Define Acceleration. The rate of change of velocity is called acceleration. It is denoted by a. It is a vector quantity. Define Uniform Acceleration If velocity of a body is changing equally in equal intervals of times then its acceleration will be uniform. Define Variable Acceleration If velocity of a body is not changing equally in equal intervals of times then its acceleration will be variable. Define Average Acceleration The average acceleration can be obtained by dividing total change in velocity with total time taken. aav = Change in Velocity/Total Time =(Vf Vi)t Define Gravitational Acceleration The acceleration of freely falling bodies is called gravitational acceleration. It is denoted by g. Its value is 10 meter per second per second (10 ms -2) 2. A body is thrown vertically upward. What is gravitational acceleration? Ans : It is 10 meter per second per second (-10 ms -2) 3. What is acceleration of a body moving with uniform velocity? Ans : The acceleration will be 0. 4. What consideration should be kept in mind while using equation of motion for free falling bodies? Initial velocity should be taken as zero. Acceleration will be taken as (g) instead of (a) Part of 2.4 Define Speed The distance covered in unit time is called speed. Asif Rasheed BS (HONS) Physics 0344-7846394 Speed = Distance/Time Page v = S/t 15 The unit of speed is meter per second (ms-1) or m/s 5. Q#2.7 /Can a body moving at a constant speed have acceleration? Yes, if it is moving in circular path, it can have acceleration. 6. A body is moving with uniform velocity, what will be its acceleration? Its acceleration will be zero. 7. A body is moving with a uniform speed. Will its velocity be uniform? Yes, if it moves in straight line and does not change its direction. 8. Can a body moving with a certain velocity in direction of East, have Acceleration in the direction of West? Yes, if its velocity will decrease, it has acceleration in the direction of west. 9. Does speedometer a car measure its velocity? No, it only measures the speed. 10. Why a stone and a piece of paper when dropped from the same height, reach the ground at the same time. Because both have same gravitational acceleration. 11. What type of change will occur in three equations of motion under the action of gravity? Acceleration (a) will be replaced with gravitational acceleration (g) in all equations. And distance (s) will be changed in to height (h) Describe the different types of motion in detail? Motions of bodies are of three types: Q2.3 (v) What is the difference between linear and random Motion? Q2.3 (ii) What is the difference between Circular and Translatory Motion? i) Translatory Motion: A motion in which each particle of a body has exactly same motion is called Translatory Motion. It may be of many kinds for examples: a. Linear Motion: If a body moves in straight line its motion is called linear motion. e.g. motion of free falling bodies, a man walking on a straight path 16 Page motion is called circular motion. e.g. motion of stone c. Random Motion: If a body moves in irregular manner its motion is called random motion. e.g. motion of butterfly. ii) Rotatory Motion: Motion is said to Rotatory, when the object rotates on its own axis. Examples: Rotatory motion of a planets on its axis, wheels of a vehicles, spinning top, ceiling fan etc. iii) Vibratory Motion: When a body moves to and fro about a point and repeats its motion then its motion is called vibratory ruler. Place one inch of it on a desk, and the other 11 off the desk. Flick the end off the desk and watch it vibrate. Q2.10 How can a vector quantity be represented graphically? Ans: When a vector is represented graphically, its magnitude is represented by the length of straight line and its direction is represented by the direction of the arrow head . Here is an example Q2.11 Why vectors quantities can not be added and subtracted like scalar quantities? Ans ; In addition of vector quantities, not their magnitude but their direction also involved Q2.12: How are vectors quantities are important to us in our daily life? CHILD CARE HIGHER SECONDARY SCHOOL 17 Ans: in our daily life vectors quantities are completely explained only when their direction Page are also considered Q2.13 Derive equation of motion for uniformly accelerated rectilinear motion? Three equations of motion are three equations of motion under the action of gravity are Vf = Vi + at S = Vi t + Vf=Vi+gt 1 2 at2 h=Vit+ 2 gt2 2aS = Vf 2 Vi 2 2gh = Vf 2 Vi 2 Q2.14 : Sketch the velocity time graph for the motion of the body? Motion Graphs For body moving at constant velocity: The graph of straight line parallel to the X axis shows that the body is moving with constant velocity a) Page 18 Derivation of Equation of Motion (Graphically) First Equation of Motion Consider an object moving with a uniform velocity u in a straight line. Let it be, given a uniform acceleration at time, t = 0 when its initial velocity is V i. As a result of the acceleration, its velocity increases to Vf (final velocity) in time t and s is the distance covered by the object in time t. The figure shows the velocity-time graph of the motion of the object. Slope of the Vf - t graph gives the acceleration of the moving object. Thus, acceleration = slope = AB = BC/AC Asif Rasheed BS (HONS) Physics 0344-7846394 19 Page (Average,acceleration(aav)= Change in Velocity/time) Slope=AB= Vf - Vi/ t a = Vf - Vi/ t Vf Vi = at Vf = Vi + at ........................................................(1) Second Equation of Motion Let Vi be the initial velocity of an object and 'a' the acceleration produced in the body. The distance travelled time t is given by the area enclosed by the velocity-time graph for the time interval 0 to t. Distance travelled ABC 1 2 = OD x OA + Where, (BC x AC) = t x Vi + = Vi t + 1 2 1 2 (Vf - Vi ) x t (Vf - Vi ) x t s in S = Vit + 20 Page S = Vi t + 1 2 at x t 1 2 2 at . Third Equation of Motion Let 'vi' be the initial velocity of an object and a be the acceleration produced in the body. The distance travelleds in timet is given by the area enclosed by the speed (v) - t graph. S= area of the trapezium OABD. 1 = ( 2 ) (OA + BD) x AC 1 ( ) 2 But we know that a =( Vf - Vi )t Or t = (Vf - Vi )a Substituting the value of t in eq. (1) we get, s= 1 ( ) 2 1 ( ) 2 2as = (Vf + Vi) ( Vf - Vi ) (Vf + Vi)( Vf - Vi) = 2as v2 - Vi 2 = 2as........... Third Equation of Motion Acceleration Due To Gravity Or Free Falling Objects Galileo was the first scientist to observe that, neglecting the effect of air resistance, all bodies in free-fall close to the Earths surface accelerate vertically downwards with the same acceleration: namely 9.8 m/s2 Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 21 Example Page If a ball is thrown vertically upward, it rises to a particular height and then falls back to the ground. However this is due to the attraction of the earth which pulls the object towards the ground Characteristic Of Free Falling Bodies 1. When a body is thrown vertically upward, its velocity continuously decreases and become zero at a particular height During this motion the value of acceleration is negative and Vf is equal to zero (a = -9.8m/s2 , Vf = 0). 2. When a body falls back to the ground , its velocity continuously increases and become maximum at a particular height During this motion the value of acceleration is positive and Vi is equal to zero (a = 9.8m/s2 , Vi = 0). 3. Acceleration due to gravity is denoted by a and its value is 9.8m/s 2 . 4. Equation of motion for the free-falling bodies be written as, Vf = Vi + gt 1 2 h = Vi t + gt2 2gh = Vf 2 Vi 2 CHAPTER: 2 KINEMATICS 1 P2.1) A train moves with a uniform Velocity of 36 km h for 10S. Find the distance travelled by it. Solution: 1 (Velocity) V= 36 km h 1 = 36x1000/60x60= 36000/3600= 10 m s 1 (Time) t= 10 m s (Distance) S= ? Formula: S= Vavx t = (10) x (10) Asif Rasheed BS (HONS) Physics 0344-7846394 Page S= 100 m ANS 22 CHILD CARE HIGHER SECONDARY SCHOOL P2.2) A train starts from nest. It moves through 1km in 100S with uniform acceleration. What will be its speed at the end of 100 S? Solution: (Distance) S= 1km =1000 m (Time) t= 100 S (Velocity)Vi= 0 m/s Vf=? By using formula: 1 S= vit+ ( 2 ) 1000= 0(t)+ 1000= 1 2 at2 1 2 2 a (100) a (10000) 2x1000/10000=a 2 A= 0.2 m s ANS Now by using first equation of motion: Vf= v ;+at Vf= 0=(0.2)(100) 1 Vf= 20 m s ANS 2 P2.3) A car has a Velocity of 10m/s. At accelerate at 0.2 m s for half minute. Find the distance travelled during this time and the final Velocity of the car. Solution: (Initial Velocity) Vi= 10m/s 2 (Acceleration) a= 0.2m/ s (time) t= 1 2 minutes= 30s (final velocity) Vf= ? S=? st By using 1 equation of motion: Vf= Vi+at Vf= (10)+(0.2)(30) Vf= 10+6 Asif Rasheed BS (HONS) Physics 0344-7846394 Page Vf= 16m s By using 3rd equation of motion to find s: 2 2 2aS= V f -V ; 23 CHILD CARE HIGHER SECONDARY SCHOOL 2 2 2aS= V f -V ; 2 2 2(0.2)= ( 16 ) - ( 10 ) 0.4 S= 256-100 S= 156 ) 0.4 S= 390m ANS P2.4) A tennis ball is hit vertically upward with a Velocity of 30m/s. it takes 3s to reach the highest point. Calculate the maximum highest reached by the ball. How Solution: (Initial Velocity) Vi= 30m/s (Time) t1= 3s (Height) S=? Time required returning to the ground t2=? 2 g = -10m/ s The value of g will be negative because the ball will be decelerating. Now by using the 2nd equation of the motion: 1 2 S= vit+ ( 2 ) (10) ( 3 ) = 90+(-5)(9) = 90-45 Height S= 45m ANS 2 P 2.6) A train starts from the nest with an acceleration of 0.5m s . Find its speed in km h1 when it has moved through 100m. Solution: Initial Velocity Vi= 0 2 Acceleration a= 0.5 m s Distance s= 100m Final Velocity Vf=? To find the final Velocity we have to find the time. By using 2 nd equation of motion: Asif Rasheed BS (HONS) Physics 0344-7846394 ) i) Page S= vit+1/2 a t By putting the values: 2 100= (0)t+1/2(0.5) ( t ) 24 2 100= (0.5) t 2 100= 0.25 t 100 = 0.25 =400 = 400 Taking square root on both sides: t2 = 400 T= 20s Now for Vf, we have formula: Vf= Vi+at Vf= 0=(0.5)(20) 1 Vf= 10m s Now to convert 10m/s into km/h, we will multiply it with 3600 nad divide it by 1000. So, 3600 Vf= 10 x 1000 1 Vf= 36 km h ANS P2.8) A cricket ball is hit vertically upward and returns to the ground 6s later. Calculate: Maximum height reached by the ball Initial Velocity of the ball :Solution 2 s /Acceleration g = -10m Time t= 6s Time for upward= t1= 6/2= 3s ?= Height= s ?Initial Velocity= Vi Final Velocity= Vf= 0 :By using 1st equation of motion Vf= vi+gt O= vi+(-10)(3) O= vi-30 Asif Rasheed BS (HONS) Physics 0344-7846394 Page vi=30 s1 Vi=30m :By using 3rd equation of motion v i 2 - V f 2 =2aS 2x(-10) x s= 0 (30) 20s= -90020s= 900 S= 900/20 S= 45m ANS 25 CHILD CARE HIGHER SECONDARY SCHOOL P2.9) When brakes are applied the speed of train decreases from the 96km/h to 48km/h. In 800m how much distance will it cover before coming to rest? (Assume the retardation is constant) :Solution :The situation can be divided into two parts. The parts 1 data is as follows Initial Velocity Vi= 96 km/h = 96x1000/3600= 26.66m/s Final Velocity Vf= 48km/h = 48x1000/3600= 13.33m/s Distance s= 800m Acceleration a=? By using 3rd equation of motion: 2 2 2aS= V f - V ; 2 2 2a(800)= ( 13.33 ) - ( 26.66 ) 1600s= -533.35 a= -533.35/1600 1 a= -0.33m/ s vi= 48km/h= 13.33m/s vf= 0 m/s s=? Again by using 3rd equation of motion: 2 2 2aS= v f v i 2 2 2(-0.3)s= ( 0 ) - ( 13.33 ) -0.6s= -177.688 S= -177.688/-0.6 S= 266.53m Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL Page 26 P2.10) In problem 2.9 find the time taken by the train to stop after the application of brakes. Solution: Initial Velocity Vi= 96km/h= 26.667m/s Final Velocity Vf= 0m/s 2 Acceleration a= -0.33m/ s Time t=? Formula Vf= vi+at O= 26.677+(-0.33)t -26.66= -033t T= -26.667/-0.33 T= 80.80 Vf-vi=at 0-26.677/-0.3344=t T=80s ANS P2.11) A car moves with uniform Velocity of 5s it comes to rest in the next 10s/ Find deceleration and total distance covered by the car? Solution: 1 Initial Velocity Vi= 40m s Time t = 10s Final Velocity Vf= 0 Retardation a=? Total distance S=? As we know that: a= vf vi ) t a= 0-40/40 2 a= -4 m s ANS Distance travelled in 1st five seconds. S 1 = vxt = 40x5 S1= 200m Average Velocity for next 10 seconds. 1 Vav= 40+0/2= 20m s S2= Vav*t = 20x10 Asif Rasheed BS (HONS) Physics 0344-7846394 Total distance S= S1 + S2 = 200+200 = 400m ANS Chapter # 3 Page s 2 = 200m 27 CHILD CARE HIGHER SECONDARY SCHOOL Dynamics 1. FORCE The Force is an agent which produces or tends to produce a motion in a body or it stops or tends to stop the motion of a body. In simple words we can also say that force is an agent which changes or tends to change the state of an object. UNIT The unit of a Force in M.K.S System is Newton 2. MASS The quantity of matter contained in a body is called mass. It is a scalar quantity. FORMULA F = ma m = F/a UNIT The unit of mass in M.K.S System is Kilogram (kg). 3. WEIGHT The force with which earth attracts other bodies towards its centre is called weight. It is a vector quantity. FORMULA; UNIT The unit of weight in M.K.S System is Newton (N). INERTIA Asif Rasheed BS (HONS) Physics 0344-7846394 W = mg Definition 28 Examples Page Inertia is the tendency of a body to resist a change in its state. Cover a glass with a post card and place a coin on it. Now strike the post card swiftly with the nail of your finger. If the stroke has been made correctly, the postcard will be thrown away and the coin will drop in the glass. If a moving bus stops suddenly, the passenger standing in it feels a jerk in the forward direction. As a result he may fall. It is due to the fact that the lower part of the standing passengers comes to rest as the bus stops. But the upper portion remains in motion due to inertia. Difference between Mass and Weight Mass 1. The quantity of matter present in a body is called mass. 2. The mass of a body remains constant everywhere and does not change by change in altitude. 3. It is a scalar quantity. 4. Mass can be determined by a physical balance. Weight 1. The force with which the earth attracts a body towards its centre is called the weight of the body. 2. The weight of a body is not constant. It is changed by altitude. 3. Weight is always directed towards the center of the earth. So it is a vector quantity. 4. Weight can be determined by only a spring balance. MOMENTUM The quantity or quality of motion is called momentum and it is denoted by P MATHEMATICAL DEFINITION It is the product of mass and velocity. Asif Rasheed BS (HONS) Physics 0344-7846394 P = mV where: Page MATHEMATICAL REPRESENTATION 29 CHILD CARE HIGHER SECONDARY SCHOOL p is the momentum m is the mass v the velocity LAW OF MOTIONS Newton formulated three laws of motion in his book. NEWTON FIRST LAW OF MOTIONS Newtons first law of motion is also known as the Law of Inertia. STATEMENT Every body continues its state of rest or uniform motion in a straight line until it is acted upon by an external or unbalance force to change its state of rest or uniform motion. EXPLANATION This law consists of a two parts (a) When body is at rest (b) When body is moving with uniform velocity (a). When a body is at rest Newtons Law states that when a body is at rest, it continues its rest unless we apply a force on it. When we apply a force, it changes its state of rest and starts moving along a straight line. (b) When body is moving with a uniform velocity Newtons Law states that when a body is moving, it moves in a straight line with uniform velocity, but when we apply an opposite force, it changes its state of motion and come to rest. Examples If a bus suddenly starts moving, the passengers standing in the bus will fall in the Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 30 backward direction. It is due to the reason that the lower part of the passengers which is in Page contract with the floor of the bus is carried forward by the motion of the bus, but the upper part of the body remains at rest due to inertia and so the passengers fall in backward direction. If a bus suddenly stops moving, the passengers standing in the bus will fall in the forward direction. It is due to the reason that the lower part of the passengers which is in contract with the floor of the bus is stopped with the bus, but the upper part of the body remains moving due to inertia and so the passengers fall in forward direction. SECOND LAW OF MOTION STATEMENT When a force acts on an object it produces an acceleration which is directly proportion to the amount of the force and inversely proportional to the product of mass EXPLANATION When we push a body with greater force then its velocity increases and change of velocity takes place in the direction of the force. If we apply a certain force F on a mass m, then it moves with certain velocity in the direction of the force. If the force becomes twice then its velocity will also increase two times. In this way if we go on increasing the fore there will be increase in velocity, which will increase the acceleration. DERIVATION According to the Newton`s Second law of motion when a force acts on an object it produces an acceleration which is directly proportion to the amount of the force. aF and inversely proportional to the product of mass a 1 m Combining both. a F m A = constant F/m 31 F m Page a=k If the Value of constant K is 1 so, a= F m or F = ma THIRD LAW OF MOTION Statement: To every action there is always an equal and opposite reaction EXPLANATION According to Newtons Law of Motion, we have: F(action) = F(reaction) The negative (-) sign indicates that the two forces are parallel but in the opposite direction. If we consider one of the interacting objects as A and the other as B, then according to the third law of motion: F(AB) = F(BA) F(AB) represents the force exerted on A and F(BA) is the force exerted on B. Examples We walk on the ground, we push the ground backward and as a reaction the ground pushes us forward. Due to this reason we are able to move on the ground. If a book is placed on the table, it exerts some force on the table, which is equal to the Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 32 weight of the book. The table as a reaction pushes the book upward. This is the reason FRICTION Page that the book is stationary on the table and it does not fall down. Definition The force, which resists the motion of one surface on another surface, is known as friction. Explanation Suppose a wooden block is placed on a table and a spring balance is attached on it. If we apply a very small force of magnitude F by pulling the spring gradually and increase it, we observe that the block does not move until the applied force has reached a critical value. If F is less then critical value, the block does not move. According to Newtons Third Law of motion an opposite force balance the force. This opposing force is known as the force of friction or friction. CausesofFriction If we see the surface of material bodies through microscope, we observe that they are not smooth. Even the most polished surfaces are uneven. When one surface is placed over another, the elevations of one get interlocked with the depression of the other. Thus they oppose relative motion. The opposition is known as friction. Factors on which Friction Depends The force of friction depends upon the following factors: 1. Normal Reaction (R) Force of friction is directly proportional to normal reaction (R), which act upon the body in upward direction against the weight of the body sliding on the surface. Asif Rasheed BS (HONS) Physics 0344-7846394 2. Nature of Surfaces 33 CHILD CARE HIGHER SECONDARY SCHOOL Page Force of friction also depends upon the nature of the two surfaces. It is denoted as u and has constant values for every surface. It is different for the two surfaces in contact. Coefficient Of Friction The coefficient of friction is a number which represents the friction between two surfaces. Between two equal surfaces, the coefficient of friction will be the same. The symbol usually used for the coefficient of friction is Greek letter , where 0 1. The maximum frictional force (when a body is sliding) is equal to the coefficient of friction the normal reaction force. F=R Where is the coefficient of friction and R is the normal reaction force. This frictional force, F, will act parallel to the surfaces in contact and in a direction to oppose the motion that is taking/ trying to take place. 1. We could not walk without the friction between our shoes and the ground. As we try to step forward, we push our foot backward. Friction holds our shoe to the ground, allowing you to walk. 2. Writing with a pencil requires friction. We could not hold a pencil in our hand without friction. 3. A nail stays in wood due to friction 4. Nut and bold hold due to friction 1. In any type of vehiclesuch as a car, boat or airplaneexcess friction means that extra fuel must be used to power the vehicle. In other words, fuel or energy is wasted because of the friction. 2. The Law of Conservation of Energy states that the amount of energy remains constant. Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 34 Thus, the energy that is lost to friction in trying to move an object is really turned to heat Page energy. The friction of parts rubbing together creates heat. 3. Due to the friction a machine has less efficiency less than 100%. 4. Due to friction machine catch fire. Laws of Friction Statement The value of limiting friction increases proportionally with the increase in normal reaction. Hence, liming friction F(s) is directly proportional to the normal reaction. F(s) < R (Here < represents the sign of proportionality dont write it in the examination paper.) => Fs = R .. (i) u = F(s)/R u is the constant of proportionality, which depends upon the nature of the surfaces of the two surfaces in contact. It is known as the coefficient of friction. It is only a number without any unit. We know that the normal reaction is directly proportional to the weight of the block, therefore, R = W = mg Substituting the value of R in equation (i) => Fs = mg Rolling Friction When a body rolls over a surface, the force of friction is called rolling friction. Rolling friction is much less than the sliding friction. This is because the surfaces in contact are very much less. LONG QUESTIONS Question: Explain the Law of Conservation of Momentum? This law states that When two or more bodies collide with one another the total momentum of the system remains the same, provided no external force acts upon them. Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL Page 35 Explanation: The law of conservation of momentum is a fundamental law of nature, and it states that the total momentum of an isolated system of objects (which has no interactions with external agents) is constant. One of the consequences of this is that the of any centre of mass system of objects will always continue with the same velocity unless acted on by a force outside the system. Consider two balls of masses m 1 and m2. They are initially moving with velocities u 1and u2 in same direction on a straight line. If u1 > u2, then the balls will collide. Let their velocities becomes v1 and v2 after collision. Total momentum of balls before collision = m1u1 + m2u2 m1v1 + m2v2 According to Law of conservation of momentum Total Momentum before collision m1u1 + m2u2 Total Momentum after collision m1v1 + m2v2 Rockets and jet engines also work on the same principle. In these machines, hot gases produced by burning of fuel rush out with large momentum. The machines gain an equal and opposite momentum. This enables them to move with very high velocities. Question: Define friction and describe the types of friction? Question: What is force of friction? How friction can be reduced? Friction: The force, which resists the motion of one surface on another surface, is known as friction. Methods to reduce friction: i) Sliding parts should be highly polished to reduce friction. ii) Friction of liquids is less than solids. Therefore oil or grease is applied between the parts of machinery. iii) Rolling friction is less then sliding friction. Therefore sliding friction should be converted to rolling friction by using ball bearings. Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 36 iv) Front side of vehicles, aeroplanes and ships are shaped wedge like and pointed so that Page minimum friction is offered by air. Centripetal Force Definition The force that causes an object to move along a curve (or a curved path) is called centripetal force. Mathematical Expression We know that the magnitude of centripetal acceleration of a body in a uniform circular motions is directly proportional to the square of velocity and inversely proportional to the a(c) v2 a(c) 1/r Combining both the equations: a(c) v2/r From Newtons Second Law of Motion: F = ma => F(c) = mv2/r Where, Fc = Centripetal Force v = Velocity of object m = Mass of object r = Radius of the curved path Banking of the roads Factors on which Fc Depends: Fc depends upon the following factors: Increase in the mass will increases Fc. It increases with the square of velocity. It decreases with the increase in radius of the curved path. When a car takes Examples The centripetal force required by natural planets to move constantly round a circle is Asif Rasheed BS (HONS) Physics 0344-7846394 37 provided by the gravitational force of the sun. Page If a stone tied to a string is whirled in a circle, the required centripetal force is supplied to it by our hand. As a reaction the stone exerts an equal force which is felt by our hand. The pilot while turning his aero plane tilts one wing in the upward direction so that the air pressure may provide the required suitable Fc. Centrifugal Force Definition A force supposed to act outward on a body moving in a curve is known as centrifugal force. Explanation Centrifugal force is actually a reaction to the centripetal force. It is a well-known fact that Fc is directed towards the centre of the circle, so the centrifugal force, which is a force of reaction, is directed away from the centre of the circle or the curved path. According to Newtons third law of motion action and reaction do not act on the same body, so the centrifugal force does not act on the body moving round a circle, but it acts on the body that provides Fc. Examples If a stone is tied to one end of a string and it is moved round a circle, then the force exerted on the string on outward direction is called centrifugal force. The aeroplane moving in a circle exerts force in a direction opposite to the pressure of air. When a train rounds a curve, the centrifugal force is also exerted on the track. CHILD CARE HIGHER SECONDARY SCHOOL 38 Vertical motion of two bodies attached to the ends of a string that passes over a Page frictionless pulley Consider two bodies A and B of masses m 1 and m2 respectively, let m1 is greater than m2. the bodies are attached to the opposite ends of an inextensible string. The string passes over a frictionless pulley. the body A being heavier must be moving downward with some acceleration. Let this acceleration be a. At the same time, the body B attached to the other end of the string moves up with the same acceleration a. As the pulley is frictionless, hence tension will be the same throughout the string. Let the tension in the string be T. Since the body A moves downwards, hence its weight m1g is greater than the tension T in the string. Net force acting on body A=m1g-T According to the Newtons law of motion: m1g-T = m1a ..... ...... 1) As body B moves upwards, hence its weight m2g is less than the tension T in the string. Net force acting on body B = T m2g According to Newton law T- m2g = m2a ...... ..... 2) a= ( m1m 2 m1+m 2 )g T= 2m 1m 2 ) m1+m 2 g ..... ..... 3) acceleration g due to gravity using , Page 39 The above arrangement is also known as Atwood machine. It can be used to find the g= m1+m 2 ) m1m2 OR Motion of two bodies attached to the ends of a string that passes over a frictionless pulley such that one body moves vertically and the other moves on A smooth horizontal surface Page 40 CHILD CARE HIGHER SECONDARY SCHOOL Consider two bodies A and B masses m 1 and m2 respectively attached to the ends of an inextensible string as shown in the figure above.Let the body A moves downwards with an acceleration a. Since the string is inextensible, therefore, body B also moves over the horizontal surface with the same acceleration a. As the pulley is frictionless hence tension T will be the same throughout the string. Since body A moves downwards, therefore, its weight m 1g is greater than the tension in T in the string. Net force acting on the body A = m1g T According to the Newtons second law of motion: m1g T = m1a ... ... ... (1) The forces acting on the body are: I. II. III. Weight m2g of the body B acting downwards. Reaction R of the horizontal surface acting on the body B in the upward direction. Tension in the string pulling the body B horizontally on the smooth surface. As body B has no vertical motion, hence resultant of vertical forces (m 2g and R) must be zero. Thus the net force acting on the body B is T. According to the Newtons second law of motion: T = m2a ... ... ... (2) Adding eqs. 1 and 2, we get acceleration a as: m m g T + T =m1a+ m2a g = a(m1+m2) m1 m1+m2 ... (3) Page a= 41 m 1m 2 m1+m2 T= FORCE AND THE MOMENTUM: Consider a body of mass m moving with initial velocity Vi. Let a force F acts on the body which produces an acceleration a in it. This changes the velocity of the body. Let its final velocity after time t becomes Vf. if Pi and Pf be the initial momentum and the final momentum related to the body related to the initial and the final velocity respectively then: Pi = mvi and Pf = mvf Changes in momentum = Final momentum initial momentum Or Pf Pi = mvf - mvi Thus the rate of change in momentum given by: p p t mvmv t =m vf vi t Since vf vi t force F. pf pi t =ma According to Newtons second law of motion: F = ma Or pf pi t =F Equation also defines the force and states Newtons second aw of motion as: When a force acts on a body, it produces acceleration in the body and will be equal to the rate of change of momentum of the body. SI unit of momentum defined by equation is Newton-second (Ns) which is the same as kmgs-1. Asif Rasheed BS (HONS) Physics 0344-7846394 42 Page 3.4. What is the law of Inertia? Ans: (Inertia is the resistance of any physical object to a change in its state of motion or rest, or the tendency of an object to resist any change in its motion including a change in direction). 3.5. Why is it dangerous the roof of a bus to travel on? Ans : The friction or drag force due to air acting on the upper part of the body of a person standing on the roof of running bus tries to turn over which is dangerous while the lower part of body remains at rest w.r.t roof of the bus 3.6. Why does a passenger move outward when a bus takes turn? Ans: When does bus take a turn the passenger sitting inside experienced centrifugal force and moves out wards 3.7. How can you relate a force with the change of momentum of a body? Ans : By using 2nd of motion we can write F = ma here a= vf vi t by putting this F =m F = vf vi t mvf mvi t but F = time Force = time rate of change of momentum 3.8. What will be the tension in the rope that is pulled from the end by two opposite forces 100N each? Ans: When two forces of 100 N each applied on a string then resultant tension is equal to 100. 3.9. Action and reaction are always equal and opposite. Then how does a body move? Ans: Action and reaction force equal in magnitude but opposite in direction. These do not act upon the same body. Action force is applied on one body, which give reactional force acting on other body. Both of these do not neutralized this is the result of motion. 3.10. A horse pulls the cart. If the action and reaction are equal and opposite then the how does the cart move? Ans: The horse applies action force by feet on the road the reaction is given by road on horse due to which the cart tied to the horse also move. 3.11. What is the law of conservation of momentum? Ans : When two or more bodies collide with one another the total momentum of the Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL 43 system remains the same, provided no external force acts upon them. Total Momentum before collision m1u1 + m2u2 Page = m1v1 + m2v2 3.12. Why is the law of conservation of momentum important? Ans : by using law of conservation of momentum it is possible to calculate, force , velocity, acceleration of a body. Most of elementary particles were discovered by this law. 3.13. When a gun is fired, it recoils. Why? Ans : according law of conservation of momentum the momentum gained by fired bullet is neutralized by equal and opposite momentum given to the gun recoils back. 3.14. Describe two situations in which force of friction is needed. Ans: The friction between walking person and surface of earth is necessary for walking. To stop a moving vehicle force of friction between tyre and road is required if this is reduced by putting oil on the road then it would be impossible to stop a vehicles. 3.15. How does oiling the moving parts of a machine lower the friction? Ans : by oiling the various parts of a matching of friction is reduced which increase its efficiency 3.16. Describe ways to reduce friction. Ans: Methods to reduce friction: i) Sliding parts should be highly polished to reduce friction. ii) Friction of liquids is less than solids. Therefore oil or grease is applied between the parts of machinery. iii) Rolling friction is less then sliding friction. Therefore sliding friction should be converted to rolling friction by using ball bearings. iv) Front side of vehicles, aeroplanes and ships are shaped wedge like and pointed so that minimum friction is offered by air. 3.17. Why rolling friction is lower than sliding friction? Ans: the interlocking between ups and down of two surface need not be ruptured in case of rolling while in case of sliding these are to be ruptured and result to increase in friction . 3.18. What do you know about the following? (i) Tension in a string Ans: Tension in string is to neutralize applied force on the string this prevents it from moving. Asif Rasheed BS (HONS) Physics 0344-7846394 Page 44 (iii) Limiting force of friction Ans: The force of friction on the body at rest lying in a rough surface is called force of static friction its value increases with the increase of applied force .The maximum possible value of static friction if applied force made grater then it body starts moving is called limiting force of static friction (iv) Braking force Ans: the bracking force is the force between brake pushing and wheel of vehicle. It is help to stop the wheels. (v) Skidding of vehicles Ans: when a force of friction between tyre and road is small then applying brakes tyre slide over the road .it is called skidding of vehicles (vi) Seatbelts Ans: The seat belts provide opposition against falling ahead when vehicle is stopped suddenly Ans: the outer edge of road is made higher to provide reactional force on tyre which prevents it from slopping. It is called banking of road. (viii) Cream separator Ans: in a cream separator milk is rotated and lighter particles of cream come at the axis of rotation and are separated from milk and collected through the pipe. 3.19. What would happen if all friction suddenly disappears? Ans: when the frictional force suddenly disappears the motion of the object would never be stopped. 3.20. Why the spinner of a washing machine is made to spin at a high speed? Ans: at very high spinning speed the water and dirt particles are separate from cloths to clean them inside washing machine. Chapter No 3 Dynamics P 3.1) A force of 20 N moves a body with an acceleration of 20ms -2 what is its mass? Solution: Force F= 20 N Acceleration a= 20ms-2 Mass m=? Formula F= ma m= F a 45 Ans P 3.2) Weight is 147 N what is its mass? Page 20/2 = 10 kg Solution: Weight w=147 N Acceleration g = 10ms-2 Mass m=? Formula W = mg m= W g 147/10 = 14.7 kg Ans P3.3) How much force is needed to prevent a body of mass 10kg from falling? Solution: Mass m=10kg Force F=a The force needed to prevent the body from falling is equal to the weight of the body F=W W=mg F=mg F= 10 x 10= 100 N Ans P3.4) Find the acceleration produce by a force of 100 N in a mass of 50 kg? Solution: Acceleration a =? Force F = 100 N Mass m = 50kg Asif Rasheed BS (HONS) Physics 0344-7846394 CHILD CARE HIGHER SECONDARY SCHOOL a= F m Page F= ma 46 Formula: a=100/50 = 2ms-2 P3.5) A body has weight 20N how much force is required to move it vertically upward with an acceleration of 20ms-2? Solution: Weight W = 20N Acceleration a = 20ms-2 Force F=? To find out force we have to first calculate the Mass of the body To find out the mass to use W= mg m = w/g m= 20/10 m = 2kg So he net force will take the body upward will be Net force F = W F= ma W = mg The g will be negative because body is moving upward so W = -mg Net force F = F-W ma m(-g ) ma + mg m(a +g) 2 (2+10) Force F= 24N Ans P3.6) Two masses 52kg and 48kg are attached to the end of the string that passes over a frictionless pulley. Find the tension in the string and acceleration in the body? When the masses are moving vertically. Asif Rasheed BS (HONS) Physics 0344-7846394 47 CHILD CARE HIGHER SECONDARY SCHOOL Page Solution: m1 = 52kg m2 = 58kg T =? a =? First we find tension in the string Formula: 2m 1m 2 T = ( m1+m 2 ) g T = 2(52) (48) (10)/ 52+48 T = 499.2N T = 500N approximately Ans Now we will find the acceleration Formula: a= ( m1m 2 m1+m 2 )g a = (52-48) (10)/ 52+48 a= 4x10/100 a= 40/100 a= 0.4ms-2 Ans P3.7) Two masses 26kg and 24kg are attached to the end of a string which passes over a frictionless pulley. 26kg is lying over a smooth horigalal table .24kg mass is moving vertically downward. Find the tension in string and acceleration in bodies. Solution: m1 = 24kg m2 = 26kg T =? a =? 2m 1m 2 ) m1+m 2 g Page T= 48 Formula: T = (24) (26) (10)/24+26 T = 124.8N T = 125N Formula: a = ( m1m 2 m1+m 2 )g = 24x10 / 24+ 26 a = 408ms-2 Ans P3.8) How much time is required to change 22 Ns momentum by a force of 20 N? Solution: (Initial momentum) Pi = 22Ns Pf = 0Ns F = 20N t =? Formula: Pf Pi t F= =F Pf Pi t = 0-22/ 20 t = -1.1s As time cannot be negative to t = 1.1s ANS P3.9) How much is the force of friction between a wooden block of mass 5 kg and the horizontal marble floor? The coefficient of friction between the wood and marble is 0.6 Asif Rasheed BS (HONS) Physics 0344-7846394 Fr =? m= 5 kg F = mg u= 0.6 Page Solution: 49 CHILD CARE HIGHER SECONDARY SCHOOL Formula Fr = UF 5 x 10 = 50 N Fr =UF Fr = 0.6 x 50 = 30 N ANS Chapter: 4 Turning effect of force Q.2 Define followings: (i Resultant vector The vector whose effect is same as combined effect of a number of vector, is called resultant vector. (ii) Torque: The torque is equal to Turning effect of force. (iii) Centre of mass: The point at which whole of mass would be connected then motion of this point describes motion of the body, is called centre of mass. (iv) Centre of gravity: The point at which whole of the weight of the body appears to be active is called centre of gravity. . Q 3 Differentiate the followings: (i) Like and unlike force: Like force act along same direction whereas the unlike force act in opposite direction. (ii) Torque and Couple: Torque is turning effect of single force whereas couple is turning effect of two equal and unlike forces, having different lines of their action. (iii) Stable and neutral equilibrium: A body stable when line of action of its weight passes within base and neutral equilibrium is state when line of action of weight does not pass through base. Q.4 How Head to Tail rule helps to find the resultant of force? To explain the Head to Tail rule of addition of vector helps in following steps: Step.1 We select a suitable scale for the graphical representation of vector. Step.2 We draw all the given vectors, one by one, so that tail of next lies on head of final drawn vector. Step.3 We join the tail of first drawn vector with head of the last drawn vector. The length of line joining gives the magnitude of the resultant according to same suitable selected scale. CHILD CARE HIGHER SECONDARY SCHOOL Page 50 Step.4 The direction of resultant vector is given by measuring angle made by the line joining with a reference axis (+ve x-axis). Q.5 How can a force be resolved into its rectangular component? Resolution of a vector, when a vector is drawn graphically. Then it may be split up into two parts, which are at 90 degree to each other. Then each one of these two parts of same vector are called the rectangular components. Let us consider a force, F, which is represented by straight line OA, in the figure. The line of representation of force F makes an angle of with direction of +ve x-axis. From the head of F, a perpendicular is drawn on x-axis. This is denoted by line AB. It is used to represent ycomponent of vector, F, because its direction is parallel to y-axis. The line OB is used to represent the other component of, F, called x-component. Figure shows that we can write: OA = OB + BA Here! OB = x-component of F = Fx BA = y-component of F =Fy Q.6 When a body is said to be equilibrium? Ans: A body is said to be equilibrium when it does not has linear and angular acceleration. Q.7 Explain the first condition for equilibrium. Ans: According to the first condition of equilibrium, the resultant force (or sum of all force) must be zero. Q.8 Why there is a need of second condition for equilibrium of a body satisfies first condition for equilibrium? Ans: Two equal and opposite force having their different lines of action from couple, which produce angular acceleration. Although first condition of equilibrium is being satisfied. A body/system is definitely in equilibrium when first, as well as, second condition (both) are being met. Q.9 What is second condition for equilibrium? Ans: According to second condition of equilibrium the total/resultant torque acting on a system must be equal to zero. Q.10 Give an example of a moving body which is in equilibrium? Ans: A parachuter moving down with uniform velocity is said to be in dynamic equilibrium. Q.11 Think of a body which is at rest but not in equilibrium. Ans: A ball thrown upward becomes at rest at the top. At this state it is not in equilibrium although it is at rest. Q.12 Why a body cannot be in equilibrium due to single force acting on it? Ans: A single force acting on a body is not balanced abd produces acceleration therefore, in the presence of a single force body cannot bbe in equilibrium. Q.13 Why the height of vehicles is kept as low as possible? Ans: The height of a vehicle is kept lowest possible so that its centre gravity remain close to its base to get more gravity. Q.14 Explain what is meant by stable, unstable and neutral equilibrium? Give examples in each case. CHILD CARE HIGHER SECONDARY SCHOOL Page 51 Ans: A body is in equilibrium when its state does not change with time and a body is unstable when resultant force on it is zero. A body is in neutral equilibrium when its centre of gravity remains at same height from the surface of the earth, while it moves. Example is of sphere rolling on horizontal surface. Q.1 Encircle the correct answer from the given choices: (i) B (ii) D (iii) B (iv) D (v) C (vi) B (vii) C ((viii) C Chapter #4 Turning effects of forces P4.1) Find the resultant of the following forces: (i) 10N along x-axis (ii) 6N along y-axis (iii) 4N along negative x-axis Let us first represent the above given forces vectors on a graph. To find the resultant of these vectors, we have to sum up these vectors. For finding resultant we use head to tail rule. As the two vectors along x-axisare in opposite direction so the resultant vector of these two vectors will be: Fx = F1 + F3 = 10N + (-4N) = 6N Fy = 6N Magnitude of resultant = Fx 2 + Fy2 (6)2 +(6)2 36+36 72 = 8.5N Direction angle = tan-1 ( = tan-1 ( 6 6 Fx Fy ) = tan-1 (1) 52 = 45 Page 4.2) Find the perpendicular components of a force of 50N making an angle of 30 with x-axis. Solution: By perpendicular components we mean the x and y components of a vector. Fx = ? Fy = ? Formula: Fx = F cos = 50 cos 30 = 50 (0.866) Fx = 43.3N Formula: Fy = F sin = 50 sin 30 = 50 (0.5) Fx = 25N 4.3) Find the megnitude and direction of force of its =-component in 12N and y-component is N. Solution: Fx = 12N Fy = 5N F=? =? Formula: F = Fx 2 + Fy2 (12)2+(5)2 144+25 = 169 = tan-1 ( F = 13N Formula: = tan-1 ( 5 12 Fx Fy ) ) = tan-1 (0.417) = 22.6 4.4) A force of 100N is applied perpendicularly an a spanner at a distance of 10cn from a nut. Find the torque produced by the force: 53 CHILD CARE HIGHER SECONDARY SCHOOL r = 10cm = = 90 = r F sin 10 100 Page Solution: F = 100N = 0.1m ( because it is perpendicular) = (0.1) (100) (sin 90 ) = 10 (1) = 10Nm P 4.5) A force is acting on a body making an angle of 30 the force is 20N. Find the force: Solution: Fx = 20N = 30 F=? Formula: F = Fx cos = 20 (cos 3 0 ) = 20 (0.866) F = 23.1N P 4.6) Steering of car having radious 16 cm. Find the torque produced by a couple of 50N. Solution: 16 r=16cm = 100 m = 0.16m couple = 2F = 2(50N) formula = =? = rF (0.16)(2(50)) = 16Nm P 4.7) A picture frame is hanging by two vertical strings. The tension in the strings are 3.8N and 4.4N. Find the weight of the picture frame. CHILD CARE HIGHER SECONDARY SCHOOL Page 54 Solution: Total tension in the strings is equal to the weight of picture frame So W = T1 + T2 = 3.8 + 4.4 W = 8.2N P 4.8) Two blocks of masses 5Kg and 3Kg are suspended by the two strings as shown. Find the tension in each string. Solution: The tension in the strings will be equal to the respective weights of the blocks. Tension in string B = weight of m = m1g = (3)(10) Tb = 30N Tension in string A = Weight of m1 + weight of m2 = 30N + m2g = 30N + (5)(10) = 30N + 50N Ta = 80N P 4.9) A nut has been tightened by a force of 200N using 10cm long spanner. What length of a spanner is required to loosen the some nut with 150N force? Solution: F1 = 200N 10 r1 = 10cm = 100 m = 0.1m As F2 = 150N r2=? = rF So r1F1 = r2F2 r1 F 1 r2 = F2 = ( 0.1 )( 200) 150 r2 = 13.3cm CHILD CARE HIGHER SECONDARY SCHOOL Page 55 P 4.10)A block of mass 10Kg is suspended at a distance of 20cm from the center of a uniform bar 1m long. What force is required to balance it at its center of gravity by applying the force at the other end of the bar? Solution: r1 = 20cm = 0.2m r2 = 50cm = 0.5m m1 =10Kg F1 = m1g = (10)(10) = 100N F2 = ? r1F1 =r2F2 r1 F1 F2 = r2 = ( 0.2 )( 100) 0.5 F2 = 40N
17,703
63,690
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.671875
3
CC-MAIN-2020-45
latest
en
0.875598
http://stackoverflow.com/questions/6284396/permutations-with-unique-values/6284458
1,405,018,060,000,000,000
text/html
crawl-data/CC-MAIN-2014-23/segments/1404776421646.0/warc/CC-MAIN-20140707234021-00007-ip-10-180-212-248.ec2.internal.warc.gz
115,417,671
19,271
# permutations with unique values itertools.permutations generates where its elements are treated as unique based on their position, not on their value. So basically I want to avoid duplicates like this: ``````>>> list(itertools.permutations([1, 1, 1])) [(1, 1, 1), (1, 1, 1), (1, 1, 1), (1, 1, 1), (1, 1, 1), (1, 1, 1)] `````` Filtering afterwards is not possible because the amount of permutations is too large in my case. Does anybody know of a suitable algorithm for this? Thank you very much! EDIT: What I basically want is the following: ``````x = itertools.product((0, 1, 'x'), repeat=X) x = sorted(x, key=functools.partial(count_elements, elem='x')) `````` which is not possible because `sorted` creates a list and the output of itertools.product is too large. Sorry, I should have described the actual problem. - What's too large? The TOTAL permutations or the UNIQUE permutations or both? –  FogleBird Jun 8 '11 at 20:30 both, see EDIT. –  xyz-123 Jun 8 '11 at 20:35 ``````class unique_element: def __init__(self,value,occurrences): self.value = value self.occurrences = occurrences def perm_unique(elements): eset=set(elements) listunique = [unique_element(i,elements.count(i)) for i in eset] u=len(elements) return perm_unique_helper(listunique,[0]*u,u-1) def perm_unique_helper(listunique,result_list,d): if d < 0: yield tuple(result_list) else: for i in listunique: if i.occurrences > 0: result_list[d]=i.value i.occurrences-=1 for g in perm_unique_helper(listunique,result_list,d-1): yield g i.occurrences+=1 a = list(perm_unique([1,1,2])) print(a) `````` result: ``````[(2, 1, 1), (1, 2, 1), (1, 1, 2)] `````` EDIT (how this works): I rewrite upper program to be longer but more readable I have usually hard time to explain how something works, but let me try. In order to understand how this works you have to understand similar, but simpler program that would yield all permutations whit repetition. ``````def permutations_with_replecement(elements,n): return permutations_helper(elements,[0]*n,n-1)#this is generator def permutations_helper(elements,result_list,d): if d<0: yield tuple(result_list) else: for i in elements: result_list[d]=i all_permutations = permutations_helper(elements,result_list,d-1)#this is generator for g in all_permutations: yield g `````` This program in obviously much simpler. d stands for depth in permutations_helper and has two functions. One function is stopping condition of our recursive algorithm and other is for result list, that is passed around. Instead of returning each result we yield it. If there were no function/operator `yield` we had to push result in some queue at point of stopping condition. But this way once stopping condition is meet result is propagated trough all stack up to the caller. That is purpouse of `for g in perm_unique_helper(listunique,result_list,d-1): yield g` so each result is propagated up to caller. Back to original program: We have list of unique elements. Before we can use each element, we have to check how many of them are still available to push it on result_list. Working of this program is very similar compared to `permutations_with_replecement` difference is that each element can not be repeated more times that is in perm_unique_helper. - That's it, thank you very much! –  xyz-123 Jun 9 '11 at 6:50 I'm trying to understand how this works, but I'm stumped. Could you please provide some kind of commentary? –  Nathan Sep 28 '11 at 21:56 @Nathan I edited answer and refined code. Feel free to post extra questions you have. –  Luka Rahne Sep 29 '11 at 8:17 You could try using set: ``````>>> list(itertools.permutations(set([1,1,2,2]))) [(1, 2), (2, 1)] `````` The call to set removed duplicates - He might need list(set(itertools.permutations([1,1,2,2]))) –  Luka Rahne Jun 8 '11 at 20:05 Or `list(itertools.permutations({1,1,2,2}))` in Python 3+ or Python 2.7, due to the existence of set literals. Though if he's not using literal values, he'd just be using `set()` anyway. And @ralu: look at the question again, filtering afterwards would be costly. –  JAB Jun 8 '11 at 20:08 set(permutations(somelist)) != permutations(set(somelist)) –  Luka Rahne Jun 8 '11 at 20:12 the problem with this is that I need the output to have the length of the input. E.g. `list(itertools.permutations([1, 1, 0, 'x']))` but wihtout the duplicates where the ones are interchanged. –  xyz-123 Jun 8 '11 at 20:14 @ahojnnes: If that's a requirement, then you really do need to filter afterwards even if you don't want to. Which means `list(set(itertools.permutations([1,1,2,2])))` is what you'd need to use. –  JAB Jun 8 '11 at 20:16 show 1 more comment This relies on the implementation detail that any permutation of a sorted iterable are in sorted order unless they are duplicates of prior permutations. ``````from itertools import permutations def unique_permutations(iterable, r=None): previous = tuple() for p in permutations(sorted(iterable), r): if p > previous: previous = p yield p for p in unique_permutations('cabcab', 2): print p `````` gives ``````('a', 'a') ('a', 'b') ('a', 'c') ('b', 'a') ('b', 'b') ('b', 'c') ('c', 'a') ('c', 'b') ('c', 'c') `````` - works perfectly well but slower than the accepted solution. Thank you! –  xyz-123 Jun 9 '11 at 6:49 It sound like you are looking for itertools.combinations() docs.python.org ``````list(itertools.combinations([1, 1, 1],3)) [(1, 1, 1)] `````` - No, combinations would have the same problem. –  JAB Jun 8 '11 at 20:13 ``````np.unique(itertools.permutations([1, 1, 1])) `````` The problem is the permutations are now rows of a Numpy array, thus using more memory, but you can cycle through them as before ``````perms = np.unique(itertools.permutations([1, 1, 1])) for p in perms: print p `````` - Came across this the other day while working on a problem of my own. I like Luka Rahne's approach, but I thought that using the Counter class in the collections library seemed like a modest improvement. Here's my code: ``````def unique_permutations(elements): "Returns a list of lists; each sublist is a unique permutations of elements." ctr = collections.Counter(elements) # Base case with one element: just return the element if len(ctr.keys())==1 and ctr[ctr.keys()[0]] == 1: return [[ctr.keys()[0]]] perms = [] # For each counter key, find the unique permutations of the set with # one member of that key removed, and append the key to the front of # each of those permutations. for k in ctr.keys(): ctr_k = ctr.copy() ctr_k[k] -= 1 if ctr_k[k]==0: ctr_k.pop(k) perms_k = [[k] + p for p in unique_permutations(ctr_k)] perms.extend(perms_k) return perms `````` This code returns each permutation as a list. If you feed it a string, it'll give you a list of permutations where each one is a list of characters. If you want the output as a list of strings instead (for example, if you're a terrible person and you want to abuse my code to help you cheat in Scrabble), just do the following: ``````[''.join(perm) for perm in unique_permutations('abunchofletters')] `````` -
1,943
7,073
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.03125
3
CC-MAIN-2014-23
latest
en
0.780634
https://codzify.com/article/DataStructures/BubbleSort
1,718,451,151,000,000,000
text/html
crawl-data/CC-MAIN-2024-26/segments/1718198861586.40/warc/CC-MAIN-20240615093342-20240615123342-00312.warc.gz
157,764,628
12,879
# Bubble Sort Algorithm with practical program in C Article by: Manish Methani Last Updated: October 10, 2021 at 10:04am IST Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. Suppose we have to sort the array of elements(1,8,5,4,2) in ascending order using Bubble Sort: ## 1) First pass: 1) Array is 1, 8, 5, 4, 2 . In the given array first two elements are compared 1 & 8 and since 1 < 8, no swapping takes place. 2) Array becomes 1, 8, 5, 4, 2. Now the next two elements are compared 8 & 5 and since 8 > 5, a swap takes place. After swapping 8 & 5 array looks like this 1,5,8,4,2. 3) Array becomes 1, 5, 8, 4, 2. Now the next two elements are compared 8 & 4 as and since 8 > 4, a swap takes place. After swapping 8 & 4, the array looks like this 1,5,4,8,2. 4) Array becomes 1, 5, 4, 8, 2. Now the next two elements are compared 8 & 2 as and since 8 > 2, a swap takes place. After swapping 8 & 2, the array looks like this 1, 5, 4, 2, 8. ## 2) Second pass: 1) Array becomes 1, 5, 4, 2, 8. Now the next two elements are compared 1 & 5 and since 1 < 5, no swap here. 2) Array becomes 1, 5, 4, 2, 8. Now the next two elements are compared 5 & 4 as and since 5 > 4, a swap takes place. After swapping 5 & 4, the array looks like this 1, 4, 5, 2, 8. 3) Array becomes 1, 4, 5, 2, 8. Now the next two elements are compared 5 & 2 as and since 5 > 2, a swap takes place. After swapping 5 & 2, the array looks like this 1, 4, 2, 5, 8. ## 3) Third pass: 1) Array becomes 1, 4, 2, 5, 8. Now the next two elements are compared 1 & 4 and since 1 < 4, no swap here. 2) Array becomes 1, 4, 2, 5, 8. Now the next two elements are compared 4 & 2 as and since 4 > 2, a swap takes place. After swapping 5 & 4, the array looks like this 1, 2, 4, 5, 8. ## 4) Fourth pass: 1) Array becomes 1, 2, 4, 5, 8. Now the next two elements are compared 1 & 2 and since 1 < 2, no swap here. ## The complexity of Bubble Sort: Notice that a total of 4 passes was required to sort the array of 5 elements. In the first pass, 4 comparisons were done and the largest element was bubbled out at the end of the array. Similarly, in the second pass, 3 comparisons were done, in the third pass, 2 comparisons were done, and so on... At the end of each pass, the largest element gets bubbled up near the end of the array. In general, To bubble sort an array of N elements, total N-1 passes are required in the worst case. In the first pass, N-1 comparisons will be done, in the second pass, N-2 comparisons will be made, in the third pass, N-3 comparisons and so on until only 1 comparison is needed. So total number of comparisons = (N-1) + (N-2) + (N-3) + .... + 1 = (N-1)(N-2) / 2 = O(N2) ....ignoring constants and lower order terms.. Thus, the complexity of bubble sort in the worst case is O(N2) where N is the number of elements of the array. ## Bubble Sort Program in C: This basic Bubble Sort in C programming explains the concept of how to sort the elements using bubble sort in Data Structures. ```#include void swap(int *a, int *b){ *a = *a + *b; *b = *a - *b; *a = *a -*b; } void bubbleSort(int N, int arr[]) { int pass = 0; int flag = 1; int i; for(pass = 0; pass < N && flag; pass++) { printf("Pass %d : ", pass); for (i = 0; i < N - pass -1; ++i) { if (arr[i] > arr[i+1]) { swap(&arr[i], &arr[i+1]); flag = 1; } else{ flag = 0;+ } } for (i = 0; i < N; ++i) { printf("%d ", arr[i]); } printf(" "); printf(" "); } } int main(void) { int N; scanf("%d", &N); int arr[N], i; for(i = 0; i < N; i++) { scanf("%d", &arr[i]); } printf("Input Array is: "); for(i = 0; i < N; i++) { printf("%d ", arr[i]); } printf(" "); bubbleSort(N, arr); printf("Sortrd Array: "); for(i = 0; i < N; i++) { printf("%d ", arr[i]); } printf(" "); return 0; }``` # Learn Flutter, FlutterFlow, Firebase & Angular. Looking to learn how to create the production-ready apps from scratch? Well, you are at the right place. ₹1299 or \$15.56 ₹1299 or \$15.56 ₹1299 or \$15.56 ₹1299 or \$15.56 FREE FREE FREE ## C Programming Test Test your C Programming skills with this comprehensive mock test on C Programming. ## Flutter Test Solve most asked Interview Questions on Flutter and Test your foundational skills in flutter. ## GATE(CSE) Operating Systems Solve most asked GATE Questions in Operating Systems and test your Gate Score. ## HTML,CSS Test This is a mock test designed to help you assess your knowledge and skills in HTML and CSS. ## (GATE CSE) Data Structures & Algorithms Test Solve most asked GATE Questions in Data Structures and Algorithms and test your Gate Score.
1,503
4,686
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.75
4
CC-MAIN-2024-26
latest
en
0.918673
https://math.stackexchange.com/questions/2606863/show-that-for-character-chi-of-an-abelian-group-g-we-have-chi-chi-ge
1,632,508,036,000,000,000
text/html
crawl-data/CC-MAIN-2021-39/segments/1631780057564.48/warc/CC-MAIN-20210924171348-20210924201348-00695.warc.gz
423,401,527
38,763
# Show that for character $\chi$ of an Abelian group $G$ we have $[\chi; \chi] \ge \chi(1)$. $\textbf{The question is as follows:}$ Prove the following properties. $\rm (a)$ $~~$ The group $G$ is Abelian if and only if every irreducible character of $G$ is linear. $\rm (b)$ $~~$ If $\chi$ is a character of an Abelian group $G$ then $[\chi; \chi] \ge \chi(1)$. $\textbf{Some attempt for to prove first part:}$ $\rm (a)$ $~~$ $\Longrightarrow$ For $G$ Abelian, every $g \in G$ and every representation $(\rho, V )$ give elements $\rho(g) \in Hom_G(V, V )$, since the $\rho(g)$ for different $g$ commute. If $V$ is irreducible, these $\pi(g)$ must all be given by scalar multiplication. Then any subspace of $V$ is an invariant subspace, implying the existence of sub-representations and thus a contradiction if V is not 1-dimensional. $\hspace{0.8cm}\Longleftarrow$ We know that a character $\chi$ of $G$ is called linear if $\chi(1) = 1$. So our question turns to say that if a finite group has only 1-dimensional irreducible representations, then it is Abelian. For to prove this we note that the number of irreducible representations is the number of conjugacy classes. Since the sum of the squares of the dimensions of the irreducible representations is the size of the group, if they're all one-dimensional, there are as many conjugacy classes as group elements, i.e. each group element is in a conjugacy class of its own. Hence the group is Abelian. $\rm (b)$ $~~$ Since as what we saw in (a) for finite Abelian group, all its representation is of dimension 1 and there are $|G|$ such inequivalent representations. I was wondering if anyone could give a hint on how to show that $\chi(1) \le [\chi,\chi]$ at some cases. Can someone please give me some hint on how to do it? Thanks! Any character $\chi$ is a nonnegative integral linear combination of irreducible characters. Thus you can write $\chi=\sum_i n_i\chi_i$ where each $n_i$ is a positive integer, and each $\chi_i$ is an irreducible character of $G$. By the first part, $\chi_i(1)=1$, so that $\chi(1)=\sum_i n_i$. Computing $[\chi;\chi]$ by decomposing $\chi$ into irreducible characters as above, and using the fact that $[\chi_i;\chi_j]=\delta_{ij}$, gives $[\chi;\chi]=\sum_i n_i^2$, (when expanding out, by orthogonality we only have to worry about terms $[n_i\chi_i;n_i\chi_i]=n_i^2[\chi_i;\chi_i]=n_i^2$) and since $n_i^2\geq n_i$, the desired inequality is then clear. In fact, equality is achieved when $n_i^2=n_i$, that is, when $n_i=1$, so when $\chi$ is a sum of distinct irreducibles. • @Many thanks for your answer! Can you please write me the complete answer? Because I think in this case we just will get the equality and not $\chi(1) \le [\chi,\chi]$? Thanks for your time! Jan 16 '18 at 16:54
795
2,791
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
3.59375
4
CC-MAIN-2021-39
longest
en
0.892192
https://convertoctopus.com/197-milliliters-to-teaspoons
1,632,321,520,000,000,000
text/html
crawl-data/CC-MAIN-2021-39/segments/1631780057366.40/warc/CC-MAIN-20210922132653-20210922162653-00111.warc.gz
225,914,987
7,682
## Conversion formula The conversion factor from milliliters to teaspoons is 0.20288413535365, which means that 1 milliliter is equal to 0.20288413535365 teaspoons: 1 ml = 0.20288413535365 tsp To convert 197 milliliters into teaspoons we have to multiply 197 by the conversion factor in order to get the volume amount from milliliters to teaspoons. We can also form a simple proportion to calculate the result: 1 ml → 0.20288413535365 tsp 197 ml → V(tsp) Solve the above proportion to obtain the volume V in teaspoons: V(tsp) = 197 ml × 0.20288413535365 tsp V(tsp) = 39.96817466467 tsp The final result is: 197 ml → 39.96817466467 tsp We conclude that 197 milliliters is equivalent to 39.96817466467 teaspoons: 197 milliliters = 39.96817466467 teaspoons ## Alternative conversion We can also convert by utilizing the inverse value of the conversion factor. In this case 1 teaspoon is equal to 0.025019906672995 × 197 milliliters. Another way is saying that 197 milliliters is equal to 1 ÷ 0.025019906672995 teaspoons. ## Approximate result For practical purposes we can round our final result to an approximate numerical value. We can say that one hundred ninety-seven milliliters is approximately thirty-nine point nine six eight teaspoons: 197 ml ≅ 39.968 tsp An alternative is also that one teaspoon is approximately zero point zero two five times one hundred ninety-seven milliliters. ## Conversion table ### milliliters to teaspoons chart For quick reference purposes, below is the conversion table you can use to convert from milliliters to teaspoons milliliters (ml) teaspoons (tsp) 198 milliliters 40.171 teaspoons 199 milliliters 40.374 teaspoons 200 milliliters 40.577 teaspoons 201 milliliters 40.78 teaspoons 202 milliliters 40.983 teaspoons 203 milliliters 41.185 teaspoons 204 milliliters 41.388 teaspoons 205 milliliters 41.591 teaspoons 206 milliliters 41.794 teaspoons 207 milliliters 41.997 teaspoons
507
1,941
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
4.125
4
CC-MAIN-2021-39
latest
en
0.759018
https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/600/8/f/a/
1,585,731,016,000,000,000
text/html
crawl-data/CC-MAIN-2020-16/segments/1585370505550.17/warc/CC-MAIN-20200401065031-20200401095031-00300.warc.gz
1,016,435,735
49,247
# Properties Label 600.8.f.a Level 600 Weight 8 Character orbit 600.f Analytic conductor 187.431 Analytic rank 0 Dimension 2 CM no Inner twists 2 # Related objects ## Newspace parameters Level: $$N$$ = $$600 = 2^{3} \cdot 3 \cdot 5^{2}$$ Weight: $$k$$ = $$8$$ Character orbit: $$[\chi]$$ = 600.f (of order $$2$$, degree $$1$$, not minimal) ## Newform invariants Self dual: no Analytic conductor: $$187.431015290$$ Analytic rank: $$0$$ Dimension: $$2$$ Coefficient field: $$\Q(\sqrt{-1})$$ Coefficient ring: $$\Z[a_1, \ldots, a_{13}]$$ Coefficient ring index: $$1$$ Twist minimal: no (minimal twist has level 24) Sato-Tate group: $\mathrm{SU}(2)[C_{2}]$ ## $q$-expansion Coefficients of the $$q$$-expansion are expressed in terms of $$i = \sqrt{-1}$$. We also show the integral $$q$$-expansion of the trace form. $$f(q)$$ $$=$$ $$q -27 i q^{3} + 120 i q^{7} -729 q^{9} +O(q^{10})$$ $$q -27 i q^{3} + 120 i q^{7} -729 q^{9} -7196 q^{11} + 9626 i q^{13} + 18674 i q^{17} -7004 q^{19} + 3240 q^{21} + 63704 i q^{23} + 19683 i q^{27} -29334 q^{29} + 87968 q^{31} + 194292 i q^{33} + 227982 i q^{37} + 259902 q^{39} -160806 q^{41} -136132 i q^{43} -1206960 i q^{47} + 809143 q^{49} + 504198 q^{51} + 398786 i q^{53} + 189108 i q^{57} -1152436 q^{59} -2070602 q^{61} -87480 i q^{63} -4073428 i q^{67} + 1720008 q^{69} -383752 q^{71} -3006010 i q^{73} -863520 i q^{77} + 4948112 q^{79} + 531441 q^{81} + 9163492 i q^{83} + 792018 i q^{87} -7304106 q^{89} -1155120 q^{91} -2375136 i q^{93} -690526 i q^{97} + 5245884 q^{99} +O(q^{100})$$ $$\operatorname{Tr}(f)(q)$$ $$=$$ $$2q - 1458q^{9} + O(q^{10})$$ $$2q - 1458q^{9} - 14392q^{11} - 14008q^{19} + 6480q^{21} - 58668q^{29} + 175936q^{31} + 519804q^{39} - 321612q^{41} + 1618286q^{49} + 1008396q^{51} - 2304872q^{59} - 4141204q^{61} + 3440016q^{69} - 767504q^{71} + 9896224q^{79} + 1062882q^{81} - 14608212q^{89} - 2310240q^{91} + 10491768q^{99} + O(q^{100})$$ ## Character values We give the values of $$\chi$$ on generators for $$\left(\mathbb{Z}/600\mathbb{Z}\right)^\times$$. $$n$$ $$151$$ $$301$$ $$401$$ $$577$$ $$\chi(n)$$ $$1$$ $$1$$ $$1$$ $$-1$$ ## Embeddings For each embedding $$\iota_m$$ of the coefficient field, the values $$\iota_m(a_n)$$ are shown below. For more information on an embedded modular form you can click on its label. Label $$\iota_m(\nu)$$ $$a_{2}$$ $$a_{3}$$ $$a_{4}$$ $$a_{5}$$ $$a_{6}$$ $$a_{7}$$ $$a_{8}$$ $$a_{9}$$ $$a_{10}$$ 49.1 1.00000i − 1.00000i 0 27.0000i 0 0 0 120.000i 0 −729.000 0 49.2 0 27.0000i 0 0 0 120.000i 0 −729.000 0 $$n$$: e.g. 2-40 or 990-1000 Significant digits: Format: Complex embeddings Normalized embeddings Satake parameters Satake angles ## Inner twists Char Parity Ord Mult Type 1.a even 1 1 trivial 5.b even 2 1 inner ## Twists By twisting character orbit Char Parity Ord Mult Type Twist Min Dim 1.a even 1 1 trivial 600.8.f.a 2 5.b even 2 1 inner 600.8.f.a 2 5.c odd 4 1 24.8.a.b 1 5.c odd 4 1 600.8.a.b 1 15.e even 4 1 72.8.a.e 1 20.e even 4 1 48.8.a.a 1 40.i odd 4 1 192.8.a.h 1 40.k even 4 1 192.8.a.p 1 60.l odd 4 1 144.8.a.k 1 120.q odd 4 1 576.8.a.b 1 120.w even 4 1 576.8.a.c 1 By twisted newform orbit Twist Min Dim Char Parity Ord Mult Type 24.8.a.b 1 5.c odd 4 1 48.8.a.a 1 20.e even 4 1 72.8.a.e 1 15.e even 4 1 144.8.a.k 1 60.l odd 4 1 192.8.a.h 1 40.i odd 4 1 192.8.a.p 1 40.k even 4 1 576.8.a.b 1 120.q odd 4 1 576.8.a.c 1 120.w even 4 1 600.8.a.b 1 5.c odd 4 1 600.8.f.a 2 1.a even 1 1 trivial 600.8.f.a 2 5.b even 2 1 inner ## Hecke kernels This newform subspace can be constructed as the kernel of the linear operator $$T_{7}^{2} + 14400$$ acting on $$S_{8}^{\mathrm{new}}(600, [\chi])$$. ## Hecke Characteristic Polynomials $p$ $F_p(T)$ $2$ $3$ $$1 + 729 T^{2}$$ $5$ $7$ $$1 - 1632686 T^{2} + 678223072849 T^{4}$$ $11$ $$( 1 + 7196 T + 19487171 T^{2} )^{2}$$ $13$ $$1 - 32837158 T^{2} + 3937376385699289 T^{4}$$ $17$ $$1 - 471959070 T^{2} + 168377826559400929 T^{4}$$ $19$ $$( 1 + 7004 T + 893871739 T^{2} )^{2}$$ $23$ $$1 - 2751451278 T^{2} + 11592836324538749809 T^{4}$$ $29$ $$( 1 + 29334 T + 17249876309 T^{2} )^{2}$$ $31$ $$( 1 - 87968 T + 27512614111 T^{2} )^{2}$$ $37$ $$1 - 137887961942 T^{2} +$$$$90\!\cdots\!89$$$$T^{4}$$ $41$ $$( 1 + 160806 T + 194754273881 T^{2} )^{2}$$ $43$ $$1 - 525105300790 T^{2} +$$$$73\!\cdots\!49$$$$T^{4}$$ $47$ $$1 + 443506200674 T^{2} +$$$$25\!\cdots\!69$$$$T^{4}$$ $53$ $$1 - 2190392005878 T^{2} +$$$$13\!\cdots\!69$$$$T^{4}$$ $59$ $$( 1 + 1152436 T + 2488651484819 T^{2} )^{2}$$ $61$ $$( 1 + 2070602 T + 3142742836021 T^{2} )^{2}$$ $67$ $$1 + 4471392460538 T^{2} +$$$$36\!\cdots\!29$$$$T^{4}$$ $71$ $$( 1 + 383752 T + 9095120158391 T^{2} )^{2}$$ $73$ $$1 - 13058700918094 T^{2} +$$$$12\!\cdots\!09$$$$T^{4}$$ $79$ $$( 1 - 4948112 T + 19203908986159 T^{2} )^{2}$$ $83$ $$1 + 29697483654810 T^{2} +$$$$73\!\cdots\!29$$$$T^{4}$$ $89$ $$( 1 + 7304106 T + 44231334895529 T^{2} )^{2}$$ $97$ $$1 - 161119742799550 T^{2} +$$$$65\!\cdots\!69$$$$T^{4}$$
2,312
4,943
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}
2.578125
3
CC-MAIN-2020-16
latest
en
0.289778