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

Update isone.py #1329

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c3928b9
Update version.h
Jun 29, 2023
ec11733
Add support for accessing ISO New England hourly market data (#1307)
dchassin Jul 3, 2023
265940a
Add wheel install (#1310)
dchassin Jul 9, 2023
c4599e4
Add shell subcommand (#1312)
dchassin Jul 10, 2023
e1bbfdd
Update Geodata.md (#1314)
aivanova5 Jul 14, 2023
e0c538a
Fix create_meters.py implementation (#1321)
aivanova5 Jul 28, 2023
cf6901e
Update README.md (#1315)
dchassin Jul 31, 2023
20f2625
Add group tool (#1319)
dchassin Jul 31, 2023
5045e38
Update isone.py
dchassin Aug 12, 2023
45037a3
Update isone.py
dchassin Aug 12, 2023
0f7b786
Fix isony.py
dchassin Aug 12, 2023
09d7d3e
Updated pole.cpp (#1317)
AllisonBrand Sep 19, 2023
7aa7146
Update test_pole.csv (#1337)
dchassin Sep 22, 2023
b1966eb
Merge branch 'develop' into develop-fix-isone-help
dchassin Sep 22, 2023
650e62c
Add headers and source to build target (#1336)
dchassin Sep 22, 2023
89994cd
Merge branch 'develop' into develop-fix-isone-help
dchassin Sep 22, 2023
2bd1ef3
Update version.h
Jun 29, 2023
ab162fc
Add support for accessing ISO New England hourly market data (#1307)
dchassin Jul 3, 2023
3406e94
Add wheel install (#1310)
dchassin Jul 9, 2023
4c5344b
Add shell subcommand (#1312)
dchassin Jul 10, 2023
ae7f891
Update Geodata.md (#1314)
aivanova5 Jul 14, 2023
05b2a02
Fix create_meters.py implementation (#1321)
aivanova5 Jul 28, 2023
4719de9
Update README.md (#1315)
dchassin Jul 31, 2023
b6c8e43
Add group tool (#1319)
dchassin Jul 31, 2023
256a551
Updated pole.cpp (#1317)
AllisonBrand Sep 19, 2023
bbbbcb4
Update test_pole.csv (#1337)
dchassin Sep 22, 2023
c666f9d
Add headers and source to build target (#1336)
dchassin Sep 22, 2023
d00b29b
Add create_childs tool (#1335)
dchassin Sep 22, 2023
462e7ec
Merge branch 'develop' into develop-fix-isone-help
dchassin Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Authors:
# DP Chassin ([email protected])

.SILENT:

$(info Current target is $(shell $(top_srcdir)/build-aux/version.sh --name))

# !!! must match version specified in configure.ac
Expand Down Expand Up @@ -50,13 +52,15 @@ AM_LDFLAGS += -module
AM_LDFLAGS += -avoid-version
AM_LDFLAGS += -export-dynamic
AM_LDFLAGS += $(GLD_LDFLAGS) -lpython$(PYVER)
AM_LIBTOOLFLAGS = --quiet

# makefile fragments populate these variables
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
dist_pkgdata_DATA = requirements.txt
pkgdata_DATA =
pkginclude_HEADERS =
noinst_LTLIBRARIES =
pkglib_LTLIBRARIES =
bin_PROGRAMS =
Expand Down Expand Up @@ -291,11 +295,18 @@ $(PREFIX)/docker.img: docker/Dockerfile Makefile
@mkdir -p $(prefix)
docker save $(PACKAGE)/$(PACKAGE_VERSION)-$(PACKAGE_BRANCH):latest -o $(prefix)/docker.img

system: python-install install
system: python-install install $(prefix)/src
@echo "Setting $$($(top_srcdir)/build-aux/version.sh --install) to the current system version"
@$(prefix)/bin/gridlabd version set
@test "$$(gridlabd --version=install)" = "$$($(top_srcdir)/build-aux/version.sh --install)" || echo 'WARNING : build and install versions differ; use build `--clean` option to fix this problem'

$(prefix)/src:
@echo Copying source files to $@...
@mkdir -p $(prefix)/src/source $(prefix)/src/python
@cp $(top_srcdir)/source/*.cpp $(prefix)/src/source
@cp $(top_srcdir)/python/*.cpp $(prefix)/src/python
@chmod -R 555 $(prefix)/src

index: weather library template

html-local: module-html developer-html troubleshooting-html
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ The preferred method for running HiPAS GridLAB-D is to download the master image
Once you have installed docker, you may issue the following commands to run GridLAB-D at the command line:

~~~
docker run -it -v $PWD:/model arras-energy/gridlabd:latest gridlabd -W /model [LOADOPTIONS] [FILENAME.EXT] [RUNOPTIONS]
docker run -it -v $PWD:/model lfenergy/arras:latest gridlabd -W /model [LOADOPTIONS] [FILENAME.EXT] [RUNOPTIONS]
~~~

On many systems, an alias can be used to make this a simple command that resembles the command you would normally issue to run a host-based installation:

~~~
alias gridlabd='docker run -it -v $PWD:/tmp arras-energy/gridlabd:latest gridlabd'
alias gridlabd='docker run -it -v $PWD:/tmp lfenergy/arras:latest gridlabd'
~~~

Note that this alias will interfere with any host-based installation. You may use the `gridlabd docker` command to manage the use of docker images concurrently with host-based installations.
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test -f $HOME/.gridlabd/bin/activate || error "$HOME/.gridlabd is not found. Run
test ! -z "$VIRTUAL_ENV" || . $HOME/.gridlabd/bin/activate 1>$STDOUT 2>$STDERR
test ! -z "$VIRTUAL_ENV" || error "unable to activate gridlabd venv"
test -f ./configure || autoreconf -isf 1>$STDOUT 2>$STDERR || error "autoconf failed"
test -f Makefile || ./configure $CONFIGURE 1>$STDOUT 2>$STDERR || error "./configure failed"
test -f Makefile || ./configure --enable-silent-rules $CONFIGURE 1>$STDOUT 2>$STDERR || error "./configure failed"
make $MAKEFLAGS $TARGET 1>$STDOUT 2>$STDERR || error "unable to make build"
if [ ! -z "$VERIFY" ]; then
$(build-aux/version.sh --install)/bin/gridlabd $VERIFY 1>$STDOUT 2>$STDERR || error "unable to verify install"
Expand Down
18 changes: 6 additions & 12 deletions cloud/websites/docs.gridlabd.us/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<!DOCTYPE HTML />
<HTML>
<SCRIPT LANGUAGE="Javascript" SRC="_defaults.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
document.writeln('<FRAMESET ROWS="' + (top_panel_height+20) + ',*" BORDER=2>');
console.info(window.location.search)
document.writeln('<FRAME SRC="_topbar.html" NORESIZE="noresize"></FRAME>');
document.writeln('<FRAMESET COLS="320,*" BORDER=3>');
document.writeln('<FRAME NAME="contents" SRC="_contents.html' + window.location.search + '"></FRAME>');
document.writeln('<FRAME NAME="page" SRC="_page.html' + window.location.search + '"></FRAME>');
document.writeln('</FRAMESET>');
document.writeln('</FRAMESET>');
</SCRIPT>

<HEAD>
<META HTTP-EQUIV="refresh" CONTENT="0,url=http://docs.gridlabd.us/index.html?owner=arras-energy&project=gridlabd" />
</HEAD>
<BODY>
Redirecting to <A HREF="http://docs.gridlabd.us/index.html?owner=arras-energy&project=gridlabd">http://docs.arras-energy.org/index.html?owner=arras-energy&project=gridlabd</A>...
</BODY>
</HTML>
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ AC_CONFIG_AUX_DIR([build-aux])
###############################################################################

AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])
AM_SILENT_RULES([yes])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])

###############################################################################
Expand Down
17 changes: 14 additions & 3 deletions docs/Module/Python.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

# Synopsis

Python 3.6 or greater:
GridLAB-D Python venv:
~~~
gridlabd shell
python$PYTHON_VER -m venv myenv
. myenv/bin/activate
python3 -m pip install $GLD_ETC/*.whl
~~~

Python 3:
~~~
>>> import gridlabd
>>> gridlabd.title()
Expand Down Expand Up @@ -256,6 +264,7 @@ Saves the full model to the file. The currently supported formats are `.glm`, `
The following model is `test.glm`:
~~~
module test;
#set suppress_repeat_messages=FALSE
clock {
starttime '2018-01-01 00:00:00';
stoptime '2018-01-01 01:00:00';
Expand Down Expand Up @@ -308,7 +317,7 @@ bash$ python3
2018-01-01 00:50:00 UTC,0.251099
2018-01-01 00:55:00 UTC,2.778129
2018-01-01 01:00:00 UTC,0.603100
4362511024
0
>>> quit()
~~~
The following example records all house temperature when the model commit if performed:
Expand Down Expand Up @@ -391,4 +400,6 @@ The first few lines of output are in `house.csv`:

# See also

* [[/Python subcommand]]
* [[/Module/Python]]
* [[/Subcommand/Shell]]

4 changes: 2 additions & 2 deletions docs/Subcommand/Geodata.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ You must subscribe to the TrafficView service to use this dataset.
The following command obtains the distance between two locations:

~~~
% gridlabd geodata -d -D distance location 37.4150,-122.2056 37.3880,-122.2884
% gridlabd geodata merge -d -D distance location 37.4150,-122.2056 37.3880,-122.2884
latitude,longitude,distance
37.415,-122.2056,0.0
37.388,-122.2884,7906.193731232153
Expand All @@ -176,7 +176,7 @@ latitude,longitude,distance
The following command obtains the coordinates for the points between two locations at 1 km resolution:

~~~
% gridlabd geodata -d -D distance location 37.4150,-122.2056 37.3880,-122.2884 -r 1000
% gridlabd geodata merge -d -D distance location 37.4150,-122.2056 37.3880,-122.2884 -r 1000
latitude,longitude,distance
37.415,-122.2056,0.0
37.41158495593229,-122.21607280180764,1000.0
Expand Down
51 changes: 51 additions & 0 deletions docs/Subcommand/Shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[[/Subcommand/Shell]] -- Open GridLAB-D shell environment

# Synopsis

Shell:

~~~
sh$ gridlabd shell [OPTIONS ...]
~~~

# Description

The `shell` subcommand opens a shell in the GridLAB-D environment. The shell used is the one currently running as specified by the `SHELL` environment variable. This can be used to run Python with the active python `venv` used for GridLAB-D, or to create a new Python virtual environment in which gridlabd can be run. The options are the same as for the shell current being used.

The following environment variables are set in the shell environment:

- `CCFLAGS`: C-compiler flags
- `CFLAGS`: C-compiler flags
- `CPPFLAGS`: C++ compiler flags
- `CXXFLAGS`: C++ compiler flags
- `GLD_BIN`: binary folder
- `GLD_ETC`: shared files folder
- `GLD_INC`: include files folder
- `GLD_LIB`: library folder
- `GLD_VER`: version folder
- `GLPATH`: GridLAB-D file search path
- `INCLUDE`: C-compiler include flags
- `LDFLAGS`: linker flags
- `LIB`: linker library path
- `PYCCFLAGS`: python C-compiler flags
- `PYLDFLAGS`: Python linker flags
- `PYTHON_CONFIG` python config executable name
- `PYTHON_VER`: python version number (major.minor)
- `PYTHONPATH`: Python search path
- `VIRTUAL_ENV`: Python virtual environment path
- `VIRTUAL_ENV_PROMPT`: Python virtual environment prompt

# Example

The following commands open a GridLAB-D shell environment and create a Python virtual environment in which GridLAB-D is installed

~~~
gridlabd shell
python$PYTHON_VER -m venv myenv
. myenv/bin/activate
python3 -m pip install $GLD_ETC/*.whl
~~~

# See also

* [[/Subcommand/Python]]
2 changes: 1 addition & 1 deletion geodata/geodata_powerline.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def TODO(value=float('nan')):
}

default_config = {
"cabletype_file" : f"{GLD_ETC}/gridlabd/geodata_powerline_cabletypes.csv",
"cabletype_file" : f"{GLD_ETC}/geodata_powerline_cabletypes.csv",
}

OPTIONS = default_options
Expand Down
Loading