gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Plugin support


From: al davis
Subject: Re: [Gnucap-devel] Plugin support
Date: Mon, 12 May 2008 15:51:07 -0400
User-agent: KMail/1.9.9

On Sunday 11 May 2008, Jesse Forsmann wrote:
> I'm thinking of possible monte carlo support.  Can this be
> done via the new supported plugin interface?
>
> Where can I get a good example to get me started?

First, what do you want the user interface to look like?

In the source, most of the c*, d*, lang*, s*, bm* can be used as 
plugins.  Just compile with "g++ -fPIC -shared  foo.cc".  Then 
you can "load ./a.out".

Look in "Make1" ..  The files explicitly listed in "RAW_SRCS" 
are part of the core.  The files listed in the groups 
like "MODELS" or "D_SRCS" are really designed as plugins.  You 
can leave them out if you want to.

For monte carlo, there is a need to vary the parameters.  Maybe 
something should be built-in, but I am not sure what.  I 
suppose you could use expressions as component values, and your 
MC plugin could randomize the values.

Something like:
R123 (a b) {10k*(1+mc1)}

.. where mc1 is the value you tweek to adjust the value.

.param mc1=0
.op
.param mc1=.1
.op
.param mc1=-.1
.op

and so on.

Make something based on a random number generator to make values 
for mc1.

What I would like to do eventually is to make a function that 
will take care of this.

R123 (a b) {10k*tolerance(.1,gaussian,15)}

... which says that it varies by +/- .1*value, has gaussian 
distribution, and is in group 15.  "Group 15" is a way to 
identify components that track each other.

Whatever the syntax is, it needs to work without changing any of 
the models.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]