-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify the data type check while the setting schedule #3
Comments
Currently epScan only supports numeric fields. Here numeric fields indicate fields should have Looking at the definition of
By default, eplusr uses eplusr::eplusr_option("validate_level")
# [1] "final"
eplusr::level_checks()
# $required_object
# [1] TRUE
#
# $unique_object
# [1] TRUE
#
# $unique_name
# [1] TRUE
#
# $extensible
# [1] TRUE
#
# $required_field
# [1] TRUE
#
# $autofield
# [1] TRUE
#
# $type
# [1] TRUE
#
# $choice
# [1] TRUE
#
# $range
# [1] TRUE
#
# $reference
# [1] TRUE
# So directly assign a number to idf <- empty_idf(8.8)
idf$add(Schedule_Compact = list("sch", NULL, "Through: 12/31", "For: AllDays", "Until: 24:00", 1))
# ✖ [1] Errors found during validation.
# ══════════════════════════════════════════════════════════════════════════
#
# ── [1] Invalid Character ─────────────────────────────────────────────────
# Fields below should be characters but are not:
#
# Class: <Schedule:Compact>
# └─ Object [ID:Input #1] <sch>
# └─ 6: "1"; !- Field 4 One possible workaround would be just to disable the checks <- eplusr::level_checks()
checks$type <- FALSE
eplusr::eplusr_option(validate_level = checks)
idf$add(Schedule_Compact = list("sch"))
# $sch
# <IdfObject: `Schedule:Compact`> [ID:54] `sch`
# Class: <Schedule:Compact>
# ├─ 1: "sch", !- Name
# │─ 2: <"Blank">, !- Schedule Type Limits Name
# │─ 3: <"Blank">, !- Field 1
# │─ 4: <"Blank">, !- Field 2
# └─ 5: <"Blank">; !- Field 3
#
idf$Schedule_Compact$sch$Field_1 <- 1
idf$Schedule_Compact$sch
# <IdfObject: `Schedule:Compact`> [ID:2] `sch`
# Class: <Schedule:Compact>
# ├─ 1: "sch", !- Name
# │─ 2: <"Blank">, !- Schedule Type Limits Name
# │─ 3: "1", !- Field 1
# │─ 4: <"Blank">, !- Field 2
# └─ 5: <"Blank">; !- Field 3 Since eplusr just follows the IDD definition, instead of changing the behavior of eplusr, I would say a better way to go is to add a preprocess in |
eplusr will report an " invalid character" error while changing the temperature of schedule in epScan.
The text was updated successfully, but these errors were encountered: