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

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.

Related

<Anylogic in 3 days> Airport model tutorial error

I have been following the tutorial book "Anylogic in 3 days", in the last chapter airport model phase 6.
Setting up flights from MS excel spreadsheet, when I try to run the model after I finished all the settings, it says The method planBoardings(Flight) in the type Main is not applicable for the arguments ().
I have checked the tutorial and my model, I don't know where I did wrong.
is there anyone who had the same problem or can you tell me where I might be wrong.
I am really new to Anylogic, I really appreciate if anyone can help!
the model logic
startBoarding function I have defined according to the tutorial
the Main - Agent Type property
Not sure about the tutorial itself, but your function planBoardings does not need an argument flight.
Delete that as below:
You may also need to adjust the code. Change the line below:
such that it says create_DepartureEvent(dateToTime(f.departureTime), f)

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.

Unable to capture available state..?

I am working on anylogic as beginner, and I have issue with adding statistic into analysis.
I am unable to find any obvious question.
Please, let me clarify on this.
The matter illustrate in the image
Thank you
Asanka
Function is name of another class, used in AnyLogic. Using this name, you refer to the class, not to the agent type. Use full name of the agent type — modelPackageName.Function.Working. Also, you may simply rename Function agent type to FunctionAgent or other one.

hierarchy of functions in MatLab

I have been reading someone else's matlab code and I don't know how the code structured. I mean I would like to know the hierarchy of functions, which function uses which function. I am reading the code to figure that out but its taking a lot of time.
So is there any other way I can see this hierarchy without reading the whole thing? To be honest it is starting to get confusing. Maybe MatLab has a built in function for that! I found this:
How can I generate a list of function dependencies in MATLAB?
but this doesn't seem to be helpful!
The MATLAB profiler will show you what functions are called by your code (and much more information to boot) and allow you to click through the hierarchy of function calls. You can either call profile on and then run your code, then call profile off and profile viewer, or you can simply call profile viewer and type a single line of code to run in the edit box at the top.
Use the dependency report provided in MATLAB:
http://www.mathworks.co.uk/help/matlab/matlab_prog/identify-dependencies.html
There are also some tools on the File Exchange, such as fdep.
No idea about a function to show visible or depended-upon functions. However the basic rules are:
1) Only the first function in a .m file (normally has to have the same name as the file itself) is visible outside that file.
2) Any function can see any top level (see 1.) function if the file is in the matlab path. Matlab can show you the path so you know where it's hunting.
3) The order of the path is important, the first instance of a function called foo found in the path will be called. Obviously the current directory is at the top of the path.
3) All functions in a given file can see all other functions in that file.
That's the basics. No doubt there are other rules, and possibly exceptions to this. But that understanding generally serves me well.
Obviously the easiest way to work out which function is being called is to click on it in the editor and open it.
One thing I do is simply place in each function at the beginning fprintf("inside function <name>/n"); and at the end of the function fprintf("leaving function <name>/n"); where <name> is the name of the function.
This will give you a very specific list of which function is being called by which function (based on the order that they appear). Another thing like this would be to place fprintf("function <name1> calling function <name2>/n"); so you can be more explicit about which function is being called by which one.

Comment Template variables in Eclipse

I have a comment template in Eclipse (CDT) that I use for function calls which looks like:
//****************************************************************************
//
// Function: ${enclosing_method}
//
// Purpose:
//
// Parameters:
//
//****************************************************************************
My problem is that the ${enclosing_method} template variable doesn't work MOST of the time, but other times it does and I have yet to figure out why. I've tried using the comment template inside of the function and outside (on top of) the function definition even within the same header file. I prefer it to be on top and have seen it work in that position but again I don't know why.
What prerequisites need to be met in order for the enclosing_method variable to place the name within the comment automagically?
Thanks in advance for any insight you can provide.
You are not the only one experiencing issues with this template.
Even in JDT (Java) there is a problem, since 2004! See bug 76661.
It is however not entirely reproducible.
Looked into this to try and find a reproducible case. I can get it happen consistently if I add a new method to a class and then execute the template inside of the method before saving
So far, no patch in sight.