text:
# zbMATH — the first resource for mathematics

Existence, uniqueness and stability of positive periodic solution for a nonlinear prey-competition model with delays. (English) Zbl 1104.34050
The authors study an $$n\times n$$ nonquadratic periodic prey-competition ODE model with delays in which the $$m$$ preys are competitors and the $$n-m$$ predators are competitors, respectively. The variable coefficients in the model are assumed to be continuous periodic functions on $$[0,+\infty)$$ with a common period. This model is more general and more complicated than the traditional Lotka-Volterra system and some recent nonquadratic prey-competition models. The authors provide sufficient conditions for the existence of a unique globally attractive positive periodic solution and a few examples of applications of the model in population dynamics.

##### MSC:
 34K13 Periodic solutions to functional-differential equations 92D25 Population dynamics (general) 34K20 Stability theory of functional-differential equations
Full Text:
##### References:
 [1] Ayala, F.J.; Gilpin, M.E.; Eherenfeld, J.G., Competition between species: theoretical models and experimental tests, Theoret. population biol., 4, 331-356, (1973) [2] Berryman, A.A., The origins and evolution of predator-prey theory, Ecology, 75, 1530-1535, (1992) [3] Chattopadhyay, J., Effect of toxic substance on a two-species competitive system, Ecol. model, 84, 287-289, (1996) [4] Chen, Y., New results on positive periodic solutions of a periodic integro-differential competition system, Appl. math. comput., 153, 2, 557-565, (2004) · Zbl 1051.45004 [5] Chen, F.D., Positive periodic solutions of neutral lotka – volterra system with feedback control, Appl. math. comput., 162, 3, 1279-1302, (2005) · Zbl 1125.93031 [6] Chen, F.D., Periodicity in a nonlinear predator-prey system with state dependent delays, Acta math. appl. sinica English series, 21, 1, 49-60, (2005) · Zbl 1096.34050 [7] F.D. Chen, On a nonlinear non-autonomous predator-prey model with diffusion and distributed delay, J. Comput. Appl. Math., in press. [8] Chen, F.D.; Lin, S.J., Periodicity in a logistic type system with several delays, Comput. math. appl., 48, 1-, 35-44, (2004) · Zbl 1061.34050 [9] Chen, F.D.; Lin, F.X.; Chen, X.X., Sufficient conditions for the existence of positive periodic solutions of a class of neutral delay models with feedback control, Appl. math. comput., 158, 1, 45-68, (2004) · Zbl 1096.93017 [10] Chen, F.D.; Sun, D.X.; Lin, F.X., Periodicity in a food-limited population model with toxicants and state dependent delays, J. math. anal. appl., 288, 1, 132-142, (2003) [11] Cui, J.; Chen, L., Asymptotic behavior of the solution for a class of time-dependent competitive system with feedback controls, Ann. differential equations, 9, 1, 11-17, (1993) [12] Fan, M.; Wang, K., Global periodic solutions of a generalized $$n$$-species gilpin – ayala competition model, Comput. math. appl., 40, 1141-1151, (2000) · Zbl 0954.92027 [13] Fan, M.; Wong, P.J.Y.; Agarwal, R.P., Periodicity and stability in a periodic $$n$$-species lotka – volterra competition system with feedback controls and deviating arguments, Acta math. sinica, 19, 4, 801-822, (2003) · Zbl 1047.34080 [14] Gaines, R.E.; Mawhin, J.L., Coincidence degree and nonlinear differential equations, (1977), Springer Berlin · Zbl 0326.34021 [15] Gilpin, M.E.; Ayala, F.J., Global models of growth and competition, Proc. natl. acad. sci. USA, 70, 3590-3593, (1973) · Zbl 0272.92016 [16] Gopalsamy, K., Stability and oscillations in delay differential equations of population dynamics, (1992), Kluwer Academic Press Dordrecht/Norwell, MA · Zbl 0752.34039 [17] Huo, H.F.; Li, W.T., Periodic solutions of a periodic lotka – volterra system with delay, Appl. math. comput., 156, 3, 787-803, (2004) · Zbl 1069.34099 [18] Li, Y.K., Periodic solutions for delay lotka – volterra competition systems, J. math. anal. appl., 246, 1, 230-244, (2000) · Zbl 0972.34057 [19] Li, Y.K.; Kuang, Y., Periodic solutions of periodic delay lotka – volterra equations and systems, J. math. anal. appl., 255, 1, 260-280, (2001) · Zbl 1024.34062 [20] Li, C.R.; Lu, S.J., The qualitative analysis of $$N$$-species periodic coefficient nonlinear relation, prey-competition systems, Appl. math-JCU, 12, 2, 147-156, (1997), (in Chinese) · Zbl 0880.34042 [21] Teng, Z.D., Nonautonomous lotka – volterra systems with delays, J. differential equations, 179, 2, 538-561, (2002) · Zbl 1013.34072 [22] Teng, Z.D., On the periodic solutions of periodic multi-species competitive systems with delays, Applied mathematics and computation, 127, 2-3, 235-247, (2002) · Zbl 1035.34078 [23] Tineo, A.; Alvarz, C., A different consideration about the globally asymptotically stable solution of the periodic $$n$$-competing species problem, J. math. anal. appl., 159, 44-55, (1991) · Zbl 0729.92025 [24] Xia, Y.; Chen, F.; Cao, J.; Chen, A., Existence and global attractivity of an almost periodic ecological model, Appl. math. comput., 157, 2, 449-475, (2004) · Zbl 1049.92038 [25] Yang, Z.H.; Cao, J.D., Positive periodic solutions of neutral lotka – volterra system with periodic delays, Appl. math. comput., 149, 3, 661-687, (2004) · Zbl 1045.92037 [26] Yang, P.; Xu, R., Global attractivity of the periodic lotka – volterra system, J. math. anal. appl., 233, 1, 221-232, (1999) · Zbl 0973.92039 [27] Zhao, X.Q., The qualitative analysis of $$n$$-species lotka – volterra periodic competition systems, Math. comput. modell., 15, 11, 3-8, (1991) · Zbl 0756.34048 [28] Zhao, J.D.; Chen, W.C., Global asymptotic stability of a periodic ecological model, Appl. math. comput., 147, 3, 881-892, (2004) · Zbl 1029.92026 [29] Zhao, J.D.; Chen, W.C., The qualitative analysis of $$N$$-species nonlinear prey-competition systems, Appl. math. comput., 149, 2, 567-576, (2004) · Zbl 1045.92038
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Ω 7

Frontpage
Crossposted from the AI Alignment Forum. May contain more technical jargon than usual.

Overall summary post here.

In a previous post, I asked which impact measures were vulnerable to subagents. Vika pointed out that it was not merely an issue of of the impact measure, but also of the baseline.

This is indeed the case, but the nature of the impact measure is still relevant. In this post, I'll establish two facts: that under the stepwise inaction baseline, a subagent completely undermines all impact measures (including twenty billion questions). And for the inaction baseline, for non-indexical impact measures, a subagent will not change anything.

The next post will delve into the very interesting things that happen with the inaction baseline and an indexical impact measure.

# Stepwise inaction baseline

All impact measures are some form of distance measure between two states, of the form , where is the state the agent is actually in, and is some baseline state to compare with.

For the stepwise inaction baseline, is calculated as follows. Let be the previous state, the previous action. Then is the state that would have followed had the agent taken the noop action, , instead of .

However, in the presence of a subagent, the agent merely has to always take the action . In that case, (in a deterministic setting[1]), and the penalty collapses to nothing.

This leaves the subagent free to maximise (the positive reward for agent and subagent), without any restrictions beyond making sure that the agent can always take the action.

# Non-indexical impact penalty

The twenty billion questions is an example of a non-indexical impact penalty. The impact penalty is defined as the difference in expected value of many variables, between the current state and the baseline state.

With the inaction baseline state, is the state the system would have been in, had the agent always done nothing/had not been turned on. Thus the definition of is independent of the agent's actions, so the inaction baseline does not collapse like the stepwise inaction baseline does.

What about subagents? Well, since the impact penalty is non-indexical, a subagent does not get around it. It matters not whether the subagent is independent, or an extension of the agent: the impact penalty remains.

1. In a non-deterministic setting, becomes a mix of an impact penalty and a measure of environment stochasticity. ↩

# Ω 7

New Comment

I think this problem is about capturing delayed effects of the agent's actions. The way the stepwise baseline is supposed to penalize delayed effects is using inaction rollouts, which compare the effects of the agent action + k noops and the effects of k+1 noops (for all positive integers k). I don't think it's useful to consider this issue for a stepwise baseline with no rollouts, since that baseline fails to penalize any delayed effects (no subagents needed).

Here, the inaction rollouts don't capture the effects of the subagent, and thus the agent doesn't receive a penalty for creating the subagent. There are several factors that contribute to this:

1. The auxiliary reward R only rewards the agent itself pressing the red button, not the red button being pressed in general, so it would not be triggered by the subagent pressing it.

2. The subagent never goes to the red button - it only goes to the blue button.

The agent would be penalized for creating the subagent if both 1 and 2 were false. If 1 was false, the auxiliary reward would be given whenever the red button was pressed. If 2 was also false, the inaction rollout after subagent creation would include a state where the subagent presses the red button, and so the agent would be penalized.

In the general case, the agent can only get away with creating subagents that don't achieve any auxiliary rewards, which I think limits the magnitude of this problem. The designer can choose auxiliary rewards (that are not achieved by the agent doing nothing) such that a subagent will achieve at least one of them. For example, if there is an auxiliary reward for reaching any state except the state before subagent creation, the no-subagent inaction rollout will consist of this state, and the subagent inaction rollout will contain a different state at least once, so subagent creation will be penalized.

The inaction rollouts effectively transforms the stepwise inaction baseline into an inaction baseline (starting from the moment the subagent is created; thus the agent has a bit more control than in a true inaction baseline).

