mpacts.commands.monitors. progress

In order to be able to use this module import it like this:

import mpacts.commands.monitors.progress
#or assign it to a shorter name
import mpacts.commands.monitors.progress as pro

ArrayAtIndexPrinter

class mpacts.commands.monitors.progress.ArrayAtIndexPrinter(array, index, component=-1, name=None)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the value of the given array at the given index.

ArrayAtIndexPrinter(name, parent, **kwargs)
PrintProgress()

ArrayBoundsPrinter

class mpacts.commands.monitors.progress.ArrayBoundsPrinter(array)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the [min,max] bounds of a given array.

ArrayBoundsPrinter(name, parent, **kwargs)
PrintProgress()

ArrayMaxMagnitudePrinter

class mpacts.commands.monitors.progress.ArrayMaxMagnitudePrinter(array)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the maximum magnitude of a given array.

ArrayMaxMagnitudePrinter(name, parent, **kwargs)
PrintProgress()

ArrayMaxPrinter

class mpacts.commands.monitors.progress.ArrayMaxPrinter(array, axis)

Bases: mpacts.commands.monitors.progress.PrinterBase

Print the maximal value of a given array, along a given axis

ArrayMaxPrinter(name, parent, **kwargs)
PrintProgress()

ArrayMeanPrinter

class mpacts.commands.monitors.progress.ArrayMeanPrinter(array, axis)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the average of a given array along the given axis.

ArrayMeanPrinter(name, parent, **kwargs)
PrintProgress()

ArrayMinPrinter

class mpacts.commands.monitors.progress.ArrayMinPrinter(array, axis)

Bases: mpacts.commands.monitors.progress.PrinterBase

Print the minimal value of a given array, along a given axis

ArrayMinPrinter(name, parent, **kwargs)
PrintProgress()

ArraySumPrinter

class mpacts.commands.monitors.progress.ArraySumPrinter(array, axis)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the sum of a given array along the given axis.

ArraySumPrinter(name, parent, **kwargs)
PrintProgress()

CpuTimePrinter

class mpacts.commands.monitors.progress.CpuTimePrinter

Bases: mpacts.commands.monitors.progress.PrinterBase

CpuTimePrinter(name, parent, **kwargs)
PrintProgress()
reset()

DefaultProgressPrinter

class mpacts.commands.monitors.progress.DefaultProgressPrinter(sim, sim_time_unit='s')

Bases: mpacts.commands.monitors.progress.PrinterBase

Duplicates the output of the default C++ printer: simulation time, timestep, wall-time, and simulation-/wall-time fraction.

DefaultProgressPrinter(name, parent, **kwargs)
PrintProgress()
reset()

FixedNumberOfStepsCondition

class mpacts.commands.monitors.progress.FixedNumberOfStepsCondition(print_rate)

Bases: object

FixedNumberOfStepsCondition(name, parent, **kwargs)
check()

ManagerAlivePrinter

class mpacts.commands.monitors.progress.ManagerAlivePrinter(manager)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the number of elements in an ArrayManager that are alive.

ManagerAlivePrinter(name, parent, **kwargs)
PrintProgress()

ManagerSizePrinter

class mpacts.commands.monitors.progress.ManagerSizePrinter(manager)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints the size of an ar.ArrayManager.

ManagerSizePrinter(name, parent, **kwargs)
PrintProgress()

PrinterBase

class mpacts.commands.monitors.progress.PrinterBase

Bases: object

All progress printers can derive from this one, and then only need to overwrite the PrintPropgress member.

No initialization of this base-class is necessary.

PrinterBase(name, parent, **kwargs)
PrintProgress()

Returns a string that in some way characterizes the progress of the simulation; MUST be overridden by derived classes.

reset()

Resets the printer - should be overridden by derived class, if needed.

PrinterChain

class mpacts.commands.monitors.progress.PrinterChain(printer_list)

Bases: mpacts.commands.monitors.progress.PrinterBase

Chains a list of printers which can then be executed in one go.

PrinterChain(name, parent, **kwargs)
PrintProgress()
reset()

ProgressIndicator

class mpacts.commands.monitors.progress.ProgressIndicator(name, sim, printer=None, print_interval=None, print_rate=None)

Bases: mpacts.commands.monitors.progress.ProgressIndicatorCommand

ProgressIndicator(name, parent, **kwargs)

ProgressIndicatorCommand

class mpacts.commands.monitors.progress.ProgressIndicatorCommand(name, sim, printer=None, gate=None)

Bases: mpacts.core.command.PythonCommand

Python command which prints the given ‘printer’ when executed.

ProgressIndicatorCommand(name, parent, **kwargs)
execute()

PropertyPrinter

class mpacts.commands.monitors.progress.PropertyPrinter(property, start_str='', scale=1.0)

Bases: mpacts.commands.monitors.progress.PrinterBase

Prints a given properties’ name and value. start_str can be used to prepend additional info, like the parent’s name.

PropertyPrinter(name, parent, **kwargs)
PrintProgress()

ShortProgressPrinter

class mpacts.commands.monitors.progress.ShortProgressPrinter(sim)

Bases: mpacts.commands.monitors.progress.PrinterBase

ShortProgressPrinter(name, parent, **kwargs)
PrintProgress()

StepPrinter

class mpacts.commands.monitors.progress.StepPrinter(sim)

Bases: mpacts.commands.monitors.progress.PrinterBase

StepPrinter(name, parent, **kwargs)
PrintProgress()

TimeIntervalCondition

class mpacts.commands.monitors.progress.TimeIntervalCondition(print_interval)

Bases: object

TimeIntervalCondition(name, parent, **kwargs)
check()
mpacts.commands.monitors.progress._Scale(val, scale)
mpacts.commands.monitors.progress._ToString(x, width=11, precision=2)

Converts lists and lists of tuples to strings with a given width and precision.