I've been reading some literature on opinion dynamics models that aim to describe how agents' opinions change after interacting with each other. A classical model (from this paper) for describing how agent $n$'s opinion, denoted by $x_n(t)\in[0,1]$, moves closer to agent $m$'s opinion, denoted by $x_m(t)\in[0,1]$, is as follows:
$$x_n(t+1) = x_n(t) + \mu (x_m(t) - x_n(t))$$
where $\mu$ is a parameter assumed to be in $[0,1/2]$.
I am trying to find a simple analogous equation describing a repulsion force between two agents. To help with this derivation, I have drawn a physical analogy describing the qualitative interaction between two objects that I am seeking. Consider a fixed object (the blue block) at position $a$ and a movable red block initially at position $b$.
The repulsion equation should capture the qualitative behavior depicted in the following two figures.
In particular, in the first figure, note that when the two blocks are close together, the red block which is pushed to $b'$, far from its initial position $b$. In the second figure, when the two blocks are initially far apart, the red block only moves slightly, from $b$ to $b'$. Note that the updated position of the red block needs to remain within the bounded interval (i.e., less than $1$).
Question: What is a simple equation, analogous to the attraction equation above, for describing the repulsion between two objects on a bounded interval?