Originally posted by: SystemAdmin
[toronbing said:]
I need to solve a series of linear programs dynamically.
For example, there are ten POSSIBLE constrains: con1, ..., con10. Each linear program will only use a number of constraints.
For example, I need to solve
Linear Program 1, using con1, con3, and con9.
Linear Program 2, using con1, con5, and con10.
Linear Program 3, using con3, con5, and con10.
How can I add and delete rows dynamically?
To delete rows, I will just use cpxdelrows.
To add rows, cpxaddrows does NOT work, since it always add the new row at the end of the original rows. What I want is to insert the new row among the original constraints according to the order con1, con2, ... con10.
What function shall I use?
#CPLEXOptimizers#DecisionOptimization