@@ -18,6 +18,7 @@ |
import java.util.Set; |
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 ngmf.util.cosu.luca.of.NS; |
import ngmf.util.cosu.luca.of.RMSE; |
import ngmf.util.cosu.luca.of.TRMSE; |
@@ -43,9 +44,11 @@ |
@Resource(file = "/bin/ages/ages-static.zip", type = ARCHIVE) |
@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) |
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 RUN_INC = "run.inc"; |
|
public static final String PAR_STARTTIME = "startTime"; |
@@ -54,6 +57,8 @@ |
public static final String CAL_STARTTIME = "cal_startTime"; |
public static final String CAL_ENDTIME = "cal_endTime"; |
|
+ public static final String PAYLOAD = "payload"; |
+ |
static final Map<String, ObjectiveFunction> OF = new HashMap<>(); |
|
static { |
@@ -190,14 +195,19 @@ |
"parallelismThreads", |
"flagSaveState", |
"flagLoadState", |
- "flagWB" |
+ "flagWB", |
+ "loadStateFilePath" |
}; |
|
@Override |
public void doProcess() throws Exception { |
+ boolean payLoad = parameter().getBoolean(PAYLOAD, true); |
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()); |
+ } |
// pass request param to model runtime parameter -> run.inc |
Map<String, String> agesParam = new LinkedHashMap<>(); |
Utils.passReqQuotedParam(agesParam, parameter(), reqParams); |