- Posts: 5
Macro "Subarray Layout Optimization" Question
- bpm77
- Topic Author
Less
More
09 Dec 2018 14:21 #6547
by bpm77
Macro "Subarray Layout Optimization" Question was created by bpm77
Hello!
I'm simulating a system on SAM for a desired array size of 6362.35 kWdc. If I check the button "Estimate subarray 1 configuration", the resulting system (33 panels in series x 838 in parallel) has a size that I know does not fit in my area, because of the number of strings in parallel.
I found out that the macro "Subarray Layout Optimization" could optimize the layout given my area constraint. However, when I try running it the following error occurs:
Macro did not finish.
[810] referencing unassigned variable:modules_per_string_npv
I cannot seem to find a way to fix this error. Does anyone have a suggestion on how to tackle this?
Thank you,
Bruno
I'm simulating a system on SAM for a desired array size of 6362.35 kWdc. If I check the button "Estimate subarray 1 configuration", the resulting system (33 panels in series x 838 in parallel) has a size that I know does not fit in my area, because of the number of strings in parallel.
I found out that the macro "Subarray Layout Optimization" could optimize the layout given my area constraint. However, when I try running it the following error occurs:
Macro did not finish.
[810] referencing unassigned variable:modules_per_string_npv
I cannot seem to find a way to fix this error. Does anyone have a suggestion on how to tackle this?
Thank you,
Bruno
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
10 Dec 2018 10:14 #6548
by pgilman
Replied by pgilman on topic Macro "Subarray Layout Optimization" Question
Dear Bruno,
For now the subarray layout optimization macro only works with the Residential and Commercial financial model. It will not work without a financial model because it uses the net present value (NPV) for the optimization.
It also does not work with the PPA financial models (single owner, partnership, leaseback) because of an issue with the variable name that we will fix in the next software update.
In the meantime, if you want to use the macro with a PPA financial model, you can fix it by modifying the macro script:
This workaround allows you to change the variable name, so if you run the macro for a Residential or Commercial case, you can comment out the new Line 501 and use the variable assignment on Line 500 instead.
Best regards,
Paul.
For now the subarray layout optimization macro only works with the Residential and Commercial financial model. It will not work without a financial model because it uses the net present value (NPV) for the optimization.
It also does not work with the PPA financial models (single owner, partnership, leaseback) because of an issue with the variable name that we will fix in the next software update.
In the meantime, if you want to use the macro with a PPA financial model, you can fix it by modifying the macro script:
- On the Macro page, click View code at the top right of the window.
- Scroll down to Line 500:
Code:npv[i][j] = get('npv');
- Add the line
Code:npv[i][j] = get('project_return_aftertax_npv');Code://
- Click Save, and then go back to the Macro page and try running the macro again.
This workaround allows you to change the variable name, so if you run the macro for a Residential or Commercial case, you can comment out the new Line 501 and use the variable assignment on Line 500 instead.
Code:
//npv[i][j] = get('npv'); // for Residential and Commercial
npv[i][j] = get('project_return_aftertax_npv'); // for PPA models
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman