diff --git a/jamsmodel/j2k_cowat_buech_ju_couplage.jam b/jamsmodel/j2k_cowat_buech_ju_couplage.jam index 7665a1349bce4fc0371334286d794a80e858922d..567367836d96c95006470d68d4bfd207c5c1bd8b 100644 --- a/jamsmodel/j2k_cowat_buech_ju_couplage.jam +++ b/jamsmodel/j2k_cowat_buech_ju_couplage.jam @@ -196,6 +196,7 @@ <var attribute="HRUS" context="J2K_RHONE" name="hrus"/> <var attribute="time" context="J2K_RHONE" name="time"/> <var attribute="Runoff" context="TimeLoop" name="catchmentSimRunoff"/> + <var name="debugMode" value="true"/> </component> <component class="jams.components.gui.JAMSExecInfo" enabled="true" name="JAMSExecInfo" version="1.1_0"/> <component class="org.unijena.j2k.DoubleSetter" enabled="true" name="DoubleSetter" version="1.0_0"> diff --git a/modules/CouplingCommunication.java b/modules/CouplingCommunication.java index 150ae199837041dd1b31ab61b09359ff977bcff2..d809b5d37e9f5e8a9e581b5de0df40fd376630b5 100644 --- a/modules/CouplingCommunication.java +++ b/modules/CouplingCommunication.java @@ -104,6 +104,12 @@ public class CouplingCommunication extends JAMSComponent { ) public Attribute.Double catchmentSimRunoff; + @JAMSVarDescription( + access = JAMSVarDescription.AccessType.READ, + description = "Tell if we run in debug mode (no timeout)" + ) + public Attribute.Boolean debugMode; + public void init() { singleton = this; //double t = 1; @@ -919,8 +925,13 @@ public class CouplingCommunication extends JAMSComponent { client.close(); // Close the socket itself // launch timeout - startTimeout(120); - + System.err.println("debug mode is: " + debugMode.getValue() + "\n"); + if (debugMode.getValue() == true) + { + startTimeout(3600); + } else { + startTimeout(120); + } } // Now loop again, waiting for the next connection } // If anything goes wrong, print an error message catch (Exception e) {