I have encountered the following problem with @optiter function. I am using EViews 11 with the latest updates.
EViews reports error when it is used within the optimize command:
@optiter is an illegal name or reserved name.
EViews manual provides the optimize command example where it is possible to retrive some information about optimization process.
Meaning, I added the @optiter function to the following example and this generates error (example below). Let me mention that it has no meaning whether @optiter is used within subroutine (which is optimized) or post-optimization.
@optmessage and @optstatus work just fine. I have one more question when it comes to @optstatus. As it is said within manual @optstatus - "provides a status code for the optimizer, both during and post-optimization." Could you give the list of possible status codes?
Code: Select all
wfcreate u 200
subroutine f(scalar !y, scalar !x)
!y = 5*!x^2 - 3*!x - 2
'scalar iter2=@optiter
endsub
scalar in = 0
scalar out = 0
optimize(min, noerr) f(out, in)
string os_mess=@optmessage
scalar os_stat=@optstatus
scalar iter=@optiter