Therefore the results on the inaction baseline apply ( https://www.lesswrong.com/s/iRwYCpcAXuFD24tHh/p/M9aoMixFLf8JFLRaP ).

This means that restrictions on increased power for the agent ("make sure you never have the power to increase the rewards") become restrictions on the actual policy followed for the subagent ("make sure you never increase these rewards").

Roughly, attainable utility becomes twenty billion questions.

For the original example, this means that the agent cannot press the red button nor gain the ability to teleport. But while the subagent cannot press the red button, it can gain the ability to teleport.

For example, if there is an auxiliary reward for reaching any state except the state before subagent creation, the no-subagent inaction rollout will consist of this state, and the subagent inaction rollout will contain a different state at least once, so subagent creation will be penalized.

This requires identifying what a subagent is in general, a very tricky unsolved problem (which I feel is unsolvable).

There's another issue; it's not enough to show that the subagent triggers a penalty. We need to show the penalty is larger than not creating the subagent. Since the penalty is zero after the subagent is created, and since the subagent has very fine control over the rewards (much finer than actions that don't include creating an intelligent being), creating a subagent might be lower penalty than almost any other action.

It won't be a lower penalty than the agent doing nothing for ever, of course. But we typically want the agent to do something, so will calibrate the penalty or R_0 for that. And it's plausible that creating the subagent will have lower penalty (and/or higher R_0) than any safe "something".

I don't think this requires identifying what a subagent is. You only need to be able to reliably identify the state before the subagent is created (i.e. the starting state), but you don't need to tell apart other states that are not the starting state.

I agree that we need to compare to the penalty if the subagent is not created - I just wanted to show that subagent creation does not avoid penalties. The penalty for subagent creation will reflect any impact the subagent actually causes in the environment (in the inaction rollouts).

As you mention in your other comment, creating a subagent is effectively switching from a stepwise inaction baseline to an inaction baseline for the rest of the episode. This can be beneficial for the agent because of the 'winding road' problem, where the stepwise baseline with inaction rollouts can repeatedly penalize actions (e.g. turning the wheel to stay on the road and avoid crashing) that are not penalized by the inaction baseline. This is a general issue with inaction rollouts that needs to be fixed.

Alas, the inaction rollouts don't seem to fix the problem: https://www.lesswrong.com/s/iRwYCpcAXuFD24tHh/p/z9MfmF8gA7SBxGSmb

I'll establish two facts: that under the stepwise inaction baseline, a subagent completely undermines all impact measures (including twenty billion questions).

Note this implicitly assumes an agent benefits by building the subagent. The specific counterexample I have in mind will be a few posts later in my sequence.

It needs to benefit for ; not necessarily for or alone.

It seems to me that, generically, since is supposed to be a hindrance to the agent, taking a few turns to then neutralise should be beneficial.

format: plain


text:
# Trying to wire in LED to show cooker element is on/off

Hi I'm a mechanical engineer so please bear with me. I'm trying to wire in an LED to show whether a cooker element is on or off. Looking at the diagrams below, the easiest way to do this would be to wire an LED into the Aditec MKA-120 outputs between 06 and 07. Would it be that simple?

The images of the diagrams are below:

Internal switchboard: https://imgur.com/mpMYTDU External switchboard: https://imgur.com/GmqQpgk Aditec MKA-120 controller: https://imgur.com/uZ0zAjH Electric diagram for cooker: https://imgur.com/uOERoYz

• Welcome to EE.SE, Charlie. Your question hasn't attracted any comments or answers after an hour. That's unusual for this site so I suggest that the question full of links and no photos may be asking a bit much from your readers. You can embed photos - I think there's a limit of two for new users - and you could format the links properly using the [Description](http://website.com/folder/page.php) syntax (or use the link button on the editor toolbar). Make it easy for your readers. – Transistor Jan 24 at 22:35
• @Transistor thanks for the heads up. I will try redo it. – charlieS Jan 24 at 23:22
• could you use a neon indicator instead of an LED? I have some NOS that is rated 240VAC – jsolarski Jan 25 at 0:33

I doubt very much that an LED is appropriate in this case. All wiring except the temperature sensor is AC line wiring. In particular,06 connects to L1, the active AC line. Anything you connect to this will operate from 230 VAC. In this case, 07 is in series with the heating elements -81 and -82, so placing an LED across these contacts will result in 230 VAC appearing across the LED when the heater is not active.

While it's true you can do this, keep 3 things in mind.

1) You must provide current limiting to the LED, and this will dissipate much more power than the LED.

2) You must provide a diode to protect the LED from the reverse voltage (about 320 volts maximum) which will appear 50 times per second.

3) Because you will have connected directly to line, unless you know very clearly what you are doing, you stand a distinct chance that your modification will cause the cooker to become live, and for your body (or that of someone you know) to complete the circuit. This is called "auto-Darwination" and it is not a good thing.

• Won't the reverse voltage only appear 25 times per second? – Simeon R Jan 25 at 0:27
• @SimeonR - Nope. UK power is 50 Hz. That is, one positive half-cycle and one negative half-cycle every 20 msec. – WhatRoughBeast Jan 25 at 0:29
• Fantastic explanation, love the last bit. Few questions if you don't mind. Can I use a neon indicator instead, as mentioned in the comments above and not worry about current limiting and diodes? Also, you say 230VAC will appear across the LED when the heater is not active, but how can that be possible if the switch is between 05 and 06 and only supplies power to the heating coil when it switches to 06 and 07? If the switch is between 05 and 06, won't the circuit between 06 and 07 be open and any light wired between them is off? Or have I misunderstood the diagram? Thank you – charlieS Jan 28 at 17:56
• @charlieS - 1) Yes, a neon indicator is an excellent choice, but you do have to worry about a current limiting resistor. However, many neon indicators will have the resistor built in - check the data sheet. No diodes needed, since a neon works with both polarities. 2) No, 05 is not connected to anything. When 05 is switched to 06, there will be ~230 VAC between 06 and 07, which will light a neon. The voltage will be reduced a bit by the resistance of the heater elements, but that will be negligable for the currents a neon indicator uses. – WhatRoughBeast Jan 28 at 23:35
• I realise I thought one thing but wrote something else. If I put a light between 6 and 7, I am essentially short circuiting between 6 and 7. I need to put an LED in series with 7 and the coils so when the coils are powered, the light comes on! – charlieS Jan 30 at 1:24


text:
# Include title page in numbering via preamble settings only?

I'm trying to make my title page count as "Page 1" in my PDF, but I have the restriction that (I think) I can only make a change to the preamble section of my .tex file.

My scenario is that I'm using sphinx-doc (with Read the Docs) to generate a PDF of our project's documentation, so I (think?) I can only make changes in the sphinx conf.py file which go into the LaTeX preable. (In other words, I don't have access to the generated .tex file before it's processed into a PDF.)

In our case, our users are reading this PDF on their devices, so I want the page numbers in the PDF to "match" the actual page count numbers of the document and the TOC.

I have figured out how to switch the numbering to arabic, but the problem is everything is off by 1. A page linked in the TOC as "Page 13" is actually Page 14 of the PDF.

I assume this is because the title page isn't being counted as a number?

I looked at other answers (here and here), but it seems that those require inline changes to the .tex file which I'm not able to do?

So I wonder if I can do this from the preamble?

Here's what I'm adding into my preamble via the sphinx config so far:

    \renewcommand\thesection{\hspace*{-0.5em}}
\renewcommand\thesubsection{\hspace*{-0.5em}}
\usepackage{bera}
\usepackage[defaultsans]{lato}
\usepackage{inconsolata}
\usepackage{ragged2e}
\AtBeginDocument{\raggedright}
\setcounter{tocdepth}{1}
\pagenumbering{arabic}

Thanks! Brian

A rather radical way is to inject \renewcommand\pagenumbering[1]{} in the preamble of the generated LaTeX file. You do this via the 'preamble' key (check the docs).
It worked for me in my testing (for document of the 'manual' type, i.e. using report class).


text:
What law is "the volume of a given mass of gas at a given temperature is inversely proportional to its pressure"?

0 votes
77 views
What law is "the volume of a given mass of gas at a given temperature is inversely proportional to its pressure"?
posted Jul 17, 2017
Looking for an answer? Promote on:

Similar Questions
0 votes

Who was the Anglo-Irish scientist who, in the 17th century, discovered that "the volume of a given mass of gas at a given temperature is inversely proportional to its pressure"?

+3 votes

Who has given the Gas Law?


text:
# Spectrometry Sampling activity:spectrometry-sampling

**How do you test liquid or solid samples with your [DIY Spectrometer](/wiki/spectrometer)?** Read about ways to prepare and scan samples here, and [read about different tests you can do with your spectrometer](/wiki/spectrometry-activities). ## Questions [questions:spectrometry-sampling] **** ## Sample containers What do you store liquid samples in? A good sample container has flat sides, so you can shine lights (and lasers) through it without lots of reflections. There are lots of different [affordable test tubes on Amazon](https://www.amazon.com/s/?field-keywords=test%20tubes), but they're mostly round. Flat-sided test tubes are often called **cuvettes** and are specifically for spectrometry. It's also good to have the light travel through a consistent amount of the sample -- many cuvettes (traditional spectrometry sample containers) are 1cm x 1cm, so the light always goes through 1cm of the sample. [![dropper.jpg](https://i.publiclab.org/system/images/photos/000/001/730/medium/dropper.jpg)](https://i.publiclab.org/system/images/photos/000/001/730/original/dropper.jpg) [![Cuvette_with_penny.jpg](https://i.publiclab.org/system/images/photos/000/001/731/medium/Cuvette_with_penny.jpg)](https://i.publiclab.org/system/images/photos/000/001/731/original/Cuvette_with_penny.jpg) _A square-sided bottle, left, and a cuvette, right (photo from [Wikipedia](http://simple.wikipedia.org/wiki/Cuvette))._ Unfortunately, we've found that cuvettes with plastic stoppers will leak when filled with oil and not kept upright (for example if you travel with them). A really nice source of completely sealable rectangular 1/4 oz glass jars which are pretty perfect for sampling can be found for $3.50 for a ten-pack here (see image below of 2 on top of a flashlight): http://www.sciplus.com/p/WHITCAP-BOTTLE_48212 **Other sample container options** *$20 (w/ shipping) 100x plastic (polystyrene) cuvettes: http://www.amazon.com/Cuvette-Polystyrene-Macro-2-5Ml-4-5Ml/dp/B008H5XJ9E/ (no caps) * $9 100x cuvette caps: http://www.amazon.com/Azzota-A920-Cuvettes-Caps-100/dp/B005YOJPLC/ *$22 Quartz cuvette (transparent in farther UV range): http://www.amazon.com/Quartz-Cuvette-standard-10mm-spectrometer/dp/B00DWXFIS6/ **** ## Water sampling Water is usually very clear in small amounts -- even murky water in a small container will look pretty transparent. That makes it hard to measure with spectrometry unless you shine light through a *lot* of it. But some tests have been done -- see this example of a scan of water from the Charles River before and after 7 days of settling, by [Jeff Hecht](https://spectralworkbench.org/sets/show/330): [![charles-river.png](https://i.publiclab.org/system/images/photos/000/001/732/large/charles-river.png)](https://spectralworkbench.org/sets/show/330) **** ## Oil sampling However, most research in Public Lab to date has focused on oil spectroscopy -- attempting to identify petroleum residue in sediments. [![IMG_20140722_230007_2.jpg](https://i.publiclab.org/system/images/photos/000/005/452/large/IMG_20140722_230007_2.jpg)](https://i.publiclab.org/system/images/photos/000/005/452/original/IMG_20140722_230007_2.jpg) To identify oil contamination, we [have been attempting](/tag/fluorescence) to illuminate oil samples with UV flashlights and green lasers, which can make some oils fluoresce, or glow, as pictured above. The basics of sample preparation for oil identification are still being refined, but our best practices to date can be found on the [Oil Testing Kit page](/wiki/oil-testing-kit) **** [![Flame spectroscopy](https://i.publiclab.org/system/images/photos/000/001/634/medium/IMG_1794.JPG)](https://i.publiclab.org/system/images/photos/000/001/634/original/IMG_1794.JPG) _Burning potato chips to measure the sodium emission spectrum from the NaCl (salt)._ ## Flame spectroscopy Another type of spectrometry which involves measuring the light of a flame and can detect specific elements (not molecules) as they emit light at very specific "peaks" -- narrow wavelength bands. Besides flames, these "emission lines" can be produced by exposing gases or sometimes liquids to UV light, lasers, or electric fields (as in a fluorescent bulb). The fluorescent bulb spectrum [you get when calibrating](/wiki/spectral-workbench-calibration) is an example of a mercury emission spectrum. Emission lines are produced by atoms, not whole molecules (the latter produce absorption lines, which we might still be able to detect since we have the flame -- a good broad-spectrum light source -- but that is just a theory at this point). So sulfur and carbon are possible targets, but we won't be able to distinguish CO2 from CO. **Basic setup:** For a more complete description, please read about the "flare spectroscopy activity" below, however, the basic setup involves simply pointing a spectrometer at a flame (which can be difficult to line up if the flame is far away), and later comparing any peaks to known peak locations of looked-for elements. We are compiling a collection of such known elements by importing "idealized" spectra from the NIST database, a process which you can [read more about here](/notes/warren/08-13-2013/importing-spectra-from-nist-and-webmineral-com-to-spectral-workbench). Read more about flame spectroscopy: - [Flare spectroscopy activity](/wiki/flare-spectroscopy-activity) (with description of experimental setup) - Flare spectroscopy research: [http://publiclab.org/tag/flare](http://publiclab.org/tag/flare) - A report from user [straylight](/profile/straylight) on a classroom activity involving [measuring different elements in a bunsen burner flame](/notes/straylight/10-14-2012/classroom-flame-spectroscopy) - A listing of imported emission spectra of elements from the NIST database so far: [https://spectralworkbench.org/tag/nist](https://spectralworkbench.org/tag/nist) --------- ### Activities [activities:spectrometry-sampling]...

