Learn R Programming

rLindo (version 8.0.1)

rLSaddScenario: Add a new scenario block to the SP model.

Description

R interface function for LINDO API function LSaddScenario. For more information, please refer to LINDO API User Manual.

Usage

rLSaddScenario(model,jScenario,iParentScen,iStage,dProb,nElems, paiRows,paiCols,paiStvs,padVals,nModifyRule)

Arguments

model
A LINDO API model object, returned by rLScreateModel.
jScenario
Index of the new scenario to be added.
iParentScen
Index of the parent scenario.
iStage
Index of the stage the new scenario branches from its parent.
dProb
The scenario probability.
nElems
Number of stochastic parameters realized at stage iStage in the new scenario.
paiRows
An integer array containing the row indices of stochastic parameters.
paiCols
An integer array containing the column indices of stochastic parameters.
paiStvs
A double array containing indices of stochastic parameters in instruction list.
padVals
A double array containing values of stochastic parameters.
nModifyRule
A flag indicating whether stochastic parameters update the core model by adding or replacing.

Value

An R list object with components:
ErrorCode
Zero if successful, nonzero otherwise.

References

LINDO SYSTEMS home page at www.lindo.com