Functions from a lattice to $[0,1]$ Let $\mathcal L$ be a bounded modular lattice. Suppose also that $\mathcal L$ is complete and upper-continuous (i.e. for any directed subset $\{x_i:i\in I\}$ of $\mathcal L$ and any $x\in \mathcal L$, 
$x\wedge\bigvee_{i\in I}x_i=\bigvee_{i\in I}(x\wedge x_i)$).
Is there any known sufficient condition for $\mathcal L$ to admit an order-preserving function $f\colon\mathcal L\to [0,1]$, such that:


*

*$f(x)=0$ if and only if $x=0$;

*if $a\leq b$ in $\mathcal L$, $f(a)=f(b)$ implies $a=b$;

*$f$ commutes with (possibly infinite) joins of directed families.


Is there any known structure theorem for lattices admitting such a map?
Of course, the obvious case is when $\mathcal L$ is an atom, in which case $\mathcal L\cong\{0<1\}$. I am much more interested in situations where the image of $f$ is a dense subset of $[0,1]$.

Motivating Example. Let $D$ be an Archimedean valuation domain, and denote by $v:D^*\to \mathbb R_{\geq0}$ the valuation on $D$. It is possible to define a function $L_v:Mod(D)\to \mathbb R_{\geq0}\cup\{\infty\}$ via the following steps:


*

*given an ideal $I$ of $R$, let $v(I):=\inf\{v(d):d\in I\}$;

*given a finitely generated right $D$-module $F$, let $\{x_1,\dots,x_n\}$ be a generating set with the minimum possible cardinality. Define inductively 


*

*$F_0=0$; 

*$F_1=x_1D$;

*if $F_k$ is defined for some $k<n$, then let $F_{k+1}=F_k+x_{k+1}D$; 



in particular $F_n=F$. Let also $B_j=Ann(x_j+F_{j-1})=\{d\in D: x_jd\in F_{j-1}\}$. We let 
$$L_v(F)=v(B_1\cdots B_n)\,;$$
 3. for a given right $D$-module $M$, we let $L_v(M)=\sup\{L_v(F):F\leq M\text{ finitely generated}\}$.
One can prove that $L_v$ is additive on short exact sequences (i.e. $L_v(B)=L_v(A)+L_v(C)$ if $0\to A\to B\to C\to 0$ is exact) and it is upper-continuous (i.e. $L_v(M)=sup_iL_v(M_i)$ when $M=\bigcup_iM_i$ with $\{M_i\}$ a directed set of submodules of $M$). 
Using these properties, one can see that 
$$Ker(L_v):=\{M\in Mod(D):L_v(M)=0\}$$
is a hereditary torsion class, and so we can define a new category
$$\mathfrak A:=Mod(D)/Ker(L_v)$$
as the Gabriel quotient of $Mod(D)$ over $Ker(L_v)$. Let $Q_v\colon Mod(D)\to \frak A$ be the quotient functor. The function $L_v$ induces a new function 
$$\bar{L_v}\colon \mathfrak A\to \mathbb R_{\geq0}\cup \{\infty\}$$
just letting $\bar{L_v}(X)$ be $L_v(M)$ for any $M\in Mod(D)$ such that $Q_v(M)=X$. This new function has the same additivity and upper-continuity properties of $L_v$ and, furthermore, it has the property that $\bar L_v(X)=0$ iff $X=0$.
All the objects $X\in \mathfrak A$ such that $\bar {L_v}(X)<\infty$ do have a lattice of subobjects with the properties described in the question (the wanted function to $[0,1]$ is just a rescaling of the values of $\bar L_v$ on subobjects).
 A: Mathematical economists have been interested in special cases of the following general question, which they call "existence of utility representations."
$\quad$ Given $(X, \precsim)$ an ordered set, when does there exist a strictly increasing function $f: X \to \mathbb R$?
A classical result is that for $\precsim$ a complete preorder (total, transitive; not necessarily antisymmetric), it is necessary and sufficient that $X$ has a countable order-dense subset, and furthermore $f$ can be taken continuous with respect to the interval topology on $X$ and standard topology on $\mathbb R$. The first statement of this was Debreu (1954) (N.B. the proof in that paper has a nontrivial error.)
Economists tend to be interested in how structural axioms on the preorder translate to canonical functional forms for $f$ (and how to interpret these axioms), but it looks like others have continued this line of research in other directions.
Here's a recent paper that looks like it gives a general answer to your question (e.g. Theorem 3.1).
$\quad$ Continuous Utility Representation Theorems in Arbitrary Concrete Categories 
$\quad$  Bosi, G. & Herden, G. Appl Categor Struct (2008) 16: 629. doi:10.1007/s10485-007-9097-0
I don't know if the characterization will be useful for your purposes, and don't know the non-economics literature well, but it seems to exist.
