From: miettinen Date: Tue, 25 Feb 2014 11:18:33 +0000 (+0000) Subject: Added sample Sysdyn models (refs #4702). X-Git-Tag: 1.8.1~127 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=db44c5d64f96b4626443358815e865f41fdf7eff;p=simantics%2Fsysdyn.git Added sample Sysdyn models (refs #4702). Fix for launching Sysdyn experiments (refs #4728). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@28937 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Discovery And Exploitation Of Resources.tg b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Discovery And Exploitation Of Resources.tg index c00a8865..bcbd16c2 100644 Binary files a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Discovery And Exploitation Of Resources.tg and b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Discovery And Exploitation Of Resources.tg differ diff --git a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Global Carbon Cycle.tg b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Global Carbon Cycle.tg index cedf440a..60edfdfa 100644 Binary files a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Global Carbon Cycle.tg and b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Global Carbon Cycle.tg differ diff --git a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Predator And Limited Prey.tg b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Predator And Limited Prey.tg index 3a1c507a..2a8f549d 100644 Binary files a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Predator And Limited Prey.tg and b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Predator And Limited Prey.tg differ diff --git a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Resource Exploitation Use Recycling.tg b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Resource Exploitation Use Recycling.tg index 4c49bbb3..132c2fc7 100644 Binary files a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Resource Exploitation Use Recycling.tg and b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Resource Exploitation Use Recycling.tg differ diff --git a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Tourists Environments And Hotel Facilities.tg b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Tourists Environments And Hotel Facilities.tg index 1dc23316..496ef1cb 100644 Binary files a/org.simantics.sysdyn.feature/rootfiles/sampleModels/Tourists Environments And Hotel Facilities.tg and b/org.simantics.sysdyn.feature/rootfiles/sampleModels/Tourists Environments And Hotel Facilities.tg differ diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java index 04f1a694..7d690601 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in + * Copyright (c) 2010, 2014 Association for Decentralized Information Management in * Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -105,7 +105,11 @@ public class SysdynExperimentActivator { SysdynExperimentManagerListener.listenManager(manager); IExperiment[] experiments = manager.getExperiments(); SubMonitor shutdownMon = mon.newChild(10000); - int workPerExperiment = 10000 / experiments.length; + int workPerExperiment; + if (experiments.length > 0) + workPerExperiment = 10000 / experiments.length; + else + workPerExperiment = 10000; for(IExperiment e : experiments) if(e.getState() != ExperimentState.DISPOSED) e.shutdown(shutdownMon.newChild(workPerExperiment));