| Summary: | Exceptions throw when scenarios are not properly designed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] STEM | Reporter: | Kun Hu <khu> | ||||||
| Component: | Simulation | Assignee: | Stefan Edlund <sedlund> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | jhkauf, sedlund | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 1.1.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 203854 [details]
The corrected project
This exception can be solved by adding "THA_0_1_2_population.model THA Human Population (Levels:0,1,2)" into the scenario. Please refer to the newly attached project which the problem is solved.
The reason is that the "Earth Science Data" provided in STEM does not have geographic information, e.g., common border and containment, of the selected country (in this case, Thailand). Because such data exist in "Human Population" model instead. Therefore, in this project, one should add "Human Population" model into the scenario in order to compose a runnable scenario.
Suggestion: The error log in this case could be more precise to indicate the real problem, or there could be a warning dialog pop up when the scenario is not ready to simulate. This has been seen when there is a missing sequencer in a scenario before running. Thanks!
Assigning to me The following issues are now detected and an (NLS externalized) message dialog shows up when attempting to run a scenario: 1. When a population model is missing the static population labels, e.g. the user forgot to add a population initializer or a model containing the population labels from the STEM library. 2. When an infector (or inoculator) fails to find either the region to infect or the disease it's suppose to infect with. This goes for infectors read from external data files too. 3. When a disease initializer fails to either find the region to initialize or the disease to initialize 4. When the external population initializer fails to initialize a population due to a bad data file or a referenced region missing in the model. 5. When a disease model fails to find the population model label needed to create and initialize the necessary disease model labels. The last check (5) should not show up since disease models automatically creates population models for the population identifier(s) needed. We did this to be backwards compatible with the built-in scenarios in STEM that were missing population models. However, I'm almost leaning towards getting rid of this since it's confusing to the users. I'll leave this bug open for now since we need to do more testing. If you manage to compose a scenario that throws an exception and fails to start and it's an error we do not catch, please attach the scenario to this bug and paste a stack trace. *** Bug 314785 has been marked as a duplicate of this bug. *** Closing this for now. Please create new bugs for additional errors not handled properly. |
Created attachment 203851 [details] the project that created the exception When running the scenario, the exception as below threw: An internal error occurred during: "Finite Difference Worker 0". java.util.NoSuchElementException java.lang.Exception at org.eclipse.stem.populationmodels.standard.impl.ExternalDataSourcePopulationInitializerImpl.decorateGraph(ExternalDataSourcePopulationInitializerImpl.java:156) at org.eclipse.stem.core.model.impl.ModelImpl.invokeNodeDecorators(ModelImpl.java:417) at org.eclipse.stem.core.model.impl.ModelImpl.getCanonicalGraph(ModelImpl.java:232) at org.eclipse.stem.core.model.impl.ModelImpl.getCanonicalGraph(ModelImpl.java:210) at org.eclipse.stem.core.scenario.impl.ScenarioImpl.initialize(ScenarioImpl.java:472) at org.eclipse.stem.jobs.simulation.SimulationManager.createSimulation(SimulationManager.java:316) at org.eclipse.stem.jobs.simulation.SimulationManager$4.run(SimulationManager.java:438) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)