Skip to content

Commit

Permalink
Purge per NREL management and legal
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Becker committed Dec 13, 2023
1 parent 860ff67 commit 523f9aa
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 112 deletions.
19 changes: 0 additions & 19 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,6 @@ export DYLD_LIBRARY_PATH # for Mac
#==============================================================================


#------------------------------------------------------------------------------

# Uncomment the following if you are using the Xpress solver
#------------------------------------------------------------------------------
#XPRESSDIR="/usr/local/opt/xpress"
#DYLD_LIBRARY_PATH="${XPRESSDIR}/lib:${SRC_DIR}:${DYLD_LIBRARY_PATH}" # for Mac
#LD_LIBRARY_PATH="${XPRESSDIR}/lib:${SRC_DIR}:${LD_LIBRARY_PATH}" # for Linux
#CLASSPATH="${XPRESSDIR}/lib/xprs.jar:${XPRESSDIR}/lib/xprb.jar:${XPRESSDIR}/lib/xprm.jar:${CLASSPATH}"
#PATH="${XPRESSDIR}/bin:${PATH}"
#
#export PATH
#export XPRESS="$XPRESSDIR/bin"
#export DYLD_LIBRARY_PATH
#export LD_LIBRARY_PATH
#export CLASSPATH
#source /opt/xpressmp/bin/xpvars.sh
#==============================================================================


