Lade...
 

CX_ACCESS_NODE::FindRouteToObject

CX_ACCESS_NODE::FindRouteToObject

Beschreibung:

Die Methode findet den optimalen Weg zwischen den

CX_ACCESS_NODEs. Ein optimaler Weg ist der Weg mit einem Minimum an Kosten (siehe CX_ACCESS_WAY::edgeWeight).

 

Code-Beispiel:

Var(origin, goal, totalWeight)

 

// Construct the graph
. . .
-> origin // starting point

-> goal   // end point

0$ -> totalWeight  // total costs of the optimal way (supposing CX_ACCESS_WAY::edgeWeight is describing costs in $)
 

goal totalWeight origin Call(FindRouteToObject)

FillObox(win, route) // display the optimal way

totalWeight PutValue(win, totalWeight) // display the total costs for this way
 

 

 

Window(win, ....)
{

  ObjectListView(route, AUTO_POSITION, ... )
  [
    INITIALIZE:
[ "CX_ACCESS_WAY::accessNode.uniqueID" HEADER T("next node") ] SetFormat

               

[ "CX_ACCESS_WAY::edgeWeight" HEADER T("weight") ] SetFormat

  ]

  String(totalWeight, ...)
}
 

Stack
Stack Position Objekttyp Kurzbeschreibung
Stack(In) Top CX_ACCESS_NODE Startobjekt der Suche
  Top-1 CX_INTEGER / CX_NUMERIC / CX_VALUE oder NULL optional: Summe der Wegekosten für den gefundenen Weg
  Top-2 CX_ACCESS_NODE Zielobjekt
Stack(Out) Top VECTOR<OBJECT> der gefundene Weg als Vektor von CX_ACCESS_WAY-Objekten

Funktionsaufruf: Call(FindRouteToObject)