EIGRP Best Path

Hi Guys
I have 2 routed links between two sites a 10G on 10G bearer and 5G on 10G bearer. Will be configuring EIGRP either side. How can I get the traffic to primarily use the 10G link. 
May be a simple question for someone. Any help will be much appreciated. Someone mentioned something about using a bandwidth command.
Thanks

Hi,
The bandwidth command should do it.  Here is doc with config example:
R2# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# interface ethernet0
R2(config-if)# bandwidth 5000
R2(config-if)# end
http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/13673-14.html
HTH

Similar Messages

  • What is the best Path for a J2EE developer with oracle?

    Hi,
    I am a J2EE developer, for the time being I work at a Commercial Bank as an enterprise application developer. I have learnt java when I was following a local IT diploma and with the help of books, works at my working place and the internet , today I am developing J2EE applications with JSP,Servlets,JSF2.0,EJB3.0 and third party JSF libraries etc. (I am also developing softwares using other programing languages such as Asp.net, C#.net, WPF etc, but I prefer to be in the java path). Other than that, I'm also working as the UI designer of most of our applications.
    I have those skills and practice after working for 4 years as a web/enterprise application developer & a UI designer, but now I have to focus on some paper qualifications and hence I am doing BCS.
    Now I want to be a java professional in Oracle's path, and I need to know what is the best path I can select to move with Oracle. I finished my classes of SCJP , but didn't do the exams as there were some rumors that Oracle will dump those exams in the future. I am interested in Oracle university, but I am unable to even think about it as I live in Sri Lanka and don't have that much of financial wealth to go USA and join.
    So I really appreciate if any Oracle professional could suggest me the best educational path according to what I mentioned about my technical and career background. Because I have a dream to join Oracle one day as an employee and being a good contributer to the same forum, which I am getting helps today!
    Thanks!!!

    As you can see on our website, Oracle did not retire the Java certifications. You can browse through the available certifications and hopefully help to determine your path.
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=140
    SCJP has now become Oracle Certified Professional Java Programmer. You can find more info on those exams on our website here: http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=320.
    Regarding training, perhaps live virtual training would be an option for you. You can find more information at http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=233.
    Regards,
    Brandye Barrington
    Certification Forum Moderator

  • DMVPN + MPLS best-path selection

    Dear Community
    We're in the process of deploying DMVPN as a backup solution to MPLS. All that is working great!
    The DMVPN wan is dual-cloud, with 2 hub routers in each cloud. Phase 3 (nhrp shortcut) is enabled on all the spokes.
    For routing, all the customer subnets are advertised in MPLS, whereas for DMVPN hub advertises only a summary to 10.0.0.0/8. The protocol for both is BGP. For DMVPN, the hub routers resides in one AS (65002) and all the spokes another common AS 65102. DMVPN is therefore peered eBGP hub > spoke.
    For customers connected to MPLS, the DMVPN serves as backup only solution. Best-path selection by longest prefix match.
    We have other customers coming on board who wish to join the same WAN but don't have the $$$ for MPLS so are opting for DMVPN only.
    Now, I have a requirement to enable spoke-to-spoke for a DMVPN only site (spokeA) to an MPLS site (spokeB). The problem is it doesn't seem to work properly as the hub router sees the best path to spokeB site via MPLS, not via DMVPN. The spoke-to-spoke is never formed, and remains spokeA > hub > mpls > spokeB. The return path is better = spokeB > DMVPN > hub > spokeA (this is because spokeB sees no route from MPLS for spokeA, so follows 10.0.0.0/8) route.
    I look for any feedback that can help to meet this requirement?
    And if any advice on the general design would be really appreciated.
    Thanks a lot!
    Phil

    Phil, 
    I did a short lab around this ... wanted to make sure I'm not saying something stupid. 
    While I can't claim it's the _optimal_ solution for your setup it seems to work in my lab.
    Spoke1 LAN 192.168.101.0/24 (AS 65001)
    Spoke2 LAN 192.168.102.0/24 (AS 65002)
    HUB LAN 192.168.111.0/24 (AS 65000)
    192.168.1.0/24 DMVPN subnet. 
    A single (i)VRF - DMVPN exists on hub, only and is assigned only to DMVPN tunnel interface. 
    Excuse a few hacks a had to use... default routed via default-originate for example :-)
    Hub
    R10-P#sh run int tu0
    Building configuration...
    Current configuration : 281 bytes
    interface Tunnel0
    vrf forwarding DMVPN
    ip address 192.168.1.1 255.255.255.0
    no ip redirects
    ip nhrp map multicast dynamic
    ip nhrp network-id 1
    ip nhrp shortcut
    ip nhrp redirect
    tunnel source Loopback0
    tunnel mode gre multipoint
    tunnel protection ipsec profile PRO
    end
    R10-P#sh run | s r b
    router bgp 65000
    bgp log-neighbor-changes
    network 192.168.111.0
    redistribute static
    neighbor 10.112.112.1 remote-as 65001
    neighbor 10.112.112.1 route-map SPOKES_MPLS in
    default-information originate
    address-family ipv4 vrf DMVPN
    neighbor 192.168.1.101 remote-as 65001
    neighbor 192.168.1.101 activate
    neighbor 192.168.1.102 remote-as 65002
    neighbor 192.168.1.102 activate
    exit-address-family
    R10-P#sh run | s vrf defini
    vrf definition DMVPN
    rd 1:1
    route-target export 100:1
    route-target import 100:1
    address-family ipv4
      import ipv4 unicast map DEFAULT
      export ipv4 unicast map SPOKE_SUBNETS
    route-target export 100:1
    route-target import 100:1
    exit-address-family
    address-family ipv6
    route-target export 100:1
    route-target import 100:1
    exit-address-family
    Result on spoke
    R1-PE#traceroute 192.168.102.1 source e2/0
    Type escape sequence to abort.
    Tracing the route to 192.168.102.1
    VRF info: (vrf in name/id, vrf out name/id)
    1 192.168.1.1 [AS 65000] 5 msec 10 msec 2 msec
    2 192.168.1.102 [AS 65000] 4 msec * 5 msec
    R1-PE#traceroute 192.168.102.1 source e2/0
    Type escape sequence to abort.
    Tracing the route to 192.168.102.1
    VRF info: (vrf in name/id, vrf out name/id)
    1 192.168.1.102 [AS 65000] 6 msec * 6 msec
    routing on hub 
    (sanitized)
    R10-P# sho ip route
    Gateway of last resort is 10.100.100.2 to network 0.0.0.0
    S* 0.0.0.0/0 [1/0] via 10.100.100.2
    10.0.0.0/8 is variably subnetted, 13 subnets, 2 masks
    B 192.168.101.0/24 [20/0] via 10.112.112.1, 00:06:40
    B 192.168.102.0/24 [20/0] via 192.168.1.102 (DMVPN), 00:00:03
    192.168.111.0/24 is variably subnetted, 2 subnets, 2 masks
    R10-P# sho ip route vrf DMVPN
    Routing Table: DMVPN
    Gateway of last resort is 10.100.100.2 to network 0.0.0.0
    B* 0.0.0.0/0 [20/0] via 10.100.100.2, 00:06:40
    192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
    C 192.168.1.0/24 is directly connected, Tunnel0
    L 192.168.1.1/32 is directly connected, Tunnel0
    B 192.168.101.0/24 [20/0] via 192.168.1.101, 00:06:40
    B 192.168.102.0/24 [20/0] via 192.168.1.102, 00:06:25

  • BGB Best path selection

    Hi,
    Could someone tell me why second path remains as best?
    MPLS_CORE#show ip bgp 192.168.1.0
    BGP routing table entry for 192.168.1.0/24, version 27
    Paths: (2 available, best #2, table default)
      Advertised to update-groups:
         1         
      Refresh Epoch 1
      64513
        2.2.2.1 from 2.2.2.1 (10.201.240.2)
          Origin incomplete, metric 156160, localpref 100, valid, external
          rx pathid: 0, tx pathid: 0
      Refresh Epoch 1
      64512
        1.1.1.1 from 1.1.1.1 (192.168.4.253)
          Origin incomplete, metric 1415680, localpref 100, valid, external, best
          rx pathid: 0, tx pathid: 0x0
    Regards
    Michal 

    Hi Michal,
    Please refer below CCO document for BGP best path selection criteria on cisco routers
    http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
    If everything attribute is same then it comes to router-id and lowest router-id is preferred.
    11. Prefer the route that comes from the BGP router with the lowest router ID.
    The router ID is the highest IP address on the router, with preference given to loopback addresses. Also, you can use the bgp router-id command to manually set the router ID.
    In your case, second route is having lowest router-id (1.1.1.1)
    --Pls dont forget to rate helpful posts--
    Regards,
    Akash

  • Inject BGP Default Routes into Multiple VRF before Best Path Selection

    Hello, 
    I have the following setup:
    Multiple Border Routers with eBGP sessions to external AS. We receive a default route from this multiple AS to keep the Table manageable. We noticed an important part of our traffic was been SW routed instead of CEF when we had the Full Internet table. Router Resources came to the ground when we changed to a default. 
    Now I want to separate this default routes into different VRF. Attached is the Diagram. 
    My question is,  the multiple default route all go into the BGP Table. The BGP table then select the best route and place it on the RIB and then to the FIB. 
    I want to redistribute the different Route on the BGP table prior to the Best path selection algorithm and placed on the RIB. 
    How can I achieve this?

    Hi,
    Redistribution of multiple routes to same prefix is not possible. Even if you have configured BGP multipath and all different bgp routes got installed into routing table, during redistribution only route will be redistributed. 
    Also would like to understand the requirement of redistributing multiple BGP routes in to IGP. As per your diagram, 3 different eBGP sessions are on three different routers, so you can prefer eBGP route over iBGP received from other routers and can distribute eBGP route to IGP from each router. Thus you will have three different default routes in to IGP in core.
    Please don't forget to rate this post if it has been helpful
    - Akash

  • Best Path to upgrade Exch 2010 SP1/W2K8 R2 to Exch2010 SP3/W2K8 R2 SP1

    What would be the best path forward to upgrade an existing Exchange 2010 SP1 server (no rollups) on Windows Server 2008 R2 to Exchange 2010 SP3 on Windows Server 2008 R2 SP1? Exchange is on a DAG with a secondary server.

    Hi,
    In addition to Ed Crowley's suggestion, I would like to clarify the following thing about upgrading Exchange server and Windows server:
    In-place upgrade is not supported, it will break Exchange.
    Here is a thread for your reference.
    In-place upgrade exchange 2010-SP3 to Windows Server 2012
    http://social.technet.microsoft.com/Forums/en-US/be9e10c3-c090-449b-bff3-693f52490d8d/inplace-upgrade-exchange-2010sp3-to-windows-server-2012?forum=exchange2010
    In your case, you need to set up a new server, move mailboxes to it at first.
    Secondly, upgrade Windows server.
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • PB12.5 Classic - What is the best path to interface with MS Outlook

    I am sure this topic has been covered but darn if I can find anything on it.
    My client is moving over to MS Outlook.  Not sure at this point if its going to be just an exchange server or outlook 365.  I am trying to figure out what the best path would be to interface to it.
    Using: PowerBuilder 12.5 Classic (no access to vb development)
    What functionality is needed...
    Need to be able to access emails including attachments. Need to have option to send in HTML format so MAPI connection may not be feasible.
    Need to have access to the calendar to view/edit meetings/appointments including viewing users availability (Busy search).
         Must also be able to know if users accept/reject meeting requests.
    Looking for the best direction... use exchange web service api.... smtp...ole...etc..
    Was directed to look into using Exchange Web Services managed API but unfortunately not able to figure out how to connect to it using PB12.5 classic, all examples I can find use C# or VB.
    Note: The application that would run this runs on PC's and thin clients.
    If there is a best direction could someone point me to some sample code/tutorial/whitepaper etc.. on how best to proceed it would be greatly appreciated.
    Thanks to all that reply
    Dave V.

    I have an example of using OLE Automation with Outlook:
    http://www.topwizprogramming.com/freecode_outlook.html
    I also have an EMailSMTP example that can be used to send email. Now that we have switched to Outlook365 we started having sporadic issues. Now we used the paid version of the SMTP control at AspEmail.com - Free Secure ASP Mail Component for an ASP and ASP.NET Environment.
    The paid version is required for TLS secure connections. Since PB is 32bit, make sure you use the 32bit version.
    OLEObject oleMail
    String ls_html, ls_file
    Integer li_rc
    // create Mail object
    oleMail = Create OLEObject
    li_rc = oleMail.ConnectToNewObject("Persits.MailSender")
    If li_rc < 0 Then
      MessageBox("Process", "Persits.MailSender failed: " + String(li_rc))
      Return
    End If
    // build the body
    ls_html  = "<html><body>"
    ls_html += "<p>This is a test!</p>"
    ls_html += "</body></html>"
    // email the file
    oleMail.RegKey   = "xxxxx"
    oleMail.Host     = "smtp.office365.com"
    oleMail.Username = "xxxxx"
    oleMail.Password = "xxxxx"
    oleMail.Port     = 587
    oleMail.TLS      = True
    oleMail.From     = "[email protected]"
    oleMail.Subject  = "A test of Persits.MailSender from PowerBuilder"
    oleMail.IsHTML   = True
    oleMail.Body     = ls_html
    oleMail.AddAddress("[email protected]")
    oleMail.Send()
    oleMail.DisconnectObject()
    MessageBox("Process", "Complete!")

  • Best path for HDV video to Apple TV.

    I use a Sony HDR-HC1 HDV to record videos and need to know the path to Apple TV that will provide the best quality. I’m showing these on a 50 inch Fujitsu 1080i Plasma. I edit the video in Imovie-HD.
    Can someone tell me what the best settings are to export from iMovie-HD into Quicktime or iTunes. I understand that Apple TV doesn’t support 1080i, so I’m wondering what are the best export settings to use to achieve the highest quality video through Apple TV.
    I used to have a Roku Picture bridge that displayed exported ts files beautifully, but it died.
    Thanks for any and all advice.
    Ken

    you understand incorrectly.
    appletv supports 1080i.
    but since 1080i is only 540 lines vert resolution,
    you should probably output at 720p
    Okay, thanks for the correction.
    Do you know if I can choose to export to 720p from iMovie-HD?

  • EIGRP Maximum-Paths

    Community,
    If I have 2 or more equal cost paths to a network where EIGRP is load balancing across them by default, if i issue the "Maximum-Paths 1" command, how does EIGRP decide which path to keep in the routing table and which to get rid of? How can this be deterministic in nature?

    Hi,
    2 links for you
    EIGRP - load balancing
    http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/13677-19.html
    EIGRP Technology
    http://www.cisco.com/c/en/us/tech/ip/enhanced-interior-gateway-routing-protocol-eigrp/index.html?referring_site=bodynav
    Regards
    Alex

  • Best path for Core Data implementation

    Hi all,
    First post so pls go easy!
    I'm a seasoned Windows/Web App developer who has recently (3-4m) discovered Mac, Cocoa and Obj-C. I've been buried in Apple docs, Hillegass and Dalrymple books for some time now trying to get to the point where I'm ready to build the Cocoa project that I have in mind, which looks to be well suited to a Core Data based Application driven by SQLite. The data model is reasonably complex with around 10 inter-related entities which must retain data integrity.
    Anyway, onto the question... historically I would have built a class library to encapsulate the use of the data model and accessed that class library when events fired to do what needs to be done. The Cocoa solution appears to support this - presumably though creating my own framework that is then referenced by the Cocoa application. I can see though that there is another path where I skip the encapsulation and build a Core Data based Cocoa app directly.
    At a high level - is there a preference between the two approaches?
    The latter seems well documented/supported but I am synically thinking that is because it is more straightforward and clearly faster, are there other advantages such as performance.
    For background the app when running will follow similar form to Mail.app in terms of multi-view with some data tables and custom views in play.
    Thanks,
    Chris

    Hi K T - thanks.
    Bottom line I think is that encapsulation is a safety blanket that I probably need to let go of. CD ticks boxes on a theory level, subject to implementation not being too heavy it seems like the logical step. The only consideration was to encapsulate a framework built on the known methods, then move the framework to CD under the covers when ready - that seems a bit gutless though and almost definitely inefficient time wise. I guess that there is little point in encapsulating CD from the outset - feel like it just adds unnecessary work in addition to some degree of performance overhead?
    {quote}Are you looking for flexibility or performance, by the way?{quote}
    Performance - the data model is unlikely to change once bedded in beyond addition of properties etc very infrequently. The app is likely to need to handle many tens of thousands of rows of data (albeit small in terms of data volume per row) for some users, and my conclusion from the documentation was that SQLite is the most appropriate route if committing to CD where data volume and/or relationships are plentiful. Is that a fair assessment?
    {quote}Are you looking to mimic traditional application interfaces or to adopt trends that are currently unfolding?{quote}
    The app I plan to build desperately needs to be brought up to date - possibly even beyond the advanced UI that AppKit seems to offer by default IMO. That said I don't want to overcommit on the extent of the build, but I do want to turn heads without just slapping coverflow or similar in for the sake of it. If you have any references or examples for doable leading edge UI design on OSX they would be gratefully received.
    Thanks again for your help - really appreciate it.
    Chris

  • Ant Colony Algorithm(ACO)  for best path searching on a graph

    hello,
    i am trying to use aco alg to print shortest path from a specified source node to a destination node. i have created a graph where i have all the vertices (array of strings) and edges(neighbours) stored. I am trying to get the ants to trail randomly on the connected edges from start to dest and then return the route.please can someone give me some advice??.
    my code is as follows,...
    public class ACOLevel7 {
         private static myGraph g = new myGraph();
         public static void main(String[] args) {
              String start = "";
              String finish = "";
         ACOLevel7 p = new ACOLevel7(g,start,finish);
    /* instance variables */
         protected String[] names = g.getNames();
         protected boolean[] Edges;
         private static String istart;
         private static String idestination;
         private static int iAntSteps = idestination.length();
    private static int iColonySize = 10000;
    private static double iPheromoneStrength = 1.8d;
    private static int iEvaporationSpan = 100;
    private static double iEvaporationRate = 0.98d;
    private boolean[][] graphEdges;
    private Random iRandom = new Random();
    /* constructor */
    public ACOLevel7(myGraph g, String start, String finish) {
         Map map = new Map();
         istart = start;
         idestination = finish;
         graphEdges = g.getEdges();
         if(g.validStartAndFinish(istart,idestination)){
         double bestScore = -1;
         System.out.println("Level 7");
         System.out.println(">>> Here is your route planner! <<<");
         for (int i = 0; i < iColonySize; i++) {
         Ant ant = new Ant();
         ant.wander(map, iAntSteps);
         double score = calcScore(ant.getTrail());
         ant.dropPheromones(score);
         if (score > bestScore) {
         System.out.println(String.format(" %5d %s %4.2f", (new Object[]
         { new Integer(i), ant.print(), new Double(score) })));
         bestScore = score;
         (map).tick();
         System.out.println("\n>>> finished <<<");
         else {
              System.out.println("\n>>> start or finish not in names array<<<");
    double calcScore(AntTrail trail) {
    double score = 0;
    for (int i = 1; i <= iAntSteps; i++);
    //      Gets the next Node to travel to
    I NEED HELP HERE!!
         String String = idestination.substring(i - 1);
    return (score / 55d) * iPheromoneStrength;
    private class Map {
    /* instance variables */
    HashMap Map = new HashMap();
    Location iStart = new Location();
    /* constructor */
    public Map() {
    Map.put(iStart.getKey(), iStart);
    public Location start() {
    return iStart;
    public ArrayList to(Location fromHere) {
    // generate every vertex location that is valid from here
    ArrayList newLocations = new ArrayList();
    for (int i = 0; i < istart.length(); i++) {
    Location n = new Location(fromHere,
    String.valueOf(istart.String(i)));
    if (!Map.containsKey(n.getKey()))
    Map.put(n.getKey(), n); // add to the map
    else
    n = (Location)Map.get(n.getKey()); // existing location
    newLocations.add(n);
    return newLocations;
    public void tick() {
    Iterator i = Map.entrySet().iterator();
    while (i.hasNext())
    if (((Location)((java.util.Map.Entry)i.next()).getValue())
    .evaporate())
    i.remove();
    private class Location {
    private String iKey;
    private String iname;
    private double iPheromones = 1;
    private int iEvaporation = iEvaporationSpan;
    /* constructor: start location */
    public Location() { istartt = ""; }
    /* constructor: from another location */
    public Location(Location from, String names) {
    iKey = from.getKey() + "|" + names;
    istartt = names;
    public String getKey() {
    return iKey;
    public String getName() {
    return istartt;
    //public String getidestt(){
    public void dropPheromones(double d) {
    iPheromones += d;
    iEvaporation = iEvaporationSpan; // reset the evaporation counter
    public double getPheromones() {
    return iPheromones;
    public boolean evaporate() {
    iPheromones = iPheromones * iEvaporationRate;
    return --iEvaporation == 0;
    private class Ant {
    private AntTrail iTrail = new AntTrail();
    public void wander(Map map, int steps) {
    iTrail.addStep(map.iname());
    for (int i = 0; i < steps; i++)
    step(map);
    private void step(Map map) {
    ArrayList choices =map.to(iTrail.current());
    Location next = null;
    double span;
    // sum the available span
    span = 0;
    Iterator i1 = choices.iterator();
    while (i1.hasNext())
    span = span + ((Location)i1.next()).getPheromones();
    // choose an index value
    double index = iRandom.nextDouble() * span;
    // find the location within the span with this index
    span = 0;
    Iterator i2 = choices.iterator();
    while (i2.hasNext()) {
    next = (Location)i2.next();
    span = span + next.getPheromones();
    if (index < span) break;
    // add the chosen location to the trail
    iTrail.addStep(next);
    public AntTrail getTrail() {
    return iTrail;
    public void dropPheromones(double score) {
    iTrail.dropPheromones(score);
    public String print() {
    return iTrail.print();
    private class AntTrail {
    private ArrayList iTrail = new ArrayList();
    public void addStep(Location n) {
    iTrail.add(n);
    public Location getStep(int index) {
    return (Location)iTrail.get(index);
    public Location current() {
    return getStep(iTrail.size() - 1);
    public void dropPheromones(double score) {
    Iterator i = iTrail.iterator();
    while (i.hasNext())
    ((Location)i.next()).dropPheromones(score);
    public String print() {
    String s1 = "";
    Iterator i = iTrail.iterator();
    while (i.hasNext()) {
    String s2 = ((Location)i.next()).getName();
    if (!s1.equals("") && !s2.equals("")) s1 += "-";
    s1 += s2;
    return s1;
    Message was edited by:
    law1211

    hello,
    i am trying to use aco alg to print shortest path from a specified source node to a destination node. i have created a graph where i have all the vertices (array of strings) and edges(neighbours) stored. I am trying to get the ants to trail randomly on the connected edges from start to dest and then return the route.please can someone give me some advice??.
    my code is as follows,...
    public class ACOLevel7 {
         private static myGraph g = new myGraph();
         public static void main(String[] args) {
              String start = "";
              String finish = "";
         ACOLevel7 p = new ACOLevel7(g,start,finish);
    /* instance variables */
         protected String[] names = g.getNames();
         protected boolean[] Edges;
         private static String istart;
         private static String idestination;
         private static int iAntSteps = idestination.length();
    private static int iColonySize = 10000;
    private static double iPheromoneStrength = 1.8d;
    private static int iEvaporationSpan = 100;
    private static double iEvaporationRate = 0.98d;
    private boolean[][] graphEdges;
    private Random iRandom = new Random();
    /* constructor */
    public ACOLevel7(myGraph g, String start, String finish) {
         Map map = new Map();
         istart = start;
         idestination = finish;
         graphEdges = g.getEdges();
         if(g.validStartAndFinish(istart,idestination)){
         double bestScore = -1;
         System.out.println("Level 7");
         System.out.println(">>> Here is your route planner! <<<");
         for (int i = 0; i < iColonySize; i++) {
         Ant ant = new Ant();
         ant.wander(map, iAntSteps);
         double score = calcScore(ant.getTrail());
         ant.dropPheromones(score);
         if (score > bestScore) {
         System.out.println(String.format(" %5d %s %4.2f", (new Object[]
         { new Integer(i), ant.print(), new Double(score) })));
         bestScore = score;
         (map).tick();
         System.out.println("\n>>> finished <<<");
         else {
              System.out.println("\n>>> start or finish not in names array<<<");
    double calcScore(AntTrail trail) {
    double score = 0;
    for (int i = 1; i <= iAntSteps; i++);
    //      Gets the next Node to travel to
    I NEED HELP HERE!!
         String String = idestination.substring(i - 1);
    return (score / 55d) * iPheromoneStrength;
    private class Map {
    /* instance variables */
    HashMap Map = new HashMap();
    Location iStart = new Location();
    /* constructor */
    public Map() {
    Map.put(iStart.getKey(), iStart);
    public Location start() {
    return iStart;
    public ArrayList to(Location fromHere) {
    // generate every vertex location that is valid from here
    ArrayList newLocations = new ArrayList();
    for (int i = 0; i < istart.length(); i++) {
    Location n = new Location(fromHere,
    String.valueOf(istart.String(i)));
    if (!Map.containsKey(n.getKey()))
    Map.put(n.getKey(), n); // add to the map
    else
    n = (Location)Map.get(n.getKey()); // existing location
    newLocations.add(n);
    return newLocations;
    public void tick() {
    Iterator i = Map.entrySet().iterator();
    while (i.hasNext())
    if (((Location)((java.util.Map.Entry)i.next()).getValue())
    .evaporate())
    i.remove();
    private class Location {
    private String iKey;
    private String iname;
    private double iPheromones = 1;
    private int iEvaporation = iEvaporationSpan;
    /* constructor: start location */
    public Location() { istartt = ""; }
    /* constructor: from another location */
    public Location(Location from, String names) {
    iKey = from.getKey() + "|" + names;
    istartt = names;
    public String getKey() {
    return iKey;
    public String getName() {
    return istartt;
    //public String getidestt(){
    public void dropPheromones(double d) {
    iPheromones += d;
    iEvaporation = iEvaporationSpan; // reset the evaporation counter
    public double getPheromones() {
    return iPheromones;
    public boolean evaporate() {
    iPheromones = iPheromones * iEvaporationRate;
    return --iEvaporation == 0;
    private class Ant {
    private AntTrail iTrail = new AntTrail();
    public void wander(Map map, int steps) {
    iTrail.addStep(map.iname());
    for (int i = 0; i < steps; i++)
    step(map);
    private void step(Map map) {
    ArrayList choices =map.to(iTrail.current());
    Location next = null;
    double span;
    // sum the available span
    span = 0;
    Iterator i1 = choices.iterator();
    while (i1.hasNext())
    span = span + ((Location)i1.next()).getPheromones();
    // choose an index value
    double index = iRandom.nextDouble() * span;
    // find the location within the span with this index
    span = 0;
    Iterator i2 = choices.iterator();
    while (i2.hasNext()) {
    next = (Location)i2.next();
    span = span + next.getPheromones();
    if (index < span) break;
    // add the chosen location to the trail
    iTrail.addStep(next);
    public AntTrail getTrail() {
    return iTrail;
    public void dropPheromones(double score) {
    iTrail.dropPheromones(score);
    public String print() {
    return iTrail.print();
    private class AntTrail {
    private ArrayList iTrail = new ArrayList();
    public void addStep(Location n) {
    iTrail.add(n);
    public Location getStep(int index) {
    return (Location)iTrail.get(index);
    public Location current() {
    return getStep(iTrail.size() - 1);
    public void dropPheromones(double score) {
    Iterator i = iTrail.iterator();
    while (i.hasNext())
    ((Location)i.next()).dropPheromones(score);
    public String print() {
    String s1 = "";
    Iterator i = iTrail.iterator();
    while (i.hasNext()) {
    String s2 = ((Location)i.next()).getName();
    if (!s1.equals("") && !s2.equals("")) s1 += "-";
    s1 += s2;
    return s1;
    Message was edited by:
    law1211

  • BGP Best Path Selection Algorithm

    How is the administrative distance positioned in the bgp route decision ?
    i.e If a route is learned from iBGP with higher "local prefernece" and eBGP with lower "local prefernece" - which path will be installed in the routing table
    the path learned from eBGP or the path with higer local prefernce ?

    For your scenario the path with the higher local pref will be installed in the routing table althogh its ibgp.
    if a router recieves the same prefix from 2 neighbors 1 from ibgp and the other from ebgp
    the router will compare them with the bgp path selection algorithm
    the one that wins will be installed in the routing table with the admin distance of the kind of route it is so if the ibgp route won the path selection you will see in the routing table the admin distance of 200,if the ebgp route won you'll see 20 in the admin distance.
    so remember the ibgp/ebgp comparision is the 9th in the path selection algorithm so an ibgp route can win the path selection by (local pref weight....)
    and if the ibgp won then you'll see the ibgp admin dstance in your routing tables.

  • ACO for finding best paths on a graph.

    hello,
    i am trying to use aco alg to print shortest path from a specified source node to a destination node. i have created a graph where i have all the vertices (array of strings) and edges(neighbours) stored. I am trying to get the ants to trail randomly on the connected edges from start to dest and then return the route.please can someone give me some advice??.
    my code is as follows,...
    public class ACOLevel7 {
         private static myGraph g = new myGraph();
         public static void main(String[] args) {
              String start = "";
              String finish = "";
         ACOLevel7 p = new ACOLevel7(g,start,finish);
    /* instance variables */
         protected String[] names = g.getNames();
         protected boolean[] Edges;
         private static String istart;
         private static String idestination;
         private static int iAntSteps = idestination.length();
    private static int iColonySize = 10000;
    private static double iPheromoneStrength = 1.8d;
    private static int iEvaporationSpan = 100;
    private static double iEvaporationRate = 0.98d;
    private boolean[][] graphEdges;
    private Random iRandom = new Random();
    /* constructor */
    public ACOLevel7(myGraph g, String start, String finish) {
         Map map = new Map();
         istart = start;
         idestination = finish;
         graphEdges = g.getEdges();
         if(g.validStartAndFinish(istart,idestination)){
         double bestScore = -1;
         System.out.println("Level 7");
         System.out.println(">>> Here is your route planner! <<<");
         for (int i = 0; i < iColonySize; i++) {
         Ant ant = new Ant();
         ant.wander(map, iAntSteps);
         double score = calcScore(ant.getTrail());
         ant.dropPheromones(score);
         if (score > bestScore) {
         System.out.println(String.format(" %5d %s %4.2f", (new Object[]
         { new Integer(i), ant.print(), new Double(score) })));
         bestScore = score;
         (map).tick();
         System.out.println("\n>>> finished <<<");
         else {
              System.out.println("\n>>> start or finish not in names array<<<");
    double calcScore(AntTrail trail) {
    double score = 0;
    for (int i = 1; i <= iAntSteps; i++);
    //      Gets the next Node to travel to
    I NEED HELP HERE!!
         String String = idestination.substring(i - 1);
    return (score / 55d) * iPheromoneStrength;
    private class Map {
    /* instance variables */
    HashMap Map = new HashMap();
    Location iStart = new Location();
    /* constructor */
    public Map() {
    Map.put(iStart.getKey(), iStart);
    public Location start() {
    return iStart;
    public ArrayList to(Location fromHere) {
    // generate every vertex location that is valid from here
    ArrayList newLocations = new ArrayList();
    for (int i = 0; i < istart.length(); i++) {
    Location n = new Location(fromHere,
    String.valueOf(istart.String(i)));
    if (!Map.containsKey(n.getKey()))
    Map.put(n.getKey(), n); // add to the map
    else
    n = (Location)Map.get(n.getKey()); // existing location
    newLocations.add(n);
    return newLocations;
    public void tick() {
    Iterator i = Map.entrySet().iterator();
    while (i.hasNext())
    if (((Location)((java.util.Map.Entry)i.next()).getValue())
    .evaporate())
    i.remove();
    private class Location {
    private String iKey;
    private String iname;
    private double iPheromones = 1;
    private int iEvaporation = iEvaporationSpan;
    /* constructor: start location */
    public Location() { istartt = ""; }
    /* constructor: from another location */
    public Location(Location from, String names) {
    iKey = from.getKey() + "|" + names;
    istartt = names;
    public String getKey() {
    return iKey;
    public String getName() {
    return istartt;
    //public String getidestt(){
    public void dropPheromones(double d) {
    iPheromones += d;
    iEvaporation = iEvaporationSpan; // reset the evaporation counter
    public double getPheromones() {
    return iPheromones;
    public boolean evaporate() {
    iPheromones = iPheromones * iEvaporationRate;
    return --iEvaporation == 0;
    private class Ant {
    private AntTrail iTrail = new AntTrail();
    public void wander(Map map, int steps) {
    iTrail.addStep(map.iname());
    for (int i = 0; i < steps; i++)
    step(map);
    private void step(Map map) {
    ArrayList choices =map.to(iTrail.current());
    Location next = null;
    double span;
    // sum the available span
    span = 0;
    Iterator i1 = choices.iterator();
    while (i1.hasNext())
    span = span + ((Location)i1.next()).getPheromones();
    // choose an index value
    double index = iRandom.nextDouble() * span;
    // find the location within the span with this index
    span = 0;
    Iterator i2 = choices.iterator();
    while (i2.hasNext()) {
    next = (Location)i2.next();
    span = span + next.getPheromones();
    if (index < span) break;
    // add the chosen location to the trail
    iTrail.addStep(next);
    public AntTrail getTrail() {
    return iTrail;
    public void dropPheromones(double score) {
    iTrail.dropPheromones(score);
    public String print() {
    return iTrail.print();
    private class AntTrail {
    private ArrayList iTrail = new ArrayList();
    public void addStep(Location n) {
    iTrail.add(n);
    public Location getStep(int index) {
    return (Location)iTrail.get(index);
    public Location current() {
    return getStep(iTrail.size() - 1);
    public void dropPheromones(double score) {
    Iterator i = iTrail.iterator();
    while (i.hasNext())
    ((Location)i.next()).dropPheromones(score);
    public String print() {
    String s1 = "";
    Iterator i = iTrail.iterator();
    while (i.hasNext()) {
    String s2 = ((Location)i.next()).getName();
    if (!s1.equals("") && !s2.equals("")) s1 += "-";
    s1 += s2;
    return s1;
    }

    Presumably the thing that you want to do is to choose a path from a small number of alternatives based on some continually changing probability distribution (based on your Phermone strength)
    Consider the simple case, where you choose between two paths, one with weight 17 and one with weight 5.
    You sum the two weights, T = 17+5 = 22
    You generate a random number between 1 and 22
    and if it is less than 17 you choose the first path and if it is greater you choose the other path. Given the uniform distribution of your random numbers you have choosen the first path 17/22nds of the time.
    In more general terms, without integer weights
    You have a collection of n weights, Wi, you total them, T
    You choose a random number, R, between zero and T (i.e. choose a random number between 0 and 1 and multiply by T) This effectively normalizes your distribution.
    Then you subtract W1 from R. If the result went below zero your value was less than W1 so you take path1, if not, subtract W2 from R (R has already been reduced by W1 so what you are testing is whether your original random number was between W1 and W2) if it goes below zero take path 2, ...
    Go through the weights in order until you get a result below zero.
    This is the classical algorithm to select an alternative from a small number of possible alternatives where each alternative has a known probability of being selected.
    I hope that helped. I did not actually read your code to see what you are doing, I just looked at the comment prior to the I NEED HELP HERE and made a guess as to what your problem was.
    In the future, you will be more likely to get help quickly if you summarize your problem rather than just posting a wad of unreadable code.
    So if I answered your question, your welcome, if not, well perhaps you can take a little more effort to explain your problem so that we don't have to work so hard to figure out what you want.
    I am assuming that you know about the Random class and actually know how to generate simple random numbers. You see, you really didn't tell us what your problem is and where you need help, and thus force us to make assumptions.

  • Best Path to Take Towards Writing Music Apps

    Hi all...
    my long term goal for learning to code is create music applications. I know I need to take baby steps towards this, though I'm not sure what those are. The ultimate goal is to create java based sequencer, like to make beats and stuff. so questions:
    1) what "path" should I take in java progress? I hear people saying there are different roads to take
    2) any resources anyone can point me to? is there some community of java music programmers? any libraries I should have to work with?
    thanks in advance, peeps

    outstretchedarm wrote:
    Hi all...
    my long term goal for learning to code is create music applications. I know I need to take baby steps towards this, though I'm not sure what those are. The ultimate goal is to create java based sequencer, like to make beats and stuff. so questions:
    1) what "path" should I take in java progress? I hear people saying there are different roads to take
    The one true path is the longest road. It's a rough road but the vistas are magnificent.
    Learn the language from the ground up.
    2) any resources anyone can point me to? is there some community of java music programmers? any libraries I should have to work with?
    probably. But you're not ready to think about that yet. First learn the language properly.
    And define what you mean by "music applications".
    Something to play music, and if so what format music (CDs, midi, other formats?)?
    Something to create music, and if so sheet music, midi files, other formats?
    Something maybe to mix recordings?

  • Sattelite vs 3g (best path based on signal)

    Hello.
    I have a C819HGW+7-E-K9 running 15.2T.
    My client wants to have simultaneously a satellite connection and a 3G VPN connection. We have a default route via satellite (we connect to the HQ via site to site tunnel) and via 3G we receive EIGRP updates (DMVPN) containing routes internall to the organization.
    If I have both connection up, I will allways use 3G even if satellite has better coverage.
    Does anyone know how can I choose diferent connections based on 3G and satellite signals? One ideia is to use event manager to shut the interface tunnel heading to 3G if signal was below Xdbm.
    I think is hard to configure something to compare diferent signal since it woul imply "if" and "then" configuration.
    Please reply if you have a diferent ideia from the one that I gave.
    Regards,
    Joao.
    P.S. - where can I find the MIB that will allow me to see the dbm in interface cellular?

    Hi Pete,
    Sure, comparing phones is a good thing to do when making a purchase decision.
    However, many of these articles (including this one) are trying to validate the lack of 3G on the iPhone. The article starts with this question and tries to prove it doesn't:
    But the question left unasked has been, "Does 3G really improve the user experience?"
    Well, of course it does. If nothing else, not having incoming calls go to voicemail while you're surfing the web or YouTube, certainly improves the experience. And only having to wait a fraction of the time for a webpage. Obviously you'll get more use out of it, just as you get more use out of a EDGE iPhone than one that only could do GPRS.
    Again, all the same criticisms were used against EDGE when it came out... battery, cpu can't keep up, you name it. All true, but just as meaningless in the end.
    Regards.

Maybe you are looking for

  • How can I remove an older version of Creative Suite while deploying Creative Suite 6

    After you build an install package using the Adobe Application Manager Enterprise is there a way it can be deployed to upgrade an older version of Creative Suite.   In my organization we do not need both versions and I have about 100 machines to depl

  • Error Logs generating

    Hi, SCRIPTS: Error Log is generating in Spool. Can you please advise me where is the problem and how to solve this. Best Regards, Maruti

  • WCS password reset

    Hi all, I'm very new to WCS and the bloke that configured the bludger has left the company.  I'm trying to get into it but I don't have the correct username/password combination. My query is:  How does one do a password reset on a WCS server?  Or fai

  • New mbp with black spots on unibody

    I just got my new macbookpro no less than a week, and have barely used it much.  But there have been tiny black and white spots here and there on the aluminum that I can't even get off.  Should this warrant for a new cover?

  • Gnome-shell extremely laggy after first login with xf86-video-ati

    Hello! I've recently switched from Catalyst to the open-source ati driver. However, after the switch gdm is extremely laggy after being started up on boot (using gdm.service) and after login gnome-shell is laggy as well. If I kill gdm or logout, the