XSLPloaddcs
PurposeLoad delayed constraints (DCs) into the SLP problemSynopsisint XPRS_CC XSLPloaddcs(XSLPprob Prob, int nSLPDC, int *RowIndex, int *Delay, int *DCStart, int Parsed, int *Type, double *Value);Arguments
Prob The current SLP problem. nSLPDC Number of DCs to be loaded. RowIndex Integer array of the row indices of the DCs. This respects the setting of XPRS_CSTYLE. Delay Integer array of length nSLPDC holding the delay after initiation for each DC. DCStart Integer array of length nSLPDC holding the start position in the arrays Type and Value of the formula for each DC. The DCStart entry should be negative for any DC which does not have a formula to determine the DC initiation. Parsed Integer indicating the whether the token arrays are formatted as internal unparsed (Parsed=0) or internal parsed reverse Polish (Parsed=1). Type Array of token types providing the description and formula for each item. Value Array of values corresponding to the types in Type.ExampleThe following example loads rows 3 and 5 as the list of delayed constraints. Row 3 is delayed until 2 SLP iterations after column 12 becomes nonzero; row 5 is delayed for 10 SLP iterations from the start (that is, until SLP iteration 11).int RowIndex[2], Delay[2], DCStart[2], Type[2]; double Value[2]; RowIndex[0] = 3; Delay[0] = 2; DCStart[0] = 0; Type[0] = XSLP_COL; Value[0] = 12; Type[1] = XSLP_EOF; RowIndex[1] = 5; Delay[1] = 10; DCStart[1] = -1; XSLPloaddcs(Prob, 2, RowIndex, Delay, DCStart, 1, Type, Value);Note that the entry for row 5 has a negative DCStart because there is no specific initiation formula (the countdown is started when the SLP optimization starts).
Further informationThe XSLPload... functions load items into the SLP problem. Any existing items of the same type are deleted first. The corresponding XSLPadd... functions add or replace items leaving other items of the same type unchanged.
The token type and value arrays Type and Value follow the rules for parsed or unparsed formulae. For possible token types and values see the chapter on "Formula Parsing". Each formula must be terminated by an XSLP_EOF token.
Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.