Author Comment Last activity Moderation
Fernmoss "Can a 405 nm led be used to visualize heating oil stains? " | Read more » about 1 year ago
laxmiassociates "Very informative. Information is detailed in a comprehensive way regarding oil testing. Insightful. Thank you for this. " | Read more » over 2 years ago
Ag8n " The kits for these tests ( someone correct me if I'm wrong) appear to be made by RenekaBio. A quick look down the test procedure and method showe..." | Read more » about 4 years ago
bararesbest " What is the solution 2? " | Read more » about 4 years ago
springem "Hi, new user here. Just got word from my water company that their turbidometer has been going offline for a few months. I'm curious if you have upl..." | Read more » almost 5 years ago
programmer1200 "Here is a link to the source but its cheaper to purchase at the actual store , for some reason they $1.71 website and only a$1 in store . https:/..." | Read more » almost 5 years ago
warren "Also, do you have a link to the light you used? Do you use a diffuser of any kind with it, or could you in theory dim the light with a filter to ma..." | Read more » almost 5 years ago
warren "That sounds amazing. Looking forward to seeing it! " | Read more » almost 5 years ago
programmer1200 "Hi @warren that sounds great I'll get one printed out and ready for use and should have it on its way within a few days. Your right about the stand..." | Read more » almost 5 years ago
warren "Hi, this is tremendous, we'd love one at the Kits initiative! Could we trade you for some Lego parts? We're curious if you'd be interested in using..." | Read more » almost 5 years ago
briandegger "Great article. Its also good to know about Renekabio(based in US and Indonesia ftw) and their set of assays. Is this the detection kit you used? h..." | Read more » about 5 years ago
neilh20 "Very interesting. A new board from seeed is intriguing- though a bit pricey - seems like it could be turned into an auto-monitoring system. https:/..." | Read more » over 5 years ago
dhaffnersr "It's me again Jeff, Dave H, sorry I posted the wrong graph i made, this is the right one " | Read more » about 7 years ago
dhaffnersr "Hey Jeff, I use spekwin32 for all my spectral data processing, first here are 2 references that may help you https://www.researchgate.net/topic/uv..." | Read more » about 7 years ago
warren "Hi, Dave - what is the tell-tale hump? Do you mean from the LED input light? If so, it's at 398nm, not 385nm. What processing did you do? " | Read more » about 7 years ago
dhaffnersr "Hey Jeff, I saw your spectra of the nail polish machine and there it is the tell tail "hump," so I exported it and processed it and here is what it..." | Read more » about 7 years ago
dhaffnersr "Hey Dave, well I was thinking along the lines of when I built a wind speed indicator with a small dc motor and LCD screen attached and calibrated i..." | Read more » about 7 years ago
stoft "Unfortunately, LED wavelength does not change with applied voltage or current -- their center peak wavelength is not variable or controllable and P..." | Read more » about 7 years ago
dhaffnersr "Hey Jeff! Sure I'd be happy to test any LEDs you want to send. I do want to throw an idea your way, I think using the higher wavelength LEDs are st..." | Read more » about 7 years ago
stoft "Sure ... what's the LED's packaging style/type? SMD, leaded, ...? " | Read more » about 7 years ago
warren "@dhaffnersr and @stoft, if you'd like I could send you the lower-wavelength LEDs as well for comparison testing? " | Read more » about 7 years ago
warren "@briandegger @jeffh - thanks for the tips on LED sourcing! Thought you'd enjoy seeing this. " | Read more » about 7 years ago
straylight "thanks ygzstc, that makes sense. I think that the approximation that relative intensity measured from the scope can be used in place of the log rel..." | Read more » about 7 years ago
ygzstc "Yes the Beer-Lambert Law is based on -log(I/Io) but it's applicable for a single wavelength value. (https://en.wikipedia.org/wiki/Beer%E2%80%93Lamb..." | Read more » about 7 years ago


text:
# Connecting Through SnowSQL¶

This topic describes how to connect to Snowflake by entering connection parameters manually. The topic then explains how to configure a default connection for ease of use, as well as one or more named connections to use alternative connection settings or create multiple concurrent sessions.

In this Topic:

## Connection Syntax¶

$snowsql <connection_parameters>  Where <connection_parameters> are one or more of the following. For detailed descriptions of each parameter, see Connection Parameters Reference (in this topic). Parameter Description -a, --accountname TEXT Your account identifier. Honors$SNOWSQL_ACCOUNT.

-u, --username TEXT

Username to connect to Snowflake. Honors $SNOWSQL_USER. -d, --dbname TEXT Database to use. Honors$SNOWSQL_DATABASE.

-s, --schemaname TEXT

Schema in the database to use. Honors $SNOWSQL_SCHEMA. -r, --rolename TEXT Role name to use. Honors$SNOWSQL_ROLE.

-w, --warehouse TEXT

Warehouse to use. Honors $SNOWSQL_WAREHOUSE. -h, --host TEXT Host address for the connection. Honors$SNOWSQL_HOST. (Deprecated)

-p, --port INTEGER

Port number for the connection. Honors $SNOWSQL_PORT. (Deprecated) --region TEXT Region. Honors$SNOWSQL_REGION. (Deprecated; use -a or –accountname instead)

-m, --mfa-passcode TEXT

Token to use for multi-factor authentication (MFA)

--mfa-passcode-in-password

Appends the MFA passcode to the end of the password.

--abort-detached-query

Aborts a query if the connection between the client and server is lost. By default, it won’t abort even if the connection is lost.

--probe-connection

Test connectivity to Snowflake. This option is mainly used to print out the TLS/SSL certificate chain.

--proxy-host TEXT

(DEPRECATED. Use HTTPS_PROXY and HTTP_PROXY environment variables.) Proxy server hostname. Honors $SNOWSQL_PROXY_HOST. --proxy-port INTEGER (DEPRECATED. Use HTTPS_PROXY and HTTP_PROXY environment variables.) Proxy server port number. Honors$SNOWSQL_PROXY_PORT.

--proxy-user TEXT

(DEPRECATED. Use HTTPS_PROXY and HTTP_PROXY environment variables.) Proxy server username. Honors $SNOWSQL_PROXY_USER. Set$SNOWSQL_PROXY_PWD for the proxy server password.

--authenticator TEXT

Authenticator: ‘snowflake’, ‘externalbrowser’ (to use any IdP and a web browser), https://<okta_account_name>.okta.com (to use Okta natively), or ‘oauth’ to authenticate using OAuth.

-v, --version

Shows the current SnowSQL version, or uses a specific version if provided as a value.

--noup

Disables auto-upgrade for this run. If no version is specified for -v, the latest version in ~/.snowsql/ is used.

-D, --variable TEXT

Sets a variable to be referred by &<var>. -D tablename=CENUSTRACKONE or –variable db_key=$DB_KEY -o, --option TEXT Set SnowSQL options. See the options reference in the Snowflake documentation. -f, --filename PATH File to execute. -q, --query TEXT Query to execute. --config PATH Path and name of the SnowSQL configuration file. By default, ~/.snowsql/config. -P, --prompt Forces an interactive password prompt to allow you to specify a password that differs from the one stored in the$SNOWSQL_PWD environment variable.

-M, --mfa-prompt

Forces a prompt for the second token for MFA.

-c, --connection TEXT

Named set of connection parameters to use.

--single-transaction

Connects with autocommit disabled. Wraps BEGIN/COMMIT around statements to execute them as a single transaction, ensuring all commands complete successfully or no change is applied.

--private-key-path PATH

Path to private key file.

--disable-request-pooling

Disables connection pooling.

-U, --upgrade

-K, --client-session-keep-alive

Keep the session active indefinitely, even if there is no activity from the user.

-?, --help

Show this message and exit.

Passwords cannot be passed through connection parameters. Passwords must be specified in one of the following ways:

Note

In Windows environments, the Cygwin terminal doesn’t prompt for your account identifier, username, or password. This is because SnowSQL cannot enable TTY mode in Cygwin terminals.

### Using Environment Variables¶

Currently, environment variables can only be used to pre-specify some command line parameter values such as password, host, and database. Environment variables are not available to use in SnowSQL variable substitution unless they are explicitly specified on the command line when starting SnowSQL, using either the -D or --variable connection parameter. For example:

Linux/macOS
$snowsql ... -D tablename=CENUSTRACKONE --variable db_key=$DB_KEY

