The index of the non zero $\phi_{k,c}$ variable is given by a variable $x_{k,c} \in \mathbb{R}^+$ with constraint
$$
x_{k,c} = k \cdot \phi_{k,c} \quad \mbox{for each $k,c$} \tag{1}
$$
You want the minimum of all (non zero) $x_{k,c}$ variables. You can introduce variable $z_c \in \mathbb{R}^+$ and add constraint
$$
z_c \le x_{k,c}+9(1-\phi_{k,c}) \quad \mbox{for each $k,c$} \tag{2}
$$
You can maximize $z_c$ to make sure that $z_c$ actually reaches one of the $x_{k,c}$ variables.
But this may not be possible (depending on the nature of your problem which is not explicitly described). In this case you can define extra binary variables $\delta_{k,c} \in \{0,1\}$ that take value $1$ if $z_c$ matches value $x_{k,c}$ and add constraints
\begin{align}
x_{k,c} - k(1-\delta_{k,c}) &\le z_c \quad &\mbox{for each $k,c$} \tag{3} \\
\delta_{k,c} &\le \phi_{k,c} \quad &\mbox{for each $k,c$} \tag{4} \\
\sum_{k} \delta_{k,c} &= 1 \quad &\mbox{for each $c$} \tag{5} \\
\end{align}
Equation $(5)$ enforces that exactly one of the $\delta_{k,c}$ variables takes value $1$, thus enforcing with $(3)$ that exactly one index $x_{k,c}$ is reached by $z_c$. Constraint $(4)$ makes sure that $\phi_{k,c}=0 \implies \delta_{k,c} = 0$.
Here is small example of how to achieve this with PuLP (for a unique value $c$ which is implicit in what follows):
import pulp
import random
sequence length
N = 9
problem definition
prob = pulp.LpProblem("first_one", pulp.LpMaximize)
variables
phi = pulp.LpVariable.dicts("sequence", [k for k in range(1,N+1)], cat=pulp.LpBinary)
x = pulp.LpVariable.dicts("index", [k for k in range(1,N+1)], lowBound=0, cat=pulp.LpContinuous)
z = pulp.LpVariable("z", lowBound=0, cat=pulp.LpContinuous)
objective function
prob += z
constraints
for k in x:
# define the index of non zero phi variables
prob += x[k] == kphi[k]
# capture smallest index of non zero phi variable
prob += z <= x[k] + N(1-phi[k])
randomly force 3 phi variables to take value 1
for _ in range(3):
k = random.choice([_ for _ in range(1, N+1)])
prob += phi[k] == 1
solve problem
prob.solve()
display phi variables
for k in phi:
print(k,pulp.value(phi[k]))
display smallest index of non zero phi variable
print("smallest index: ",pulp.value(z))
param K integer > 0;and thenvar phi {1..K} binary;andvar kmin in 1..K;. Then specify the constraint bysubj to kminDefn: kmin = min {k in 1..K} (k*phi[k] + K*(1-phi[k]));. To keep the example simple, I have left out the indexc, but you could introduce it by adding another index set forphiandkmin. (Applying min to an expression involving variables will work with the newer versions of AMPL MIP solvers.) – 4er Dec 27 '23 at 15:41