Thanks Ben, very helpful, as predicted! I will pass this on to one of
our current GSOC students and see if we can address this ASAP. It's
actually been on the 'to do' list for a while, and now we know what we
need to do.
Adrian, would you like to take a look at this? We can discuss further by
email. I think essentially we would need to prise the Asc_UnitValue
function out of the tcltk code and into the main 'libascend' code, then
provide a way to call it from the GUI. It would be good to provide a
'check all dimensions' feature too, somehow, apart from the per-relation
approach, and list any problematic relations (and the associated *terms*
in those relations?) in a dialog box.
Cheers
JP
On 18/05/15 15:07, Ben Allan wrote:
> See
> char *Asc_UnitValue(CONST struct Instance *i)
> in tcltk/interface/UnitsProc.c.
> The basic strategy with the tcl/tk interface is to include relation
> dim checking as part of displaying the correct units on the residual.
> Any relation which is token-based and does not yet have a
> dimensionality derived [you cannot set the dimensionality explicitly
> on relations from the language] has an attempt to derive the
> dimensionality any time it is displayed (unless noisy checking is
> disabled). Since the answer the checker obtains can change (until all
> the variables have fixed dimensions), it gets called repeatedly while
> browsing until it succeeds or proves an error.
>
> Most of the code involved is not heavily tied to tcl, so it would be
> easy to call into it from python as desired.
>
>
> On Sun, May 17, 2015 at 4:21 PM, John Pye <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hi Arash, Steffen,
>
> Indeed, I have noticed the same issue myself. I believe that this
> kind of term-by-term dimension checking was a feature of ASCEND in
> the Tcl/Tk GUI days, but somewhere along the way, the feature
> hasn't been correctly incorporated into the newer PyGTK GUI.
>
> Ben, I you familiar with where the dimensional checking of
> equations (declarative section) is done in ASCEND? Is there a
> function that needs to be run to conduct this checking, that
> perhaps is outside the 'system_build' step, and maybe still
> embedded in the Tcl/Tk interface code?
>
> There *is* dimension checking in the PyGTK GUI in relation to
> variable-setting, in assignment statements within METHODs, but I
> think that what you are referring to is missing and would be
> something that we can restore.
>
> Cheers
> JP
>
> On 18/05/15 07:27, Arash sadrieh wrote:
>>
>> Dear Steffen,
>>
>> Thanks for your email, I think John might know the answer?
>>
>> Cheers,
>> Arash
>>
>>
>> On 18 May 2015, at 6:44 am, Steffen Heldt
>> <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>> Dear Arash,
>>>
>>> I have a question regarding Ascends ability to check dimensional
>>> consistency. I use Ascend 0.9.9 on Ubutu 12.04 LTS. If I
>>> manipulated the equation "FlatEnds" in file "vessel.a4c" to make
>>> it dimensional inconsistent (e.g. end_area = 1 {PI} *D^*3*/4),
>>> then I expect an error or warning message when loading/compiling
>>> the model. However, I don't see any error/warning message in the
>>> PyGTK GUI although the solution of the model changes.
>>>
>>> Can you please let me know where the error/warning is suppose to
>>> be raised? Thank you very much in advance for your support!
>>>
>>> Best regards,
>>>
>>> Steffen
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users