This paper presents a linear programming optimization algorithm with changeable weighting factors for reaching maximum revenue in the peak-value duration of the PV power and electricity price in a smart Vehicle-to-Grid (V2G) system. In order to render an accurate revenue assessment, the EV battery wear model is also taken into consideration through the parameters including the equivalent daily discount, estimated cycle life, the battery capital cost and battery salvation value. Moreover, a linear objective function is proposed by exerting the forecasted PV power profile to constitute the dynamic weighting factors for the EV battery power variables. The comparative simulation results in MATLAB/Simulink verify that the proposed dynamic optimization algorithm can reach its maximum revenue in three times i.e., the peak-value duration of the PV power, the peak-value duration of electricity price and the end of the simulation. In addition, the results affected by the EV battery wear model are presented.