apis-main is the name of energy sharing software for autonomous distributed control of energy developed by Sony CSL. apis-main is installed in each node (battery system connected to the DC grid via a bidirectional DC/DC converter). Via the Device Driver, the software periodically obtains the remaining capacity of the battery and automatically carries out energy sharing between nodes by nagotiating with other apis-mains in accordance with behavior rulesets determined by each nodeβs remaining battery capacity. Negotiations between apis-mains use a communication line such as Ethernet, and the energy sharing takes place with direct current on the DC grid. apis-main does not rely on software that carries out centralized control of nodes. All nodes have the same software, apis-main, and autonomous distributed control is carried out with only apis-main in each node.
Refer to the apis-main_specification for more information
Here is how to install apis-main individually.
git, maven, groovy and JDK must be installed in advance.
$ git clone https://github.com/SonyCSL/apis-bom.git
$ cd apis-bom
$ mvn install
$ cd ../
$ git clone https://github.com/SonyCSL/apis-common.git
$ cd apis-common
$ mvn install
$ cd ../
$ git cone https://github.com/SonyCSL/apis-main.git
$ cd apis-main
$ mvn packageHere is how to run apis-main individually.
$ cd exe
$ bash start.shHere is how to stop apis-main individually.
$ cd exe
$ bash stop.shSet the following parameters in the exe folder as necessary.
Refer to "Chapter 6, About Configuration Files" in the apis-main_specification for more information.
βconfig.json
βββ- communityId β(default : oss_communityId)
βββ- clusterId β(default : oss_clusterId)
βββ- unitId β(default : E001)
βββ- unitName β(default : E001)
βββ- systemType β(default : dcdc_emulator)
βpolicy.json
βββ- memberUnitIds β(default : "E001", "E002", "E003", "E004")
βcluster.xml
βββ- <member> β(default : 127.0.0.1)
βββ- <interface> β(default : 127.0.0.1)
βstart.sh
βββ-conf β (default : ./config.json)
βββ-cluster-host β (default : 127.0.0.1)
In order to run multiple apis-mains on the same PC, multiple config.json and start.sh are needed.
To run 4 apis-mains on the same PC.
[Parameter Setting Example]
<First Setting>
βconfig.json
βββ- unitId : E001
βββ- unitName : E001
βββ- stateFileFormat : "{tmpdir}/apis/state/%s"
βββ- dealLogDirFormat : "{tmpdir}/apis/dealLog/'uuuu'/'MM'/'dd'"
βstart.sh
βββ-conf ./config.json
βββ-cluster-host 127.0.0.1
<Second Setting>
βconfig2.json
βββ- unitId : E002
βββ- unitName : E002
βββ- stateFileFormat : "{tmpdir}/apis/state2/%s"
βββ- dealLogDirFormat : "{tmpdir}/apis/dealLog2/'uuuu'/'MM'/'dd'"
βstart2.sh
βββ-conf ./config2.json
βββ-cluster-host 127.0.0.1
<\Third Setting>
βconfig3.json
βββ- unitId : E003
βββ- unitName : E003
βββ- stateFileFormat : "{tmpdir}/apis/state3/%s"
βββ- dealLogDirFormat : "{tmpdir}/apis/dealLog3/'uuuu'/'MM'/'dd'"
βstart3.sh
βββ-conf ./config3.json
βββ-cluster-host 127.0.0.1
<Fourth Setting>
βconfig4.json
βββ- unitId : E004
βββ- unitName : E004
βββ- stateFileFormat : "{tmpdir}/apis/state4/%s"
βββ- dealLogDirFormat : "{tmpdir}/apis/dealLog4/'uuuu'/'MM'/'dd'"
βstart4.sh
βββ-conf ./config4.json
βββ-cluster-host 127.0.0.1
All other files are used in common.
[Running]
$ cd exe
$ bash start.sh
$ bash start2.sh
$ bash start3.sh
$ bash start4.sh βapis-main_specificaton(EN)
βapis-main_specificaton(JP)
An example of creating an API specification using the Javadoc command is shown below.
(For Ubuntu18.04)
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
$ cd apis-main
$ mvn javadoc:javadoc The API specification is created in apis-main/target/site/apidocs/.
βNotice