NetLogo Headless Meaning with respect to speed - netlogo

What does one exactly mean by headless mode of NetLogo? I am considering it is running netlogo without GUI, what about the speed of slider for the model running.

netlogo-headless doesn't need to deal with speed slider ... the speed slider is there only to manage the computer video ressource. Without GUI the speed is maximum.

Related

Control two motors simultaneously with VESC

I need to be able to control 2 motors simultaneously using VESC for an RC car. I'm currently using an STM32F407 and VESC firmware version 6.00.58 to do this. Right now, I can get one motor at a time to spin, but I can't figure out how to get both to spin simultaneously at different speeds or directions.
The software has a flag for enabling dual motor support, and we can control two motors, but not simultaneously independently (simultaneous run, independent speed/direction). Based on that I designed around the STM32F407 using the VESC6_Plus schematic:
VESC 6 Plus
I had to remap some of the pins to align with timers - there was only one option to be able to connect two motors. The design works beautifully, I have no problem driving them independently, just having problems with getting the software to run them simultaneously and independently control speed and direction.
Has anyone done this successfully or has anyone got an idea on how to do it?

Unity 2d project runs very slow and uses 90+% of CPU

I have a 2d project that started running extremely slow. I've tried to backtrack what I did but I can't remember what exactly happened that caused this, as it was running perfectly at one point. Here's a screenshot of the profiler:
What I've tried:
Updating my GPU to the latest version
Updating Unity to the latest version
Restarting the editor multiple times
Restarting my PC multiple times
Lowered the framerate via custom interaction mode
I'm quite new to Unity, and quite frankly I'm very lost right now. I've been Googling this for hours now. Any help is greatly appreciated.
Screenshot of profile in hierarchy view:
There should be smth with your grid or tile map, try to turn off those components. If fps raises, try to recreate tilemap/grid
1119.19ms is a solid second meaning you get less than 1 FPS.
For 60 FPS, you should not use more than 16,666ms.
Use the Profiler. (Window -> Analysis -> Profiler) it will tell you what takes up time.
Enable the "Stats" in Game View. For pc, Triangles should be below 6 Million and Batches (drawCalls) should be lower than ~4000 preferably. These numbers are purely for reference on high-end CPU and GPU for a 3D Game, but if you have a BIG difference you should look into that (Like 60k Batches or 20M Triangles would be BAD). GPU Instancing can lower DrawCalls. Making all the non-moving things static in your scene will help as well. Re-Use materials as often as you can. But the most important thing: Profile. You need to know your bottleneck.
You can manually boost performance using simple script
void Start()
{
// Make the game run as fast as possible
Application.targetFrameRate = 300;
}

How do I fix slow-down with `pen-down` in NetLogo 3D?

I've picked up on NetLogo a little while ago and was intrigued by the possibilites that this platform offers.
As a little hobby-project I wanted to make a simulation of our solar system in NetLogo 3D.
It turned out great but I have one big problem that I am not able to solve on my own.
In order to display a planets orbit around the sun I added some buttons with the function to ask each respective planet (turtle) to pen-down and draw a line. However if I keep this "feature" on within a matter of seconds the simulation becomes noticably slower and sluggish. After 30 seconds or so it gets so laggy that even the interface becomes hard to use.
Without pen-down the simulation can run indefinitely.
Can anyone here tell me how to fix this slow-down issue?
I've checked the RAM usage and it is well below the limit I have set in the config file.
Alternatively, is there a better solution to visualize orbits?
When I loaded the model library's 3D Flocking model and asked the turtles "pen-down" it became increasingly slow. The trails presumably increase the complexity of the 3D structure that needs to be rendered.
I advised a student a few years ago who made models of our solar system and exoplanet systems in 2D and 3D. See http://resources.modelling4all.org/libraries/orbits/documentation
Note that the models are in the Behaviour Composer and the NetLogo code can be obtained by clicking on the Download tab.

Unity is showing different physics behaviour while building for different devices

I am working on roulette(Casino Style game) game project in Unity3D.
I am rotating a ball around a wheel and wheel is also rotating on its own axis in fixed update.
I am using transform.RotateAround function to rotate the ball around the wheel and i am also decreasing ball's speed in fixed update.I am assigning a random initial speed to ball within a range such that it always stops on different position each time .
For testing purpose i kept the initial ball speed to constant and check it in unity editor such that every time it rotates it always stops on the same number.
I build this project to android and PC .Though the ball stops on the same number each time in both android and PC build but the result is different in both of them.
For example- Every time ball rotates it stops on number 8 in android and number 20 on Pc each time.
Can somebody please suggest me some ways to obtain same result on different devices?
Why it is happening? Is unity physics behaviour is different in different processor?
and please explain me how to fix that .
Unity has a fixed time step, so that isn't the cause of the differences as one might expect. Physics simulations are incredibly complex things, so I'm not going to pretend that I know exactly why you're seeing differences. However, I would imagine it is to do with floating point precision differences between your computer and a much smaller phone processor.
One way to test this would be to run the simulation on another computer, and compare the results to the both of your current devices.

How can I detect if the user is walking/running with his device?

simple question hard answer:
I'd like to be able to read if the device (and the user) is running/walking holding his device. I know that the iPhone accelerometer calculates acceleration so if the user runs at a constant speed, there will be no signal spotted.
Any help on that ?
I actually used to work on that...what you can do is to detect with the accelerometer and gyro the frequency of the movement. If you plot a chart, you will see a periodic behavior when you walk or run. Do some "field" testing and you could see how those frequency change between walking and running. It's pretty cool.
Try dynamic time warping (DTW).
First, you build a small "database" of motions that you would like to recognize.
Then, in your application you compare the current sensor readings with DTW to the ones in the database and pick the most similar one.