The character in my anylogic are wrong, they change with the two following character, what can i do? - anylogic

I have a real problem with Anylogic. Whe i create a model in the section palette and also the names of objects is writed with the next character. I mean if a call an object 'abc' it will be call 'cde' and i cant read nothing. Can someone help me with this? Thank you all.

Related

unit.variable not found as numeric variable in foo Synth Package

I am trying to run the Synthetic Control Method in R. I tried to prepare my data according to Abadie, Diamond and Hainmueller (2011) (https://www.jstatsoft.org/article/view/v042i13).
But when running the dataprep.out function I get the error message that my unit.variables are not nurmeric variables in foo. I don't understand the problem here because my table purely consists of numeric values. The table is also classified as a data.frame. I have attached some pictures to underline my problem. If anyone could help me that would be greatly appreciated!
My code (https://i.stack.imgur.com/7BVYc.png)
My table (https://i.stack.imgur.com/TV1IC.png)
I have tried to reimport my data over and over again. But nothing seems to help.

How to select output in Anylogic by agent parameter?

So, I'm pretty new with Anylogic, but have done a lot of tutorials and I have programming experience in Java. For my thesis I'm modelling a vehicle flow as a process. In the source block, I create custom agents (vehicles) with some parameters from the database. This works fine. Then I want to assign an electric parameter with randomTrue(0.5). For this, I call a setupTaxi-function, where electric ist set. The parameter for the randomTrue-function should be changeable, so I set it as an extra paramter anteilEtaxis (0.5).
After that, I want the vehicles to do different things depending on the value of electric using SelectOutput. I selected the Condition and test on agent.electric.
I basically did the exact same thing as described in the Anylogic help. And yet the framework always chooses the true Output port, no matter if the parameter ist set to true or false.
See the image for setup and parameters. I tested this via console (the first line is a println-call in source, the second a println-call in selectOutput.). Plus you can see that the parameter is set to different values, because the 3D visualisation model depends on it:
enter image description here
Also, I tried a few different combinations of setting the parameters, reading them etc... The only thing that will work is putting randomTrue(0.5) directly in the Condition box. This is not what I want though. So if you have an idea, what is wrong, please tell me.
This is a typical beginners problem.
I will assume you are calling the setupTaxi-function in your source in the "on exit" action... If you are doing that, then it's too late and the agent already made its decision on where it will go after the select output block.
You have to call your setupTaxi-function in 2 possible places:
1) In your source on the "on at exit" action
2) In your vehicle agent on the "on startup" action
Or even.. just make electric variable have a default value of randomTrue(main.anteilEtaxis)... that will also work.

is there any way for us to config input parameters of operation

I am a newbie of Enterprise Architect, today I have a question,
could you please help me to answer it?
My question is "When using [Call Operation] Action, is there any way for us to config input parameters of operation?". I tried to use action pin for call argument, but it is not worked. The generated code is not added the parameter.
I attached the image too.
This question is important for me, could you please help me to answer it.
Call and argument config
activity diagram and generated code
Open the properties of the pin and select the Pin tab on the left. Now you can define the parameters if the action is a Call Operation.

Matlab GUI, sometimes listbox disappears. I used: set(handles.listbox,'value',1) and seems it does not work

In the GUI, I have two listboxes, and the data in these two listboxes can be passed to each other. A user can pass all the data to the other one, he can also select some data and pass to the other one.
The problem is: Sometime, the listbox will disappear, but all the pushbuttons works as expected. And Matlab gives a warning: Warning: multi-selection listbox control
requires that Value be an integer within String range.Control will not be rendered until all of its parameter values are valid.
I did some research, someone advises to use this: set(handles.listbox,'value',1) . But it does not solve this problem.
And what's more, I cannot figure out under what kind of circumstance this error may happen.
Can you guys please tell me how to solve this? And in which case this error may happen?
Thanks a lot.

Get Multiple Locations of the Same String in Array

Is there any way to get the indices of the same string (that appears more than once) in a single array? I know I can find a specific string's location using:
[nameOfArray indexOfObject:#"apple"]
Of course, I could create a for loop essentially using the same code above and ignoring the previous "apples" found. I can't help to feel that there is a simpler (built-in) way to do this in objective-c. Am I right?
Thank you all in advance.
You could use indexesOfObjectsPassingTest with the "test" block being a block that tests for equality.