Windows
$snowsql ... -D tablename=CENUSTRACKONE --variable db_key=%DB_KEY%  In the above example, --variable sets a Snowflake variable named db_key to the DB_KEY environment variable. ## Configuring Default Connection Settings¶ We recommend configuring your default connection parameters to simplify the connection process. Thereafter, when connecting to Snowflake, you can omit your Snowflake account identifier, username, and any other parameters you have configured as your default values. To configure your default settings: 1. Open the SnowSQL configuration file (named config) in a text editor. The default location of the file is: Linux/macOS ~/.snowsql/ Windows %USERPROFILE%\.snowsql\ Note You can change the default location by specifying the --config path command-line flag when starting SnowSQL. 2. In the [connections] section, configure the default connection parameters by removing the comment symbol from any of the following parameters and specifying the correct values: [connections] #accountname = <string> # Account identifier to connect to Snowflake. #username = <string> # User name in the account. Optional. #password = <string> # User password. Optional. #dbname = <string> # Default database. Optional. #schemaname = <string> # Default schema. Optional. #warehousename = <string> # Default warehouse. Optional. #rolename = <string> # Default role. Optional. #authenticator = <string> # Authenticator: 'snowflake', 'externalbrowser' (to use any IdP and a web browser), https://<okta_account_name>.okta.com (to use Okta natively), 'oauth' to authenticate using OAuth.  Attention • The password is stored in plain text in the config file. You must explicitly secure the file to restrict access. For example, in Linux or macOS, you can set the read permissions to you alone by running chmod: $ chmod 700 ~/.snowsql/config

• If your password includes special characters, you must enclose the password in either single quotes or double quotes.

## Verifying the Network Connection to Snowflake with SnowCD¶

After configuration, you can evaluate and troubleshoot your network connectivity to Snowflake using SnowCD.

You can use SnowCD during the initial configuration process and on-demand at any time to evaluate and troubleshoot your network connection to Snowflake.

## Using Named Connections¶

To make multiple simultaneous connections to Snowflake, or to simply store different sets of connection configurations, you can define one or more named connections.

### Defining Named Connections in the Configuration File¶

1. Open the config configuration file in a text editor. By default, the file is located in:

Linux/macOS

~/.snowsql/

Windows

%USERPROFILE%\.snowsql\

2. Add a separate [connections] section with a unique name for each named connection.

For example, the following illustrates a connection named my_example_connection for a Snowflake account with the account identifier myorganization-myaccount:

[connections.my_example_connection]
accountname = myorganization-myaccount
dbname = mydb
schemaname = public
warehousename = mywh

### Connecting to Snowflake Using a Named Connection¶

Use the -c <string> (or --connection <string>) connection parameter to specify a named connection, where <string> is the name of a connection defined in the configuration file.

For example, connect using the my_example_connection connection you created in Defining Named Connections in the Configuration File (in this topic):

$snowsql -c my_example_connection  ## Using Key Pair Authentication & Key Pair Rotation¶ SnowSQL supports key pair authentication and key rotation. You can use unencrypted or encrypted key pairs. Caution While unencrypted private keys are supported, Snowflake strongly recommends using encrypted private keys when connecting to Snowflake. Unencrypted private keys have no protection against unauthorized use if any unauthorized person gains access to them. The following procedure presumes you use the recommended encrypted key pair authentication: 1. To start, follow the instructions to configure Key Pair Authentication & Key Pair Rotation. 2. Specify the path to the private key file either in the configuration file or on the command line: • In the configuration file: • Add the private_key_path connection parameter to your connection settings and specify the local path to the private key file you created. The syntax is not OS-specific: Supported OS private_key_path = <path>/rsa_key.p8  • Use the SNOWSQL_PRIVATE_KEY_PASSPHRASE environment variable to set the passphrase for decrypting the private key file. Note that you do not enclose the passphrase in quotes for Linux or MacOS but must use single or double quotes for Windows: Linux/macOS export SNOWSQL_PRIVATE_KEY_PASSPHRASE=<passphrase>  Windows set SNOWSQL_PRIVATE_KEY_PASSPHRASE='<passphrase>'  • On the command line: Include the private-key-path connection parameter and specify the path to your encrypted private key file: $ snowsql -a <account_identifier> -u <user> --private-key-path <path>/rsa_key.p8

SnowSQL prompts you for the passphrase. Alternatively, use the SNOWSQL_PRIVATE_KEY_PASSPHRASE environment variable to set the passphrase for decrypting the private key file (as described above).

## Using a Proxy Server¶

To use a proxy server, configure the following environment variables:

• HTTP_PROXY

• HTTPS_PROXY

• NO_PROXY

Note

The proxy parameters (i.e. proxy_host, proxy_port, proxy_user and SNOWFLAKE_PROXY_PWD in the command line and config file) are deprecated. Use the environment variables instead.

However, this requires SnowSQL 1.1.20 or higher. To determine your current version, see Understanding SnowSQL Versioning.

For example:

Linux/macOS
export HTTP_PROXY='http://username:password@proxyserver.company.com:80'

Windows
set HTTP_PROXY=http://username:password@proxyserver.company.com:80

Tip

Snowflake’s security model does not allow Secure Sockets Layer (SSL) proxies (using an HTTPS certificate). Your proxy server must use a publicly-available Certificate Authority (CA), reducing potential security risks such as a MITM (Man In The Middle) attack through a compromised proxy.

If you must use your SSL proxy, we strongly recommend that you update the server policy to pass through the Snowflake certificate such that no certificate is altered in the middle of communications.

Optionally NO_PROXY can be used to bypass the proxy for specific communications. For example, Amazon S3 access can be bypassed by specifying NO_PROXY=".amazonaws.com".

## Using a Web Browser for Federated Authentication/SSO¶

To use browser-based SSO authentication for SnowSQL, add --authenticator externalbrowser to your SnowSQL connection parameters:

For example:

$snowsql -a <account_identifier> -u <username> --authenticator externalbrowser  For more information about federated authentication/SSO, see Managing/Using Federated Authentication. ## Verifying the OCSP Connector or Driver Version¶ Snowflake uses OCSP to evaluate the certificate chain when making a connection to Snowflake. The driver or connector version and its configuration both determine the OCSP behavior. For more information about the driver or connector version, their configuration, and OCSP behavior, see OCSP Configuration. ## OCSP Response Cache Server¶ Note The OCSP response cache server is currently supported by SnowSQL 1.1.55 and higher. Snowflake clients initiate every connection to a Snowflake service endpoint with a “handshake” that establishes a secure connection before actually transferring data. As part of the handshake, a client authenticates the TLS/SSL certificate for the service endpoint. The revocation status of the certificate is checked by sending a client certificate request to one of the OCSP (Online Certificate Status Protocol) servers for the CA (certificate authority). A connection failure occurs when the response from the OCSP server is delayed beyond a reasonable time. The following caches persist the revocation status, helping alleviate these issues: • Memory cache, which persists for the life of the process. • File cache, which persists until the cache directory (e.g. ~/.cache/snowflake or ~/.snowsql/ocsp_response_cache) is purged. • Snowflake OCSP response cache server, which fetches OCSP responses from the CA’s OCSP servers hourly and stores them for 24 hours. Clients can then request the validation status of a given Snowflake certificate from this server cache. Important If your server policy denies access to most or all external IP addresses and web sites, you must whitelist the cache server address to allow normal service operation. The cache server hostname is ocsp*.snowflakecomputing.com:80. If you need to disable the cache server for any reason, set the SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED environment variable to false. Note that the value is case-sensitive and must be in lowercase. If none of the cache layers contain the OCSP response, the client then attempts to fetch the validation status directly from the OCSP server for the CA. ## Connection Error Handling¶ Cannot open self /usr/bin/snowsql or archive /usr/bin/snowsql.pkg (Linux Only) Due to a limitation in pyinstaller (the program that packages SnowSQL into a stand-alone executable from Python source code), prelink mistakenly strips parts of the snowsql executable and causes this error. To avoid this issue, the SnowSQL installer attempts to update the prelink configuration file in /etc/prelink.conf.d/snowsql.conf for the snowsql executable such that prelink does not alter the file. Unfortunately, this configuration update cannot be made by the SnowSQL auto-upgrade process. Work with your system administrator to run the following command on your workstation: $ sudo bash -c "echo '-b snowsql' > /etc/prelink.conf.d/snowsql.conf"

Note

If you install snowsql in your user home directory, this issue is less likely to occur because prelink is configured, by default, to scan the shared binary directories (e.g. /usr/bin or /bin) and does not alter programs in your home directory.

## Connection Parameters Reference¶

### -a , --accountname¶

Description

Required

This connection parameter can also be set in the configuration file.

Value

String

Also, the value can be an environment variable:

Linux/macOS

$SNOWSQL_ACCOUNT Windows %SNOWSQL_ACCOUNT% For example, in Linux or macOS: $ export SNOWSQL_ACCOUNT=myorganization-myaccount

$snowsql -a$SNOWSQL_ACCOUNT

Default

None

### -u , --username¶

Description

Specifies the login name of the user with whom you connect to the specified account.

This connection parameter can also be set in the configuration file.

Value

String

The value can be an environment variable:

Linux/macOS

$SNOWSQL_USER Windows %SNOWSQL_USER% For example, in Linux or macOS: $ export SNOWSQL_USER=jdoe

$snowsql -u$SNOWSQL_USER

Default

None

### -d , --dbname¶

Description

Specifies the database to use by default in the client session (can be changed after login).

Value

String

The value can be an environment variable:

Linux/macOS

$SNOWSQL_DATABASE Windows %SNOWSQL_DATABASE% This connection parameter can also be set in the configuration file. Default None ### -s , --schemaname¶ Description Specifies the database schema to use by default in the client session (can be changed after login). Value String The value can be an environment variable: Linux/macOS $SNOWSQL_SCHEMA

Windows

%SNOWSQL_SCHEMA%

This connection parameter can also be set in the configuration file.

Default

None

### -r , --rolename¶

Description

Specifies the role to use by default for accessing Snowflake objects in the client session (can be changed after login).

This connection parameter can also be set in the configuration file.

Value

String

The value can be an environment variable:

Linux/macOS

$SNOWSQL_ROLE Windows %SNOWSQL_ROLE% Default None ### -w , --warehouse¶ Description Specifies the virtual warehouse to use by default for queries, loading, etc. in the client session (can be changed after login). This connection parameter can also be set in the configuration file. Value String The value can be an environment variable: Linux/macOS $SNOWSQL_WAREHOUSE

Windows

%SNOWSQL_WAREHOUSE%

Default

None

### -h , --host — Deprecated¶

Description

Provided for backward compatibility/internal use

Specifies the address of the host to which you connect in Snowflake.

This parameter is no longer used because the host address is determined automatically by concatenating the account identifier you specified (using either -a or --account) and the Snowflake domain (snowflakecomputing.com).

Value

String

Default

None

### -p , --port — Deprecated¶

Description

Provided for backward compatibility/internal use

Specifies the port number to use for connection.

This parameter is no longer used because the port number for Snowflake is always 443.

Value

String

Default

None

### --region — Deprecated¶

Description

Provided for backward compatibility/internal use

Specifies the ID for the region where your account is located.

This parameter is no longer used. For more details, see -a , --accountname (in this topic).

Value

N/A

Default

N/A

### -m , --mfa-passcode¶

Description

Specifies the second token for MFA (multi-factor authentication) if you pass in the passcode in the command line.

Value

String

Default

None

### --mfa-passcode-in-password¶

Description

