Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35893
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'indicated': 0.07; 'present,': 0.07; 'python': 0.09; 'calculates': 0.09; 'calculating': 0.09; 'curve': 0.09; 'enormous': 0.09; 'finite': 0.09; 'subtract': 0.09; 'threshold': 0.09; 'to)': 0.09; 'whatever.': 0.09; 'student': 0.15; 'value.': 0.15; 'enough.': 0.16; 'equations': 0.16; 'formula': 0.16; 'iterated': 0.16; 'iteration': 0.16; 'range,': 0.16; 'range.': 0.16; 'repeatedly,': 0.16; 'seperate': 0.16; 'side.': 0.16; 'sign.': 0.16; 'simplest': 0.16; 'solver': 0.16; 'stuff.': 0.16; 'subject:stuck': 0.16; 'term.': 0.16; 'tutorials.': 0.16; 'worst': 0.16; 'zero,': 0.16; 'wrote:': 0.17; 'numerical': 0.17; 'url:edu': 0.18; '(or': 0.18; 'variable': 0.20; 'changes': 0.20; 'error.': 0.21; 'supposed': 0.21; 'assignment': 0.22; 'constant': 0.22; 'produces': 0.22; 'rapidly': 0.22; 'smallest': 0.22; 'work.': 0.23; 'references': 0.23; 'random': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'looks': 0.26; 'values': 0.26; 'am,': 0.27; 'rest': 0.28; 'skip:( 20': 0.28; 'case,': 0.29; 'points': 0.29; 'maybe': 0.29; 'books': 0.30; 'becomes': 0.30; 'function': 0.30; 'error': 0.30; 'figure': 0.30; 'generally': 0.32; 'could': 0.32; 'getting': 0.33; 'web,': 0.33; 'controlling': 0.33; 'function.': 0.33; 'picking': 0.33; 'to:addr:python-list': 0.33; 'times.': 0.33; 'that,': 0.34; 'version': 0.34; 'project': 0.34; 'acceptable': 0.35; 'direction': 0.35; 'something': 0.35; 'there': 0.35; 'except': 0.36; 'but': 0.36; "didn't": 0.36; 'method': 0.36; 'two': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'some': 0.38; 'nothing': 0.38; 'there,': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'help': 0.40; 'end': 0.40; 'your': 0.60; 'range': 0.60; "you've": 0.61; 'first': 0.61; 'side': 0.61; "you'll": 0.62; 'relatively': 0.62; 'repeat': 0.62; 'solve': 0.62; 'close': 0.63; 'email addr:gmail.com': 0.63; 'more': 0.63; 'behavior': 0.64; 'results': 0.65; 'equals': 0.65; 'treat': 0.65; 'civil': 0.66; 'study': 0.66; 'purchase': 0.67; 'header:Reply- To:1': 0.68; 'received:74.208': 0.71; 'url:htm': 0.71; 'increase': 0.72; 'reply-to:no real name:2**0': 0.72; 'square': 0.75; 'hand': 0.82; 'equation,': 0.84; 'isolated': 0.84; 'pavement': 0.84; 'received:74.208.4.194': 0.84; 'sides.': 0.84; 'slope': 0.84; 'steps.': 0.91; 'hand,': 0.97 |
| Date | Tue, 01 Jan 2013 11:39:09 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: got stuck in equation |
| References | <2043e377-00d8-49d7-a35a-0c52c869f70f@googlegroups.com> |
| In-Reply-To | <2043e377-00d8-49d7-a35a-0c52c869f70f@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:m1EqNyYmO2p/4qLccaLf8BW94iYOCr2TQyH715/oTR/ zhUF5/0RGl7tu0AF4HeiCNCRa9necc6UnXBFpgBo8RlqpEL2yR nx2RdeXESfiXNKyjyRhEtvUOcZhrzUsZa1Skd9/i8/+CZNMxbg SR5DgRwfgTkSlhFrN3elLjkLNBRM0StY8AyyWm1LmtHQF3dOv5 nKipW4gmOQMkU2rVthjLdmmkk8m6AQn58wbNRQmq1GU/VV8PDe 70GxY4GRNExi1SaT1NcTmUTfvcDR4iwBsrI8YfOjy/BTxbLQJZ u9/0O7ZD7MlCpZkKzxN7oYJl2sANzsS61HChxrH88NS6MzxqQ= = |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1517.1357058384.29569.python-list@python.org> (permalink) |
| Lines | 86 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357058384 news.xs4all.nl 6945 [2001:888:2000:d::a6]:55163 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:35893 |
Show key headers only | View raw
On 01/01/2013 10:40 AM, usamazohad@gmail.com wrote: > hi . . my name is usama khan > i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python. > > i know very litle about programing. still learning from tutorials. u can call me a beginner. > now i need to solve this equation so that i can put this in python but the formula of design is very complex > > Formula is : > > log(W18) = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07 > > every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out. > so plz help me out Tk Solver is (or was) a program for getting numerical results from equations where you couldn't (or didn't want to) express the equation with the independent variable isolated on its own side of the equals sign. I don't know where it's available for purchase or download now; I do see references to it on the web, plus books still available about it. Apparently it's up to version 5. Anyway, since everything else is a constant, use some program like Tk Solver to get the value for SN, then the Python program becomes simply: SN = 4.7732 or whatever. On the other hand, perhaps you didn't mean the other values were constant, but rather known. For example, perhaps your program is supposed to ask the user for values to W18, to dpsi, etc., then it is to calculate one or more values for SN that make the equation work. SN might be "structural number" as indicated on this web page: http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/06_structural_design/06-3_body.htm The big equation on that page looks kinda like the one you present, though I didn't study every term. 1) Is there a finite range of values that SN might fall into? I know nothing about pavement design, other than what I just read there, but there might well be a specific range that's reasonable to expect. 2) Take the present equation, and subtract log(w18) from both sides. Now, you want a value for SN that produces zero, or something close for the left hand side. Call that side "error". Is the value "error" relatively predictable for changes in SN ? For example, in the simplest case, any increase in SN will result in an increase of error. The worst case would be where any tiny change in SN might result in enormous changes in a random direction to error. 3) Figure an acceptable value for error, so you'll know when you're close enough. 4) if the first three questions have good answers, then you could write a function that transforms FN into error. Then write a controlling loop that calls that function repeatedly, picking values for FN that will converge the error into ever-smaller value. The first iteration might go over the entire range, dividing it into maybe ten steps. Then pick the two smallest values for error, and treat those particular two FN values as your new range. Repeat until the error value is below the threshold figured in #3, or until you've iterated an unreasonable number of times. There are ways to improve on that, but they generally require you know the approximate behavior of the function. For example, Newton's method is a method of calculating square roots, starting with end points of 1 and N, and it converges more rapidly because it effectively calculates the slope of the curve over each range. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
got stuck in equation usamazohad@gmail.com - 2013-01-01 07:40 -0800
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 03:03 +1100
Re: got stuck in equation Dave Angel <d@davea.name> - 2013-01-01 11:39 -0500
Re: got stuck in equation Dave Angel <d@davea.name> - 2013-01-01 11:42 -0500
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:25 -0800
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 04:51 +1100
Re: got stuck in equation Ramchandra Apte <maniandram01@gmail.com> - 2013-01-01 21:20 -0800
Re: got stuck in equation alex23 <wuwei23@gmail.com> - 2013-01-02 01:53 -0800
Re: got stuck in equation Ramchandra Apte <maniandram01@gmail.com> - 2013-01-01 21:20 -0800
Re: got stuck in equation DJC <djc@news.invalid> - 2013-01-02 14:44 +0000
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:25 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:30 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:30 -0800
Re: got stuck in equation Roy Smith <roy@panix.com> - 2013-01-01 12:47 -0500
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 04:44 +1100
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:00 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:12 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:12 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:00 -0800
Re: got stuck in equation Tim Roberts <timr@probo.com> - 2013-01-01 13:09 -0800
csiph-web