Question: Given the language $L = \{w \in \{a,b\}^\* \, | \, |w| = n \cdot \sqrt{n} \text{ and } n \geq 42\}$ and the assignement to proof that $L \notin CFL$ with the Pumping lemma. 

Assuming $L \in CFL$, would it be possible to start with defining a language $L' := L \cap a^+$ which has to be context-free since $CFL$ is closed under intersection with $REG$. 
Now I would have to proof that $L' = \{w \in a^+ \, | \, |w| = n \cdot \sqrt{n} \text{ and } n \geq 42\}$ isn't regular because the alphabet contains only one symbol. 

Let $k$ be the constant of the Pumping lemma and $m > k$ and $m > 42$. So $z = a^{m^2\cdot\sqrt{m^2}} = a^{m^3} \in L'$.

$|z| = |uvw| = m^3 ...$ 

How to continue?

Answer: 
This problem cannot be solved using a (modified) Floyd-Warshall Algorithm. The underlying assumption in F.-W. is that all paths arriving at a given node can be extended along the *same* path to the destination. Therefore choosing the shortest path that arrives at a node is also optimal for all paths that pass *through* the node. By adding the fuel constraint, this assumption is broken.

More generally, problems of this form are called the Resource-Constrained Shortest Path Problems and are, in general, $\mathcal{NP}$-hard. A generic solution to this problem is to enumerate all feasible paths that lead to any node in the graph, which obviously leads to exponential time complexity. In practice, "dominance" rules are applied to prune partial paths that are clearly inferior to other partial paths; in your case such a dominance rule could be to throw away all paths arriving at a node with more refills and less fuel than another path arriving on the same node.
I think you can run BFS or DFS method $N$ times for each vertex as a source, where $N$ is the number of vertices. The thing you should consider is the fact that each state in BFS or DFS method comprises two items. The first one is the vertex number and the second is the remaining fuel. Let state $(3, 50)$ denote we are in vertex $3$, and the remaining fuel is $50$. If vertex $4$ is an adjacent vertex, and the required fuel for the path $3 \to 4$ is $60$, then refueling is required.
On the contrary, if fuel for the path $3 \to 4$ was $40$, we could reach vertex $4$ with state $(4, 10)$.