Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1016 from slacgismo/develop
Browse files Browse the repository at this point in the history
Release beauharnois-28
  • Loading branch information
aivanova5 authored Nov 5, 2021
2 parents cbba476 + 5630b20 commit 90e21c4
Show file tree
Hide file tree
Showing 157 changed files with 48,585 additions and 15,048 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:

runs-on: ubuntu-latest
container: slacgismo/gridlabd_dockerhub_base:210520
container: slacgismo/gridlabd_dockerhub_base:211105

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:

runs-on: ubuntu-latest
container: slacgismo/gridlabd_dockerhub_base:210520
container: slacgismo/gridlabd_dockerhub_base:211105

steps:
- uses: actions/checkout@v2
Expand Down
Empty file modified build-aux/setup-Darwin-20.sh
100644 → 100755
Empty file.
29 changes: 18 additions & 11 deletions build-aux/setup-Linux-amzn-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ yum -q install ncurses-devel -y
#yum -q install epel-release -y
yum -q install libcurl-devel -y

# python3 support needed as of 4.2
yum -q install python37 python3-devel python3-tkinter -y
[ -f /bin/python3 -a ! -f /usr/local/bin/python3 ] && ln -s /bin/python3 /usr/local/bin/python3
[ -f /bin/python3-config -a ! -f /usr/local/bin/python3-config ] && echo '#!/bin/bash
/bin/python3-config $*' > /usr/local/bin/python3-config
chmod +x /usr/local/bin/python3-config
[ ! -f /usr/local/include/python3.7m ] && ln -sf /usr/include/python3.7m /usr/local/include/python3.7m
/usr/local/bin/python3 -m pip install --quiet --user matplotlib pandas mysql-connector Pillow
chmod -R a+w /usr/local/lib64/python3.7/site-packages
# python3.9.x support needed as of 4.2
if [ ! -x /usr/local/bin/python3 -o $(/usr/local/bin/python3 --version | cut -f-2 -d.) != "Python 3.9" ]; then
yum install openssl-devel bzip2-devel libffi-devel zlib-devel -q -y
cd /usr/local/src
curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz
cd Python-3.9.6
./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC"
make -j $(nproc)
make altinstall
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3
curl -sSL https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3
/usr/local/bin/python3 pip -m install mysql-connector mysql-client matplotlib numpy pandas Pillow networkx
fi

# mono
if [ ! -f /usr/bin/mono ]; then
Expand All @@ -45,8 +53,7 @@ mono /usr/local/natural_docs/NaturalDocs.exe \$*' > /usr/local/bin/natural_docs
fi

# converter support
/usr/local/bin/python3 -m pip install --quiet --user networkx
# cd /tmp
# curl http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/m/mdbtools-0.7.1-3.el7.x86_64.rpm > mdbtools-0.7.1-3.el7.x86_64.rpm
# rpm -Uvh mdbtools-0.7.1-3.el7.x86_64.rpm
# yum -q install mdbtools -y
yum -q install mdbtools -y
83 changes: 83 additions & 0 deletions build-aux/setup-Linux-ubuntu-20.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash

# Install needed system tools
# update first
apt-get -q update
apt-get -q install tzdata -y

# install system build tools needed by gridlabd
apt-get -q install git -y
apt-get -q install unzip -y
apt-get -q install autoconf -y
apt-get -q install libtool -y
apt-get -q install g++ -y
apt-get -q install cmake -y
apt-get -q install flex -y
apt-get -q install bison -y
apt-get -q install libcurl4-gnutls-dev -y
apt-get -q install libncurses5-dev -y
apt-get -q install liblzma-dev -y
apt-get -q install libssl-dev -y
apt-get -q install libbz2-dev -y
apt-get -q install libffi-dev -y
apt-get -q install zlib1g-dev -y