#------------------------------------------------------------------------------
# You can change the following to add Julia to your system Path
#------------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,4 @@ all_data*
docs/formulation/*aux
docs/formulation/*log

# Customized docker files
docker-compose.xpressOS.yml
Dockerfile.xpressOS.pyjul

/.werf_secret_key
1 change: 1 addition & 0 deletions debug_inputs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"api_key": "uaz52dr5KTT5Qs5U72rS70hw3IYeHVEyAaDUFQvo", "Settings": {"timeout_seconds": 420, "time_steps_per_hour": 1, "optimality_tolerance": 0.001, "add_soc_incentive": true, "run_bau": true, "include_climate_in_objective": false, "include_health_in_objective": false, "off_grid_flag": false}, "Financial": {"analysis_years": 25, "elec_cost_escalation_rate_fraction": 0.006, "offtaker_discount_rate_fraction": 0.07, "offtaker_tax_rate_fraction": 0.0, "om_cost_escalation_rate_fraction": 0.001, "owner_discount_rate_fraction": 0.07, "owner_tax_rate_fraction": 0.0, "third_party_ownership": false, "value_of_lost_load_per_kwh": 0.0, "microgrid_upgrade_cost_fraction": 0.0, "offgrid_other_capital_costs": 0.0, "offgrid_other_annual_costs": 0.0, "CO2_cost_per_tonne": 51.0, "CO2_cost_escalation_rate_fraction": 0.042173, "generator_fuel_cost_escalation_rate_fraction": 0.012, "existing_boiler_fuel_cost_escalation_rate_fraction": 0.015, "boiler_fuel_cost_escalation_rate_fraction": 0.015, "chp_fuel_cost_escalation_rate_fraction": 0.015}, "Site": {"latitude": 39.91065, "longitude": -105.2348, "include_exported_elec_emissions_in_total": true, "include_exported_renewable_electricity_in_total": true}, "ElectricLoad": {"annual_kwh": 10000000.0, "doe_reference_name": "MediumOffice", "year": 2017, "loads_kw_is_net": true, "critical_loads_kw_is_net": false, "critical_load_fraction": 0.5, "operating_reserve_required_fraction": 0.0, "min_load_met_annual_fraction": 1.0}, "ElectricTariff": {"monthly_demand_rates": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "monthly_energy_rates": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], "urdb_label": "", "urdb_rate_name": "", "urdb_utility_name": "", "add_monthly_rates_to_urdb_rate": false, "add_tou_energy_rates_to_urdb_rate": false}, "ElectricUtility": {"interconnection_limit_kw": 1000000000.0, "net_metering_limit_kw": 100000000.0, "emissions_region": "", "emissions_factor_CO2_decrease_fraction": 0.01174, "emissions_factor_NOx_decrease_fraction": 0.01174, "emissions_factor_SO2_decrease_fraction": 0.01174, "emissions_factor_PM25_decrease_fraction": 0.01174}, "Wind": {"size_class": "large", "min_kw": 0.0, "max_kw": 10000.0, "installed_cost_per_kw": 2386.0, "om_cost_per_kw": 35.0, "macrs_option_years": 0, "macrs_bonus_fraction": 0.0, "macrs_itc_reduction": 0.5, "federal_itc_fraction": 0.0, "state_ibi_fraction": 0.0, "state_ibi_max": 10000000000.0, "utility_ibi_fraction": 0.0, "utility_ibi_max": 10000000000.0, "federal_rebate_per_kw": 0.0, "state_rebate_per_kw": 0.0, "state_rebate_max": 10000000000.0, "utility_rebate_per_kw": 0.0, "utility_rebate_max": 10000000000.0, "production_incentive_per_kwh": 0.0, "production_incentive_max_benefit": 1000000000.0, "production_incentive_years": 1, "production_incentive_max_kw": 1000000000.0, "can_net_meter": true, "can_wholesale": true, "can_export_beyond_nem_limit": true, "can_curtail": true, "operating_reserve_required_fraction": 0.0}}
10 changes: 0 additions & 10 deletions docker-compose.nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ services:
- django-nginx
restart: "on-failure"

licenseserver:
build:
context: julia_src/xpress/licenseserver
mac_address: c4:b3:01:d3:d5:eb
command: xpserver
expose:
- 27100

julia-nginx:
container_name: julia-nginx
build:
Expand All @@ -91,8 +83,6 @@ services:
- JULIA_NUM_THREADS=2
expose:
- 8081
depends_on:
- licenseserver
volumes:
- ./julia_src:/opt/julia_src

Expand Down
9 changes: 0 additions & 9 deletions docker-compose.nojulia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,5 @@ services:
volumes:
- .:/opt/reopt

licenseserver:
container_name: licenseserver-nojul
build:
context: julia_src/xpress/licenseserver
mac_address: c4:b3:01:d3:d5:eb
command: xpserver
expose:
- 27100

volumes:
pgdata:
13 changes: 0 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,13 @@ services:
- 8000:8000
volumes:
- .:/opt/reopt

licenseserver:
container_name: xpress_license_server
build:
context: julia_src/xpress/licenseserver
mac_address: c4:b3:01:d3:d5:eb
command: xpserver
expose:
- 27100

julia:
container_name: julia_api
build:
context: julia_src/
args:
- XPRESS_LICENSE_HOST=xpress_license_server
command: julia --project=/opt/julia_src http.jl
ports:
- "8081:8081"
depends_on:
- licenseserver
volumes:
- ./julia_src:/opt/julia_src
19 changes: 0 additions & 19 deletions julia_src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
FROM reopt/xpressbase AS xpress

FROM julia:1.8.5

# Install NREL root certs for machines running on NREL's network.
ARG NREL_ROOT_CERT_URL_ROOT=""
RUN set -x && if [ -n "$NREL_ROOT_CERT_URL_ROOT" ]; then curl -fsSLk -o /usr/local/share/ca-certificates/nrel_root.crt "${NREL_ROOT_CERT_URL_ROOT}/nrel_root.pem" && curl -fsSLk -o /usr/local/share/ca-certificates/nrel_xca1.crt "${NREL_ROOT_CERT_URL_ROOT}/nrel_xca1.pem" && update-ca-certificates; fi
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Install Xpress solver for client
ENV XPRESSDIR=/opt/xpressmp
ENV XPRESS=/opt/xpressmp/bin
ENV LD_LIBRARY_PATH=${XPRESSDIR}/lib:${LD_LIBRARY_PATH}
ENV LIBPATH=${XPRESSDIR}/lib:${LIBPATH}
ARG CLASSPATH=${XPRESSDIR}/lib/xprs.jar:${CLASSPATH}
ARG CLASSPATH=${XPRESSDIR}/lib/xprb.jar:${CLASSPATH}
ENV CLASSPATH=${XPRESSDIR}/lib/xprm.jar:${CLASSPATH}
ENV PATH=${XPRESSDIR}/bin:${PATH}

WORKDIR /opt/reopt/solver
COPY --from=xpress /opt/reopt/solver .
RUN sed -i -e 's/\r$//' install.sh
ARG XPRESS_LICENSE_HOST=licenseserver
RUN set -x && printf "f\nc\n\nn\n\n${XPRESS_LICENSE_HOST}\ny\n" | ./install.sh >> license_info.txt;
RUN rm xp8.12.3_linux_x86_64.tar.gz

# Install gfortran for /ghpghx
RUN apt-get update && apt-get install -y \
gfortran
Expand Down
10 changes: 0 additions & 10 deletions julia_src/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
version: "2.1"

services:
licenseserver:
container_name: xpress_license_server_dev
build:
context: ./xpress/licenseserver
mac_address: c4:b3:01:d3:d5:eb
command: xpserver
expose:
- 27100

julia:
container_name: julia_api_dev
build:
context: .
args:
- XPRESS_LICENSE_HOST=xpress_license_server_dev
command: julia --project="/opt/julia_src" http.jl
ports:
- "8081:8081"
7 changes: 1 addition & 6 deletions julia_src/xpress/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
FROM ubuntu:latest
# For creating base image of Julia API. Requires an untracked tar.gz file for FICO Xpress
# Used in both production and local development

WORKDIR /opt/reopt/solver
COPY xp8.12.3_linux_x86_64.tar.gz .
COPY install.sh .
# For creating base image of Julia API
22 changes: 0 additions & 22 deletions julia_src/xpress/licenseserver/Dockerfile

This file was deleted.

13 changes: 13 additions & 0 deletions workflow_notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
docker compose build
docker compose up

docker extension for viewing container status, attaching to containers

Julia package changes
Updating REopt.jl version within Docker container - REopt#branch versus Docker no-julia
Restart julia_api

Test with postman
Test with django - shell into django container

Debugging within VSCode Remote Containers in the django container

0 comments on commit 523f9aa

Please sign in to comment.