Relative Content

Tag Archive for anylogic

Importing Database Process Route with Alternatives

I have built a model to simulation an industrial process flow.
My model is essentialy composed by two agents:
the agents product, and the agent process.
Both the agents are population and their value is imported from an excel database.
Here the structure of the model:
enter image description here
Here the agent Main, the agent product enter in the model by the source block and they are sent to the agent Process by the exit block.
The agent Product has two collection: c_processstep that is a Linked List (string) that contains all the process step in the right order, and another collection called c_Timing that contains all the process time in the same order.
I will share you the structure of the database to make you understand:
the database is composed by two excel sheets:
enter image description here
enter image description here

Random spawning node

I want a rectangular node called “Start” to appear between the coordinates 1000×1000 and 950×950 once per simulation. For this I have the function “setRandomPosition

How can i alter between database sheets in anylogic?

// Assuming you have an array or list of sheet names (e.g., sheetNames) String[] sheetNames = {“sheet1”, “sheet2”, “sheet3”, “sheet4”, “sheet5”, “sheet6”, “sheet7”, “sheet8”, “sheet9”, “sheet10”, “sheet11”, “sheet12”, “sheet13”, “sheet14”, “sheet15”, “sheet16”, “sheet17”, “sheet18”, “sheet19”, “sheet20” /* … add more sheet names … */}; int i = 0; // Initialize the index // Loop through […]

Alternative to The constructor Road is deprecated

We have a simulation with the traffic library, and recently while reviewing the Java code, I found the following message: “The constructor Road(Agent, ShapeDrawMode, boolean, int, int, double, Paint, MarkupSegment…) is deprecated” in all the lines related to my 2D map modeling. I’m not sure if there is an alternative to this or if I made a mistake, because this is connected to some problems I was having with, for some reason, more cars passing through the map than through the logical model. In any case, I’m leaving one of the lines of code that show this message; perhaps the error can be seen there.

How to merge or combine statechart and process flow in AnyLogic

My intention is to measure the queue, facility utilization and time in system. I have a statechart in Person agent tab, people start from home location, moving to facility (pharmacy) and return to home. Once they reach to facility, I want to measure queue and utilization of facility. For that, I created a flow enter > service > exit. In the pharmacy state, I wrote “enter1.take(this)”. I was expecting people will enter the flow once they reach at pharmacy, but I found only the first person entering the flow. what’s wrong with others? Also, I want once they are served, they should come to the statechart again, I have an arc from pharmacy state to home where I want people will go back to home again. Is there any logical flaw here and how they will return from process flow to statechart? People and pharmacy are set in GIS regions in main agent. See, attached picture.

Anylogic, access population statistics in sensitivity analysis?

I want to run a univariate sensitivity analysis on a few individual parameters in an SEIR-type model to see how they affect disease transmission dynamics. I want to see how changes in the parameter values affect population statistics. However, I cannot figure out how to access the population statistics from the sensitivity analysis experiment.