General Equilibrium Modelling I have a question regarding GE modelling.
The firm's problem is to:
$$
\max\pi=pf(k,l)-wl-rk
$$

If this is true, we choose $l$ and $k$ to maximize the difference
between costs and revenues. This yields the familiar FONCs for $l$
and $k.$ However, in equilibrim, we set the profits equal to 0. 

My intuition tells me that after we solve the above problem, the equilibrium
condition implies our selecting a price $p$ such that $\pi$ equal
$0$ in equilibrium. Is this correct?
In a typical GE model, price (including wage and rent) is determined by the market clearing condition, which requires that supply equals demand. Specifically, 


labor supplied (determined by household solving utility maximization problem) equals labor demanded (determined by firm's profit maximization problem)
goods supplied (determined by firm's optimal total production) equals goods demanded (determined by household's consumption and investment decisions)
capital supplied (household's investment decision) equals capital demanded (firm's optimal choice of $k$)


The zero-profit condition is derived from the assumption of perfectly competitive behavior (or both firms and households are price takers). This condition may contribute to the determination of equilibrium prices. But to say that $p$ is selected to ensure zero-profit of the firm just sounds incorrect.