Skip to content

Changes for running LEGO.py - #109

Draft
scrappie1 wants to merge 4 commits into
mainfrom
fix/slackNodeParameterValidation
Draft

Changes for running LEGO.py#109
scrappie1 wants to merge 4 commits into
mainfrom
fix/slackNodeParameterValidation

Conversation

@scrappie1

@scrappie1 scrappie1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
  • In LEGO/modules/power.py: the updated validation for slack node parameter now expects Slack node value is in Power_Parameters.xlsx to be set to CALCULATE_FROM_MAX_DEMAND in order for the slack node to be calculated.

  • LEGO.py now is to be run with optional command line arguments (for clustering):

python LEGO.py -h
Usage: LEGO.py [-h] [--numberOfRPs NUMBEROFRPS] [--lengthOfRPs LENGTHOFRPS]
               caseStudyDirectory
               [{ModelType.DETERMINISTIC,ModelType.EXTENSIVE_FORM,ModelType.BENDERS,ModelType.PROGRESSIVE_HEDGING}]

Starts LEGO for given case study

Positional Arguments:
  caseStudyDirectory    Path to folder containing data for LEGO model
  {ModelType.DETERMINISTIC,ModelType.EXTENSIVE_FORM,ModelType.BENDERS,ModelType.PROGRESSIVE_HEDGING}
                        ModelType of first model

Options:
  -h, --help            show this help message and exit
  --numberOfRPs NUMBEROFRPS
                        Number of representative periods to cluster the data into
  --lengthOfRPs LENGTHOFRPS
                        Hours per representative period (e.g., 24, 48)
  • Running LEGO.py now also generates a file LEGO.log with the output from the run including timestamps (TODO).

@scrappie1
scrappie1 marked this pull request as ready for review July 22, 2026 13:11
@scrappie1
scrappie1 marked this pull request as draft July 22, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant