Set $I_n = \{0,\ldots,n-1\}$.
Given integers $v_0,\dots,v_{n-1} \in \mathbb{N}$, find an integer $t>0$, a map $f:\mathbb{N} \times I_n \to \mathbb{N}^t$, and a well-founded order $>_t$ on $\mathbb{N}^t$ such that: $$\forall i \in I_n, m \in \mathbb{N}. f(m,i) >_t f(m+v_i,i+_n 1)$$
where $+_n$ is addition in $\mathbb{Z}_n$ and $v_0+\dots+v_{n-1}<0$. Is there an efficient algorithm to do that?
Explanation and motivation
The directed weighted graph $0 \stackrel{v_0}\to 1 \stackrel{v_2}\to \ldots \stackrel{v_{n-2}}\to n-1 \stackrel{v_{n-1}}\to 0$ describes how a magnitude $m \in \mathbb{N}$ varies. For transition $i \stackrel{v}{\to} j$, $m$ gets updated with $m+v$. It must hold that $\sum_{i = 1}^n v_i < 0$. Consider the following problem:
Give an assignment of values in $\mathbb{N}^t$ to nodes and an order that decreases at each transition. That is, if $\text{nodes} = \{0,\ldots,n-1\}$, I want to build a map $f:\mathbb{N} \times \text{nodes} \to \mathbb{N}^t$ with $t > 0$ satisfying: $\forall i \in \text{nodes}. f(m,i) >_t f(m+v_i, i +_n 1)$ where $>_t$ is a well-founded order on $\mathbb{N}^t$.
Is there an algorithm that can built such an $f$ and $<_t$?
Example (my try):
Assume you have the following chain is given:
$1 \stackrel{+3}{\to} 2 \stackrel{-2}{\to} 3 \stackrel{-2}{\to} 1$
In this case, $+3-2-2 = -1 < 0$.
Let's start at 1.
Since $m$ increases, I will annotate measure $(2,m)$ in $1$ and measure $(1,m)$ in $2$ so that lexicographic order decreases.
At $2$, measure $m$ decreases so I can leave annotation $(1,m)$ as it was.
At $3$, measure $m$ decreases so I can copy annotation $(1,m)$ from $2$.
Coming back to $1$, I have a problem, since I had annotated $(2,m)$ before, but now I have annotated $(1,m)$ and these are clearly different measures.
Can you help me out of this problem?
Note on the meaning of the specification
Just to make sure the specification matches my needs, the problem tries to model how some quatity $m$ varies in a loop of successive function applications. The functions form a loop that ends at $0$. It is guaranteed that when traversing the whole loop, quantity $m$ decreases (according to the variations $v_i$). In each function one have to check that in the next call certain measure $f$ (depending on the parameter $m$) decreases.