! Open model
SPECIAL>LOADMODEL|BALCS for analysis A.mdl


! Run standard scenarios w/orig Sterman et al. parameters

! conservative strategy vs. conservative opponent (model default)
SIMULATE>RUNNAME|CC
SIMULATE>READCIN|
MENU>RUN|o
MENU>VDF2TAB|!|!

! aggressive strategy vs. conservative opponent (model default)
SIMULATE>RUNNAME|AC
SIMULATE>READCIN|AC.cin
MENU>RUN|o
MENU>VDF2TAB|!|!

! aggressive strategy vs. aggressive opponent (model default)
SIMULATE>RUNNAME|AA
SIMULATE>READCIN|AA.cin
MENU>RUN|o
MENU>VDF2TAB|!|!

! Generate synthetic data

! short data
SIMULATE>RUNNAME|DataShort
! adjust parameters to generate synthetic data
! set parameters to unknowns
! add noise
SIMULATE>READCIN|DataGenerate.cin
! set a short time available
SIMUlATE>SETVAL|FINAL TIME=8
MENU>RUN|o

! longer data
SIMULATE>RUNNAME|DataLong
! adjust parameters to generate synthetic data
! set parameters to unknowns
! add noise
SIMULATE>READCIN|DataGenerate.cin
! set a long time available
SIMUlATE>SETVAL|FINAL TIME=20
MENU>RUN|o

! restrict the variables available in the data by exporting with a savelist and re-importing
MENU>VDF2DAT|DataLong.vdfx|DataLong.dat|keyvars.lst
MENU>VDF2DAT|DataShort.vdfx|DataShort.dat|keyvars.lst
MENU>DAT2VDF|DataLong.dat|DataLong.vdfx
MENU>DAT2VDF|DataShort.dat|DataShort.vdfx


! Calibrate

! ordinary unweighted payoff, short data
SIMULATE>RUNNAME|CalShortUnwt
SIMULATE>READCIN|base.cin
SIMULATE>PAYOFF|IndustryOrders.vpd
SIMULATE>OPTPARM|IndustryParams.voc
SIMULATE>DATA|DataShort.vdfx
MENU>RUN_OPTIMIZE|o
MENU>VDF2TAB|!|!

! ordinary unweighted payoff, long data
SIMULATE>RUNNAME|CalLongUnwt
SIMULATE>READCIN|base.cin
SIMULATE>PAYOFF|IndustryOrders.vpd
SIMULATE>OPTPARM|IndustryParams.voc
SIMULATE>DATA|DataLong.vdfx
MENU>RUN_OPTIMIZE|o
MENU>VDF2TAB|!|!

! repeat with short data, reweighted payoff with prior on discard rate & compute confidence bounds
SIMULATE>RUNNAME|CalShortWtPrior
SIMULATE>READCIN|base.cin
SIMULATE>PAYOFF|IndustryOrdersLN.vpd
SIMULATE>OPTPARM|IndustryParamsPayVal.voc
SIMULATE>DATA|DataShort.vdfx
MENU>RUN_OPTIMIZE|o
MENU>VDF2TAB|!|!

! repeat with long data, reweighted payoff with prior on discard rate & compute confidence bounds
SIMULATE>RUNNAME|CalLongWtPrior
SIMULATE>READCIN|base.cin
SIMULATE>PAYOFF|IndustryOrdersLN.vpd
SIMULATE>OPTPARM|IndustryParamsPayVal.voc
SIMULATE>DATA|DataLong.vdfx
MENU>RUN_OPTIMIZE|o
MENU>VDF2TAB|!|!

! repeat with long data, reweighted payoff with prior on discard rate & compute confidence bounds via MCMC
SIMULATE>RUNNAME|CalLongMCMC
SIMULATE>READCIN|base.cin
! use the Powell optimum as a starting point
SIMULATE>ADDCIN|CalLongWtPrior.out
SIMULATE>PAYOFF|IndustryOrdersLN.vpd
SIMULATE>OPTPARM|IndustryParamsMCMC.voc
SIMULATE>DATA|DataLong.vdfx
MENU>RUN_OPTIMIZE|o
MENU>VDF2TAB|!|!
