Having trouble proving relation is not necessary for RMS real-time scheduling to be true. [closed] - real-time

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I can see how to solve the right side of the equation but when not knowing what C and T are how can I prove it is not necessary and confirm it is sufficient?
I thought about changing the C/T to a variable such as x and starting from N = 1 and solving for x at each step until the RHS is not >= to the LHS. Is this a correct way to go about this?

As the questions stated the bound you provided n(2^(1/n)-1) is sufficient in the sense that if it is true then the set of tasks is schedulable but it is not complete, it will reject task sets that are still schedulable under RMS. A simple example is a harmonic task set. A harmonic task set is one where each period is is an exact multiple of all the tasks with small periods. A trivial example is the task set of two tasks each with a capacity of 1 and a period of 2. It has 100% utilization and is schedulable under RMS but its utilization is greater than the percentage 0.828 listed in the chart for N=2.
In general, to determine if a task set is schedulable under RMS the follow recurrence relationship is solved for each task i:
If this value is less than T_i for each task assuming implicit deadlines) than the task set is schedulable.

Related

How to get the distribution of all the times in a queue? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last year.
Improve this question
Edit: The solution was that the serviceRate was too high for the amount of arriving trucks.
In my Anylogic model, I have a population of terminals (5) and a population of trucks (100). The trucks visit the terminals, which are a queueing model for them. The terminals have a number of gates (e.g., 7) that can all service 1 truck at a time (service time is based on a uniform distribution). If all the gates are busy, the other trucks have to wait in a (FIFO) queue in front of the terminal.
I want to measure the time trucks are standing within the queues before the terminals (without the service time). How can I create these terminal processes best within my Anylogic model?
I tried using a service block (the first processes in the picture), but I think that gives all the time and not only the time within the queue. I also tried a queue and delay block (below), to be able to measure the queue time. However, the distribution of the time measurement is not working as I get no distribution but just 1 (very small) number, as can be seen in the lowest picture. Same if I measure the time within the service or delay block... Does any body know how to let this work? Thanks!
You delay capacity is numberOfGates. It means if that value is 5, then 5 trucks will move into delay block at the same time. Other arrived trucks will wait in the queue if delay.size()=5. There is nothing wrong in this, you should check if your model really works as intended.
The agents would move into delay block immediately if you selected the maximum capacity option in the delay block.
Also instead of timeMeasureStart/End, use your own assignments. That is, inside the delay, on enter type agent.waitStart = time(); and upon leaving type yourHistogramData.add(time()-agent.waitStart);
It turns out that the service rate was too high for the amount of trucks I send to the terminal.

How should I implement the function to choose the route i want? [closed]

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 4 years ago.
Improve this question
I have a simple network that has several routes from start to end. Vehicles from a transporter fleet will carry agents from the left conveyor to the right conveyor using the moveByTransporter block. What are some syntax i can use to refer to paths/nodes on the network?
Also, what is a sample code line of how i can check the number of vehicles on a specific path?
This is my sample network and idea of trying how to make a new routing instead of just the shortest path (the path i want to follow is via the yellow highlighted one)
The moveTo block will take the route with the shortest distance. If the agent's speed is the same across all choices, then the shortest distance will also be the fastest time.
In the past, I have used Dijkstra's algorithm and manually routed my agents from a to b, then b to c, etc. This way, I could use travel times instead of just distances. This also opens up the possibility of considering congestion by applying a penalty to some segments if there are too many other agents on them. You can also pick a route, but then when you get to the next node, re-calculate the rest of the route for updated congestion considerations.
This is all custom, and I would not recommend it for simple problems. You would be better off to look at other alternatives (assume constant speeds or consider the pedestrian library with walls, etc, depending on your problem).

Understanding term deterministic and non random [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I am confused about a situation which is presented on the following slide:
Last sentences says that:
It is important to note that deterministic does not mean that
xt is non-random. What does this mean? If A and B are random variable, then x must be random right?
I think the point may be that nature may choose randomly among different paths, but once you know which path has been chosen you can predict future values of x_t on the path from past values x_{t-1}, etc. So e.g. nature may flip a coin to choose between the following two paths: x_t=0 for all t, and x_t=1 for all t. Then if you don't know the path, x_t is indeed random. But once you know x_{t-1}, you know x_t.

how to apply a signal after a period of time in simulink [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I simulated a system with Simulink. Now , I want to apply controller signal to system
after a time, for example after 20 seconds. It means that the sys. works 20s without
controller and after it the controller is applied.
Which block can do it?
Put the controller inside a Triggered Subsystem and set the trigger signal to go high after 20s, for example using a Clock block and a Compare to Constant block, set to >=20.

bellman ford algorithm [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
It is said, "If a negative edge cycle is reachable from the source than the algorithm returns false".
What does this "reachable from source indicates"?
Look at the following image:
Can you give me some example in which this algorithm will return false if there exist a negative edge cycle reachable from source.
Note: I am new to algorithms.
What that means is that if there exists a cycle that has a total weight that is negative, then the algorithm cannot give an answer because repeatedly following the cycle "reduces" the weight of the path. I don't see any negative weight cycles (by inspection) in the graph you show, so the stated limitation shouldn't be a concern in your case.
Edit: "reachable from source" means that the negative weight cycle is only a concern if it is reachable - meaning that a path from the specified source to some node in the negative weight cycle exists - from the start or source node. Bellman Ford finds the shortest path from a distinguished node to all nodes reachable from that node. Does that make sense?
When the algorithm is used to find shortest paths, the existence of negative cycles is a problem, preventing the algorithm from finding a correct answer. However, since it terminates upon finding a negative cycle, the Bellman-Ford algorithm can be used for applications in which this is the target to be sought - for example in cycle-cancelling techniques in network flow analysis.
Please refer this link:- http://evlm.stuba.sk/~partner2/DBfiles/Optimization/Dynamical%20optimization/Optimization_EN_Ford-Belman_algorithm.pdf