Menu

Using Uniform Distribution in LQN Model

Help
2019-02-01
2019-02-28
  • Gururaj Maddodi

    Gururaj Maddodi - 2019-02-01

    Hello,

    I want to use Uniform distribution in one of the activities for service time on the processor. I was trying different distributions in the example code. I used Uniform as given in the documentation.

    model = LayeredNetwork('LQN1');
    % definition of processors, tasks and entries
    P1 = Processor(model, 'P1', 1, SchedStrategy.PS);
    T1 = Task(model, 'T1', 1, SchedStrategy.REF).on(P1);
    E1 = Entry(model, 'E1').on(T1);

    P2 = Processor(model, 'P2', 1, SchedStrategy.PS);
    T2 = Task(model, 'T2', 1, SchedStrategy.INF).on(P2);
    E2 = Entry(model, 'E2').on(T2);

    % definition of activities
    T1.setThinkTime(Erlang.fitMeanAndOrder(10,2));

    A1 = Activity(model, 'A1', Exp(1.3)).on(T1).boundTo(E1).synchCall(E2,3);
    A2 = Activity(model, 'A2', Uniform(10, 20)).on(T2).boundTo(E2).repliesTo(E2);

    I get error if I run the code. I get "Abstract classes cannot be instantiated. Class 'Uniform' inherits abstract methods or properties but does not implement them. See the list of methods and properties that 'Uniform' must implement if you do not intend the class to be abstract." How can I use Uniform distribution? Other distributions mentioned in the documentation works fine.

     
  • Gururaj Maddodi

    Gururaj Maddodi - 2019-02-02

    It seems like the sample method is not impelemented from the Distrib super class for Uniform, while it seems like its been implemented in other like Disabled and Immediate. Is that a by design? I really need to use Uniform distribution for my scenario. Is there a work-around for this. Otherwise I can't use Line. Please help.

    Thanks.

     
  • Giuliano Casale

    Giuliano Casale - 2019-02-28

    Hi Gururaj

    I am sorry for the late reply, I had replied over the email but probably it was discarded as I did not use the right email address.

    You have shared the model, can you please also share the solver invocation code?

    Queueing theory is not meant to use uniform distributions, so it's a rather unusual need, may I ask why you need that? Perhaps there are better ways to do the same without the Uniform.

    Thanks
    Giuliano

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.