AnyLogic: How i know i have multiple networks and solve that problem? - simulation

The agent is not following the outlined path for moving to its destination
because destination is in different network.
How i know i have multiple networks and how to avoided that. So agents move on the path.

You can get the number of networks by calling getNetworks().
You can loop through them using
for (INetwork currentNetwork :getNetworks()) {
// do something with currentNetwork
}
Check my current video series on making networks a lot more powerful, including the problem of having several networks: https://www.benjamin-schumann.com/blog/2022/8/6/taking-control-of-your-network-agent-based-pathfinding

to see if you have multiple networks, you can check on the projects panel
Here you will see all the networks you have, and what nodes are contained inside each network.
AnyLogic doesn't know automatically how to connect these 2 networks if you want to do it, so you need to have attention to details when you build your networks.
if your agent move between nodes that are not in the same network, you will get unexpected results

When paths and the destination **node" do not connect with each other, then the agent does not follow the path and uses the shortest path to reach its destination.
A Network is the collection of paths and nodes that we create on canvas.
If we create multiple collections of paths and nodes and do not connect one collection with the other, then they act as separate networks.

Related

how do i fix this error about pallet rack network?

I am creating network with different pallet rack and paths and the model gives me this error :"Pallet rack root.palletRack_360: couldn't find the path for the cell #0".Why?
thanks for the help.
here the model:https://1drv.ms/u/s!AhfvS-jv8ukShIRtDNG-DUolG-Z6Ow?e=SBUOph
Likely, you have accidentally created more than 1 network. However, agents can only navigate within 1 network. See how many networks you have by checking the "Projects" view under Main->Presentation->level
Below, I accidentally created 2 networks:
Combine items from different networks by ensuring that every path is connected properly
If there's a Path point inside the aisle (which turns green when in network) of the rack, then you may get this error. Try keeping just the continuous path without any points in the aisle.

Avoiding collisions with other objects while moving an Agent to a specific destination

I have in my model some free-moving agents, which travel to specific nodes. I use the function...
moveTo(node)
...to specify the node an agent should visit. Using this function, the agent travels the shortest path to the node. However, the model layout contains areas (i.e. image files), which the agent should not pass. Right now, the agents may travel through these areas to reach their destination. Now I'm wondering, whether there is an easy way to permit an agent to enter specific areas in the model, when traveling to a node.
I already took a look at the example model "Wandering Elephants" where the elephants are permitted to walk through areas with water. The solution there is, that if an elephant meets water in the direction it's currently heading, it randomly searches for another direction, until it finds one without water. However, this approach doesn't really fit to my problem, as the elephants in the model wander around without any specific destination. I'm searching for a method, which works for an agent that travels to a specific point. In the best case, the agent would search the shortest path around the obstacle to reach its destination.
Edit 1: The following figure shows my problem in a nutshell. On the left side is my model structure, while on the right side the state chart of my custom agent. What is happening in the model: The 3 sources are producing agents, which will be delayed for an uncertain time (delay stops with stopDelay()). Everytime an agent enters a delay, the delay is added to the collection request. My customagent check requests in a loop until the collection contains at least one request. Then, the customagent randomly selects a request (i.e. delay object) to serve. Each delay is associated with a node (the collection processNodes maps delays to nodes). Now, I want to cast my customagent to a Transporter and move it to the corresponding node. The agent should avoid collisions with the stripped walls in the model. I want to avoid any seizing and releasing of resources. I just want to adapt the behaviour of the Transport agent from the material handling library to my agent.
Edit 2:
In my current testbed, my custom agent does not consider node 1 or node 2. For testing, the agent should only try to reach node without any collisions.
I found a sufficient work-around. Not exactly what I wanted, but it works. Against my initial intention, I use now seize and release for transports. However, I added a hold-block in front of each seized-block and only a resource, which decides to serve the process, is able to unblock the corresponding hold. The on-enter control of the unblocked hold ensures that the hold is directly blocked again as soon as a single agent flows through. For the case that other users are also interested in the solution, I attached the flow-chart of the process and the state-chart of the Transporter-Agent. The system structure is quite the same as in my initial question.
There is no build-in way unless you use transporters from the Material handling library (or pedestrians). These can do what you need.
So easiest might be to convert you agents to transporters temporarily.
Otherwise, you will have to code something yourself...

How does Cloud Data Fusion decide which project network to use for the dataproc resources?

I have a project with 4 VPC networks. I created a GCDF instance, I had expected that the "default" network would be picked but I see that another one was picked, (the first one alphabetically). Is this the algorithm, the alphabetic order of names?
Is there a way to specify the network to be used, that would be very useful since I would like to isolate the network where those VMs run.
Your observation is correct. Current implementation selects network alphabetically. To use specific network, there are multiple options:
Create a dataproc compute profile that uses default or any other VPC network you have already created.
Use system.profile.properties.network=default as system preference.

Change osm bonus pack input file

I am using osmbonuspack library in my project to find the route between a departure and a destination node and I want to save information related to the traversal time of the edges. So I keep a file which contains the nodes and edges of a specific city (OSM data). My problem is that for a specific route, osmbonuspack returns a road that doesn't agree with my file. I mean that when I search for two nodes of the route in my file, they exist, but there isn't an edge between them, while osmbonuspack has found an edge between them.
I know that this may is happening because I keep information only for a city, so this edge in my file is probably split into more nodes and edges.
But is there any way that I can change an input file or url in osmbonuspack so that it searches for a route in my .osm file?
No way: OSMBonusPack only provides access to online route services.
For offline routing using local map files, you can try GraphHopper Android.

SNMP : How to find a mac address in the network?

I've wrote a Perl script to query devices (switches) on the network, it's used to find an mac address over the LAN. But, I would like to improve it, I mean, I have to give to my script these parameters:
The #mac searched
Switch' IP
Community
How can I do to just give IP and community ?
I know that it depends on my network topology ?
There is a main stack 3-switches (cisco 3750), and after it's linked to other ones (2960), in cascade.
Anyone has an idea ?
Edit : I would like to not specify the switch.
Just give the #mac and the community.
You have to solve two problems... Where will the script send the first query... Then, suppose you discover that a mac address was learned through port 1/2/1 on that switch and that port is connected to another switch. Somehow your script must be smart enough to query the switch attached to port 1/2/1. Continue the same algorithm until you do not have a switch to query.
What you are asking for is possible, but it would require you to either give the script network topology information in advance, or to discover it dynamically with CDP or LLDP. CDP always carries the neighbor's ip address... Sometimes you can get that from LLDP. Both CDP and LLDP have MIB objects you can query.
You'll need two scripts basically. You already have a script to gather your data, but it takes too long to find a single MAC. Presumably you have a complete list of every switch and it's IP address. Loop over them all building a database of the CAM table. Then when you need to search for a MAC, just query your pre-built database. Update it about once an hour or so and you should maintain pretty accurate results. You can speed the querying of several devices by running multiple snmp walks in parallel.