# install python 3.9
if [ ! -x /usr/local/bin/python3 -o $(/usr/local/bin/python3 --version | cut -f-2 -d.) != "Python 3.9" ]; then
cd /usr/local/src
curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz
cd Python-3.9.6
./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC"
make -j $(nproc)
make altinstall
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config
ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc
ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle
curl -sSL https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3
fi

# install python libraries by validation
/usr/local/bin/python3 pip -m install --upgrade pip
/usr/local/bin/python3 pip -m install mysql-connector mysql-client matplotlib numpy pandas Pillow

# doxggen
apt-get -q install gawk -y
if [ ! -x /usr/bin/doxygen ]; then
if [ ! -d /usr/local/src/doxygen ]; then
git clone https://github.com/doxygen/doxygen.git /usr/local/src/doxygen
fi
if [ ! -d /usr/local/src/doxygen/build ]; then
mkdir /usr/local/src/doxygen/build
fi
cd /usr/local/src/doxygen/build
cmake -G "Unix Makefiles" ..
make
make install
fi

# mono
apt-get -q install curl -y
if [ ! -f /usr/bin/mono ]; then
cd /tmp
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu wheezy/snapshots/4.8.0 main" | tee /etc/apt/sources.list.d/mono-official.list
apt-get -q update -y
apt-get -q install mono-devel -y
fi

# natural_docs
if [ ! -x /usr/local/bin/natural_docs ]; then
cd /usr/local
curl https://www.naturaldocs.org/download/natural_docs/2.0.2/Natural_Docs_2.0.2.zip > natural_docs.zip
unzip -qq natural_docs
rm -f natural_docs.zip
mv Natural\ Docs natural_docs
echo '#!/bin/bash
mono /usr/local/natural_docs/NaturalDocs.exe \$*' > /usr/local/bin/natural_docs
chmod a+x /usr/local/bin/natural_docs
fi

# converter support
/usr/local/bin/python3 pip -m install networkx
apt-get -q install mdbtools -y
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM slacgismo/gridlabd_dockerhub_base:210520
FROM slacgismo/gridlabd_dockerhub_base:211105


ENV container docker
Expand Down
4 changes: 4 additions & 0 deletions docs/GLM/Directive/Clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ clock {
}
~~~

# Caveat

Introducing more than one clock directive in a model is allowed. However, all elements of previous clock directives are reset when a new clock directive is encountered. As a result, all previous parameters of previous settings are lost after the new directive is processed.

# See also

