Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. FEWS configuration file Explorer.xml  in the directory  SystemConfigFiles
    1. the  dateTime  section  
      1. In order to hide the year within FEWS, the dateTimeFormat must be configured accordingly.  
      2. The cardinalTimeStep  should be consistent with fewsSystemTimeUpdateInMinutes . Indeed, it makes no sense to set it in the WaterCoach to 1 minute, while it is set to 1 hour in the FEWS configuration (although this will not cause any problems in the game). (obsolete as of FEWS release 2013.02)
      3. The element adjustSystemTimeAutomatically should be set to 'true', otherwise it will not be possible for the WaterCoach to alter the systemTime during the game. (Also make sure that you don't have a T0 configured in the global.properties file).
    2. Note: this change is no longer required with the embedded WaterCoach: The port number  fewsPiPortNumber for the FEWS PI service has to be in the range of port numbers that must be specified in Explorer.xml . Note: by specifying this range the PI service is started. This part of the configuration can be kept the same in the live system, but be aware that this means that the PI service will be started in the live system as well.

      Code Block
      xml
      xml
      <piServicePortRange start="50505" end="50505"/>
    3. To distinguish the FEWS configuration for the WaterCoach, one could change the name and panel labels. The name of the Explorer window is configured with systemCaption and the name of the panels with panelHeaderLabels . For example, the term TRAINING or SERIOUS GAME could be added to the captions of these panels.  (obsolete as of FEWS release 2013.02 since the FEWS user interface contains a yellow border when operated in WaterCoach mode)
    4. Add WaterCoach plugin to Explorer.xml, see the configuration examplesexample (Only for the embedded WaterCoach, Delft-FEWS 2016.01 and up).

      Anchor
      watercoachplugin
      watercoachplugin

      Info
      titleloadAtStartup with embedded WaterCoach (Delft-FEWS 2016.01 and up)

      Note: with the embedded WaterCoach (Delft-FEWS 2016.01 and up), it is recommended to use the option loadAtStartup in Explorer.xml set to true, when the script_config.xml makes use of the option dataStart. This is because to be able to change the time in the GUI Delft-FEWS needs to restart. After the restart, only those tasks in Explorer.xml with loadAtStartup=true are started. If this option is set to false for the WaterCoachDisplay, the user will have to manually restart the display, just after she started the WaterCoach mode the first time, which can be confusing.


  2. Depending on the set-up of the scenario and script database, an additional change could be required, see Scenario and Script database.
  3. Note: with some configurations at the start-up of fews via the WaterCoach, the error message 'Fault occurred' may occur. This message can be ignored.
  4. Since all data for a scenario is pre-loaded in the FEWS local data store, it is desirable to hide certain data after the current system time, e.g. measurement data. This can be accomplished by specifying hideExternalHistoricalAfterSystemTime=true in the file global.properties , which is located in the FEWS configuration directory. As the name of this key implies, only time series of the type "external historical" are hidden; time series of the types "external forecast", "simulated historical", and "simulated forecast" are completely visible. As of FEWS release 2012.02, this step is no longer required.

    Additional steps for embedded WaterCoach (2016.01 and up)
  5. Changes to the global.properties
    1. add key WATERCOACH_SCENARIO_DATABASE_FOLDER=%REGION_HOME%/WaterCoach
      Note, this is optional, you could also define this location directly in waterCoachDisplay.xml
    2. configure localDatastoreFormat=firebird, since the default 2016.01 database is Dirby

      Info

      Note: the shared database approach for the participant mode is only supported for Firebird at the moment

  6. Create <My_WaterCoachDisplay>.xml in <root_folder>\Config\DisplayConfigFiles\, see configuration examplesexample
    If you have an existing application_config.xml, make the following changes:
    1. move file to <root_folder>\Config\DisplayConfigFiles\ and rename if you like
    2. replace root element config with root element waterCoachDisplay
    3. add element <config>
    4. remove elements
      1. <locale>,
      2. <fewsExecutable>,
      3. <fewsRegionDir>,
      4. <fewsPiPortNumber>
    5. move element <hideYear> under the element <scenarioScriptDatabasePath>
    6. use key from global.properties to configure <scenarioScriptDatabasePath>
    7. add element </waterCoachDisplay> to the end of the file
  7. Optional: Modifiy Delft-Fews layout to start with WaterCoach plugin in the front

    1. Make sure you have configured the WaterCoach plugin in Explorer.xml to loadAtStartUp is true (see previous step)
    2. Start Delft-FEWS

    3. Bring WaterCoach plugin window to the front and

    4. select menu -> File -> Save Layout

  8. Managing of the logging from WaterCoach

    1. User category name "nl.wldelft.fews.gui.plugin.watercoach" in Log4jConfig.xml to enter specific rules for logging from WaterCoach.
      See configuration examplesexample, in which all debug messages in WaterCoach are suppressed.

...

  • The master WaterCoach session needs to make her LocalDataStore shareable using the F12-P function within the Fews application. In the future this action will be done automatically, if the WaterCoach application is so configured. As of FEWS release 2013.02, this step is no longer required, as long as the vjdbcServicePortRange is configured in SystemConfigFiles/Explorer.xml to a specific port, e.g.: <vjdbcServicePortRange start="40404" end="40404"/>
  • Start the embeded vdjbc server using the F12-L option. This action provides an IP adress and port number in the log-window of the Fews application. These should correspond to the IP adress and port defined in the client_config.xml file of the particpant WaterCoach sessions. Replace by next step (url).
  • The particpant WaterCoach session(s) should link to this embeded vjdbc server by configuring this in the clientConfig.xml of the FEWS application, see configuration examplesexample.

  • The master WaterCoach session can not be used for the training, because LocalDataStore of its Fews application is not updated by changes made by the participant WaterCoach sessions.

    Info
    titleNote on master WaterCoach session

    With the embedded WaterCoach (2016.01 and up) the master WaterCoach session can be used for training and the LocalDataStore of its Fews applications are updated by changes made by the participant WaterCoach sessions.

 

Examples

Anchor
applicationExamples_configExampleclientConfigapplication
Examples_configExampleclientConfig

Code Block
titleExample of clientConfig configuration (Participant)
<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd">
    <databaseServer>
    <url>jdbc:vjdbc:rmi://<host>:<port>/VJdbc,FewsDatabase</url> 
<!-- replace <host> with the correct host (e.g. localhost if both applications are run on the same pc, the Ip address of the pc, or a network location) -->
<!-- replace <port> according to the port configuration in Explorer.xml in the Master FEWS configurations (e.g. 40404 according to the example on this wiki) -->
    </databaseServer>
    <localCacheSizeMB>500</localCacheSizeMB>
</clientConfiguration> 

Anchor
applicationExamples_configExampleapplicationConfigapplication
Examples_configExampleapplicationConfig

Code Block
titleExample of application configuration (Stand Alone WaterCoach)
   <config xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/watercoachschemas/version1.0/application_config.xsd">
      <name>Example of application configuration</name>
      <locale>EN</locale>
      <hideYear>false</hideYear>
      <fewsExecutable>..\FEWS_WaterCoach\bin\Fews_WC.exe</fewsExecutable>
      <fewsRegionDir>..\FEWS_WaterCoach\Fews_WC</fewsRegionDir>
      <scenarioScriptDatabasePath>ScenarioScriptDatabase\Fews_WC</scenarioScriptDatabasePath>
      <fileAssociation extension="pdf">C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe</fileAssociation>
      <fileAssociation extension="jpg">C:\WINDOWS\system32\mspaint.exe</fileAssociation>
      <timeControl>
         <pause>true</pause>
         <next>false</next>
         <set>false</set>
         <fastForwardBackward>true</fastForwardBackward>
      </timeControl>
      <experienceLevel>
         <levels>Beginner;Expert</levels>
         <adjustLevel>false</adjustLevel>
      </experienceLevel>
      <fewsPiPortNumber>50505</fewsPiPortNumber>
      <showVisualizeScriptButton>true</showVisualizeScriptButton>
      <participant>false</participant>
      <!-- option for developer, useful when you are working on the same scenario -->
      <copyLocalDataStore>false</copyLocalDataStore>
   </config>

Anchor
Examples_configList
Examples_configList

Code Block
xml
xml
titleExample of meta-application configuration
   <configList xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/watercoachschemas/version1.0/application_config.xsd">
      <configPath>C:\path\to\application\configuration\application_configuration.xml</configPath>
      <configPath>C:\some\other\path\to\application\configuration\application_configuration.xml</configPath>
   </configList>

Anchor
Examples_watercoachDisplay
Examples_watercoachDisplay

Code Block
titleExample of display configuration (Embedded WaterCoach, 2016.01 and up)
   <waterCoachDisplay xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/watercoachschemas/version1.0/waterCoachDisplay.xsd">
<config>
 <name>Example of application configuration</name>
      <scenarioScriptDatabasePath>ScenarioScriptDatabase\Fews_WC</scenarioScriptDatabasePath>
      <hideYear>false</hideYear>
      <fileAssociation extension="pdf">C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe</fileAssociation>
      <fileAssociation extension="jpg">C:\WINDOWS\system32\mspaint.exe</fileAssociation>
      <timeControl>
         <pause>true</pause>
         <next>false</next>
         <set>false</set>
         <fastForwardBackward>true</fastForwardBackward>
      </timeControl>
      <experienceLevel>
         <levels>Beginner;Expert</levels>
         <adjustLevel>false</adjustLevel>
      </experienceLevel>
      <participant>false</participant>
      <!-- option for developer, useful when you are working on the same scenario -->
      <copyLocalDataStore>false</copyLocalDataStore>
   </config>
</waterCoachDisplay> 

Anchor
Examples_explorerTask
Examples_explorerTask

Code Block
titleExample of WaterCoach plugin configuration in Explorer.xml (Embedded WaterCoach, 2016.01 and up)
  <explorerTask name="WaterCoach">
    <displayConfigFileName>My_WC_Display_Config_File</displayConfigFileName>
    <toolbarTask>false</toolbarTask>
    <menubarTask>false</menubarTask>
    <allowMultipleInstances>false</allowMultipleInstances>
    <toolWindow>true</toolWindow>
    <loadAtStartup>false</loadAtStartup> <!-- select true if configuration will only be used in WaterCoach mode -->
</explorerTask>

Anchor
Examples_log4jConfig
Examples_log4jConfig

Code Block
titleExample of logging configuration for category nl.wldelft.fews.gui.plugin.watercoach (Embedded WaterCoach, 2016.01 and up)
 <category name="nl.wldelft.fews.gui.plugin.watercoach" additivity="false">
                <priority value="INFO"/> <!--If another level is used, the WC script messages won't become visible in Delft-FEWS-->
				<appender-ref ref="dataStoreLogEntriesTable"/>
                <appender-ref ref="defaultLogFile"/>
                <appender-ref ref="explorerLogPanel"/> 
 </category>