!Example of run file used, based on original run files for EMPIRE.

model runEMPIRE
uses "mmxprs"; !gain access to the Xpress-Optimizer solver
uses "mmjobs";

options noimplicit  !no implicit definitions
options explterm    !explicitly terminate lines with a semicolon

!Parameters section
parameters
    SOURCE_FILE_DIR     =   "..\\src\\xpress-mosel";
    MODELNAME           =   "europe_v33_ZEP";
    POLICYSCENARIO      =   "EC_2014_ref";
    INSTANCEEXT         =   "31048_01_unlim3007_L3_BESS_0";
    CASERUN             =   1;
    USER_CASERUN_EXT    =   "";
end-parameters

!added
setparam("XPRS_cutstrategy", 2);!1:3

!sample declarations section
declarations
    EMPIRE_DEQ_MODEL : Model;
    
    ! Control problem setup
    MAX_TECH_BUILD_CONS    : boolean;!
    MAX_TECH_INSTALL_CONS  : boolean;!
    MAX_LINE_BUILD_CONS    : boolean;!
    MAX_LINE_INSTALL_CONS  : boolean;!
    
    ! Control debug mode (just write an MPS or lp file)
    DEBUG   : boolean;!
    USE_MPS : boolean;!

    ! Add a comment
    COMMENT : string; ! if a particular comment should be added to the result file;

    USE_LINE_EXPANSION : boolean;

    ! Business as usual
    CCS_SUPPORT_FACTOR          : real;
    MAX_CCS_SUP                 : real;
    EURO_GEN_EPS                : integer;
    EURO_EPS                    : integer;
    DYN_EURO_EMISSION_CTR       : integer;
    EURO_ABS_EMISSION_LIMIT     : integer;
    NO_CCS                      : boolean;
    NO_STORAGE                  : boolean;
    GRANDFATHERING              : boolean;
    CCS_DEMO_DEPLOY_FORM        : boolean;
    CFD_SUPPORT                 : boolean;
    NUCLEAR                     : boolean;

    CASERUN_EXT                 : string;
    
    CCS_CAPEX_SUPPORT_FACTOR    :   real;
    CCS_OPEX_SUPPORT_FACTOR     :   real;
    CCS_TS_COST_SUPPORT_SCHEME  :   integer;
    CCS_OPEX_SUPPORT_SCHEME     :   integer;
    CCS_SUPPORT_END             :   integer;
    CCS_FiP                     :   real;
    
    EVNT                        : Event;
end-declarations

DEBUG                   := false; !true;
USE_MPS                 := false; !true;

CCS_DEMO_DEPLOY_FORM    := false;
EURO_GEN_EPS            := 0;
EURO_EPS                := 0;  !Emission Performance Standard (CO2/kWh) 
EURO_ABS_EMISSION_LIMIT := 2; !80% reduction by 2050
GRANDFATHERING          := false;
NO_STORAGE              := true;
USE_LINE_EXPANSION      := false;
DYN_EURO_EMISSION_CTR   := 0;
MAX_CCS_SUP             := 5; 
CCS_SUPPORT_END         := 4;
NO_CCS                      := false;
CCS_CAPEX_SUPPORT_FACTOR    := 0.0;
CCS_OPEX_SUPPORT_FACTOR     := 0.0;
CCS_TS_COST_SUPPORT_SCHEME  := 0;
CCS_OPEX_SUPPORT_SCHEME     := 0;
CCS_FiP                     := 0;
CFD_SUPPORT                 := false;
NUCLEAR                     :=true; !EMPIRE Nuclear policy is changed to not allow new nuclear installations in France and GB when NUCLEAR =false;

CASERUN_EXT                 := "_tideext_C" + CASERUN;

