Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart, macro, and sample file upgrades #1948

Merged
merged 17 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This macro helps the user determine the optimal subarray size, ground coverage r
//@ name=length;type=number;label=Enter the Length of Field or Rooftop (m):;value=35
//@ name=width;type=number;label=Enter the width of Field or Rooftop (m):;value=25
//@ name=setback;type=number;label=Enter the setback (in m) from edges:;value=1
//@ name=max_gcr;type=number;label=Enter the maximum GCR:;value=1
//@ name=max_gcr;type=number;label=Enter the maximum GCR:;value=0.99
//@ name=min_gcr;type=number;label=Enter the minimum GCR(value cannot equal 0):;value=0.1
//@ name=gcr_steps;type=number;label=Enter the increments you would like to iterate GCR over:;value=0.1
//@ name=max_tilt;type=number;label=Enter the maximum allowable (fixed) tilt angle (in Degrees):;value=90
Expand Down
Binary file modified deploy/runtime/quickstart/mini-grid-example.sam
Binary file not shown.
2 changes: 1 addition & 1 deletion samples/3D Shade LK Scripts/3d-shade-active-surface.lk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This LK script is designed to work from SAM's 3D Shade Calculator. It
// shows how to use LK to create an active surface in the scene.
//
// This script was last tested in SAM 2021.12.02.
// This script was last tested in SAM 2024.12.12.
//
//////////////////////////////////////////////////////////////////////////

Expand Down
9 changes: 9 additions & 0 deletions samples/3D Shade LK Scripts/3d_shade-script-examples.lk
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//////////////////////////////////////////////////////////////////////////
//
// This LK script is designed to work from SAM's 3D Shade Calculator.
//
// This script was last tested in SAM 2024.12.12.
//
//////////////////////////////////////////////////////////////////////////


delay=700;
rotate( 140, 26 );
switch_to(1);
Expand Down
Binary file modified samples/Excel Exchange/excel-exchange-example.sam
Binary file not shown.
2 changes: 1 addition & 1 deletion samples/Excel Exchange/excel-object-example.lk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
file with the sam-exel-exchange-example.xlsx in the same folder.

Script originally written in SAM 2014.11.24
Updated and tested in SAM 2020.2.29 r2
Updated and tested in SAM 2024.12.12

*/
////////////////////////////////////////////////////////////////////////////////
Expand Down
Binary file modified samples/Excel Exchange/excel-object-example.sam
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This script runs a simulation and plots the output generation profile in a
DView window.

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12

*/
////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CSV file.

Use it with the data.csv file that accompanies this script.

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12

*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ column of data from a text file.

Use it with the data.txt file that accompanies this script.

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12

*/
////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
4. Set the value of the grid_target variable below to the value you want
to use in the time series array for the grid power target array.

Tested in SAM 2021.12.02.
Tested in SAM 2024.12.12.
*/
////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion samples/LK Scripts for SAM/battery-life-plot.lk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use the script:
1. Create or open a PV Battery or Custom Generation Battery case in SAM.
2. Run the script.

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12

*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SAM case:

To use the script, click Run above and follow the prompts.

Written in SAM 2020.11.29. Last tested in SAM 2021.12.02.
Written in SAM 2020.11.29. Last tested in SAM 2024.12.12.

*/

Expand Down
2 changes: 2 additions & 0 deletions samples/LK Scripts for SAM/coeffgen6par.lk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
This script runs the 6parsolve SSC compute module to calculate input parameters
for the 6-parameter single-diode photovoltaic model (CEC Module Model) from
datasheet parameters.

Last tested in SAM version 2024.12.12
*/

// Create SAM SDK Simulation Core (SSC) object
Expand Down
2 changes: 1 addition & 1 deletion samples/LK Scripts for SAM/csv-functions.lk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SAM LK script samples illustrating how to use the csvread() and csvwrite()
to work with CSV files.

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12
*/
////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion samples/LK Scripts for SAM/discount-rate-and-wacc.lk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for(rl=0;rl<11;rl++)
// effective tax rate
te=ts+(1-ts)*tf;
// debt fraction
fd=get('debt_percent')/100;
fd=get('debt_fraction')/100;
// inflation
ri=get('inflation_rate')/100;
// calculate real discount rate to set using wacc=dr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
Run simulations over a range of flat energy buy rates for a parametric study.

This script sets energy charge inputs for a simple flat buy rate and runs a
set of simulations over a range of flat rates.
set of simulations over a range of flat rates. Intended for use with an open
SAM case with a behind-the-meter financial model.

Written in SAM 2020.11.29 r2 tested in SAM 2021.12.02
Written in SAM 2020.11.29 r2 tested in SAM 2024.12.12.

*/

Expand Down
2 changes: 1 addition & 1 deletion samples/LK Scripts for SAM/electricity-rates-inputs.lk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the Residential and Commercial financial models.
Use it as a reference for electricity rate input variables. (Use the get()
function to read the values of variables.)

Prepared in SAM 2017.9.5. Tested in SAM 2021.12.02
Prepared in SAM 2017.9.5. Tested in SAM 2024.12.12

*/
////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This script requires that the debt mode on the Financial Parameters be set to
"Debt percent" and for depreciation, that the allocation for 5-yr MACRS be 100%
(all other allocations must be zero).

Tested in SAM 2021.12.02
Tested in SAM 2024.12.12

*/

Expand Down
Loading