Hi Nakul

The 'if..else' functionality that you refer to is actually not trivial
because ASCEND is essentially declarative rather than procedural when
declaring models. So some very clever stuff is required in the solver to
support such stuff.

ASCEND does actually implement much of that stuff, however, using our
CONDITIONAL..WHEN modelling syntax. This works, and was the result of a
couple of PhD projects, but it requires the use of the CMSlv solver,
which in turn depends on the commercial CONOPT solver (trial version
available though).

http://ascendwiki.cheme.cmu.edu/Conditional_modelling

On the other hand, one can keep using an NLA solver and *fake* an
'if..else' through the clever use of abs(...) functions,

http://ascendwiki.cheme.cmu.edu/Abs

This will sometimes work fine, but the discontinuity you are creating
can also in some cases badly confuse the default QRSlv solver, which
makes assumptions of continuity in its algorithm.

Alternatively, one can use continuous approximations for discontinuous
functions like so:

http://en.wikipedia.org/wiki/Heaviside_step_function#Analytic_approximations

We are working to improve ASCEND support in this area. For example, see

http://ascendwiki.cheme.cmu.edu/User:LeonKwek

Hope that helps.

Cheers
JP

nakul kukar wrote:
> Sir,
>
> Regarding the code of DNI, I am facing a small problem in which you
> would be able to help me. In the enclosed figure, a correlation is
> given which I intend to code.
>
> But I am not aware of the functionality in ASCEND which would make it
> to automatically chose the correct equation based upon the value of
> Kt. Since it is based on C++, ASCEND must support something like an
> if-statement of C/C++. But I was unable to locate it in the
> documentation and other resources that I have.
>
> It would be very kind of you if you could point me in the correct
> direction.
>
> Hoping for and early reply.
>
> Regards
> Nakul


------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

Reply via email to