Well Event: Add opt-in column-aligned schedule output

Add an align_columns option to schedule generation. When enabled, each
keyword is serialized with a '--'-prefixed column-header comment and data
rows right-aligned into fixed-width columns, instead of the compact default
form. The default output is unchanged.

A new RimKeywordFactory::deckKeywordToAlignedString introspects the OPM deck
model and renders each item in its own column (consecutive defaults are not
collapsed into 'N*'). The flag is threaded through RicScheduleDataGenerator
and exposed on the GenerateSchedule scriptable method as align_columns in the
Python generate_schedule_text wrapper.
This commit is contained in:
Kristian Bendiksen committed 2026-06-01 15:45:03 +02:00
1 parent bce29354ea
commit 19c547cc2e
9 files changed
+317 -13

No files matched your search

@@ -585,6 +585,13 @@ RimcWellEventTimeline_generateSchedule::RimcWellEventTimeline_generateSchedule(
"",
"",
"Emit the first (simulation-start) date as a comment instead of a DATES keyword" );
CAF_PDM_InitScriptableField( &m_alignColumns,
"AlignColumns",
false,
"",
"",
"",
"Emit a column-header comment and right-aligned, fixed-width columns instead of the compact form" );
}
//--------------------------------------------------------------------------------------------------
@@ -638,7 +645,13 @@ std::expected<caf::PdmObjectHandle*, QString> RimcWellEventTimeline_generateSche
std::set<const RimWellPath*> mswWells( mswWellPaths.begin(), mswWellPaths.end() );
QString scheduleText =
RicScheduleDataGenerator::generateSchedule( *timeline, *eclipseCase, wellPathsWithEvents, dates, mswWells, m_firstDateAsComment() );
RicScheduleDataGenerator::generateSchedule( *timeline,
*eclipseCase,
wellPathsWithEvents,
dates,
mswWells,
m_firstDateAsComment(),
m_alignColumns() );
// Return the schedule text in a data container
auto* dataObject = new RimcDataContainerString();