case CASERUN of
    !--------
    !Baseline
    !--------
    1:  do
        COMMENT := "Baseline,Fixed inv, abs emission 80%,no line investement, 2 patterns, with nuclear, no CFD,  with CCS, no storage investment ";
    end-do
    !--------------------
    ! CCS TS cost support
    !--------------------
    2:  do
        COMMENT :=  "Fixed inv, no abs emission limit,no line investement, 2 patterns, with nuclear, no CFD,  with CCS, no storage investment ";
        EURO_ABS_EMISSION_LIMIT := 0;
    end-do
    3:  do
            COMMENT :=  "Fixed inv, abs emission 80%, with line investement, 2 patterns, with nuclear, no CFD,  with CCS, with storage investment ";
            USE_LINE_EXPANSION      := true;
    end-do
    4:  do
            COMMENT :=  "Fixed inv, abs emission 80%, no line investement, 2 patterns, with nuclear, with CFD,  with CCS, with storage investment ";
            CFD_SUPPORT:=true;
    end-do
    
    5: do
            COMMENT :=  "Fixed inv, no abs emission limit,no line investement, 2 patterns, no nuclear, no CFD,  with CCS, with storage investment ";
            NUCLEAR :=false;
    end-do
    
    


else
    COMMENT := "Baseline,Fixed inv, abs emission 80%,no line investement, 2 patterns, with nuclear, no CFD,  with CCS, with storage investment ";
    CASERUN_EXT                 := USER_CASERUN_EXT;
end-case

! Compile the sub-model file
! EMPIRE_deq_tidal.mos is the "EMPIRE - Deterministic equivalent problem" with added tidal lagoon files
if compile("",SOURCE_FILE_DIR + "\\EMPIRE_deq_tidal.mos",
            "shmem:EMPIRE_deq_tidal.bim")<>0 then 
    writeln("ERROR! The EMPIRE model file didn't compile correctly");
    exit(1);
end-if
load(EMPIRE_DEQ_MODEL, "shmem:EMPIRE_deq_tidal.bim");

run(EMPIRE_DEQ_MODEL,   "MODELNAME="                    + MODELNAME 
                        +",POLICYSCENARIO="             + POLICYSCENARIO
                        +",INSTANCEEXT ="               + INSTANCEEXT 
                        +",CASERUN_EXT ="               + CASERUN_EXT
                        +",DEBUG="                      + DEBUG
                        +",USE_MPS="                    + USE_MPS
                        +",USE_LINE_EXPANSION="         + USE_LINE_EXPANSION
                        +",NO_CCS="                     + NO_CCS 
                        +",NO_STORAGE="                 + NO_STORAGE
                        +",DYN_EURO_EMISSION_CTR="      + DYN_EURO_EMISSION_CTR
                        +",EURO_GEN_EPS="               + EURO_GEN_EPS
                        +",EURO_ABS_EMISSION_LIMIT="    + EURO_ABS_EMISSION_LIMIT
                        +",EURO_EPS="                   + EURO_EPS
                        +",GRANDFATHERING="             + GRANDFATHERING
                        +",COMMENT="                    + COMMENT
                        +",CCS_CAPEX_SUPPORT_FACTOR="   + CCS_CAPEX_SUPPORT_FACTOR
                        +",CCS_OPEX_SUPPORT_FACTOR="    + CCS_OPEX_SUPPORT_FACTOR
                        +",CCS_TS_COST_SUPPORT_SCHEME=" + CCS_TS_COST_SUPPORT_SCHEME
                        +",CCS_OPEX_SUPPORT_SCHEME="    + CCS_OPEX_SUPPORT_SCHEME
                        +",CCS_SUPPORT_END="            + CCS_SUPPORT_END
                        +",MAX_CCS_SUP="                + MAX_CCS_SUP
                        +",CCS_FiP="                    + CCS_FiP
                        +",CCS_DEMO_DEPLOY_FORM="       + CCS_DEMO_DEPLOY_FORM 
                        );
wait; 
EVNT := getnextevent;

!if getclass(EVNT) <> EVENT_COMPLETED then
!   writeln("EMPIRE model has message problems: Completed run code is " + 
!       EVENT_COMPLETED + ", but recived " + getclass(EVNT));
!   exit(3);
!end-if

    

end-model