@@ -19,6 +19,10 @@ |
import javax.ws.rs.Path; |
import static m.oms.ages.V1_0.KEY_SCRIPT; |
import static m.oms.ages.V1_0.KEY_SCRIPT_NP; |
+import static m.oms.ages.V1_0.KEY_SCRIPT_NP3; |
+import static m.oms.ages.V1_0.KEY_SCRIPT_NP30; |
+import static m.oms.ages.V1_0.KEY_SCRIPT_NP3000; |
+import static m.oms.ages.V1_0.KEY_SCRIPT_NPBDCW; |
import ngmf.util.cosu.luca.of.NS; |
import ngmf.util.cosu.luca.of.RMSE; |
import ngmf.util.cosu.luca.of.TRMSE; |
@@ -45,10 +49,18 @@ |
@Resource(file = "java-*-std*.txt output/csip_run/out/*.csv", type = OUTPUT) |
@Resource(file = "${csip.dir}/bin/ages/simulation/ages.sim", type = REFERENCE, id = KEY_SCRIPT) |
@Resource(file = "${csip.dir}/bin/ages/simulation/ages_noPL.sim", type = REFERENCE, id = KEY_SCRIPT_NP) |
+@Resource(file = "${csip.dir}/bin/ages/simulation/ages_noPLSFIR3.sim", type = REFERENCE, id = KEY_SCRIPT_NP3) |
+@Resource(file = "${csip.dir}/bin/ages/simulation/ages_noPLSFIR30.sim", type = REFERENCE, id = KEY_SCRIPT_NP30) |
+@Resource(file = "${csip.dir}/bin/ages/simulation/ages_noPLSFIR3000.sim", type = REFERENCE, id = KEY_SCRIPT_NP3000) |
+@Resource(file = "${csip.dir}/bin/ages/simulation/ages_noPLBDCW.sim", type = REFERENCE, id = KEY_SCRIPT_NPBDCW) |
public class V1_0 extends ModelDataService { |
|
public static final String KEY_SCRIPT = "ages.sim"; |
public static final String KEY_SCRIPT_NP = "ages_noPL.sim"; // no payload script |
+ public static final String KEY_SCRIPT_NP3 = "ages_noPLSFIR3.sim"; // no payload script |
+ public static final String KEY_SCRIPT_NP30 = "ages_noPLSFIR30.sim"; // no payload script |
+ public static final String KEY_SCRIPT_NP3000 = "ages_noPLSFIR3000.sim"; // no payload script |
+ public static final String KEY_SCRIPT_NPBDCW = "ages_noPLBDCW.sim"; // no payload script |
public static final String RUN_INC = "run.inc"; |
|
public static final String PAR_STARTTIME = "startTime"; |
@@ -58,6 +70,7 @@ |
public static final String CAL_ENDTIME = "cal_endTime"; |
|
public static final String PAYLOAD = "payload"; |
+ public static final String PROJECT = "project"; |
|
static final Map<String, ObjectiveFunction> OF = new HashMap<>(); |
|
@@ -208,11 +221,33 @@ |
@Override |
public void doProcess() throws Exception { |
boolean payLoad = parameter().getBoolean(PAYLOAD, true); |
+ String project = parameter().getString(PROJECT, "SFIR3"); |
String dsl = parameter().getString(KEY_SCRIPT, |
resources().getFile(KEY_SCRIPT).toString()); |
if (!payLoad) { |
dsl = parameter().getString(KEY_SCRIPT_NP, |
resources().getFile(KEY_SCRIPT_NP).toString()); |
+ if (!project.isEmpty()) { |
+ if (project.equals("SFIR3")) { |
+ dsl = parameter().getString(KEY_SCRIPT_NP3, |
+ resources().getFile(KEY_SCRIPT_NP3).toString()); |
+ } |
+ if (project.equals("SFIR30")) { |
+ dsl = parameter().getString(KEY_SCRIPT_NP30, |
+ resources().getFile(KEY_SCRIPT_NP30).toString()); |
+ } |
+ if (project.equals("SFIR3000")) { |
+ dsl = parameter().getString(KEY_SCRIPT_NP3000, |
+ resources().getFile(KEY_SCRIPT_NP3000).toString()); |
+ } |
+ if (project.equals("SFIR300")) { |
+ throw new IllegalArgumentException(" NO SFIR 300 data available"); |
+ } |
+ if (project.equals("BDCW")) { |
+ dsl = parameter().getString(KEY_SCRIPT_NPBDCW, |
+ resources().getFile(KEY_SCRIPT_NPBDCW).toString()); |
+ } |
+ } |
} |
|
// pass request param to model runtime parameter -> run.inc |