<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Discussion</title><link>https://sourceforge.net/p/powerdevs/discussion/</link><description>Recent posts to Discussion</description><atom:link href="https://sourceforge.net/p/powerdevs/discussion/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 26 Jun 2022 09:14:43 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/powerdevs/discussion/feed.rss" rel="self" type="application/rss+xml"/><item><title>How can BQSS proceed when there are N simultaneous events without enumerating 3^N possibilities?</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/e56f1842/?limit=250#46cb</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;From a practical perspective, why allow simultaneous events? This leads to an (IMHO) interesting problem: what should the minimum timestep be? Making it 10e-301s is clearly not a good idea. &lt;/p&gt;
&lt;p&gt;Maybe it is possible to not check &lt;em&gt;all&lt;/em&gt; possibilities but instead only check for a useful subset of them and ignore all others?&lt;/p&gt;
&lt;p&gt;-marcel&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">marcel hendrix</dc:creator><pubDate>Sun, 26 Jun 2022 09:14:43 -0000</pubDate><guid>https://sourceforge.net4425675a333d431ea6ab1d64c1dfba9d2ac476e3</guid></item><item><title>Bugs in qss_switch and possible fix</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/8072e4d6/?limit=25#c9c7</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;In my models I have been extensibly using the qss_switch atomic model.  Just now I found a behaviour which I think it is a bug in the code. I made up a very simple model to easily reproduce the problem (below the code and screenshots explanation).&lt;br/&gt;
I have an idea on how to fix it which does solve the problem in this small made up model, but I wanted to make sure with you if is the correct fix as it will impact all my other models (which are harder to verify they keep working as expected).&lt;/p&gt;
&lt;p&gt;The made up model can be found online here: &lt;a class="" href="https://www.dropbox.com/s/c1y31q80i0uozkx/reproduceQssSwitchBug.zip?dl=0" rel="nofollow"&gt;reproduceQssSwitchBug.zip&lt;/a&gt;&lt;br/&gt;
And looks like this: &lt;a class="" href="https://www.dropbox.com/s/k26gip07ie7rh56/Selection_773.png?dl=0" rel="nofollow"&gt;(online here)&lt;/a&gt;&lt;br/&gt;
&lt;img alt="reproduceQssSwitchBug model" rel="nofollow" src="https://photos-4.dropbox.com/t/2/AAAdNhUCvrm3GR0z2KgB9Z2K0IFg72trWm3sC0eBVys82A/12/66116119/png/32x32/1/_/1/2/Selection_773.png/EMWirjMYsQ4gAigC/xQ2tzPQwTYVdYKfdPljRsYY0PsZib-NBMkcDgiQUfx0?size=2048x1536&amp;amp;size_mode=3"/&gt;&lt;/p&gt;
&lt;p&gt;The trapezoidal goes from -1 to 1 is 1sec and crosses 0 at t=0.5 (plotted below in green). Is the input to the switch both in port 0 and 1 (this is to simplify the example. In my models the input may come from different models, but the problem arises when they are synchronised).  The switch level=0, so in this example the output (plotted in red) should work similar to a saturation: it should output 0 when the trapezoidal&amp;lt;0 and should output the trapezoidal when it is positive. But as the plot shows it is not:&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://www.dropbox.com/s/dfi3go4lfi09al7/Selection_772.png?dl=0" rel="nofollow"&gt;online here&lt;/a&gt;&lt;br/&gt;
&lt;img alt="current and expected outputs" rel="nofollow" src="https://photos-6.dropbox.com/t/2/AABPnQbYGxpLlcTpa7CJnAuxzb8jFH--Yx0v9inFGvSwUg/12/66116119/png/32x32/1/_/1/2/Selection_772.png/EMWirjMYsQ4gAigC/UzsGdNiGBgGal_TWxCToxJjQQZ3uCAz4ugpQOpEEegY?size=2048x1536&amp;amp;size_mode=3"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt;&lt;br/&gt;
1. The first bug (marked with 1 in the plot) seems to shift the input: at t=0.5 the trapezoid is 0, but the output of the switch is 1.&lt;br/&gt;
2. The second bug (marked with 2 in the plot) seems to skip the updates of the input. From t=0.5 to t=2.5 the trapezoid changes 2 times (at t=1 and at t=2). But the output of the switch stays with the first value of the trapezoid (increasing).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Possible fixes:&lt;/strong&gt;&lt;br/&gt;
1. For bug 1, I think it caused by line 113 in the lambda function: &lt;br/&gt;
&lt;code&gt;if (sigma&amp;gt;0)advance_time(y,sigma,-1);&lt;/code&gt;&lt;br/&gt;
That line advances the time of the output if necessary, but this was already done in lines 95-98. Thus, it advances the output 2 times, shifting the input.&lt;br/&gt;
Commenting line 113 seems to fix the bug, at least in this example&lt;br/&gt;
2. For bug 2, I think it is caused by the synchronicity of events arriving at port 0 and 1 in the qss_switch: at t=1 first the event arrives at port 0, and thus sigma is set to 0 programming and immediate output. But then the event also arrives to port 1, it calculates the next level crossing (never), and sets sigma=inf (which overrides the previous sigma=0 so the programmed output is never done).&lt;br/&gt;
Changing line 71 as follows seems to fix the bug:&lt;br/&gt;
} else &lt;strong&gt;if(sigma != 0)&lt;/strong&gt; {&lt;/p&gt;
&lt;p&gt;Adding these 2 changes produce the expected output as shown in the plot. &lt;br/&gt;
Nevertheless, it will impact all the qss_switch blocks in all my models, so I wanted to shared this with you to check if the fixes are correct and will not break other parts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you think it is safe to apply these changes in all qss_switch blocks?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much,&lt;br/&gt;
Matias&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matias Bonaventura</dc:creator><pubDate>Wed, 21 Jun 2017 09:28:22 -0000</pubDate><guid>https://sourceforge.net9fd8d6661382860ea89af698c811302a48bca131</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#3c49</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi! &lt;br/&gt;
This may have nothing to do with the GnuPlot-block. They are using void-Pointer in connection with Event-instances to send messages. Thereby they are doing some ugly type - casts between double* , double[], and vector*.  Maybe there is something wrong....&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Franz Preyser</dc:creator><pubDate>Thu, 23 Mar 2017 18:28:43 -0000</pubDate><guid>https://sourceforge.net2b7a26b981f8723c800fb0d59d4c11485494a417</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#d27e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm having similar issues and could not find a way to fix it.&lt;/p&gt;
&lt;p&gt;When compiling any model that has gnuplot involved, I get a &lt;strong&gt;PowerDevs - Message&lt;/strong&gt; window with the following message: &lt;em&gt;The process terminated abnormally.&lt;br/&gt;
Unknown signal 0&lt;/em&gt;. After that a GnuPlot window (with id: 0) appears, and everytime I close it, respawns a new one until I have to manually kill the gnuplot process.&lt;/p&gt;
&lt;p&gt;When running the model via command line, I get the following output:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;matt@ubu:~/workspace/powerdevs/output$ ./model -tf 100
Creating model... 
Model Created, start running ... 
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2.8).
Segmentation fault (core dumped)
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
Warning: empty y range [0:0], adjusting to [-1:1]
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;^ and this goes on and on until I manually kill the gnuplot process.&lt;/p&gt;
&lt;p&gt;Apparently the mismatch warning does not affect anything for what I have read online, still don't know why I'm getting that segfault and warnings.&lt;/p&gt;
&lt;p&gt;I'm running Ubuntu 16.10, 64 bits, in a VirtualBox machine.&lt;br/&gt;
GnuPlot version 5, patchlevel 4.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matías Aereal Aeón</dc:creator><pubDate>Thu, 23 Mar 2017 15:44:53 -0000</pubDate><guid>https://sourceforge.net51de989ecec47de920da44ba553aff91da910172</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#e7ef</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Both solutions that Franz mentioned worked for me. I've chosen the second one, since it implies adding a single line to the original gnuplot block code.&lt;/p&gt;
&lt;p&gt;Thank you very much for all your replies!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ezequiel</dc:creator><pubDate>Tue, 21 Feb 2017 03:09:17 -0000</pubDate><guid>https://sourceforge.netdd7b95c5435c9fca322ec3d7407e8646cd07c494</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#8081</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Sadly we have not found a solution that works on all platforms. Different version of ubuntu have different tweaks for the gnuplot problem. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Federico Bergero</dc:creator><pubDate>Mon, 20 Feb 2017 17:25:52 -0000</pubDate><guid>https://sourceforge.netf89b20fa0341fb9e35608e4ac552f9e6e7f8545e</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#5ac0</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In my old Ubuntu 12 I remember I had to install gnuplot-x11 for the wxt persist to work&lt;/p&gt;
&lt;p&gt;sudo apt-get install gnuplot-x11&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matias Bonaventura</dc:creator><pubDate>Mon, 20 Feb 2017 15:17:49 -0000</pubDate><guid>https://sourceforge.net9b3b18c11050663bb86f823b1717b0063b056bd6</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#9aba</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Ezequiel!&lt;br/&gt;
I have made the following experience:&lt;br/&gt;
With Kubuntu 16.04 I have to use:&lt;br/&gt;
strcpy(buff,"\npause -1"); // use this line in kubuntu 16.04&lt;/p&gt;
&lt;p&gt;with Kubuntu 14.04 I have to use:&lt;br/&gt;
strcpy(buff,"\nset terminal wxt persist"); // use this line in kubuntu 14.04&lt;br/&gt;
strcpy(buff,"\npause -1");&lt;/p&gt;
&lt;p&gt;Then zooming and everything else worked for me.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Franz Preyser</dc:creator><pubDate>Mon, 20 Feb 2017 06:49:23 -0000</pubDate><guid>https://sourceforge.netf4215dedaf5debff8ec1c94a9a8dfdf376433488</guid></item><item><title>gnuplot and powerdevs</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/fe65e5e6/?limit=25#c841</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I'm a newbie with powerDEVS. I'm experiencing some problems with results plotted in gnuplot. At first, results plotted in gnuplot window closed after the simulation had finished. Then I realized that it was due to the wxt option in the gnuplot script file, so I modified the code of gnuplot block replacing the line strcpy(buff,"\nset terminal wxt persist") by strcpy(buff,"\nset terminal qt persist").&lt;br/&gt;
Now I'm having another issue related to that. Buttons in the gnuplot window, such as zomm in/out or grid on/off, do nothing. After a bit of googling I've discovered that it could be caused by the persist option in the script, because since gnuplot closes after simulation, the results window remains open but inactive.&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;I'm using PowerDEVS 2.4rev981 on Ubuntu 16.04 and gnuplot 4.6.6-3.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ezequiel</dc:creator><pubDate>Sun, 19 Feb 2017 17:19:11 -0000</pubDate><guid>https://sourceforge.nete7235c509dac705867d48678e37c3943bfc6856f</guid></item><item><title>How can BQSS proceed when there are N simultaneous events without enumerating 3^N possibilities?</title><link>https://sourceforge.net/p/powerdevs/discussion/general/thread/e56f1842/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I think I figured it out, so for anyone else who might come across this later:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is indeed nondeterministic, but&lt;/li&gt;
&lt;li&gt;The reason it doesn't take an exponential amount of time to find a consistent solution is that a greedy algorithm doesn't need backtracking: i.e., there is always a valid choice for every quantized variable (perhaps it is "keep it constant" rather than "go up" or "go down", but at least one of these works) no matter how many others have been already quantized at the same time step.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mehrdad N.</dc:creator><pubDate>Tue, 23 Feb 2016 20:44:44 -0000</pubDate><guid>https://sourceforge.net61f50e8f0534a43c87fbc661628f1e81a4410b6c</guid></item></channel></rss>