<｜begin▁of▁sentence｜>### Instruction:
Imagine you're orchestrating a transportation network where the trucks represent nodes and the routes between them carry certain weights based on, say, distance or cost. Your fleet consists of three main hubs: Hub0, Hub1, and Hub2. You have routes running between these hubs as follows: a route from Hub0 to Hub1 costing $2 for transit, a general route from Hub1 to Hub0 without a specified cost, and two routes that start and end at Hub2—one with a $3 cost and the other without any specific cost assigned to it.

To streamline your logistics operation, you're interested in creating a matrix that encapsulates this network, with an eye towards easy visualization of the costs and connections between each hub. In network terms, you would like to convert this list of routes and hubs into an adjacency matrix using NetworkX tools.

Given the specification of your network, how would you apply the 'to_numpy_array' function from NetworkX to yield this matrix? Your node list to work with corresponds to your hubs: [Hub0, Hub1, Hub2]. Could you reframe the edge set and the nodelist within a practical logistics scenario by framing it as a request for our team to generate the matrix? The scenario needs to remain true to the original data points provided: edge set { (0, 1, weight=2), (1, 0), (2, 2, weight=3), (2, 2) } and nodelist [0, 1, 2].
### Response:
import networkx as nx
import numpy as np

# Create a directed graph with weighted edges
G = nx.MultiDiGraph()
G.add_edge(0, 1, weight=2)
G.add_edge(1, 0)
G.add_edge(2, 2, weight=3)
G.add_edge(2, 2)

# Specify nodelist for ordering
nodelist = [0, 1, 2]

# Convert graph to NumPy adjacency matrix
A = nx.to_numpy_array(G, nodelist=nodelist, dtype=float, order='C', multigraph_weight=sum, weight='weight', nonedge=0.0)

# Print the adjacency matrix
print(A)
<|EOT|>
