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

Revision history [back]

click to hide/show revision 1
initial version

Optional IDF and Workspace Object

Hello, i put those code as measure wirting guide :

new_sch = "
    Schedule:Compact,
    Return rate 95, !- Name
    Fractional,        !- Schedule Type Limits Name
    Through: 12/31,          !- Field 1
    For: AllDays,            !- Field 2
    Until: 24:00,            !- Field 3
    0.95;                    !- Field 4
    "
    new_sch_idfobj = OpenStudio::IdfObject::load(new_sch)
    puts "compact schedule #{new_sch_idfobj}"
    new_sch_idfobj1 = new_sch_idfobj.get
    sch_returnrate = workspace.addObject(new_sch_idfobj1)
    puts "compact schedule1 #{sch_returnrate}"

it return in screen :

compact schedule #<OpenStudio::OptionalIdfObject:0x000000062ceda8>
compact schedule1 #<OpenStudio::OptionalWorkspaceObject:0x000000062ceb50>

What difference between Optional and NonOptional Object ? Have any difference with standard objects when we need to use them ?

Optional IDF and Workspace Object

Hello, i I put those this code as measure wirting writing guide :

new_sch = "
    Schedule:Compact,
    Return rate 95, !- Name
    Fractional,        !- Schedule Type Limits Name
    Through: 12/31,          !- Field 1
    For: AllDays,            !- Field 2
    Until: 24:00,            !- Field 3
    0.95;                    !- Field 4
    "
    new_sch_idfobj = OpenStudio::IdfObject::load(new_sch)
    puts "compact schedule #{new_sch_idfobj}"
    new_sch_idfobj1 = new_sch_idfobj.get
    sch_returnrate = workspace.addObject(new_sch_idfobj1)
    puts "compact schedule1 #{sch_returnrate}"

it return returns in screen :

compact schedule #<OpenStudio::OptionalIdfObject:0x000000062ceda8>
compact schedule1 #<OpenStudio::OptionalWorkspaceObject:0x000000062ceb50>

What difference between Optional and NonOptional Object ? Non-Optional Object? Have any difference with standard objects when we need to use them ?them?