github.com/archlabjp/eeslism-go@v0.0.0-20231109122333-4bb7bfcdf292/README.md (about) 1 # EESLISM Go 2 3 This program is a port of "EESLISM", a general-purpose simulation program for building thermal-environmental 4 control systems consisting of both buildings and facilities, to the Go language. 5 6 The original EESLISM is written in C and is available at https://github.com/satoh-er/open_eeslism. 7 Although the Go language version still needs to be tested, it is not inferior to the C language version in terms of execution speed. 8 9 ## Why porting to Go ? 10 11 The original EESLISM is littered with improper string memory handling. It was considered difficult to fix these completely. It seemed appropriate to port it to a C-compatible language with garbage collection, so we considered Carbon, Zig, and Go, and based on the popularity of the languages, we decided to try porting it to Go. 12 13 ## Quick Start 14 15 For Ubuntu/Debian user 16 ``` 17 sudo apt install golang # if you didnot install golang 18 git clone https://github.com/archlabjp/eeslism-go 19 cd eeslism-go 20 go build 21 ./eeslism 22 ``` 23 24 ## How to build 25 26 We assume that the Go compiler is available.If not available, please refer to https://go.dev/doc/install to install Go. 27 28 Run next command. 29 ``` 30 go build 31 ``` 32 33 If you build as Windows Executable (64bit), run next command. You will get `eeslism.exe`. 34 ``` 35 GOOS=windows GOARCH=amd64 go build -o eeslism.exe 36 ``` 37 38 If you build as WebAssembly, run next command. You will get `eeslism.wasm`. 39 ``` 40 GOOS=js GOARCH=wasm go build -o eeslism.wasm 41 ``` 42 43 For other compilation targets, please refer to [here](https://go.dev/doc/install/source#environment 44 ). 45 46 ## Run samples 47 48 ``` 49 go run main.go samples/standard-plan-no-hcap-PCM-CM-fsolm.txt 50 ``` 51 52 ## Creating your configuration file 53 54 See [this document](format/README.md) 55 56 ## Running Speed Performance 57 58 The execution speed of the Go version is approximately 14 seconds for the standard model (a 19-room detached dwelling with a 1-month aid run and a 12-month main calculation at 30-minute intervals). 59 It is almost as fast as the optimized build of open_eeslism. 60 61 ``` 62 $ time ./eeslism-go samples/standard-plan-no-hcap-PCM-CM-fsolm.txt 63 real 0m13.970s 64 user 0m13.328s 65 sys 0m1.014s 66 ``` 67 68 Under the same conditions, open_eeslism (Release build + O3 optimized) yields the following results 69 ``` 70 real 0m13.933s 71 user 0m12.433s 72 sys 0m1.442s 73 ``` 74 75 76 ## Porting Policy 77 78 In porting from C to Go language, we keep the changes to a minimum. We also try to keep the source code names as one-to-one as possible. For example, if the original source code name is name.c, the ported source code name is name.go. This is to facilitate verification in case of mistakes by maintaining the correspondence. 79 80 All code is stored in the main module, which is a private function in the Go language if the function name starts with a lowercase letter. In order to maintain identity with the original function name, it was necessary to store all code in the main module. 81 82 ### Accuracy of porting 83 84 We have confirmed that the same calculation results are obtained for a minimum sample. However, EESLISM is a very versatile program with a long history and requires much validation. 85 86 ## Internal Structure 87 88 Please refer to [this picture](eeslism_data_structure.png) for data structure. 89 90 ## Author 91 92 Wataru Uda 93 94 ## License 95 96 Distributed under the GPL-2.0 License. See [LICENSE](LICENSE) for more information.