anylogic

Failure to Read Updated AnyLogic DB Values

喜欢而已 提交于 2020-01-01 18:27:22
问题 I am currently using an AnyLogic database to store used parking capacity. I have written a function that reads the database and assigns an id to each container or trailer that is stored. Afterward, an UPDATE query is used to update the array. The database read is performed using selectfrom() as specified by the database query tool. The UPDATE query is as follows: update(storage) .where(storage.id.eq(ret%1000/10)) .set(storage.trailer, 1) .execute(); This is based off of the example given in

Modelling population density in AnyLogic

吃可爱长大的小学妹 提交于 2019-12-25 04:04:34
问题 I am trying to model population density in AnyLogic. To that end, I've inserted an image of a country in Main, and used polyline to draw areas (called pl_[areaname], provinces in this case. Then using a function (SetHomeLocation) in Main, I am placing agents (patients in this case) in these areas, if a condition is met. For brevity, part of the code is shown below. double x; double y; if(uniform(1) <= 0.0343995) /// province 1 do { x = uniform( image.getX(), image.getX() + image.getWidth() );

Moving one agent within another agent in Anylogic

左心房为你撑大大i 提交于 2019-12-25 03:41:03
问题 I am making simple distribution center in Anylogic.I did make truck agent and i am able to move it from one gis point to another gis point. But I want to load some other agents(Let's say banana agent) into my truck agent and then trucks start their journey(if truck is full of banana).How can i do this? 回答1: I hope you have already solved your problem from almost a year ago. However, since there is no specific answer, I'll leave it here for anyone who might get stuck with the same problem.

Setting drop-off block in anylogic

时光总嘲笑我的痴心妄想 提交于 2019-12-25 01:54:21
问题 How can I set the drop-off block to unload a certain percentage of people at one train station and a different percentage at the next train station? 回答1: You can find out how many agents are contained in the container by doing container.contents().size() Let's imagine you want to dropoff 50% in the first and 10% in the second. In the first dropoff, assuming that you want to dropoff 50% you can choose the option dropoff "given quantity if available" and set the quantity as (int)round(

How to design multi level highway intersection

亡梦爱人 提交于 2019-12-24 11:23:02
问题 So I am trying to design a multi-level highway system with the Road Traffic library in Anylogic . The highways have multiple levels and I am having trouble with depicting the difference in the levels of the roads in my model. I looked at the help content related to RTL specifically Library Reference Guides and Tutorials but they don't mention adding grades/inclination to a road to get a multi level system. I apologize in advance if I missed documentation related to this. But I would like to

Anylogic Road Traffic Library Lane Change error

本秂侑毒 提交于 2019-12-23 17:01:58
问题 I am trying to model a highway system of roads but I am getting this error: root.<population>[3]: Car failed to change lane (that was necessary to continue movement) or route to the specified destination cannot be found The full error code is: java.lang.RuntimeException: root.<population>[3]: Car failed to change lane (that was necessary to continue movement) or route to the specified destination cannot be found at com.anylogic.engine.Engine.error(Unknown Source) at com.anylogic.engine.Agent

Anylogic - Combined multiple items back to original owner [closed]

一世执手 提交于 2019-12-13 09:16:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 10 months ago . I am trying to construct a a simple airport security channel. I have a 'loadService' where passengers split with a number of bags. (Number of bags is picked randomly off a Custom Distribution). The bags then go on a conveyor, while the passenger goes through a metal detector.

“Anylogic” Inventory management

青春壹個敷衍的年華 提交于 2019-12-13 03:46:04
问题 I want to simulate a hospital. A patient(disease is illustrated with color) arrives at the hospital, and the doctor needs a medical cart to treat patient. The medical cart have four different item categories. Three of the item categories relates to the color of the patient and one item category is used at every patient. When a patient arrives a certain amount of the medical cart gets drained, until it reaches a certain inventory level and the cart is transferred to a location to be filled up.

Parking randomly in Anylogic

谁说胖子不能爱 提交于 2019-12-13 03:36:42
问题 I am using AnyLogic's Traffic Road Library and I know it's possible in the car Source module to define the initial position of the car in a parking lot. I want the parking lot space to be randomly chosen. I know there is this function randomFreeSpaceIndex() that returns the index of randomly chosen free parking space. But I do not know how to call it on my car source or use it with the CarMoveTo tool. Here is my model so far. Any help is appreciated! 回答1: I'm pretty sure that you can't with

How to fix: Anylogic does not connect to Eclipse over Socket

妖精的绣舞 提交于 2019-12-13 02:54:25
问题 I'm trying to create a scenario on my Macbook with Mojave in Anylogic, which is part of agent-based simulation with many different tools. My idea is to connect Anylogic via Java Interface to Eclipse. The main problem is, that Anylogic somehow does not respond. I have tried many different codes with sockets, but could not find one, which worked for Anylogic. I'm using the free version of Anylogic and created a Java Interface under my Main Project. To run the Java Interface I press right-click