fnicolo

15 Reputation

2 Badges

2 years, 170 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by fnicolo

@ryanw 

MapleSim plots values with a good sample rate (for a sample rate ask of 0.002 second, the plot is well sample to 0.002 second in the MapleSim Gui), but C function is called each model fondamental step time (each 0.0004s). And in a step, the C function is called 3 times.

For example, if I make a simulation of 1 second with a model fondamental step time of 1ms, with a defined sample call to C function at 5 ms, with 10000 points to plot  :

The model will make 1000 step for the simulation.
The model must make  200 calls to the C function

The MapleSim graphic result is well sampled to 5ms
but :
the number of calls to C function is of 1000*3 = 3000

while I expect to have only 200 calls, or at worst 600 calls to the C function

 

@ryanw Yes, of course. In my example, fixed step solver is 0.0004 s while sample time of the function is 0.002 s.

In MapleSim, the output of the bloc is well sampled to 0.002 second (like wanted), but the C function is called at each solver step (each 0.0004 second).

It does a lot of unnecessary function call and if I want to sample the C function, I need to encode a decimation for each C function sampled in MapleSim (workaround).

Help documentation says :

he Boolean output is true when the Boolean input has a rising edge from false to true, otherwise the output is false
The output is true only for an instant, so a plot of it will always appear false.

I have test the rising edge with an integrator with an reinit input. it seems to work well.

@FadiBunni 

I don't know why it works with /enable option ... i have spend a week end to find the solution for this problem. Desinstalling java, reinstalling java, desinstalling Maple, resinstalling Maple, and other ridiculous tests ... and a luminous idea came to me : enabling the java acces bridge  !!! Yeah !!!!

if you understand what it means :

from http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136191.html

Java Access Bridge is a technology that exposes the Java Accessibility API in a Microsoft Windows DLL, enabling Java applications and applets that implement the Java Accessibility API to be visible to assistive technologies on Microsoft Windows systems. Java Accessibility API is part of Java Accessibility Utilities, which is a set of utility classes that help assistive technologies provide access to GUI toolkits that implement the Java Accessibility API.

In order for existing assistive technologies available on Microsoft Windows systems to provide access to Java applications, they need some way to communicate with Java Accessibility Utilities. Java Access Bridge supports this communication.

An assistive technology application running on Microsoft Windows (for example a screen reader) communicates with Java Access Bridge DLLs, which in turn communicates with the Java Virtual Machine through Java Access Bridge Java libraries. These Java libraries communicate with Java Accessibility Utilities. Java Accessibility Utilities collects information about what is happening in the Java application, which it forwards to the screen reader through Java Access Bridge.

Page 1 of 1