Skip to content

Latest commit

 

History

History
159 lines (121 loc) · 5.17 KB

README.md

File metadata and controls

159 lines (121 loc) · 5.17 KB

apis-main

Introduction

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

キャプチャ

Installation

Here is how to install apis-main individually.
git, maven, groovy and JDK must be installed in advance.

$ git clone https://github.com/hyphae/apis-bom.git
$ cd apis-bom
$ mvn install
$ cd ../
$ git clone https://github.com/hyphae/apis-common.git
$ cd apis-common
$ mvn install
$ cd ../
$ git cone https://github.com/hypahe/apis-main.git
$ cd apis-main
$ mvn package

Running

Here is how to run apis-main individually.

$ cd exe
$ bash start.sh

Stopping

Here is how to stop apis-main individually.

$ cd exe
$ bash stop.sh

Parameter Setting

Set 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)

Tips

In order to run multiple apis-mains on the same PC, multiple config.json and start.sh are needed.

<Example>

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  

Documentation

apis-main_specificaton(EN)
apis-main_specificaton(JP)

API Specification

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/.

License

Apache License Version 2.0

Notice

Notice