Anylogic: Is it possible to move Transporters based on travel time, rather than distance and speed? - simulation

I would like to use transporters in my model in various places (tugboats, forklifts, reach stackers, trucks, etc.). However, my model paths and animation can't be drawn to scale, detailed explanation in brackets below.
Is there a way I can move the transporter from one node to another based on travel time (similar to what a movable resource can do), rather than speed and distance?
The "Move By Transporter" block does not seem to allow this and I have not been able to find a solution online. Thank you for your help.
(Explanation on why I can't draw to scale: firstly, some destination locations (storage areas, etc.) are not known yet and will just be represented by a travel delay to get there, secondly, different areas of the model will be drawn to different scales, i.e. some network paths will represent a multiple kilometers and some network paths will only represent a few hundred meters, etc.)

You can draw the paths to suit your animation and then simply set the speed of the transporter that gets seized to a speed so that the duration of the movement matches what you need it to be, and when the transporter gets released set the speed back to normal

Related

Why does the agent not go to the right attractor?

i have a fork-lifter who takes the item from the truck and stock it in the rectangular node.
The problem is that i want that the fork-lifter stock the agent according to the attractors. Instead, the operator goes in the same point every time. Why?(i did the same with another flowchart and same blocks and there is no problem, maybe a network problem?).
YOu have to manually tell it to which attractor it should go. Attractors are not actual physical spaces (that become "full" if something is stored there). They are just spaces to separate things visually.
In your process blocks, you probably did not specify the attractors correctly or did not define to move to a random attractor. But even in the latter case, you could have things being stored in the same attractor.
Two options:
Either, turn your attractors into actual agents with rectangular nodes, that you setup to be "empty/full" with state charts (faster but harder to design)
Or use the material handling library with its storage system setup, doing this for your (but this is computationally slower)

Looking for a way to analyse transporter traffic on shopfloor (Density Map) in AnyLogic

I built up a shopfloor where material flow is realized by Transporters (AGV / AMR) with free space navigation. I am looking for a possibility to observe traffic at certain spots (e.g. work stations, storage areas) or even on the whole shopfloor so I can compare different scenarios of the material flow and supply strategy of the working station with a view on the traffic. I tried out the Density Map but since it observes the whole layout which is quite big the values get too low for the scale quite fast so it isn't performing the way I want it to. Is there a way so set up like a "area density map" so I can just observe a defined rectangle or another functionality which could help me here?
Happy about all ideas! :-)
You can use normal Rectangular Node elements and trigger "on enter" code to count drive-throughs or similar, as below.
Just make sure to set the capacity to infinity so normal traffic flow is not interrupted :)

How to make pedestrians appear at AreaNode with attractors from a pedSource

I am working on an evacuation project for a floor and would like to create a distribution of pedestrians from the pedSource block. These pedestrians will already appear in an area when I run the simulation. I want to obtain a fixed number of pedestrians in one area while the rest is distributed to other areas.
I have made a collection of areas that pedestrians will appear using allLocations (area, area1, area2 and OfficeArea). The event is triggered by an event and using a delay block. The max amount of pedestrians at the given floor is 100
Image of block flowchart
Image of floor layout plan
This is the code I tried where pedestrians would appear in the areas:
allLocations.get(uniform_discr(0, allLocations.size()-1))
I expect a fixed 10 number of pedestrians in the office area and positioned where I set the attractors, but the actual result shows more than 10 number of pedestrians and do not appear at the set attractor.
Image of actual result
Setting an attractor as a target for pedestrians is according to the documentation only working for the blocks pedWait and pedGoTo (I could actually only get it to work with pedWait, not with pedGoTo). Therefore you cannot initialize agents directly onto attractors using the initial location or the jumpTo() function.
You have several options as a workaround:
Extract the x,y coordinates of the attractor, and use the type point(x,y) to define the initial location or the location for the jumpTo()
Instead of using (graphical) attractors consider just defining points by code directly
Use very small individual areas instead of one large area with attractors
Use a pedWait block in your process flow and let your pedestrians 'walk' to their initial positions. Give the model a short time until everybody is on the desired location before starting your evacuation. You can also run the model in super fast mode during this initial phase, so that it will barely be visible.

HoloLens: How to stabilize holograms at far distances

