Deletes the edge connecting this agent to a given agent, or from this agent to a list of agents, within a given network.
delete_edge_to(network, agent) delete_edge_to(network, agent-list)
If an edge exists in the given network from the current agent to a given agent ID, then the edge is deleted. Otherwise, the action has no effect. If the second argument is a list expression, then edges from the current agent to each agent in the list are deleted.
For undirected networks, because direction does not matter, both
delete_edge_to() have the same effect of
deleting an undirected edge between the current and other agents.
The name of the network to manipulate.
An expression that evaluates to the ID of an agent.
A list of agent ids.
If there is a directed network named
NETWORK with three agents,
agent3, with agent ids,
respectively, connected with an edge from agent1 to agent2 and another edge
from agent1 to agent3, then the edge from agent1 to agent2 can be deleted with
the following action rule:
if (id == id1) then delete_edge_to(NETWORK, id2)
In the same scenario described above, both connections can be deleted with the action rule:
if (id == id1) then delete_edge_to(NETWORK, list(id2,id3))
add_edge_from(), add_edge_to(), delete_edge_from(), is_connected_from(), is_connected_to()