Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

dani71's profile - activity

2017-03-09 10:11:50 -0500 answered a question Wrong volume calculation in OpenStudio

The same issue is discussed and resolved here by Jaime Bull:

https://unmethours.com/question/10628...

2016-08-26 10:27:32 -0500 asked a question Getting model path from runner object in OpenStudio

The runner object (openstudio::ruleset::OSRunner) has the lastOpenStudioPath attribute that can be set by:

runner.setLastOpenStudioModelPath(OpenStudio::Path.new(modelPath))

It is posible read the last OpenStudio model from the runner as:

model = runner.lastOpenStudioModel

You can also read the path of the weather file used:

weatherPath = runner.lastEpwFilePath

Then ¿is it posible to get the the last OpenStudio model path?

I've tried with:modelPath = runner.lastOpenStudioModelPath but is not working.

Thanks

2016-05-31 10:16:14 -0500 asked a question ZoneAirBalance:OutdoorAir object in OpenStudio

Is it possible to add a ZoneAirBalance:OutdoorAir object using OpenStudio interface?

2016-04-06 04:56:01 -0500 commented answer **FATAL:IP: Errors occurred on processing IDF file. Preceding condition(s) cause termination.

I've got the same problem and I found enought information to solve it at the file: \run\6-EnergyPlus-0\eplusout.audit

2016-04-06 03:36:00 -0500 commented answer Define scheduleRuleset by measure

Thanks, works perfectly.

2016-03-16 05:03:07 -0500 asked a question Define scheduleRuleset by measure

Hi,

I'm defining a new scheduleRuleset and when I ask for the activeRuleIndices got an array of -1 and this error:

[utilities.time.Date] <1> Comparing Dates with improper base years

I've try using the year in the Date definition but I've got the same error.

This is the code I'm using:

scheduleRuleset = OpenStudio::Model::ScheduleRuleset.new(model)
scheduleDay     = OpenStudio::Model::ScheduleDay.new(model, 18.5)
scheduleRule    = OpenStudio::Model::ScheduleRule.new(scheduleRuleset, scheduleDay)
monthOfTheYear  = OpenStudio::MonthOfYear.new(1)
startDate       = OpenStudio::Date.new(monthOfTheYear, 1)
endDate         = OpenStudio::Date.new(monthOfTheYear, 7)

scheduleRule.setStartDate(startDate)
scheduleRule.setEndDate(endDate)
msg(f, "scheduleRule.ruleIndex: #{scheduleRule.ruleIndex}\n")
activeIndices = scheduleRuleset.getActiveRuleIndices(startDate, endDate)
msg(f, "#{activeIndices}\n")

The stdout sais 14 times:

[utilities.time.Date] <1> Comparing Dates with improper base years

And that's the output:

scheduleRule.ruleIndex: 0

[-1, -1, -1, -1, -1, -1, -1]

I've tried also defining the days like this:

startDate  = OpenStudio::Date.new(monthOfTheYear, 1, 2009)
endDate    = OpenStudio::Date.new(monthOfTheYear, 7, 2009)

But with the same result.

Is that the way to define a scheduleRuleset by measure?

How should I manage the year to avoid improper base year comparing dates?

Thanks in advance.

2016-02-17 04:51:51 -0500 commented question How to set ZoneVentilation:DesignFlowRate in workspace object?

Solved,

I was using a test name instead a real schedule name. Using an existing schedule name works fine both with : or _ .

Thank you very much for your help.

2016-02-15 09:30:39 -0500 received badge  Teacher (source)
2016-02-15 04:32:17 -0500 received badge  Editor (source)
2016-02-15 04:26:43 -0500 answered a question How to set ZoneVentilation:DesignFlowRate in workspace object?

Solved,

I was using a test name instead a real schedule name. Using an existing schedule name works fine both with : or _ .

Thank you very much for your help.

2016-02-15 03:56:15 -0500 commented question How to set ZoneVentilation:DesignFlowRate in workspace object?

Due to this bug: https://github.com/NREL/OpenStudio/is... , this measure doesn't work properly when used with an ideal air loads system, and the idf object ends with an "Always On Discrete" schedule name. We are trying to work around this using an Energy+ measure instead of an OpenStudio one.

2016-02-12 09:02:28 -0500 received badge  Student (source)
2016-02-12 06:34:51 -0500 asked a question How to set ZoneVentilation:DesignFlowRate in workspace object?

I'm trying to change the Schedule Name in the zoneVentilation:DesignFlowRate workspace objects.

To do this I retrieve all the zoneVentilation:DesignFlowRate objects using getObjectsByType. Then I iterate over the array and try to set the Schedule Name using the setString method. Unexpectedly, it returns False and no change is done.

I'm using the example in the Measure Writing Guide, following closely the "Editing EnergyPlus Workspace Objects" section, and I can't find any obvious problem.

What follows is the code I'm testing:

idfFlowRates = workspace.getObjectsByType("ZoneVentilation_DesignFlowRate".to_IddObjectType)
if not idfFlowRates.empty?
    msg("\n __ result __\n")    
    msg("  idfFlowRates[0].class ----------------------> #{idfFlowRates[0].class}\n")    
    msg("  inital value: idfFlowRates[0].getString(1) -> #{idfFlowRates[0].getString(1)}\n")
    result = idfFlowRates[0].setString(1,"Test text")
    msg("  succesfully written? -----------------------> #{result}\n")
    msg("  final value --------------------------------> #{idfFlowRates[0].getString(1)}\n")
else
    msg("array is empty \n")
end

The output of this code is:

__ result __
idfFlowRates[0].class ----------------------> OpenStudio::WorkspaceObject
inital value: idfFlowRates[0].getString(2) -> Always_On
succesfully written? -----------------------> false
final value --------------------------------> Always_On

Do you have any clue about what I may be missing here?

Note: getObjectByType function seems to be working ok because idfFlowRates is an array of WorkspaceObjects. I get the same result using : instead of _.