Appends the MFA passcode to the end of the password.

You can force the password prompt and type the password followed by the MFA passcode. For example if the MFA token was 123456 and the password was PASSWORD:

$snowsql ... -P ... Password: PASSWORD123456  Value N/A (parameter doesn’t take a value) Default N/A ### --abort-detached-query¶ Description Aborts a query if the connection between the client and server is lost. Value Boolean Default False (i.e. an active query does not abort if the connection is lost) ### --probe-connection¶ Description Test connectivity to Snowflake and report the results. Note that this is an experimental option used mainly to print out the TLS/SSL certificate chain. Value N/A (parameter doesn’t take a value) Default N/A ### --authenticator¶ Description Specifies the authenticator to use for verifying user login credentials. Value String (Constant): • snowflake uses the internal Snowflake authenticator. • externalbrowser uses your web browser to authenticate with Okta, ADFS, or any other SAML 2.0-compliant identity provider (IdP) that has been defined for your account. • https://<okta_account_name>.okta.com (i.e. the URL endpoint for Okta) authenticates through native Okta (only supported if your IdP is Okta). • oauth authenticates using OAuth. When OAuth is specified as the authenticator, you must also set the --token parameter to specify the OAuth token (see below). For more information, see Managing/Using Federated Authentication and OAuth with Clients, Drivers, and Connectors. Default snowflake Note The externalbrowser authenticator is only supported in terminal windows that have web browser access. For example, a terminal window on a remote machine accessed through a SSH (Secure Shell) session may require additional setup to open a web browser. If you don’t have access to a web browser, but your IdP is Okta, you can use native Okta (i.e. set the authenticator to https://<okta_account_name>.okta.com). ### --token¶ Description Specifies the OAuth token to use for authentication. This parameter is required only when you specify --authenticator=oauth. Value String Default None ### -v , --version¶ Description Use the specified SnowSQL version or, if no version is specified, display the latest SnowSQL version installed. Value String Default None ### --versions¶ Description Lists all available versions of SnowSQL that can be installed and run. To install an earlier SnowSQL version from the list, use the -v option and specify the version you want to install. Value N/A (parameter doesn’t take a value) Default N/A ### --noup¶ Description Disables auto-upgrade for this run. If this option is not included and a newer version is available, SnowSQL automatically downloads and installs the new version. The next time you run SnowSQL, the new version is used. Value N/A (parameter doesn’t take a value) Default N/A ### -D , --variable¶ Description Defines SnowSQL variables on the command line. This option can be used to set specific variables to use in Snowflake. Value String For example: $ snowsql ... -D tablename=CENUSTRACKONE --variable db_key=$DB_KEY ...  Default None ### -o , --option¶ Description Defines SnowSQL configuration options on the command line. These options override any options that have been set in the SnowSQL configuration file. For descriptions of the options you can set/override, see SnowSQL Configuration Options Reference. Value String Default None ### -f , --filename¶ Description Specifies a SQL file to execute in batch mode. The value can be a file name (including the directory path, if needed) or a URL to the file. Value String Default None ### -q , --query¶ Description Specifies a SQL query to execute. The value can be a single SQL query or a semicolon-separated list of queries to execute (e.g. 'select current_user(); select current_role()'). You can also specify multiple queries to run asynchronously by separating the queries with ;>. The following example starts SnowSQL and runs all four queries asynchronously: snowsql -o log_level=DEBUG -q "select * from SNOWSQLTABLE;> insert into table table1 values(2);> select 5;>select count(*) from testtable;" Value String Default None ### --config¶ Description Specifies the location (i.e. directory path) for the SnowSQL configuration file. Include this connector parameter if you want to move or copy the configuration file from the default location. Value String Default OS-specific: Linux/macOS ~/.snowsql/ Windows %USERPROFILE%\.snowsql\ ### -P , --prompt¶ Description Forces an interactive password prompt. By default, SnowSQL uses the password stored in the$SNOWSQL_PWD environment variable. Using this option allows you to override the password defined in \$SNOWSQL_PWD.

Value

N/A (parameter doesn’t take a value)

Default

N/A

### -M, --mfa-prompt¶

Description

Forces a prompt for the second token for MFA. Alternatively use --mfa-passcode <string> if you want to pass in to the command line.

Value

N/A (parameter doesn’t take a value)

Default

N/A

### -c , --connection¶

Description

Specifies a connection to use, where the specified string is the name of a connection defined in the SnowSQL configuration file. For more details, see Using Named Connections (in this topic).

Value

String

Default

None

### --single-transaction¶

Description

Combined with --filename, --query, or standard input commands, this option wraps BEGIN/COMMIT around the statements to ensure all commands complete successfully or no change is applied.

Value

N/A (parameter doesn’t take a value)

Default

N/A

Note

Note that if the input commands use BEGIN, COMMIT, or ROLLBACK, this option will not work correctly. Also, if any command cannot be executed inside a transaction block, this option will cause the command to fail.

### --private-key-path¶

Description

Path to private key file.

Caution

While unencrypted private keys are supported, Snowflake strongly recommends using encrypted private keys when connecting to Snowflake.

For more information, see Using Key Pair Authentication & Key Pair Rotation.

This connection parameter can also be set in the configuration file.

Value

String

Default

None

### --disable-request-pooling¶

Description

By default, snowsql uses connection pooling. Connection pooling usually reduces the lag time to make a connection. However, it can slow down client failover to an alternative DNS when a DNS problem occurs. This parameter allows you to turn off connection pooling.

This parameter applies only to customers who have replication enabled.

Value

N/A (parameter doesn’t take a value)

Default

N/A

### -U , --upgrade¶

Description

Value

N/A (parameter doesn’t take a value)

Default

N/A

Note

### -K , --client-session-keep-alive¶

Description

Keep the session active indefinitely, even if there is no activity from the user.

Value

N/A (parameter doesn’t take a value)

Default

N/A

Note

Internally the parameter CLIENT_SESSION_KEEP_ALIVE is set to true for the session.

### -? , --help¶

Description

Shows the command line quick usage guide.

Value

N/A (parameter doesn’t take a value)

Default

N/A


text:
## Scotland - Full fiscal autonomy

Tue 21 April 2015

In the wake of Scotland voting to remain part of the UK, the SNP government has proposed Full fiscal autonomy (FFA). This means expenditure will need to be met by tax revenues raised in Scotland, and the shortfall, i.e. the deficit, will need to be covered by borrowing arranged by the Scottish government. Scotland would remain part of the UK and so have to pay a contribution to the Westminster government for its share of defence and other international costs. You can think of FFA as fiscal separation or fiscal independence.

Update: the SNP have released their 2015 General election manifesto and renamed it Full Fiscal Responsibility.

Although it seems unlikely that FFA will find political approval in coming years, its implications deserve some attention. In this post I'm going to use a simple model of my own devising to look at how different assumptions of growth and expenditure will affect Scotland's deficit under FFA. The model draws on historical data from Government Expenditure & Revenue Scotland 2013-14 (GERS) to establish trends for Scotland's share of UK public sector revenues and expenditure, and combines them with Office of Budget Responsibility (OBR) UK forecasts to predict them for the next five financial years.

## Deficit breakdown

The graph below shows Scotland's deficit deconstructed into various components which are useful for understanding implications of FFA. The data plotted are:

• blue: this is Scotland's population share of the UK deficit, i.e. in 2013-14, 8.3% of the UK's population resided in Scotland, so the blue bar for that year is 8.3% of the UK's deficit (i.e. PSNB ex).
• red: this is the extra deficit peculiar to Scotland excluding North Sea revenues. Most of it comes from Scotland having a higher spending per capita, but a smaller part is due to non-north sea revenues per head being slightly lower. It is positive and so always increases Scotland's deficit.
• yellow: this is Scotland's share of North Sea revenue (less the small amount already included in the blue bar). It is negative and so always reduces Scotland's deficit.
• green: this is the Scottish deficit. Adding the red, blue and yellow bars together (remembering the yellow is negative) will give the green line's value for a given year.

Source: A breakdown of the history of the notional Scottish deficit as generated by a simple model using data from GERS. The OBR's March 2015 Economic and fiscal outlook report for the UK is the basis for forecasts in the shaded area. As with GERS, all figures are in current prices, i.e. not corrected for inflation.

The data to the left of the shaded region is based on actual data on Scottish finances from GERS. The shaded area to the right are forecasts using my model which applies recent trends in expenditure and revenue from GERS to infer forecasts for Scotland based on OBR forecasts for the UK. Further detail on how these components are calculated can be found in an appendix at the end.

When the green line is above the top of the blue bar, Scotland is in a weaker fiscal position than the UK as a whole, and by weaker I mean that if Scotland had FFA, it would have a higher deficit per capita than the UK.

Over the last 15 years, Scotland would have been weaker in all but three years, and those years were when oil revenues were highest, i.e. the yellow bars are longest.

The red bars represent a potential extra fiscal problem for Scotland which has historically been mitigated by the yellow bars. It is only potential because neither the problem nor its mitigation have mattered in reality because Scotland's extra deficit is heavily diluted in the UK's deficit.

The word deficit is often used rather loosely, so to be precise, the Scottish deficit (green line) is the negative of the net fiscal balance as reported in GERS. It is current plus capital expenditure less revenue. GERS also states a UK net fiscal balance which is the negative of PSNB ex (Public Sector Net Borrowing Excluding temporary effects) quoted by the OBR report and ONS Public Sector Finances. Although not strictly correct, to be consistent with common usage and keep jargon at bay, I refer to this as the UK deficit in this post.

## Forecasting full fiscal autonomy

If Scotland had FFA then it would have a deficit, and the deficit would be the green line. The forecasts I've produced in the shaded region of the graph show what would happen under two assumptions:

1. that the OBR predictions for the UK under the current coalition government's plans are correct;
2. that the tax revenue and expenditure trends that have persisted for at least the last fifteen years continue if Scotland has FFA.

Neither assumption is likely to be true, but it still makes sense to explore some possible scenarios using the above forecast as a baseline. First let's consider the big implication of the plummeting forecasts for North Sea revenue that come from assumption 1.

The graph shows that North Sea revenue (yellow) almost disappears from 2015-16 onwards. This means that there is nothing to mitigate the extra deficit (red) and consequently Scotland's deficit (green) remains well above its share of the UK deficit (blue). The size of the red bars represents the £7.6bn deficit estimated by the IFS that is dubbed the "black hole" by the media. Notice that even as the blue bars shrink, there is no reduction in the red bar. The explanation is simple: the coalition government strategies are designed only to reduce the UK deficit and so they don't address the extra deficit in Scotland.

So under FFA, Scotland would need to introduce additional measures to bring its extra deficit down. The SNP government claim they will do this by using the "fiscal levers" that they will gain control of under FFA.

Let's imagine an alternate reality in which FFA powers come into effect in 2014-15. If Scotland had voted to separate in 2014 then this would have happened in 2015-16, so it's not too far fetched.

