I have string stored in a database. It is the output log of IBM CPLEX
When I retrieve it into Ignition, it is a single (long) line of text of type :class com.inductiveautomation.ignition.gateway.datasource.BasicStreamingDataset
The string has many line separators \n
How do I reformat this to display in a text component that looks like:
! --------------------------------------------------- CP Optimizer 22.1.1.0 --
! Minimization problem - 12 variables, 27 constraints
! TimeLimit = 1
! LogVerbosity = Terse
! Initial process time : 0.01s (0.01s extraction + 0.00s propagation)
! . Log search space : 16.8 (before), 16.8 (after)
! . Memory usage : 441.6 kB (before), 441.6 kB (after)
! Using parallel search with 8 workers.
! ----------------------------------------------------------------------------
! Best Branches Non-fixed W Branch decision
0 12 -
- New bound is 34920
-
45320 15 0.12s 1 (gap is 22.95%) 45320 2024 7 1 F -
- New bound is 40120 (gap is 11.47%)
45320 2024 7 1 - - New bound is 41799.95 (gap is 7.77%)
! Using failure-directed search.
45320 2031 7 1 F 2399 >= startOf(O_103#0#P2#O_1
03#12000.0) - New bound is 45316 (gap is 0.01%)
! ----------------------------------------------------------------------------
! Search completed, 1 solution found.
! Best objective : 45320 (optimal - effective tol. is 4)
! Best bound : 45316
! ----------------------------------------------------------------------------
! Number of branches : 19044
! Number of fails : 11218
! Total memory usage : 4.5 MB (4.5 MB CP Optimizer + 0.0 MB Concert)
! Time spent in solve : 0.12s (0.12s engine + 0.01s extraction)
! Search speed (br. / s) : 170035.7
! ----------------------------------------------------------------------------
Thank you
'