* [share/tzinfo.txt](https://github.com/slacgismo/gridlabd/blob/master/gldcore/tzinfo.txt)
51 changes: 51 additions & 0 deletions docs/GLM/Global/Geocode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[[/GLM/Global/Geocode]] -- Geohash encoder

# Synopsis

GLM:

~~~
${GEOCODE <latitude>,<longitude>[#<resolution>]}
${GEOCODE <objname>[#<resolution>]}
~~~

# Description

Return the geohash code corresponding to the latitude/longitude given or the object name. This can be helpful is connecting object based on location, such as linking an object to weather.

The default resolution is 5. The resolution corresponds to the following distances:

1 2500 km
2 600 km
3 80 km
4 20 km
5 2.5 km
6 0.2 km
7 0.08 km
8 0.02 km
9 0.0025 km
10 0.0006 km
11 0.000075 km

# Example

The following example prints the geohash codes for a position and an object:

~~~
class test
{
char32 geocode;
}
object test
{
name "test";
latitude 37.5;
longitude -122.2;
}
#print ${GEOCODE 37.5,-122.2#6}
#print ${GEOCODE test#6}
~~~

# See also

* [[/GLM/Subcommand/Geodata]]
5 changes: 1 addition & 4 deletions docs/GLM/Macro/Ifexist.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ The `#ifexist` macro is used to conditionally process GLM lines when a file is f
#endif
~~~

# Caveats

1. TODO enumerate known issues using Ifexist

# See also

* [[/Glm/Macro/If]]
* [[/Glm/Macro/Ifmissing]]

41 changes: 41 additions & 0 deletions docs/GLM/Macro/Ifmissing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[[/Glm/Macro/Ifmissing]] -- Macro to conditionally process GLM lines when a file missing

# Synopsis

GLM:

~~~
#ifmissing <path-name>
...
[#else]
...
#endif
~~~

or

~~~
#ifmissing "<path-name>"
...
[#else]
...
#endif
~~~

# Description

The `#ifmissing` macro is used to conditionally process GLM lines when a file is not found.

# Examples

~~~
#ifmissing "myfile.glm"
#print didn't find it
#endif
~~~

# See also

* [[/Glm/Macro/If]]
* [[/Glm/Macro/Ifexist]]

2 changes: 1 addition & 1 deletion docs/Module/Powerflow/Pole.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
~~~
object pole
{
pole_status "OK";
status "OK";
tilt_angle "0 deg";
tilt_direction 0 deg";
weather "<climate-object>";
Expand Down
2 changes: 2 additions & 0 deletions docs/Module/Tape/Player.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class player{

The object properties that will be updated based on value in the player's input file. Property names are case sensitive, and whitespace between properties is verboten. Properties with units may be converted to compatible internal units, if necessary. Complex properties may be written as their individual real and imaginary parts by appending ".real" or ".imag" to the property name, such as "power.real", but those parts cannot convert their units, if the associated complex property has an internal unit specified.

The property object must be omitted when the CSV file contains a header line with the property list. In this case, looping is not permitted.

### `file`

~~~
Expand Down
18 changes: 11 additions & 7 deletions docs/Subcommand/Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Shell:

~~~
host% gridlabd job [-v|--verbose] [-q|--quiet] [-d|--debug] [-j|--jobfile JOBFILE] [-w|--workdir FOLDER] [-c|--configfile CONFIG] [-T|--threadcount NTHREADS] FILE1 ...
host% gridlabd job [-v|--verbose] [-q|--quiet] [-d|--debug] [-j|--jobfile JOBFILE] [-w|--workdir FOLDER] [-c|--configfile CONFIG] [-m|--modifyfile MODIFY] [-T|--threadcount NTHREADS] FILE1 ...
~~~

GLM:

~~~
#job [-v|--verbose] [-q|--quiet] [-d|--debug] [-j|--jobfile JOBFILE] [-w|--workdir FOLDER] [-c|--configfile CONFIG] [-T|--threadcount NTHREADS] FILE1 ...
#job [-v|--verbose] [-q|--quiet] [-d|--debug] [-j|--jobfile JOBFILE] [-w|--workdir FOLDER] [-c|--configfile CONFIG] [-m|--modifyfile MODIFY] [-T|--threadcount NTHREADS] FILE1 ...
~~~

# Description
Expand All @@ -26,24 +26,28 @@ The default configuration file name is `gridlabd-config.glm`.

### `-c|--configfile CONFIG`

Specifies the name of the configuration file to use instead of `gridlabd-config.glm`.
Specifies the name of the configuration file name to use instead of `gridlabd-config.glm`. The configuration file is created from the job entry in the job control file and loaded before the main GLM file is loaded.

### `-d|--debug`

Enables debugging output.

### `-T|--threadpool NTHREADS`

Enables parallel processing of jobs using a threadpool using the specified number of threads.

### `-j|--jobfile JOBFILE`

Specifies the name of the job control file to use instead of `gridlabd-job.csv`.

### `-m|--modifyfile MODIFY`

Specifies the name of the modify file to use instead of `gridlabd-modify.glm`. The modification file is loaded after the main GLM file is loaded.

### `-q|--quiet`

Disables all but error output.

### `-T|--threadpool NTHREADS`

Enables parallel processing of jobs using a threadpool using the specified number of threads.

### `-v|--verbose`

Enable additional output (useful to diagnose problem).
Expand Down
Loading

0 comments on commit 90e21c4

Please sign in to comment.