There are two sets of levers to operate. A Scottish government could choose to pull back on the expenditure levers, i.e. make cuts. This is the coalition government approach for the UK. The SNP object to this, with some justification in my opinion, so they talk up the other option: to throw forward the levers that will increase revenues.

The SNP don't propose any tax rises, but instead express a belief that economic growth will result in increased revenues from income tax, VAT and corporation tax. Specifically, they say that Scotland's non-North Sea (onshore) annual revenue is predicted to grow by £15bn by 2020. This is true (give or take a billion) but it does not help in reducing the red bars, because that growth of revenue is simply reflecting the growth of UK revenues predicted by the OBR, and is already implied in the graph: it's part of the reason for the blue bars' reduction, with coalition cuts accounting for the rest.

## Extra growth?

Having established that the growth predicted by the OBR cannot reduce the red bars, the question becomes how much extra growth is needed to do so? As North Sea revenues are a lost cause for the next five years, the extra growth would need to be in onshore tax revenues.

The graph below is identical to the one above, except for the forecasts: the extra deficit (red) is eroded to zero in 2019-20 by a growth in onshore revenues.

Source: As for the the previous graph, except now the models assumes a 2% growth in onshore tax revenues in Scotland.

The real (i.e. inflation adjusted) revenue growth needed to produce this forecast is about 4.6%. The OBR forecasts UK real GDP growth to average at 2.4% over the next five years, so extra growth of about 2pp (percentage points) would be needed from Scottish onshore revenues.

But this model uses OBR forecasts that assume coalition cuts are taking place. The SNP have said that they'd like Westminster to grow annual expenditure in real terms at 0.5%, so presumably, if they had FFA they might want to do that in Scotland. I found that adding 0.9pp to Scottish expenditure (remember these are nominal, i.e. not inflation adjusted) produces an annual growth in Scottish expenditure of 0.5% in real terms. To produce the above graph, i.e. bring the Scottish deficit to zero in 2019-20, requires 3pp extra onshore growth, making the real growth rate a hefty 5.6%.

One thing that's not included in the two scenarios I've mentioned is the extra burden of paying for borrowing, as that would be required to cover the deficit during the years it is being reduced. It would of course only increase the deficit and require more extra growth from revenues.

## Enforced cuts?

But what if borrowing could not be secured under FFA? In this case cuts would need to be made. Let's optimistically assume that the UK agreed to use its borrowing to cover the blue share and shoulder the debt interest payments too, then Scotland would have to eliminate the remaining deficit by cutting the red bar down until it was at least as small as the yellow bar.

So the cuts for 2014-15 would be £6.2bn and for 2015-16 as £7.7bn. From 2014-15 to 2019-20, a cumulative total of £46bn of cuts would be required, and this is in addition to the coalition cuts assumed in the OBR's forecast. For context, this represents 11% of the annual Scottish expenditure, and equal to the spend on Education and training.

## Bottom line

There is no prospect of growth on anything like the scale that the SNP would need to close Scotland's extra deficit. No major, developed economy has shown real growth of around 5% in recent years. In fact, the UK is currently one of the best performers with 2.6%.

The fact that an FFA Scotland has no track record of borrowing, that it embarked on FFA knowing that it would face such a large deficit and that Scotland does not have control over its own currency would all make borrowing very difficult and more expensive than for the UK. The likely outcome would be a mixture of costly borrowing and cuts over and above what the UK coalition government propose, with the full burden falling on Scotland.

The easiest way to avoid these intractable difficulties is for Scotland to reject FFA and continue the arrangement of pooling resources with the UK. That's not to say the UK has to remain as it is, nor is it a statement that Scotland is "too wee and too poor" to be independent (a phrase only uttered by the SNP). It is simply saying that for the foreseeable future FFA is both economically unwise and self-defeating in that it serves neither Scottish interests nor those of the UK.

Last minute update: At almost the moment I was about to hit publish on this post, this IFS report was published. It broadly agrees with what I've found, though it forecasts a slightly greater extra deficit for Scotland. For example, Table 1 shows an extra deficit of £49bn over the next five years, whereas I found it to be £46bn. The IFS predicts a real growth rate of 4.5% is needed to avoid this deficit by 2019-20, consistent with my estimate of 4.6% above. I'm reassured that my amateur and self-taught understanding of these things turns out to be consistent with a respected body such as the IFS

### Appendix: Model details

The mathematics below describe the simple model used to split Scotland's deficit figures into the components displayed on the above graph.

Let the UK deficit for a given year be $$D$$ and the expenditure (Total Managed Expenditure) be $$E$$ and revenue (current receipts) be $$R$$. Let's also split $$R$$ into the sum of onshore revnue $$O$$ and north sea revenue $$N$$. So, we can write the deficit as:

$$D=E-R=E-O-N \label{UKDeficit}$$

We can do the same for Scotland using the subscript $$s$$:

$$D_s=E_s-O_s-N_s \label{ScotDeficit}$$

Let the fraction of the UK population that live in Scotland be $$p$$. We can then write the Scottish expenditure, onshore and North Sea revenues as follows:

$$\begin{eqnarray} E_s&=&(p+e)E \nonumber \\\ O_s&=&(p+o)O \label{shares}\\\ N_s&=&(p+n)N \nonumber \end{eqnarray}$$

where $$e$$ is the fractional extra expenditure for Scotland above what you'd expect from it's population share, and $$o$$ and $$n$$ are similar but for onshore and North Sea revenues respectively.

For 2013-14, $$p=0.083$$, $$p+e=0.092$$, $$p+o=0.081$$ and $$p+n=0.755$$. Notice that $$p+o$$ is less than $$p$$, so $$o$$ must be negative, whereas $$e$$ and $$n$$ are positive, as has been the case for at least the last fifteen years. In the base model shown in the first graph, the forecasts have $$p$$ declining slowly at its recent historical rate of -0.24%, and $$e$$, $$o$$ and $$n$$ remain approximately constant over the next five years.

Inserting (\ref{shares}) into (\ref{ScotDeficit}) gives:

\begin{eqnarray} D_s&=&(p+e)E - (p+o)O - (p+n)N \nonumber \\\ &=&p(E-O-N) + eE -oO - nN \nonumber \\\ &=&pD +(eE-oO) - nN \end{eqnarray}

where (\ref{UKDeficit}) is used to substitute $$D$$ in after the second line. The three terms in the final line are the population share of the UK's deficit $$pD$$ (blue bars); the extra deficit for Scotland $$(eE-oO)$$ (red bars); and reduction in deficit due to North Sea revenue (yellow bars).

Notice that because $$o$$ is negative, the $$-oO$$ increases deficit. Also, the $$nN$$ term is not just the geographic share of North Sea revenue but the extra on top of population share. The population share of North Sea revenue is contained within $$pD$$.


text:
Asymmetric Creep Behavior of Ceramics

Title & Authors
Asymmetric Creep Behavior of Ceramics
Lim, H.J.; Jung, J.W.; Han, D.B.; Kim, K.T.;

Abstract
Asymmetric creep behaviors of ceramics under high temperature were investigated. Based on the Norton's power-low creep equation, multidirectional creep equations were proposed for general geometric loading conditions. The proposed equations were implemented into finite element program (ABAQUS) to simulate creep behaviors of ceramics in complicated loading conditions. The calculated results were compared with experimental data for uniaxial compression of Si-SiC C-ring and flexure of Si-SiC and $\small{Al_2O_3}$ in the literature. The finite element results agreed well with experimental data when the principal stresses are smaller than the threshold stress for creep damage. A good agreement was also obtained for damage zone in Si-SiC bending creep specimen compared with experimental data.
Keywords
Asymmetric Creep;Alumina;Bending;FEM;Cavity;
Language
Korean
Cited by


text:
# MathSciDoc: An Archive for Mathematician ∫

#### Algebraic Geometrymathscidoc:1912.43120

