Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the code #2

Open
white0320dream opened this issue Dec 13, 2018 · 4 comments
Open

How to run the code #2

white0320dream opened this issue Dec 13, 2018 · 4 comments

Comments

@white0320dream
Copy link

Dear author:
can you explain how to run the code on my computer? since I do not know how to run omnet++ and python at the same time?

@softmicro929
Copy link

On Ubuntu 16

  1. install omnet++4.6
    2.create a virtualenv for python
    3.run make in omnet/router
    4.in your virtual env, install other necessary compotent listed in Readme

Please refer to Readme first!

@Gogolooklook
Copy link

Thank you!

@white0320dream
Copy link
Author

I have analyze the source code, but I cannot understand how to describe the demand, the traffic is the described by what?

@Muhammaduazir69
Copy link

Muhammaduazir69 commented Sep 2, 2024

If someone face simtime_t out of range error, here is the solution to make changes under omnet/router/Application.cc at handleMessage function

if (lambda > 0)
{
// Add a minimum threshold for lambda to avoid division by extremely small values
double effectiveLambda = std::max(lambda, 1e-6); // Set a lower bound
double etime_val = exponential(1.0 / effectiveLambda);
EV << "Calculated inter-arrival time (etime): " << etime_val << " seconds" << endl;

        // Check if the calculated time is within bounds
        if (etime_val > 0 && etime_val < (MAXSIM - simTime()).dbl()) {
            EV << "Scheduling next event at: " << simTime() + etime_val << endl;
            scheduleAt(simTime() + etime_val, msg);
        } else {
            EV << "Skipping scheduling due to excessive or invalid time: " << etime_val << endl;
            cancelAndDelete(msg);
        }
    } else {
        EV << "Invalid lambda value: " << lambda << ". Skipping scheduling." << endl;
        cancelAndDelete(msg);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants