> Earlier Andrew Makhorin wrote (in relation to a Sudoku > problem) (Message-ID: <[EMAIL PROTECTED]>):
>> Try using the option '--intopt' to enable the >> mip presolver. It may reduce the problem size by >> removing redundant rows and columns. > I am working on a relatively literal energy system > simulation. Part of the model involves > interconnected units transacting electricity, > natural gas, district heat, and so on. Ultimately > a (directed acyclic) patchwork of classical > network flow problems needs to be solved -- > together with a refinement to avoid low duty (less > than say 50%) usage which thereby introduces binary > variables to cover the shut-down status. > The simulation generates a suitable GLPK problem > using the GLPK C-language APIs. > It would make my C++ coding easier if I could > populate this model with a lot of trivial constraint > equations which simply match the flows between units. > For instance: > flow-from-generator = flow-to-transmission-line > Is this sensible or would I be better advised to > be resolve these variables before building the > GLPK problem? > Or will the following setting (GLPK 4.11 API) > reduce the problem automatically: > lpx_set_int_parm(my_lpx, LPX_K_PRESOL, 1); The efficiency of the lp presolver signficantly depends on the structure of the problem to be presolved. However, if your model is LP, not MIP, I think it is normal to build it in a natural way without any preliminary transformations, even if that would lead to redundant rows and columns or increase the number of them. In particular, it is normal *not* to resolve trivial constraints, because the lp presolver can do that. > And will I need to introduce some special > variables to cover gas supply from Russia? :-) Only if you want the objective function to be unpredictable. ;) Andrew Makhorin _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