Asian Journal of Mathematics, 18, (1), 29-52, 2014
We give a short proof of Penner-Grushevsky-Schumacher-Trapanis large genus asymptotics of Weil-Petersson volumes of moduli spaces of curves. We also study asymptotic expansions for certain integrals of pure \psi classes and answer a question of Mirzakhani on the asymptotic behavior of one-point volume polynomials of moduli spaces of curves.
@inproceedings{kefeng2014a,
title={A remark on Mirzakhani's asymptotic formulae},
author={Kefeng Liu, and Hao Xu},
url={http://archive.ymsc.tsinghua.edu.cn/pacm_paperurl/20191221111648934353680},
booktitle={Asian Journal of Mathematics},
volume={18},
number={1},
pages={29-52},
year={2014},
}

Kefeng Liu, and Hao Xu. A remark on Mirzakhani's asymptotic formulae. 2014. Vol. 18. In Asian Journal of Mathematics. pp.29-52. http://archive.ymsc.tsinghua.edu.cn/pacm_paperurl/20191221111648934353680.


text:
Your browser does not support JavaScript!
http://iet.metastore.ingenta.com
1887

Optimising regimes for energy storage in a power system

• Author(s):
• DOI:

$16.00 (plus tax if applicable) Buy Knowledge Pack 10 chapters for$120.00
(plus taxes if applicable)

IET members benefit from discounts to all IET publications and free access to E&T Magazine. If you are an IET member, log in to your account and the discounts will automatically be applied.

Recommend Title Publication to library

You must fill out fields marked with: *

Librarian details
Name:*
Email:*
Name:*
Email:*
Department:*
Why are you recommending this title?
Select reason:

Energy Storage for Power Systems — Recommend this title to your library

Thank you

The situation when the total rated power and energy capacity of the energy storage are used in a compulsory regime is quite rare, since the storage unit parameters have been chosen under 'cover the winter peak demand and summer trough demand' conditions. It may be considered as an unplanned regime when all the reserve capacity is already used and there is still a shortage of generating power. An optimal regime arises when part of the rated power and energy capacity of the storage is not used for compulsory load coverage. Usage of the rest of installed capacity of the energy storage unit allows us to change the load on generating units in an optimal way, making it possible to minimise the fuel cost for the energy consumed. Unused or spare energy storage capacity may also be used as spinning reserve. Use of the reserve regime provides fuel saving whenever there is a need for spinning reserve.

Chapter Contents:

• 16.1 Storage regimes in the power system
• 16.2 The optimal regime criterion
• 16.3 Criterion for a simplified one-node system
• 16.4 Algorithm for the optimal regime

Inspec keywords:

Preview this chapter:

Optimising regimes for energy storage in a power system, Page 1 of 2

| /docserver/preview/fulltext/books/po/pbpo146e/PBPO146E_ch16-1.gif /docserver/preview/fulltext/books/po/pbpo146e/PBPO146E_ch16-2.gif

Related content

content/books/10.1049/pbpo146e_ch16
pub_keyword,iet_inspecKeyword,pub_concept
6
6
This is a required field


text:
# Changes

## Check dams

, 1 year ago
m
Sizing and spacing of check dams
----

{{#widget:WolframAlpha|id=a04d99bf6eaf9309e13e0b359f7368e2}}{{#widget:WolframAlpha|id=edc4fd3f7f54774d9ab0471f34d6041c}}

To estimate the depth of water that can be infiltrated into a surface within a given time::
$y=f\times t$
After surveying the longitudinal profile of the swale, the number of check dams for the swale can be calculated by using the following equation:
:$Number\ of\ dams= \frac{L\left ( S_{i}-S_{e} \right )}{h}$
{{Plainlist|1= Where:
8,241
edits


text:
# zeros of a polynomial in a finite field

Hi everyone. While looking for examples of asymptotically bad towers of function fields over a finite field $F_q$ defined by a Kummer equation of the form $y^m=f(x)$ with $p\equiv 1\mod m$ where $p=Char(F_q)$ the following situation came up: let $$a, b, c, d\in F_q$$ such that $a$, $c$ and $ad-bc$ are non zero in $F_q$. Now consider the rational function $$g(x)=(a/c)^m-\left(\frac{ax+b}{cx+d}\right)^m$$ and let $f(x)$ be the denominator of $g(x)$. Clearly $f(x)$ is a polynomial of degree $m-1$ with coefficients in $F_q$. To my surprise, after many numerical experiments, $f(x)$ seems to be a separable polynomial splitting into linear factors in $F_q[x]$. I could prove this in one particular situation. Maybe someone already knows this is true or, equally better, someone already found a counterexample. Thanks!

-
The tags for your question are probably not what you intended – Trevor Wilson Jul 19 '12 at 22:37
To (possibly) clarify what Wanax says: since $p\equiv 1\pmod{m}$, the polynomial $h(y)=y^m-1$ has $m$ distinct roots in $\mathbb{F}_p$ (the multiplicative group of a finite field is cyclic). You have $g(x)=-\frac{a^m}{c^m}h(\frac{x+b/a}{x+d/c})$, so roots of $g(x)$ are now very easy to figure out. – Vladimir Dotsenko Jul 20 '12 at 9:38
oops...how could i miss that??? thanks a lot wanax and vladimir. – R. Toledano Jul 27 '12 at 18:09


text:
# Line intersection jump causes arrow to be drawn from the center of node instead of the boundary

I have a diagram where the arrow lines between \nodes overlap and I would like them to have a semicircle (or some sort of indication really) on their intersection point to communicate which arrow is going where. I have been consulting this answer for my task. The 'flexible' solution is working as intended and, as aptly named, works with -|, |- variants of the connection which I have a need for.

However, the arrow lines seem to originate from the center of my nodes a and b like so. I would have hoped from them to look like that of the arrow between x and y just with the hump added.

My attempt.

\documentclass[10pt, border=1in]{standalone}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, arrows.meta}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}

\tikzstyle{object} = [draw, rectangle, minimum width=2cm, minimum height=1cm, text centered, draw=black]
\tikzstyle{arrow} = [thick,->,>=Triangle]

\pgfmathsetmacro{\jumpswap}{1}
\tikzset{
% set up keys for radius, position, swap
jump pos/.estore in=\jumppos,
jump swap/.code={\pgfmathsetmacro{\jumpswap}{\jumpswap*-1}},
jump pos=0.5,
% set up styles for the various to-paths
-u-/.style={ % straight line
to path={
let \p1=(\tikztostart),\p2=(\tikztotarget),\n1={atan2(\y2-\y1,\x2-\x1)} in
(\p1) -- ($($(\p1)!\jumppos!(\p2)$)!\jumpradius!(\p1)$)
},
-u|/.style={ % -| path with jump on horizontal leg
to path={
let \p1=(\tikztostart),\p2=(\tikztostart-|\tikztotarget), \n1={atan2(\y2-\y1,\x2-\x1)} in
(\p1) -- ($($(\p1)!\jumppos!(\p2)$)!\jumpradius!(\p1)$)
},
|u-/.style={ % |- path with jump on vertical leg
to path={
let \p1=(\tikztostart),\p2=(\tikztostart|-\tikztotarget), \n1={atan2(\y2-\y1,\x2-\x1)} in
(\p1) -- ($($(\p1)!\jumppos!(\p2)$)!\jumpradius!(\p1)$)
},
-|u/.style={ % -| path with jump on vertical leg
to path={
let \p1=(\tikztostart-|\tikztotarget),\p2=(\tikztotarget), \n1={atan2(\y2-\y1,\x2-\x1)} in
(\tikztostart) -- (\p1) -- ($($(\p1)!\jumppos!(\p2)$)!\jumpradius!(\p1)$)
},
|-u/.style={ % |- path with jump on horizontal leg
to path={
let \p1=(\tikztostart|-\tikztotarget),\p2=(\tikztotarget), \n1={atan2(\y2-\y1,\x2-\x1)} in
(\tikztostart) -- (\p1) -- ($($(\p1)!\jumppos!(\p2)$)!\jumpradius!(\p1)$)
},
% define the jump style, set it to use straight line by default
jump/.style={-u-,#1},
jump/.default={}
}

\begin{document}

\begin{tikzpicture}[node distance=2cm]
\node(n1)[object]{x};
\node(n2)[object, below of=n1, xshift=-3.5cm]{a};
\node(n3)[object, right of=n2, xshift=5cm]{b};
\node(n4)[object, below of=n1, yshift=-2cm]{y};

\draw[arrow](n1)--(n4);
\draw[arrow](n2) to[jump] (n3); % connecting arrow called here
\end{tikzpicture}

\end{document}

I am open to any other solution that enables displaying the desired intersection marker(s). Thank you for reading.

• Only code you need in preamble is \tikzstyle{object} = [draw, rectangle, minimum width=2cm, minimum height=1cm, text centered, draw=black] \tikzstyle{arrow} = [thick,->,>=Triangle] \tikzset{ jump/.style={ to path={ let \p1=(\tikztostart),\p2=(\tikztotarget),\n1={atan2(\y2-\y1,\x2-\x1)} in (\tikztostart) -- ($($(\tikztostart)!#1!(\tikztotarget)$)!0.15cm!(\tikztostart)$) arc[start angle=\n1+180,end angle=\n1,radius=0.15cm] -- (\tikztotarget)} }, jump/.default={0.5} }
– user31034
Apr 26, 2021 at 23:02
• I don't understand the purpose of this comment. Could you explain to me, please? Apr 27, 2021 at 1:02
• Replace last draw command by \draw[arrow](n2.east) to[jump] (n3.west);. When you say '\draw (n1)--(n2), you are making reference to n1.center and n2.center although TiKZ only draws between borders. In this case jump uses a to syntax which draws between anchors without considering node's bodies. Apr 27, 2021 at 9:28

Here's an alternative method of achieving the jumping arc which uses my spath3 library. It locates the intersection of the paths and automatically places an arc at the intersection point in the over path. It additionally breaks the under path at the arc.

\documentclass[10pt, border=1in]{standalone}
%\url{https://tex.stackexchange.com/q/594585/86}

\usepackage{tikz}
\usetikzlibrary{
shapes.geometric,
arrows.meta,
positioning,
calc,
intersections,
spath3
}

\tikzset{
object/.style={
draw,
rectangle,
minimum width=2cm,
minimum height=1cm,
text centered,
draw=black
},
arrow/.style={
thick,
->,
>=Triangle
},
bridging path/.initial=arc,
bridging span/.initial=8pt,
bridging gap/.initial=4pt,
bridge/.style 2 args={
spath/split at intersections with={#1}{#2},
spath/insert gaps after
components={#1}{\pgfkeysvalueof{/tikz/bridging span}},
spath/join components upright
with={#1}{\pgfkeysvalueof{/tikz/bridging path}},
spath/split at intersections with={#2}{#1},
spath/insert gaps after
components={#2}{\pgfkeysvalueof{/tikz/bridging gap}},
}
}

\AtBeginDocument{
angle=180, delta angle=-180];
}

\begin{document}

\begin{tikzpicture}[node distance=2cm]
\node(n1)[object]{x};
\node(n2)[object, below of=n1, xshift=-3.5cm]{a};
\node(n3)[object, right of=n2, xshift=5cm]{b};
\node(n4)[object, below of=n1, yshift=-2cm]{y};

\path[spath/save=up] (n1) -- (n4);
\path[spath/save=along] (n2) -- (n3);

\tikzset{bridge={along}{up}}

\draw[arrow,spath/use=up];
\draw[arrow,spath/use=along];

\end{tikzpicture}

\end{document}

• Thank you. Could provide some guidance on how I would use this if the arrow between the nodes is bent using the ++(x,y) and is passing over multiple bent arrows between other nodes? Apr 27, 2021 at 21:46
• @Rashiq The line \tikzset{bridge={along}{up}} adds the jumps to the along path and the breaks to the up` path, so you simply repeat that line for each pair of paths where you want to have one path passing over another. There are some more complicated examples on this site, I'll dig one out for you to see. Apr 27, 2021 at 21:51
• tex.stackexchange.com/a/583847/86 Apr 27, 2021 at 21:52


text:
# MAPE - Mean Absolute Percentage Error

Calculates the mean absolute percentage error (Deviation) function for the forecast and the eventual outcomes.

## Syntax

MAPE(X, Y, Ret_type)
X
is the original (eventual outcomes) time series sample data (a one dimensional array of cells (e.g. rows or columns)).
Y
is the forecast time series data (a one dimensional array of cells (e.g. rows or columns)).
Ret_type
is a switch to select the return output (1=MAPE (default), 2=Symmetric MAPE (SMAPI)).
Order Description
1 MAPE (default)
2 SMAPE

## Remarks

1. MAPE is also referred to as MAPD.
2. The time series is homogeneous or equally spaced.
3. For a plain MAPE calculation, in the event that an observation value (i.e. $x_k$) is equal to zero, the MAPE function skips that data point.
4. The mean absolute percentage error (MAPE), also known as mean absolute percentage deviation (MAPD), measures the accuracy of a method for constructing fitted time series values in statistics.
5. The two time series must be identical in size.
6. The mean absolute percentage error (MAPE) is defined as follows:

$$\mathrm{MAPE}=\frac{100}{N}\times \sum_{i=1}^N \left | \frac{x_i - \hat x_i}{x_i} \right |$$

Where:
• $\{x_i\}$ is the actual observations time series
• $\{\hat x_i\}$ is the estimated or forecasted time series
• $N$ is the number of non-missing data points
7. When calculating the average MAPE for a number of time series, you may encounter a problem: a few of the series that have a very high MAPE might distort a comparison between the average MAPE of a time series fitted with one method compared to the average MAPE when using another method.
8. In order to avoid this problem, other measures have been defined, for example the SMAPE (symmetrical MAPE), weighted absolute percentage error (WAPE), real aggregated percentage error, and relative measure of accuracy (ROMA).
9. The symmetrical mean absolute percentage error (SMAPE) is defined as follows:

$$\mathrm{SMAPE}=\frac{200}{N}\times \sum_{i=1}^N \frac{\left | x_i - \hat x_i \right |}{\left | x_i\right |+\left | \hat x_i\right |}$$
10. The SMAPE is easier to work with than MAPE, as it has a lower bound of 0% and an upper bound of 200%.
11. The SMAPE does not treat over-forecast and under-forecast equally.
12. For a SMAPE calculation, in the event the sum of the observation and forecast values (i.e. $x_k + \hat x_k$) equals zero, the MAPE function skips that data point.

## Examples

Example 1:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
A B C
Date Series1 Series2
1/1/2008 #N/A -2.61
1/2/2008 -2.83 -0.28
1/3/2008 -0.95 -0.90
1/4/2008 -0.88 -1.72
1/5/2008 1.21 1.92
1/6/2008 -1.67 -0.17
1/7/2008 0.83 -0.04
1/8/2008 -0.27 1.63
1/9/2008 1.36 -0.12
1/10/2008 -0.34 0.14
1/11/2008 0.48 -1.96
1/12/2008 -2.83 1.30
1/13/2008 -0.95 -2.51
1/14/2008 -0.88 -0.93
1/15/2008 1.21 0.39
1/16/2008 -1.67 -0.06
1/17/2008 -2.99 -1.29
1/18/2008 1.24 1.41
1/19/2008 0.64 2.37

Formula Description (Result)
=MAPE($B$1:$B$19,$C$1:$C$19,1) MAPE (151.503)
=SMAPE($B$1:$B$19,$C$1:$C$19,2) SMAPE (500)


text:
# It is possible to add modifiers to a group?

I made a group of different objects with different set of modifiers for each one. I wanted to add a lattice modifiers to this group to be able shape its form... it is possible? I tried with no sucess... It seems something very useful, i'm impressed something like this isn't implemented in blender yet...

• Possible dupe of Array a group of objects. Sep 29 '14 at 3:10
• No, unfortunately not. Modifier nodes are planned for someday, which would allow for this kind of thing. For now you will either have to add the modifiers manually or with a quick python script. Or apply the existing modifiers and join the objects with Alt C > Mesh, Ctrl J. Then add the modifier to the resulting object.
– gandalf3
Sep 29 '14 at 3:41
• If you are asking how to add the same modifier to all the selected objects without having to do each one manually then you can select them all and add a modifier to one of them and then use Make Links(Ctrl+l) then choose->Modifiers. It's not entirely clear what you are asking so I could be way off here. Sep 29 '14 at 7:30
• @MarcClintDion Your tip may help me... thank you!;) Sep 29 '14 at 14:44
• @gandalf3 I'm not wanted to join the meshes for memory saves (I've made copies ALT+D of these objects to reduce memory usage and render time) it is a high poly stairs handrail with a lot of details. But I've discovered that I can apply the same lattice for each one of the objects and then I'll be able to shape them all together. Lets hope that the ability of apply modifiers to mesh groups arrive soon in Blender. It will make the solution for these situations, a lot easier. Thanks for your explanations! ;) Sep 29 '14 at 14:53

Modifiers can be easily added using python.

target_lattice = bpy.data.objects['Lattice']

for obj in bpy.data.groups['Group'].objects:
new_mod = obj.modifiers.new(type='LATTICE', name='Lattice')
new_mod.object = target_lattice
new_mod.strength = 0.5

Instead of all objects in a group you can use the selected objects with bpy.context.selected_objects

By changing type='LATTICE' you can add any modifier you want. Each modifier has different property names which can be seen in tooltips when python tooltips are enabled.

• Awesome! I'll try that! Thank you so much! ;) Sep 30 '14 at 11:05


text:
# 22.3 The process of breathing

 Page 1 / 49
By the end of this section, you will be able to:
• Describe the mechanisms that drive breathing
• Discuss how pressure, volume, and resistance are related
• List the steps involved in pulmonary ventilation
• Discuss the physical factors related to breathing
• Discuss the meaning of respiratory volume and capacities
• Define respiratory rate
• Outline the mechanisms behind the control of breathing
• Describe the respiratory centers of the medulla oblongata
• Describe the respiratory centers of the pons
• Discuss factors that can influence the respiratory rate

Pulmonary ventilation is the act of breathing, which can be described as the movement of air into and out of the lungs. The major mechanisms that drive pulmonary ventilation are atmospheric pressure ( P atm ); the air pressure within the alveoli, called alveolar pressure ( P alv ); and the pressure within the pleural cavity, called intrapleural pressure ( P ip ).

## Mechanisms of breathing

The alveolar and intrapleural pressures are dependent on certain physical features of the lung. However, the ability to breathe—to have air enter the lungs during inspiration and air leave the lungs during expiration—is dependent on the air pressure of the atmosphere and the air pressure within the lungs.

## Pressure relationships

Inspiration (or inhalation) and expiration (or exhalation) are dependent on the differences in pressure between the atmosphere and the lungs. In a gas, pressure is a force created by the movement of gas molecules that are confined. For example, a certain number of gas molecules in a two-liter container has more room than the same number of gas molecules in a one-liter container ( [link] ). In this case, the force exerted by the movement of the gas molecules against the walls of the two-liter container is lower than the force exerted by the gas molecules in the one-liter container. Therefore, the pressure is lower in the two-liter container and higher in the one-liter container. At a constant temperature, changing the volume occupied by the gas changes the pressure, as does changing the number of gas molecules. Boyle’s law    describes the relationship between volume and pressure in a gas at a constant temperature. Boyle discovered that the pressure of a gas is inversely proportional to its volume: If volume increases, pressure decreases. Likewise, if volume decreases, pressure increases. Pressure and volume are inversely related ( P = k/ V ). Therefore, the pressure in the one-liter container (one-half the volume of the two-liter container) would be twice the pressure in the two-liter container. Boyle’s law is expressed by the following formula:

${P}_{1}{V}_{1}={P}_{2}{V}_{2}$

In this formula, P 1 represents the initial pressure and V 1 represents the initial volume, whereas the final pressure and volume are represented by P 2 and V 2, respectively. If the two- and one-liter containers were connected by a tube and the volume of one of the containers were changed, then the gases would move from higher pressure (lower volume) to lower pressure (higher volume).

thank you sooo much bro
helloo
Sentamu
Fatima hw a u
Sentamu
hii
Shubham
any one elaborate fr me foramens of the skull and features which they transmit
Sentamu
icant undrestand plz
try to read I hop you will understand
state and explain 20 radiology uses
what are chemicals in anatomy and physiology?
what can I do to find it easy for me in anatomy and physiology course
Mike
study up on the basics of the periodic chart, learn bones and muscles attachments, and learn muscles. Those take the longest to memorize. After that it should be a little easier.
Toni
what are the two types of body cells
what is malnutrition
Claire
malnutrition refers to faulty nutrition resulting from malabsorption,poor diet or overeating. Sometimes too these food do not contain all the six food nutrients in their right proportion.
Yakubu
thank you
Claire
welcome
Yakubu
Will u be malnourished?
Baigwa
gud
Budumari
gabriel
Nothing! Radiology it means the study or using of radiation in medical science it can be 1.diagnose or treatment diagnosed radiology! x- ray. ultrasound. ct-scan. mammogram. MRI. 2. treatmen- radiation oncology, like Cobalt 60. and nuclear medicine
Larry
what is X-ray?
Nissar
X-ray is type of light that make it possible to see inside any object. as human body
KUNDAN
How the nervous system develops
From the cells at the back of an embryo
Mma
breifly explain anatomy of thorax
How many region the rib is divided
Konneh
how many bon of human being
Nura
206
John
how to study for the skeletal system
ryaisha
and anatomy
ryaisha
I really need sources immediately
ryaisha
I printed out all the different bones. Put them in the see through protective sheaths and got dry erase markers. I could right on them and erase to help me learn to spell the names of markings and bones.
Toni
Or go to a book store, Barnes and Noble(doesn't have to be this) and they have coloring books for anatomy. \$16. Really helpful.
Toni
okay thanks and are what study tools you use to study the materials and get a better understanding
ryaisha
*what are
ryaisha
hiii
Roopa
I prefer diagrams, pictures that lay out each step with the information in each step. For Example: how action potential creates muscles to move. A pictured diagram gives me a better understanding of how each piece plays a role in each step of the process.
Toni
Also for basics, such as memorizing vocab. Flash cards are great. Don't become discouraged if you don't get them all right the first times through. The more you go through them, your brain will remember pieces of information from each and help you to pull out the information 😉
Toni
okay thanks
ryaisha
what is the functions of the lips in human
could I say sensation?
Sovilace
kissing
Obrian
for protection
Omar
Lips assist in speech and eating
Cindy
Too many easy questions. Which bones are the axial and appendicular? What are the abbreviations for TEE, TTE, AED, A-Mode, B-Mode, and LTH? What is the difference between hypothalamus and thalamus? Where is the parathyroid located? How many True Ribs do we have?
Transesophageal echocardiography Transthoracic Echocardiography automated external defibrillator brightnees mode Los Hermanos Taverna
Inam
what is anatomy
anatomy is scientific study of body structures and how they relate to each other
Skeater
Are there other functions of the nucleolus apart from synthesis of RNA and formation of ribosomes
plays a role in cell response to stress
airiz
what is angle of auscultation
Anatomy which is the study of the human body structure has a couple of reasons it is been studied It helps to discover genetic disease cytology And histology which is the study of tissues Physiology is the study of function of the human cells It helps to know how the different body part works Its helps to know how part of the brain works And lastly It gives the essential to understand more about anatomy
describe the external features of a spinal cord
Spinal nerves emerge in pairs, one from each side of the spinal cord along its length. The cervical nerves form a plexus (a complex interwoven network of nerves—nerves converge and branch). The cervical enlargement is a widening in the upper part of the spinal cord (C 4–T 1). Nerves that extend in
Inam
Hormones regulate certain target cell responses. These can include which of the following?
describe the external features of spinal cord
okoche


text:
# How can you relate structural forces to load factors and inertia force [closed]

Our professor in aircraft structures asked us to research how can you relate structural forces to load factors and inertia forces and i dont have a clue. Help

• Start with $F=ma$ and then come back when you get stuck. Sep 30 '18 at 13:03

F=ma is a great place to start! The other one is torque = force x lever arm length.

One might start by considering what needs to be built, a jet fighter or a recreational biplane. Limiting factors eventually are pilot comfort, speed, and manuverability. You build a flight envelope profile: how fast, how slow, how high, (we all get) how low.

From these parameters (and with the help of more mathmaticly oriented colleagues found here) we now set maximum loads on the aircraft, usually at maximum speed and mauverability.

Notice that inertia is a function of mass. F=ma. a=F/m. If it is heavier the acceleration is less. This would work into roll rates with heavier wing tips.

Torque would work into control surface area and distance from CG, as well as weight distribution.

Structural forces must be sufficient (safety margins are suggested) to meet all load forces.

Before wading into the Math, I would present the design application and determine reasonable limits and safety margins.

In the real world there is nothing wrong with forming a team to solve these issues.