Skip to content

edges

Syntax

edges = <file-with-edge.csv>

Parameters

file-with-edges.csv
A comma-separated file with at least three columns.

Description

This network property reads in a set of initial edges for the network from a csv file. Each row of the file must have the format:

<from-agent-id>, <to-agent_id>, <edge-weight>

where the first two fields are agent IDs and the the third field is a numeric value.

Note

If the network is undirected, two edges are added for each row in the file, one in each direction. Both edges have the same weight.

Examples

The following creates a network with two edges, one from agent 123 to agent 456, and one from agent 456 to agent 789. In adition, edges are read from each line in the file my_edges.csv:

network  MyNet {
    edge = 123, 456, 1.0
    edge = 456, 789, 0.5
    edges = my_edges.csv
}

See Also