Skip to content

Instantly share code, notes, and snippets.

@jdherman
jdherman / test-gurobi.txt
Created December 3, 2025 19:06
Gurobi missing DV
This file has been truncated, but you can view the full file.
==============Run Study Start============
Set parameter Username
Set parameter LicenseID to value 2734542
Academic license - for non-commercial use only - expires 2026-11-07
Cycle 1 in 1921/10/31 Skipped. (gentables)
Cycle 2 in 1921/10/31 Skipped. (swpforecast)
Variables in dvarMap not in varDoubleMap:
[c_ntoma]
Variables in varDoubleMap not in dVarMap:
@jdherman
jdherman / results.txt
Created December 3, 2025 18:00
DV differences CBC vs Gurobi
month, cycle, variable, CBC, Gurobi
1921_10 c14 c_mcd002 413.67056 10808.279287776533
1921_10 c14 c_mcd005 423.99056 10818.599287776533
1921_10 c14 c_mcd009 290.63034 10685.239075815958
1921_10 c14 c_mcd014 290.63034 10685.239075815958
1921_10 c14 c_mcd018 290.63034 10685.239075815958
1921_10 c14 c_mcd021 290.63034 10685.239075815958
1921_10 c14 c_mcd028 295.23552 10689.844247024068
1921_10 c14 c_mcd032 254.10301 10648.711742729001
1921_10 c14 c_mcd033 254.10301 10648.711742729001
@jdherman
jdherman / results.txt
Created December 3, 2025 17:52
example monthly r_11_sa4_dwrps2
month cycle variable CBC Gurobi
1921_10 c24 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c25 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c26 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c27 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c28 r_11_sa4_dwrps2 42.334787 42.33478692379353
1921_10 c29 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c30 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c31 r_11_sa4_dwrps2 42.334787 42.33478692379354
1921_10 c32 r_11_sa4_dwrps2 42.334787 42.33478692379354
@jdherman
jdherman / download-data-caiso.py
Last active January 23, 2018 01:54
Download CAISO hourly renewables data
# this runs in python 3 as of Jan. 2018
import pandas as pd
import time
import urllib
from bs4 import BeautifulSoup
import numpy as np
from io import StringIO
import matplotlib.pyplot as plt
dates = pd.date_range(start='4/20/2010', end='1/20/2018')
@jdherman
jdherman / folsom-data.csv
Last active October 5, 2016 15:36
really simple reservoir simulation
datetime storage elevation outflow inflow precip evap tocs
2000-10-01 659.258 435.01 1849.0 1107.0 0.0 9.0
2000-10-02 658.149 434.89 1991.0 1432.0 0.0 0.0
2000-10-03 656.208 434.68 2327.0 1357.0 0.0 9.0
2000-10-04 653.436 434.38 2020.0 631.0 0.0 9.0
2000-10-05 651.034 434.12 2110.0 908.0 0.0 9.0
2000-10-06 650.295 434.04 1871.0 1507.0 0.0 9.0
2000-10-07 647.632 433.75 2046.0 712.0 0.0 9.0
2000-10-08 644.331 433.39 2241.0 586.0 0.0 9.0
2000-10-09 641.671 433.1 1886.0 554.0 0.0 9.0
# Leaf River Mississippi, 40 years of daily data
# Precip (mm/day) PET (mm/day) Q (mm/day)
0.0000000e+000 4.6004000e+000 2.8995124e-001
0.0000000e+000 4.3092000e+000 2.4476064e-001
0.0000000e+000 4.3286000e+000 2.1338209e-001
0.0000000e+000 4.7777000e+000 1.9329787e-001
0.0000000e+000 2.9110000e+000 1.8325798e-001
0.0000000e+000 3.5714000e+000 1.7447252e-001
1.3518000e+000 1.4499000e+000 1.7195922e-001
0.0000000e+000 4.6986000e+000 1.6694149e-001
@jdherman
jdherman / exstatic.py
Created December 9, 2015 18:24
exstatic syllabi keyword analysis
import glob
kw = ['climate', 'decision theory', 'dynamic', 'economics', 'game theory', 'heuristic', 'hydrology',
'integer', 'linear', 'model', 'nonlinear', 'policy', 'probability', 'statistics',
'stochastic','quality', 'simulation', 'optimization']
files = glob.glob('*.txt')
courses_including = {}
avg_count = {}
@jdherman
jdherman / plotstyle.py
Created October 10, 2015 22:44
plot style python
def init_plotting():
sns.set_style('whitegrid')
plt.rcParams['figure.figsize'] = (5, 4)
plt.rcParams['font.size'] = 13
plt.rcParams['font.family'] = 'OfficinaSanITCBoo'
# plt.rcParams['font.weight'] = 'bold'
plt.rcParams['axes.labelsize'] = 1.1*plt.rcParams['font.size']
plt.rcParams['axes.titlesize'] = 1.1*plt.rcParams['font.size']
plt.rcParams['legend.fontsize'] = plt.rcParams['font.size']
plt.rcParams['xtick.labelsize'] = plt.rcParams['font.size']
@jdherman
jdherman / taccvietnam.md
Last active August 29, 2015 14:26
tacc vietnam notes for Julie

###First Clone the latest version of the model from bitbucket.

###Upload code to TACC You can use scp, rsync, even git, whatever. I use rsync:

rsync -raz . jdh33@stampede.tacc.utexas.edu:~/projects/emodps

when you're in the highest level directory of the project (the dot .) the nice thing about rsync is that it only transfers files that were added or modified relative to the destination.

@jdherman
jdherman / cawater-links.md
Last active December 30, 2020 23:05
links for california water data