openbugs generating inital values error - winbugs

I have a model that I can run in winbugs but I get an error in openbugs when loading and generating initial values even when using the same code and the same data.
When loading initial values in both winbugs and openbugs I get the message that the "chain contains uninitalized variables". Then I can successfully generate initial values in winbugs but in openbugs I get the error "error for node Ny[2] of type GraphBinoimial. Node second argument must be integer valued." My initial values for Ny are Ny=c(4,4,4,4,4,4,4,4). These seem like integers to me. Plus these same initial values are accepted in winbugs.
You may be asking yourself, if I can get it work in winbugs why do I care to get it to work in openbugs? I am most interested in running the whole process through R. I've been trying to do this with R2Winbugs or Brugs (openbugs) but I get errors on initialization with both of these and it even crashes R (I'd never seen the r-bomb before but now I can make it happen repeatedly). I think this is probably for the same reason that I can't run the data manually in openbugs.
Being able to run this through R would greatly reduce the frustration of interacting with win/openbugs especially when running a series of models with different data.
Thanks in advance for your insight.
lg

Related

Sudden too many errors: methods are undefined

My DES model was working well till I've added a new function (just like many others added before) and the model gave me all these error messages:
I wonder what do these messages mean and what made all of them appear suddenly. I was running the model just before it without any errors. Is there a way I could get my model back? :)
Thank you.
Edit 1:
Here is the newly created function: Newly created function
Given that I've ignored it, and made all the callings of it as comments, then the errors were still appearing. I've closed this model version and opened a backup then created the same function and the whole scenario happened again with the same 94 errors.
Is there something I need to change in the function itself?
The function checks the number of agents in certain parts of the model to stop delay blocks accordingly. That's done by adding variables that increment on exiting of agents and get the difference between them.
Typically this is caused by a syntax error in the new function that you created. See if you ignore this and then compile if it gets fixed.
Most of the time the compiler is smart enough to show you the error, but often if you replace a { with [ or you leave out a { the compiler get very confused and gives you 100s of errors.
If yous still cant find the issue maybe paste the code of your new function in the question.

How to find the bad start value guess when facing an initialization divergence in Dymola

I am using an open-source modelica library(ThermoSysPro) to build a simple Rankine cycle model, but it seems there is an issue about initialization.
So I changed the debug setting as follows to check the log file:
In the dslog.txt file, I could see there are a lot of errors in the same type:
As the log file shows, all these errors are caused by iteration divergence and bad start values:
In order to see which iteration variable caused the divergence, I checked the iteration result of all the iteration variables, but they all seem in the right range. So I am not sure what I should do next to find the source of the divergence. The method in the Dymola help manual didn't work in practice.
My question is how should I do to find the bad start values when facing the initialization divergence in Dymola?
Here is the link of the library, the model I built, the log files generated.
github link

Why are my transporterControl methods using getRouteData() and getNumberOfTransporters() erroneous?

I am trying to implement a simple form of transporter routing choice algorithm but I am having some trouble using some of the functions as given by Anylogic help. My model basically just tries to check the number of transporters in the next following path and node and then evaluates accordingly to pick the route. It is not complete as of now but the picture below shows my current implementation:
While compiling and executing the program, I received 2 errors and hope some advice can be provided.
Error 1
Error 1 can be seen in the screen capture above. Why is my function call erroneous?
Error 2
I am not too sure why this is happening either. Any advice?
Appreciate all the help given!

cdsbootstrap matlab function error

I am very very new to matlab, actually I only just got the program to run one code. A good friend of mine wrote a code for me however it doesn't seem to work, I have provided the link to the code and data files required, can anyone tell me what's wrong or fix it for me? Much thanks!
The error I am getting is:
Warning: No such number of days in the future exist for a 30/360 day-count basis. > In daysadd at 141 In CDS_PD at 35
https://www.dropbox.com/s/jtjk187rpu0fhv5/cds.zip
It appears that it is only a warning and is an inherent limitation of the "30/360 day-count basis" as used by the daycount function. As far as I can tell it just means that the calculated day is not unique in this basis. So it doesn't necessarily mean that the program is functioning incorrectly.
See:
http://www.mathworks.com.au/help/finance/daysadd.html
http://www.mathworks.com.au/help/finance/_f0-6010.html#bsuk32t-1
http://www.google.com.au/search?q=30%2F360+day-count+basis

How can I use 5x5filter (Xilinx block), it keeps telling me there is an error in the counter?

I'm trying to apply edge filter to an image using Xilinx blocks,
I used 5x5 buffer then I connected the 5x5filter to it.
But it keeps telling me:
Illegal Period, This blocks attempts to set period that is a non-integer multiple of the system rate
Error occurred during "Block Configuration".'
which I did not understand.
Similar such problem(with solution) is posted in Xilinx Forum. Go through the link given below:
http://forums.xilinx.com/t5/DSP-Tools/Can-any-1-help-me-regarding-FIR-implementation-in-system/m-p/33650#M1463
It means that the sample time of one of the block isn't an integer multiple of the model's minor timestep. Check the configuration parameters for the model and the parameters of your new blocks.
I don't think this has anything to do with the Xilinx blocks specifically.