OMNeT Debug Problem (a): about "No gate index specified when accessing vector gate ' out '" solution

Source: Internet
Author: User

Time: 2017,8.24-25

I'm new, and recently started using OMNETPP to do a wireless charging car in the charging network planning problem, "No gate index specified when the accessing vector gate ' out '" is a very common (well, To my current level is such a problem, until the 10 points in the morning to solve, instantly feel their level, but also continue to improve!! We'll try harder later! The phenomenon is as follows:

Thank teacher Liu taught me to adjust the code, the next detailed how I resolved, the beginning of the event trigger conditions to change, but did not involve the operation of the door connection, actually appeared the above problems, after some debugging, found that after the change, The door connection loop (I am a large number of connections through a for loop) in the actual storage ID is not enough, the last door does point to empty, the next question is how to be insufficient, it should be the code to generate ID function problems, go back to the front, found that the function of the ID has changed, Since I changed the trigger conditions, which led to the condition of the ID being changed, and the reference to different functions, the new reference function was not used before, so after writing, the problem is that it is here. I take this opportunity to debug this function once, found the algorithm a lot of bugs, blame themselves, these are not related to oment itself, after fighting, finally solved, take this opportunity to improve the function, the other surrounding and perfect again, to improve some details, this problem solved.

This is really a small problem, the most novice, summed up the door you encounter the connection problem:

1. The location of the door connection: initialization, transceiver function, connection display (some continue to add)

2. Consider if the ID is correct:

A. Possible ID exceeded (this is not allowed), exceeding the defined gate size (in initialization)

B. Two ID is not connected at all

C. Confusion of several common ID types: array index,node id,mode ID (three different, careful)

3. The door connection problem may also be other algorithms problems, resulting in a chain reaction, so this phenomenon is very confusing! In fact, it is not directly related to the door connection code problems, but the ID data input terminal problem, the process may be no problem.

To sum up, learn from the future, speed up efficiency, refueling!

OMNeT Debug Problem (a): about "No gate index specified when accessing vector gate ' out '" solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.