First time here? Check out the Help page!
1 | initial version |
The CSV output file you're looking at is generated by converting the ESO output file and/or MTR output file using the ReadVars utility. Unfortunately, you cannot alter the CSV output file to contain values in a horizontal fashion -- even if you use EMS for custom outputs, it will only generate the CSV file in a vertical fashion because that is what ReadVars is programmed to do. You would have to alter the source code of ReadVars to generate the CSV in a horizontal fashion.
If you really need results in a horizontal fashion, then I suggest you use a Python or Ruby script to transpose the vertical results from EnergyPlus into horizontal results for your optimization algorithm. You could also change how you're using the MOBO tool to get values from the CSV file in a vertical fashion.
2 | No.2 Revision |
The CSV output file you're looking at is generated by converting the ESO output file and/or MTR output file using the ReadVars utility. Unfortunately, you cannot alter the CSV output file to contain values in a horizontal fashion -- even if you use EMS for custom outputs, it will only generate the CSV file in a vertical fashion because that is what ReadVars is programmed to do. You would have to alter the source code of ReadVars to generate the CSV in a horizontal fashion.
If you really need results in a horizontal fashion, then I suggest you use a Python or Ruby script to transpose the vertical results from EnergyPlus into horizontal results for your optimization algorithm. You could also change how you're using the MOBO tool to get values from the CSV file in a vertical fashion.
UPDATE
If you are trying to do something similar to the following example from the MOBO documentation, then you will need to flip the results from EnergyPlus in a vertical fashion into a horizontal fashion so that MOBO can read it correctly.
This process of changing a table from horizontal to vertical is called "transposing". In Python, you can use the pandas library to do this.
import pandas as pd
df = pd.read_csv('data/src/energyplus_results.csv') # read EnergyPlus results into dataframe
df = df.T # alter dataframe to transpose rows and columns
df.write_csv('data/src/mobo_inputs.csv' # write new transposed dataframe to separate CSV file to use as MOBO inputs
So, your workflow would be: