  We suggest to generalize the dark energy equation of state (EoS) by
introduction the relaxation equation for pressure which is equivalent to
consideration of the inhomogeneous EoS cosmic fluid which often appears as the
effective model from strings/brane-worlds. As another, more wide generalization
we discuss the inhomogeneous EoS which contains derivatives of pressure. For
several explicit examples motivated by the analogy with classical mechanics the
accelerating FRW cosmology is constructed. It turns out to be the
asymptotically de Sitter or oscillating universe with possible transition from
deceleration to acceleration phase. The coupling of dark energy with matter in
accelerating FRW universe is considered, it is shown to be consistent with
constrained (or inhomogeneous) EoS.
