anylog | let us log on the running application without restart
kandi X-RAY | anylog Summary
kandi X-RAY | anylog Summary
a tool which can let us log on the running application without restart.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Writes the given object to the given serializer
- Applies the given value to the given serializer
- Writes an object after a separator
- Writes the given object before the serializer
- Write the given field to the JSON serializer
- Sets a serial context field
- Writes a long and char
- Scan a try statement
- Generates a finally clause for a finally block
- Prints the output class
- Scan string
- Writes the given object to the given JSON serializer
- Scan integer
- Returns this number as a integer
- Serializes an object into JSON
- Read integer
- Scan string array
- Scan a field name
- Returns the type of the method call
- Write an object to the serializer
- Scan double
- Read boolean
- Scan float
- Scan field name
- Scan field
- Write an object field to the JSON
anylog Key Features
anylog Examples and Code Snippets
Community Discussions
Trending Discussions on anylog
QUESTION
I would like to create a TimePlot after my simulation run using a called function. I used the Constructor Summary from this page: https://anylogic.help/api/com/anylogic/engine/analysis/TimePlot.html and the following Code in the function. I don't get any mistakes when I build the model, but when I call the function the chart isn't created or can't be seen anywhere. Can somebody help me with this?
Best Christoph
...ANSWER
Answered 2022-Mar-27 at 15:18You need to manually add it to your presentation.
First, store the TimePlot
you created in a local variable such as TimePlot myPlot = new TimePlot(...);
.
Then, call presentation.add(myPlot)
.
Else, you only created an object but did not tell AnyLogic to actually show it.
QUESTION
system:Mac OS software:AnyLogic 8 Personal Learning Edition 8.7.6 language: Java
When I run my model, the console print this info:
...Warning: the fonts "Times" and "Times" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
ANSWER
Answered 2021-Aug-01 at 11:11We also recently had this issue on a mac running the latest public beta of Monterey.
For some reason the Times font was no longer installed or active on the Mac.
You can check in FontBook
You can simply reinstall it
I struggled to find a source online - her is one suggestion - https://www.freebestfonts.com/timr45w-font
QUESTION
In the Anylogic GIS environment, I want to send a message to the agents that are close to the agent that sends the message. Is it possible to send a message to more than one agent within a certain distance in a GIS environment?
Thanks,
I used send("msg", this.getNearestAgent(agents)); but it only sends the message to the one nearest agent and not the nearest ones.
...ANSWER
Answered 2022-Mar-24 at 22:35You will need to create your own function for this. I created the following one with the agent type called MyAgent
so replace MyAgent
with whatever Agent Type you are using:
QUESTION
I am a beginner in anylogic and I am modeling production process in which there are several different raw materials (defined as agents e.g. metal sheet A, metal sheet B, etc.) they are going through the process and create several types of final products… therefor I have to inject the materials based on production plan and store them in warehouse and then get them out of the warehouse according to the production plan and BOM of the product.
Let’s say that the situation is that Any logic should check the production plan hourly and inject the agents to the model according to that production plan. Here is a part of injection plan according to my monthly production plan. (I have this plan for 1 month and I want to simulate it.)
My question is that how can I set this production plan for anylogic to inject the materials to the model.
...ANSWER
Answered 2022-Feb-27 at 13:33Good questions. This is typically where I would suggest making use the AnyLogic database and using a Dynamic event to inject the right amount of units at the time specified.
I start by setting up an Excel sheet with the schedule data and importing it into the AnyLogic DB
Then you need a Dynamic event with code similar to the one below that will inject the correct amount of units at the right time for the right source.
And then on the model start-up you call a function that creates all these dynamic events for you from the entries in the DB
Should be very simple and this approach is very flexible able to handle any schedule and any amount of units
QUESTION
I am building an airport model with passengers spawning, shopping/eating and departing.
Most passengers rush to their GateArea (Polygonal Node) and wait there until they feel it is appropriate to engage in discretionary activities. When they think about leaving the GateArea they generate a "Eat"- or "Shop"- Goal" and are transferred into a PedGoTo-Block that is linked to the according shop. At this point I sometimes get the error:
...ANSWER
Answered 2022-Feb-22 at 15:32Assuming that there really aren't any obstacles other than other pedestrians, then the parameter that can help improve your situation is the diameter of the pedestrian. Reducing it means that pedestrians can get closer to each other.
You can also change the diameter dynamically at any point of your simulation using ped.setDiameter( x ). So for example, you can set it to 0 at that specific point in time until the pedestrian leaves that area and change it back to 0.5.
Following the discussion in the comments, it appeared that the issue was not the diameter. Nonetheless, I am keeping it above as it might be the issue for someone facing a similar problem.
The real issue was that the modeler asking the question was making the agent leave the pedestrian flow chart using remove(agent)
. Once the agent is sent back to the flowchart using an Enter
block, AnyLogic no longer recognizes that agent as a pedestrian present in the pedestrian network.
As such, instead of using Enter
block, pedEnter
should be used. The latter requires as input the location of the pedestrian's appearance. Since in your case the pedestrian is not really moving, just leaving the flowchart for modeling purposes, you can specify the location as the agent's current location as shown below.
QUESTION
I have just started to use Anylogic / JAVA and have assembled a process flowchart with agent components. The model includes extracting Histogram Data from a number of locations throughout the flowchart. I'm aiming to get the x%th percentile value of the histogram data such that I get the variable value (in this case queue and delay) that x% of the data is less than.
The help file suggests I can specify a low and high confidence value (i.e the x%th values) I wish to compute. However, during run time, I only see a CDF being shown in the graph and the percentiles are not available. How do I extract the percentile values post-simulation to display as an output? Is there a built-in way within Anylogic to do so?
The closest thing I found was the "getCDF function where I would have to write a custom function to find the closest index that yields the target x%th value. If I have to go the route of a custom function, I started the following code
I was hoping to pass to the function the individual Histogram Data objects as an argument and be able to use the Histogram Data methods within the function body. This does not work since the methods don't get recognized. What did I do wrong? The function is supposed to take in a variable histogram data object and given a specified percentile, calculate the pro-rated index value that yield the target percentile iterating through the getCDF function.
Thank you all for the help in advance!
...ANSWER
Answered 2022-Feb-12 at 04:43While I cant confirm if your logic is correct there are a few basic mistakes in your code
- The input argument type for histoName should be
HistogramSmartData
not object. That is why "the methods don't get recognized"
You can verify the type of object by using code complete - see example below how I verified that a histogram data object that I dragged from the palette is of type HistogramSmartData
. After that you can lookup HistogramSmartData
in the help.
- You used a
do while
syntax for your while loop - not how it is used in java ;-)
It is either
QUESTION
I'm having an issue with Anylogic: I'm writing a function where I need to declare a new item of the type of an already existing Agent type. If I declare it with the code:
MyAgent name = new MyAgent();
everything is ok but when I try to execute a function to change the value of an internal value,
name.func();
it gives me a NullPointerException
, because the internal variable of the declared MyAgent
seems not to exist.
What am I missing?
Thanks a lot in advance for your help
ANSWER
Answered 2022-Feb-10 at 13:15Certain functions are not available inside agents that get created programmatically, like the default random number generator and certain other utility functions that get passed to agents.
So if you do this for example it wont work, and you get an NPE (Null Pointer Exception)
Rather always make use of a population - unless you know you will not be using any of those internal functions.
MyAgent name = add_myAgents();
Where myAgents
is a population.
QUESTION
I am an Engineering Student and as part of my diploma thesis, I am simulating the passenger changeover process in metros using the Anylogic Pedestrian Library.
In the simulation, it often happens that standing passengers "leave" the standing area and somehow get into the sitting places, blocking the way from other peds that would like to occupy the seat.
All passengers come from the Passenger Agent, where they have a boolean variable wantToSit. If wantToSit = false, they are routed into the standing area, with wantToSit = true they go to take their seats.
Now, I would like to restrict the access of peds with wantToSit = false into the area drown using polygonal nodes around the seat groups, so that the phenomenon written above cannot occur, thus only sitting passengers will enter this area.
However, when I try to define the condition for the access restriction in the polygonal Node, I always get the error "... cannot be resolved to a variable".
Here is the variable from the Agent "Passenger":
On the Agent "Main", where the Polygonal Node is, the auto code complete does not recommend anything for want
or for ped.
. For the word Passenger
, see the picture below:
Is there a way to use the access restriction feature in this case? I don't know how to access this parameter of Passenger from Main, which is a different agent.
Thank you in advance for your help!
...ANSWER
Answered 2021-Aug-20 at 05:54If you do the code complete action in the condition field before you type anything, you will see that the local variables available for you to use in the condition field is agent
and self
And then if you choose agent
you will see that the fields within your custom Pedestrian agent will become available.
Try not to type anything without code complete. It can save you a lot of time.
QUESTION
I've got another small issue with AnyLogic resources.
I want to be able to release a specific resource from a resource pool - not just any resource from the pool. The reason is that I occasionally seize multiple resources from a ResourcePool (one at a time) and then wish to release the resources again one at a time. But I don't want to release "any" resource from the pool, I want to be able to specify which specific resource of the pool to release.
Is this possible or is this one of the limitations of the resources implementation?
...ANSWER
Answered 2021-Sep-21 at 03:21I can think of many ways to do this depending on the situation... first one is to use a selectOutput before the release in order to release or not. The selectOutput will check if it's the right resource to release
the other option, if you want to release everything with the same release block but in a given order, you can put a wait block before the release block and wait for the right moment to release the resource
another one, is to use wrap up actions, and put a wait block in the wrap up, to wait for the other resources to arrive there before releasing so they are released in order
QUESTION
In AnyLogic 8, how do I create a Time Color Plot which has one row for each agent in a pool of agents?
As explained in an answer to this question, I can create a separate dataset for each row, and then have the Time Color Plot display one row for each dataset. But this requires hardcoding the number of datasets (and thus the number of agents), whereas I want to create a model with a variable number of agents and thus a variable number of rows in the Time Color Plot.
This AnyLogic cloud model includes a Time Color Plot where each forklift in a pool of agents has its own row in a Time Color Plot. Unfortunately, because it is a cloud model, I cannot download the model to investigate how it is built.
How do I create a Time Color Plot where each row corresponds to an agent in a pool of agents (like in that linked cloud model)?
...ANSWER
Answered 2021-Aug-03 at 08:55You can simply add the datasets programmatically using chart.addDataSet();
Here is the code for the model you referenced where the chart starts off empty (except for the color setup) and you simply add the bars during run time.
You can also remove them as needed.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install anylog
You can use anylog like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the anylog component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page