This document show how to specify the path of python script and conduct co-simulation with EnergyPlus .

Co-simulation by using CosimR

library(CosimR)

Step1: generate the .xml file

## CosimR.xml is copied to D:/bcvtb/examples/CosimRtest successfully!

Step2: modify the .xml file

file.copy(from = system.file("extdata/Cosim.py", package = "CosimR"),
          to = paste0(xmlpath,'/python'),
          overwrite = TRUE)
## [1] TRUE
## Part1: Cosim time set modify >>>>>>>>>
## timeStep: 900 beginTime: 259200 endTime: 345600
## Part2: ArrayExtract actor pram.args modify >>>>>>>>>
## extractLength: 2 outputArrayLength: 2
## Part3: EnergyPlus Simulator pram.args modify >>>>>>>>>
## energyplus command: " -w D:/bcvtb/examples/ePlusWeather/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw -p eplusout -s C -x -m -r D:/bcvtb/examples/CosimRtest/SmOffPSZ.idf "
## Part4: SystemCommand pram.args modify >>>>>>>>>
## programname: python 
## programArgs: "D:/bcvtb/examples/CosimRtest/python/Cosim.py $input $time $iteration" 
## workingDir: D:/bcvtb/examples/CosimRtest/python 
## simulationLog: D:/bcvtb/examples/CosimRtest/python/simulation.log
## ---------------- Modification End ----------------

Step3: save the .xml file

## new.xml is written successfully!

Step4: run the .xml file

Add plotter in BCVTB manually

Plotter block is not included in the .xml template file provided in the CosimR package. If you want see the results in real time, add plotter block in BCVTB manually is a good choice.