Hypergeometric function

Use this forum to post Vensim related questions.
lorenzo.cioni
Senior Member
Posts: 102
Joined: Wed Jul 30, 2014 7:09 am
Vensim version: PLE

Re: Hypergeometric function

Post by lorenzo.cioni »

lorenzo.cioni wrote:Hi
could you please check the attached model and explain the seemingly absurd behavior of the 1F1 variable through which I'm trying to implement the infinite series expression of such the 1F1 Hypergeometric function?
How many terms should I consider? Is there any better and more clever way (in Vensim, of course)?
All the best.
Lorenzo
I forgot saying that the variable I'm referring to is in the view labelled Pinf.
L.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Hypergeometric function

Post by Administrator »

Why is the behaviour absurd?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Hypergeometric function

Post by tomfid »

Right. I can't make heads or tails of it, especially without knowing how it's used in the original paper.
lorenzo.cioni
Senior Member
Posts: 102
Joined: Wed Jul 30, 2014 7:09 am
Vensim version: PLE

Re: Hypergeometric function

Post by lorenzo.cioni »

Administrator wrote:Why is the behaviour absurd?
Because doseAdenovirus increases linearly with time according to doseAdenovirus=ConcentrationAdenovirus*Time*rin*rf/(reff*fconv) and so I expect a strictly monotone behavior from 1F1 and so from Pinf=1-1F1, don't you agree with me? If you do agree you cannot deem the current behavior of Pinf as rational.
All the best.
Lorenzo
lorenzo.cioni
Senior Member
Posts: 102
Joined: Wed Jul 30, 2014 7:09 am
Vensim version: PLE

Re: Hypergeometric function

Post by lorenzo.cioni »

Hi
I was able to solve by using the following relation that guarantees the convergencence of the Taylor series with a limited number of terms that I use to implement the hypergeometric function :
1F1(a,b,z)=exp(z)*1F1(b-a,b,-z)
to be used if z<0.
Anyway, thank you all for your suggestions.
Lorenzo
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Hypergeometric function

Post by tomfid »

Well done!
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Hypergeometric function

Post by Administrator »

For any DSS users, this function is now available in an external function library,
http://vensim.com/workbench/#gnu-scient ... vensim-dss
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply