delay

Gekko model with variable delay

Gekko model with variable delay Question: I have a system with a non-constant delay. Does gekko support this type of problem and can it be handled in the MHE and MPC formulation? Reading the docs I can see how to implement the delay, but I am not sure how the state estimation part of the …

Total answers: 1

Running a python for loop iteration for 5 seconds

Running a python for loop iteration for 5 seconds Question: The following code runs the main function and sleeps for exactly 5 seconds – time spent to run the function. starttime = time.time() timeout = time.time() + 60 * 2 # 60 seconds times 2 meaning the script will run for 2 # minutes while …

Total answers: 1

How can I get millisecond and microsecond-resolution timestamps in Python?

How can I get millisecond and microsecond-resolution timestamps in Python? Question: How do I get millisecond and microsecond-resolution timestamps in Python? I’d also like the Arduino-like delay() (which delays in milliseconds) and delayMicroseconds() functions. I read other answers before asking this question, but they rely on the time module, which prior to Python 3.3 did …

Total answers: 2

How to create a delayed queue in RabbitMQ?

How to create a delayed queue in RabbitMQ? Question: What is the easiest way to create a delay (or parking) queue with Python, Pika and RabbitMQ? I have seen an similar questions, but none for Python. I find this an useful idea when designing applications, as it allows us to throttle messages that needs to …

Total answers: 6

Measure website load time with Python requests

Measure website load time with Python requests Question: I’m trying to build a tool for testing the delay of my internet connection, more specifically web site load times. I thought of using the python requests module for the loading part. Problem is, it’s got no built-in functionality to measure the time it took to get …

Total answers: 3