-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/NREL/OpenStudio-BuildStock
- Loading branch information
Showing
45 changed files
with
10,729 additions
and
3,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#start the measure | ||
class ServerDirectoryCleanup < OpenStudio::Ruleset::ReportingUserScript | ||
|
||
#define the name that a user will see, this method may be deprecated as | ||
#the display name in PAT comes from the name field in measure.xml | ||
def name | ||
"Server Directory Cleanup" | ||
end | ||
|
||
#define the arguments that the user will input | ||
def arguments() | ||
args = OpenStudio::Ruleset::OSArgumentVector.new | ||
end #end the arguments method | ||
|
||
#define what happens when the measure is run | ||
def run(runner, user_arguments) | ||
super(runner, user_arguments) | ||
|
||
#use the built-in error checking | ||
unless runner.validateUserArguments(arguments, user_arguments) | ||
false | ||
end | ||
|
||
initial_string = "The following files were in the local run directory prior to the execution of this measure: " | ||
Dir.entries("./../").each do |f| | ||
initial_string << "#{f}, " | ||
end | ||
initial_string = initial_string[0..(initial_string.length-3)]+"." | ||
runner.registerInitialCondition(initial_string) | ||
|
||
Dir.glob("./../*.sql").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.audit").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../in.osm").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.bnd").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.eio").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.shd").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.mdd").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../*.eso").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
Dir.glob("./../pre-preprocess.idf").each do |f| | ||
File.delete(f) | ||
runner.registerInfo("Deleted #{f} from the run directory.") if !File.exist?(f) | ||
end | ||
|
||
final_string = "The following files were in the local run directory following the execution of this measure: " | ||
Dir.entries("./..").each do |f| | ||
final_string << "#{f}, " | ||
end | ||
final_string = final_string[0..(final_string.length-3)]+"." | ||
runner.registerFinalCondition(final_string) | ||
|
||
true | ||
|
||
end #end the run method | ||
|
||
end #end the measure | ||
|
||
#this allows the measure to be use by the application | ||
ServerDirectoryCleanup.new.registerWithApplication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<measure> | ||
<schema_version>3.0</schema_version> | ||
<name>server_directory_cleanup</name> | ||
<uid>ec7d04ad-0b7b-495b-825a-e1b6d28d1d3f</uid> | ||
<version_id>06036ce2-8e98-45e1-9043-78e2aa60a26a</version_id> | ||
<version_modified>20170511T212356Z</version_modified> | ||
<xml_checksum>5F1EDF75</xml_checksum> | ||
<class_name>ServerDirectoryCleanup</class_name> | ||
<display_name>Server Directory Cleanup</display_name> | ||
<description>Removes a significant portion of the saved results from each run, helping to alleviate memory problems.</description> | ||
<modeler_description>Use during large server runs, when individual sequel files and the like will not be needed.</modeler_description> | ||
<arguments/> | ||
<outputs/> | ||
<provenances/> | ||
<tags> | ||
<tag>Calibration</tag> | ||
</tags> | ||
<attributes> | ||
<attribute> | ||
<name>Measure Type</name> | ||
<value>ReportingMeasure</value> | ||
<datatype>string</datatype> | ||
</attribute> | ||
<attribute> | ||
<name>Uses SketchUp API</name> | ||
<value>false</value> | ||
<datatype>boolean</datatype> | ||
</attribute> | ||
</attributes> | ||
<files> | ||
<file> | ||
<version> | ||
<software_program>OpenStudio</software_program> | ||
<identifier>1.11.5</identifier> | ||
<min_compatible>1.11.5</min_compatible> | ||
</version> | ||
<filename>measure.rb</filename> | ||
<filetype>rb</filetype> | ||
<usage_type>script</usage_type> | ||
<checksum>942440CE</checksum> | ||
</file> | ||
</files> | ||
</measure> |
2 changes: 0 additions & 2 deletions
2
project_resstock_dsgrid/housing_characteristics/HVAC Sizing.tsv
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.