- Posts: 5
Documentation for LK
- dagoski
- Topic Author
Less
More
22 Sep 2017 17:37 #5745
by dagoski
Documentation for LK was created by dagoski
I've just started to learn LK. The syntax seems easy enough to grok, but there's not a lot of documentation on how to do fairly elementary things. Is there a good set of documentation that covers things like how to create a new case and run a simulation. I've watched some of the video, but it only seems to cover how to work with an existing case. I'm working with a batch of parcels and would like to create cases for each. Would it be smarter to create a template case and change only the relevant parameters, system size in my case, then write the output to a file? At any rate, can any tell me if there's document that has details on each of the SAM LK functions? Thanks in advance.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5415
25 Sep 2017 12:02 #5746
by pgilman
Replied by pgilman on topic Documentation for LK
Hello,
Thank you for the message.
You can find some example LK scripts here that might be helpful:
sam.nrel.gov/samples
Click Functions at the top of the script editor window to see a searchable list of LK functions.
Click Help to open SAM's Help topic on the LK script editor with some basic instruction for how to use the editor.
From SAM's Help window, click Scripting reference to open a PDF document describing the LK scripting language.
You can create a case from LK using the
function, but if you are just getting started with LK, it might be easier to create the case in SAM first, and then use the script to change input variable values and run simulations.
For example, start SAM, create a case, and then open the script editor and type the following script:
Then, click Run at the top of the script editor window to run the script, and it should display windows in the console at the bottom of the window.
Best regards,
Paul.
Thank you for the message.
You can find some example LK scripts here that might be helpful:
sam.nrel.gov/samples
Click Functions at the top of the script editor window to see a searchable list of LK functions.
Click Help to open SAM's Help topic on the LK script editor with some basic instruction for how to use the editor.
From SAM's Help window, click Scripting reference to open a PDF document describing the LK scripting language.
You can create a case from LK using the
Code:
create_case()
For example, start SAM, create a case, and then open the script editor and type the following script:
Code:
simulate();
result = get('annual_energy');
outln('result = ' + result);
Then, click Run at the top of the script editor window to run the script, and it should display windows in the console at the bottom of the window.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman