The integration of electric vehicles (EVs) and renewable energy sources (RES), which are important key elements of green and sustainable energy, into power systems has become a crucial research subject in recent years due to their uncertain nature. Demand response (DR) strategies are expected to play a crucial role in the penetration of EVs and RESs. However, in order to improve the participation of EV owners in DR programs, their comfort should also be considered. In this study, a model was devised in the form of mixed-integer linear programming (MILP) that aims to mitigate the comfort violation of EV owners during vehicle-to-grid (V2G) and peak load limitation (PLL) operations through vehicle-to-vehicle (V2V) transactions and photovoltaic (PV) production in an electric vehicle parking lot (EVPL). A Machine learning (ML) based structure has been implemented using Long Short-Term Memory (LSTM) cells, a special type of recurrent neural network (RNN), to cope with the uncertainty of PV production and the uncertainty of EVs arrival times at EVPL. The results have shown that V2V transaction and PV generation may play an important role in terms of minimizing comfort violation during DR operations. All applications are developed in Python programming language.