Dear all,
I am modeling the operating feature of a device capturing CO2 from the atmosphere. The function of the device is explained as follows. We assume that 96 time intervals in a day and one interval takes up 15min. The device can operate several cycles in one day. A thorough cycle should be finished to capture CO2 when the device works. A cycle of the device takes up three time intervals, that is, 45mins. In one cycle, there are two processes, which can be called process A and process B. Process A takes up one time interval (15min) and process B takes up two time intervals (30min). Process A and process B should be continuous (i.e., process B after process A). The mass of captured CO2 in a cycle is a variable, and the values of the variable in three intervals in a cycle equal (because a quantity of CO2 should experience both processes before it is fully captured).
I wrote a code that can realize the logic of the cycle in one day. You can find the code in the attachment. In the code, I use three kind of binary variables to describe the logic, that is, operating status (I_A and I_B), startup status (SU_A and SU_B) and shutdown status (SD_A and SD_B). However, I have no idea how to make the mass (m_CO2) equal in three time intervals in the same cycle (the value of m_CO2 in different cycles can be different). Can you please help me with this modeling problem? In brief, I wonder how to realize the following logic:
if SU_B(t) = 1
then m_CO2(t-1) = m_CO2(t) = m_CO2(t+1);
Thanks in advance!
Best regards
Gray Lee
UC_test.gms (1.86 KB)