- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use BCONF to solve a value minization problem for a two dimentional function. The function value is quite flat along one dimension. The difference over a big range is close to the 1.0E-15. BSCONF cannot find the true solution. Instead, I always just got the initial guess, no matter what that value is. I set the following parameter, but it does not help. Can someone help me with this problem? Thank you.
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
The code I used is
XGUESS = (/b_p, 2.E0/)
XSCALE = (/1.E0,0.01E0/)
XLB = (/B_min, S_min/)
XUB = (/B_max, S_max/)
FSCALE = 1.E0
ITP = 0;
CALL DU4INF (IPARAM, RPARAM)
IPARAM(1) = 1;
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
RPARAM(6) = 1.0E8
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, RPARAM=rparam, & FVALUE=F)
Another question is that when I inclue IPARAM, defined as integer, I got an error,
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, IPARAM=iparam, & RPARAM=rparam, FVALUE=F)
The error is:
error #6633: The type of the actual argument differs from the type of the dummy argument. [IPARAM]
An example of the function values over some grid points is
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
The code I used is
XGUESS = (/b_p, 2.E0/)
XSCALE = (/1.E0,0.01E0/)
XLB = (/B_min, S_min/)
XUB = (/B_max, S_max/)
FSCALE = 1.E0
ITP = 0;
CALL DU4INF (IPARAM, RPARAM)
IPARAM(1) = 1;
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
RPARAM(6) = 1.0E8
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, RPARAM=rparam, & FVALUE=F)
Another question is that when I inclue IPARAM, defined as integer, I got an error,
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, IPARAM=iparam, & RPARAM=rparam, FVALUE=F)
The error is:
error #6633: The type of the actual argument differs from the type of the dummy argument. [IPARAM]
An example of the function values over some grid points is
-0.117351401842974 |
-0.117351401842976 |
-0.117351401842978 |
-0.117351401842980 |
-0.117351401842980 |
-0.117351401842980 |
-0.117351401842980 |
-0.117351401842978 |
-0.117351401842977 |
-0.117351401842974 |
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the range of the function you want to minimise is so small, then you can not expect any
solution to be found! The variation is almost as small as the smallest variation you can have:
1.0d0+epsilon(1.0d0) /= 1.0d0
but
1.0d0+0.5*epsilon(1.0d0) can not be distinguished from 1.0d0.
So, unless you canchange the function in some wayso that the variation becomes clearer,
your onlyhope is to use quadruple precision.
Here is an example:
f(x) =exp(-1.0e-15*x**2)
with xwithin the range -1 to 1
This will most probably cause the same problems. If you modify the function, say,
minimise log(f(x)) or approximate f(x)-1 via the Taylor series, then the relative variation
will be much larger.
But: be careful! You can not simply do: g(x) = f(x)-1 because of rounding errors.
You will have to transform the function itself.
(I probably express myself in a very unclear way, but I have no time now to elaborate)
Regards,
Arjen
solution to be found! The variation is almost as small as the smallest variation you can have:
1.0d0+epsilon(1.0d0) /= 1.0d0
but
1.0d0+0.5*epsilon(1.0d0) can not be distinguished from 1.0d0.
So, unless you canchange the function in some wayso that the variation becomes clearer,
your onlyhope is to use quadruple precision.
Here is an example:
f(x) =exp(-1.0e-15*x**2)
with xwithin the range -1 to 1
This will most probably cause the same problems. If you modify the function, say,
minimise log(f(x)) or approximate f(x)-1 via the Taylor series, then the relative variation
will be much larger.
But: be careful! You can not simply do: g(x) = f(x)-1 because of rounding errors.
You will have to transform the function itself.
(I probably express myself in a very unclear way, but I have no time now to elaborate)
Regards,
Arjen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the range of the function you want to minimise is so small, then you can not expect any
solution to be found! The variation is almost as small as the smallest variation you can have:
1.0d0+epsilon(1.0d0) /= 1.0d0
but
1.0d0+0.5*epsilon(1.0d0) can not be distinguished from 1.0d0.
So, unless you canchange the function in some wayso that the variation becomes clearer,
your onlyhope is to use quadruple precision.
Here is an example:
f(x) =exp(-1.0e-15*x**2)
with xwithin the range -1 to 1
This will most probably cause the same problems. If you modify the function, say,
minimise log(f(x)) or approximate f(x)-1 via the Taylor series, then the relative variation
will be much larger.
But: be careful! You can not simply do: g(x) = f(x)-1 because of rounding errors.
You will have to transform the function itself.
(I probably express myself in a very unclear way, but I have no time now to elaborate)
Regards,
Arjen
solution to be found! The variation is almost as small as the smallest variation you can have:
1.0d0+epsilon(1.0d0) /= 1.0d0
but
1.0d0+0.5*epsilon(1.0d0) can not be distinguished from 1.0d0.
So, unless you canchange the function in some wayso that the variation becomes clearer,
your onlyhope is to use quadruple precision.
Here is an example:
f(x) =exp(-1.0e-15*x**2)
with xwithin the range -1 to 1
This will most probably cause the same problems. If you modify the function, say,
minimise log(f(x)) or approximate f(x)-1 via the Taylor series, then the relative variation
will be much larger.
But: be careful! You can not simply do: g(x) = f(x)-1 because of rounding errors.
You will have to transform the function itself.
(I probably express myself in a very unclear way, but I have no time now to elaborate)
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. This is a smart idea. I have transformed the function so that the range is much bigger.
Now my problem is probably with using BCONF. I still cannot find the true solution even though the function value ranges is the following. My code is
XGUESS = (/b_p, 2.E0/)
XSCALE = (/1.E0,0.01E0/)
XLB = (/B_min, S_min/)
XUB = (/B_max, S_max/)
FSCALE = 1.E0
ITP = 0;
CALL DU4INF (IPARAM, RPARAM)
IPARAM(1) = 1;
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
RPARAM(6) = 1.0E8
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE,RPARAM=rparam)
CALL ERSET (0, 1, 0)
Now my problem is probably with using BCONF. I still cannot find the true solution even though the function value ranges is the following. My code is
XGUESS = (/b_p, 2.E0/)
XSCALE = (/1.E0,0.01E0/)
XLB = (/B_min, S_min/)
XUB = (/B_max, S_max/)
FSCALE = 1.E0
ITP = 0;
CALL DU4INF (IPARAM, RPARAM)
IPARAM(1) = 1;
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
RPARAM(6) = 1.0E8
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE,RPARAM=rparam)
CALL ERSET (0, 1, 0)
-17.824207645 |
-17.824207879 |
-17.824208079 |
-17.824208246 |
-17.824208380 |
-17.824208481 |
-17.824208549 |
-17.824208583 |
-17.824208584 |
-17.824208551 |
-17.824208486 |
-17.82420839 |
-17.82420826 |
-17.82420809 |
-17.82420789 |
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page