meta data for this page
  •  
Action disabled: source

Use JESS Client with GenOpt

GenOpt (http://simulationresearch.lbl.gov/GO/) uses RunEPlus.bat included in the EnergyPlus folder to carry out E+ simulations. RunEPlus.bat file is fairly similar to EPL-run.bat, therefore injecting JESS Client for running remote simulations with GenOpt is as straightforward as with EP-Launch (see Use JESS Client with EP-Launch).

Here are recommended steps:

  1. Follow the steps as described in Use JESS Client with EP-Launch to install JESS Client in EnergyPlus folder. You do not need to copy over EPL-run.bat in this case.
  2. Create a copy of the RunEPlus.bat in the EnergyPlus folder, and call it RunJESS.bat for example.
  3. Follow the example in Use JESS Client with EP-Launch, modify RunJESS.bat to inject JESS Client command-line and add necessary clean-up actions.
  4. In GenOpt configuration folder (e.g. C:\GneOptV3-1-0\cfg\), make a copy of EnergyPlus-7-0-0-Win7.cfg and name it JESS-Win7.cfg. Note that JESS support E+ Versions 7.0 and above automatically.
  5. Modify JESS-Win7.cfg, so it calls the new RunJESS.bat instead of RunEPlus.bat. See code example below.
  6. And finally, to test it with the GenOpt examples, go to an example folder (e.g. C:\GneOptV3-1-0\example\energyplus\7_0_0\GPSHookeJeeves\) and modify optWin7.ini, so the configuration file points to JESS-Win7.cfg. See code further below.
  7. That's it!

/* GenOpt configuration file for
   EnergyPlus on Windows XP
   MWetter@lbl.gov, 11/30/11
*/

// Error messages of the simulation program.
SimulationError
{
    ErrorMessage = "**  Fatal  **";
    ErrorMessage = "** EnergyPlus Terminated--Error(s) Detected";
}

// Number format for writing the simulation input files.
IO
{
    NumberFormat = Double;
}

/*  Specifying how to start the simulation program.
    In "Command", only those words in %xx% are 
    replaced (possibly with empty Strings).
*/
SimulationStart
{
    // The command line below calls RunEPlus.bat.
    Command = "cmd /C \"\"C:\\Program Files \(x86\)\\EnergyPlusV7-0-0\\RunJESS.bat\" \"%Simulation.Files.Input.File1%\" \"%Simulation.CallParameter.Suffix%\"\"";
    WriteInputFileExtension = false;
}


/* GenOpt example initialization file for EnergyPlus
   Operating system: Windows 7
   MWetter@lbl.gov, 2011-11-30
*/
Simulation {
  Files {
    Template {
      File1 = singleZonePurchAir_template.idf;
    }
    Input {
      File1 = singleZonePurchAir.idf;
    }
    Log {
      File1 = singleZonePurchAir.err;
    }
    Output {
      File1 = singleZonePurchAir.eso;
    }
    Configuration {
      File1 = "..\\..\\..\\..\\cfg\\JESS-Win7.cfg";
    }
  }
  CallParameter { // optional section
    // The weather file without extension
    Suffix = USA_IL_Chicago-OHare.Intl.AP.725300_TMY3;
  }
  ObjectiveFunctionLocation
  {
      Name1      = Es_tot;
      Function1  = "add( %Es_heat%, %Es_cool%, %Es_light%)";

      Name2      = Es_heat;
      Function2  = "divide( %Q_heat%, 0.44)";

      Name3      = Es_cool;
      Function3  = "divide( %Q_cool%, 0.77)";

      Name4      = Es_light;
      Function4  = "multiply( %E_lights%, 3)";

      Name5             = Q_heat;
      Delimiter5        = "170,";
      FirstCharacterAt5 = 1;

      Name6             = Q_cool;
      Delimiter6        = "201,";
      FirstCharacterAt6 = 1;

      Name7             = E_lights;
      Delimiter7        = "6,";
      FirstCharacterAt7 = 1;
  }
} // end of section Simulation
Optimization {
  Files {
    Command {
      File1 = command.txt;
    }
  }
} // end of configuration file