// Create a runnable simulation from the given scenario and run it mgr.createAndRunSimulation(scenario);
Scenario scenario = (Scenario)Utility.getIdentifiable(scenarioUri);
Quote: |
The serialized instance of an Identifiable at "platform:/resource/USFlu/scenarios/test.scenario" was not found or was of the wrong format |
Quote: |
!ENTRY org.eclipse.stem.core 4 0 2010-04-19 09:28:10.347 !MESSAGE The serialized instance of an Identifiable at "platform:/resource/US-Flu/scenarios/DougScenario.scenario" was not found or was of the wrong format !STACK 0 org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/US-Flu/scenarios/DougScenario.scenario' does not exist. |
String projectName = "US-Flu"; //String scenarioName = "DougScenario.scenario"; for (String scenarioName: args) { // Get the internal URI to the Scenario resource file in the workspace URI scenarioUri = URI.createURI("platform:/resource/"+ projectName +"/scenarios/"+ scenarioName); System.out.println("Working Directory = " + System.getProperty("user.dir")); System.out.println("Scenario URI = "+scenarioUri.toString()+" ==> "+scenarioUri.path()+" ==> "+scenarioUri.toFileString()); // Load the scenario from file Scenario scenario = (Scenario)Utility.getIdentifiable(scenarioUri); // Get the simulation manager SimulationManager mgr = SimulationManager.getManager(); // Create/run simulation from the given scenario mgr.createAndRunSimulation(scenario); }