github.com/archlabjp/eeslism-go@v0.0.0-20231109122333-4bb7bfcdf292/main.go (about)

     1  // EESLISM Go
     2  package main
     3  
     4  import (
     5  	"fmt"
     6  	"log"
     7  	"os"
     8  
     9  	"github.com/akamensky/argparse"
    10  	eeslism "github.com/archlabjp/eeslism-go/eeslism"
    11  )
    12  
    13  func main() {
    14  	log.SetFlags(log.Lmicroseconds)
    15  
    16  	// コマンドライン引数の処理
    17  	parser := argparse.NewParser("EESLISIM Go", "a general-purpose simulation program for building thermal-environmental control systems consisting of both buildings and facilities")
    18  
    19  	filename := parser.StringPositional(&argparse.Options{
    20  		Required: true,
    21  		Help:     "Input data file name"})
    22  
    23  	efl_path := parser.String("", "efl", &argparse.Options{
    24  		Default: "Base",
    25  		Help:    "EFLファイルのディレクトリ"})
    26  
    27  	err := parser.Parse(os.Args)
    28  	if err != nil {
    29  		fmt.Print(parser.Usage(err))
    30  	}
    31  
    32  	// if len(*efl_path) > 0 {
    33  	// 	os.Chdir(*efl_path)
    34  	// }
    35  
    36  	eeslism.Entry(*filename, *efl_path)
    37  }