I want to place virtual objects (holograms) at far distances (20+ meters) in the HoloLens 1. However, at such distances holograms become unstable and appear to "swim" in the display. Has anyone had success with this? What worked for you?
Some potential fixes include:
Ensure 60 FPS
Adjust Stabilization Plane
Employ visual markers (vuforia)
Use static room scan (may not scale well)
For me, frame rate is not an issue. And I am using Unity 2017.4.4f1. Currently, I have a single world anchor and all objects are set relative to this anchor.
20+ meters is a lot and I am not sure if this will work good enough.
Ensuring 60 fps or at least 50/55+ is important but this wont solve the swimming at this distance. A low framerate might only cause additional swimming :)
Everything that should appear statically placed in the room should be on or very close to the stabilization plane. So what you want to avoid is having the far objects at very different distances from the user. That would otherwise cause the ones farthest off from the stabilization plane to swim.
If you only have the far away object try placing the stabilization plane at the same distance as the object, if the distances are changing a lot you can also update the stabilization plane distance at runtime to always set it to the current distance to the object.
Would be interesting to hear if it worked out :)
One more thing: If I remember correctly, objects should ideally placed directly or in close proximity to their world anchor to help stabilization.
20 metres is too far. The docs
Best practices When holograms cannot be placed at 2m and conflicts
between convergence and accommodation cannot be avoided, the optimal
zone for hologram placement is between 1.25m and 5m. In every case,
designers should structure content to encourage users to interact 1+ m
away (e.g. adjust content size and default placement parameters).

Jelly physics 3d

I want to ask about jelly physics ( http://www.youtube.com/watch?v=I74rJFB_W1k ), where I can find some good place to start making things like that ? I want to make simulation of cars crash and I want use this jelly physics, but I can't find a lot about them. I don't want use existing physics engine, I want write my own :)
Something like what you see in the video you linked to could be accomplished with a mass-spring system. However, as you vary the number of masses and springs, keeping your spring constants the same, you will get wildly varying results. In short, mass-spring systems are not good approximations of a continuum of matter.
Typically, these sorts of animations are created using what is called the Finite Element Method (FEM). The FEM does converge to a continuum, which is nice. And although it does require a bit more know-how than a mass-spring system, it really isn't too bad. The basic idea, derived from the study of continuum mechanics, can be put this way:
Break the volume of your object up into many small pieces (elements), usually tetrahedra. Let's call the entire collection of these elements the mesh. You'll actually want to make two copies of this mesh. Label one the "rest" mesh, and the other the "world" mesh. I'll tell you why next.
For each tetrahedron in your world mesh, measure how deformed it is relative to its corresponding rest tetrahedron. The measure of how deformed it is is called "strain". This is typically accomplished by first measuring what is known as the deformation gradient (often denoted F). There are several good papers that describe how to do this. Once you have F, one very typical way to define the strain (e) is:
e = 1/2(F^T * F) - I. This is known as Green's strain. It is invariant to rotations, which makes it very convenient.
Using the properties of the material you are trying to simulate (gelatin, rubber, steel, etc.), and using the strain you measured in the step above, derive the "stress" of each tetrahdron.
For each tetrahedron, visit each node (vertex, corner, point (these all mean the same thing)) and average the area-weighted normal vectors (in the rest shape) of the three triangular faces that share that node. Multiply the tetrahedron's stress by that averaged vector, and there's the elastic force acting on that node due to the stress of that tetrahedron. Of course, each node could potentially belong to multiple tetrahedra, so you'll want to be able to sum up these forces.
Integrate! There are easy ways to do this, and hard ways. Either way, you'll want to loop over every node in your world mesh and divide its forces by its mass to determine its acceleration. The easy way to proceed from here is to:
Multiply its acceleration by some small time value dt. This gives you a change in velocity, dv.
Add dv to the node's current velocity to get a new total velocity.
Multiply that velocity by dt to get a change in position, dx.
Add dx to the node's current position to get a new position.
This approach is known as explicit forward Euler integration. You will have to use very small values of dt to get it to work without blowing up, but it is so easy to implement that it works well as a starting point.
Repeat steps 2 through 5 for as long as you want.
I've left out a lot of details and fancy extras, but hopefully you can infer a lot of what I've left out. Here is a link to some instructions I used the first time I did this. The webpage contains some useful pseudocode, as well as links to some relevant material.
http://sealab.cs.utah.edu/Courses/CS6967-F08/Project-2/
The following link is also very useful:
http://sealab.cs.utah.edu/Courses/CS6967-F08/FE-notes.pdf
This is a really fun topic, and I wish you the best of luck! If you get stuck, just drop me a comment.
That rolling jelly cube video was made with Blender, which uses the Bullet physics engine for soft body simulation. The bullet documentation in general is very sparse and for soft body dynamics almost nonexistent. You're best bet would be to read the source code.
Then write your own version ;)
Here is a page with some pretty good tutorials on it. The one you are looking for is probably in the (inverse) Kinematics and Mass & Spring Models sections.
Hint: A jelly can be seen as a 3 dimensional cloth ;-)
Also, try having a look at the search results for spring pressure soft body model - they might get you going in the right direction :-)
See this guy's page Maciej Matyka, topic of soft body
Unfortunately 2d only but might be something to start with is JellyPhysics and JellyCar