Commands#
DSS commands as implemented in AltDSS/DSS C-API implementation of the OpenDSS engine. All are available in OpenDSS, but there are some omissions like OpenDSS-GIS commands (either closed-source or not publicly available).
Name |
Description |
---|---|
|
Comment. Command line is ignored. |
|
Inquiry for property value. Result is put into GlobalResult and can be seen in the Result Window. Specify the full property name. |
|
For step control of solution process: Pops control actions off the control queue according to the present control mode rules. Dispatches control actions to proper control element “DoPendingAction” handlers. |
|
For step control of solution process: Initialize iteration counters, etc. that normally occurs at the start of a snapshot solution process. |
|
For step control of solution process: Sample the control elements, which push control action requests onto the control queue. |
|
For step control of solution process: Show the present control queue contents. |
|
For step control of solution process: Invoke direct solution function in DSS. Non-iterative solution of Y matrix and active sources only. |
|
For step control of solution process: Solves the circuit in present state but does not check for control actions. |
|
For step control of solution process: Invoke iterative power flow solution function of DSS directly. |
|
Aborts all the simulations running |
|
Display “About Box”. (Result string set to Version string.) |
|
Add a marker to a bus in a circuit plot. Markers must be added before issuing the Plot command. Effect is persistent until circuit is cleared. See also ClearBusMarkers command. Example: |
|
Alignfile [file=]filename. Aligns DSS script files in columns for easier reading. |
|
Estimates the allocation factors for loads that are defined using the XFKVA property. Requires that energymeter objects be defined with the PEAKCURRENT property set. Loads that are not in the zone of an energymeter cannot be allocated. |
|
Brings back the names of all PCE connected to the bus specified in the argument. |
|
Brings back the names of all PDE connected to the bus specified in the argument. |
|
Batch edit objects in the same class. Example: BatchEdit Load..* duty=duty_shape |
|
Forces rebuild of Y matrix upon next Solve command regardless of need. The usual reason for doing this would be to reset the matrix for another load level when using LoadModel=PowerFlow (the default) when the system is difficult to solve when the load is far from its base value. Works by invalidating the Y primitive matrices for all the Power Conversion elements. |
|
Define x,y coordinates for buses. Execute after Solve or MakeBusList command is executed so that bus lists are defined.Reads coordinates from a CSV file with records of the form: busname, x, y. |
|
Calculates the incidence matrix of the Active Circuit |
|
Calculates the incidence matrix of the Active Circuit. However, in this case the matrix will be calculated considering its hierarchical order,listing the buses starting from the substation to the farthest load in the model |
|
Calculate the laplacian matrix using the incidence matrix previously calculated. Before calling this command the incidence matrix needs to be calculated using calcincmatrix/calcincmatrix_o. |
|
Calculates voltage base for buses based on voltage bases defined with Set voltagebases=… command. |
|
Find the maximum load the active circuit can serve in the PRESENT YEAR. Uses the EnergyMeter objects with the registers set with the SET UEREGS= (..) command for the AutoAdd functions. Syntax (defaults shown): |
|
Change default directory to specified directory |
|
Returns the total losses for the active circuit in the Result string in kW, kvar. |
|
List of intrinsic DSS Classes. Returns comma-separated list in Result variable. |
|
Force execution of the end-of-time-step cleanup functions that samples/saves meters and updates selected state variables such as storage level |
|
Clear all circuits currently in memory. |
|
Clears all the circuits and all the actors, after this instruction there will be only 1 actor (actor 1) and will be the active actor |
|
Clear all bus markers created with the AddBusMarker command. |
|
Clones the active circuit. This command creates as many copies of the active circuit as indicated in the argument if the number of requested clones does not overpasses the number of local CPUs. The form of this command is clone X whereX is the number of clones to be created |
|
Opposite of the Open command. |
|
Close all DI files … useful at end of yearly solution where DI files are left open. (Reset and Set Year=nnn will also close the DI files) |
|
Shows the documentation file for the COM interface.This file provides guidance on the properties and methods included in the COM interface as well as examples and tips. Use this file to learn more about the COM interface and its different interfaces or just as a reference guide. |
|
[Case1=]casename [case2=]casename [register=](register number) [meter=]{Totals* | SystemMeter | metername}. |
|
Reads the designated file name containing DSS commands and processes them as if they were entered directly into the command line. The file is said to be “compiled.” Similar to “redirect” except changes the default directory to the path of the specified file. |
|
Request to create a TCP/IP socket to communicate data with external modules. This function requires the host address and TCP port to connect. Not supported on DSS-Extensions |
|
Returns the currents for each conductor of ALL terminals of the active circuit element in the Result string. (See Select command.)Returned as comma-separated magnitude and angle. |
|
Convert all Loadshapes presently loaded into either files of single or files of double. Usually files of singles are adequate precision for loadshapes. Syntax: |
|
[case=]casename [year=]yr [registers=](reg1, reg2,…) [peak=]y/n [meter=]metername |
|
Disables a circuit element or entire class. Example: |
|
Request to terminate a TCP/IP socket. This function requires the host address and TCP port to disconnect. Not supported on DSS-Extensions |
|
kw=nn how={Proportional* | Uniform |Random | Skip} skip=nn PF=nn file=filename MW=nn What=[Generator*|Load] |
|
Do a DOS command. Sends the command “cmd … “ to Windows. Execute the “cmd /?” command in a DOS window to see the options. To do a DOS command and automatically exit, do |
|
Display the properties of either a specific DSS object or a complete dump on all variables in the problem (Warning! Could be very large!). Brings up the default text editor with the text file written by this command. |
|
Edit an object. The object is selected and it then becomes the active object. |
|
Enables a circuit element or entire class. Example: |
|
Execute state estimator on present circuit given present sensor values. |
|
Export various solution values to CSV (or XML) files for import into other programs. Creates a new file except for Energymeter and Generator objects, for which the results for each device of this class are APPENDED to the CSV File. You may export to a specific file by specifying the file name as the LAST parameter on the line. For example: |
|
Exports the overloads report with the content available at the moment of the call. It only affects the overloads report for the active actor. |
|
Exports the voltage violations1 report with the content available at the moment of the call. It only affects the voltage violations report for the active actor. |
|
Edit specified file in default text file editor (see Set Editor= option). |
|
Do Cleanup, sample monitors, and increment time. |
|
FormEdit [class.object]. Brings up form editor on active DSS object. |
|
Returns DSS property values set using the Set command. Result is returned in Result property of the Text interface. |
|
Define x,y coordinates for buses using real GIS Latitude and Longitude values (decimal numbers). Similar to BusCoords command. Execute after Solve command or MakeBusList command is executed so that bus lists are defined.Reads coordinates from a CSV file with records of the form: busname, Latitude, Longitude. |
|
Gives this display. |
|
This command forces reinitialization of the solution for the next Solve command. To minimize iterations, most solutions start with the previous solution unless there has been a circuit change. However, if the previous solution is bad, it may be necessary to re-initialize. In most cases, a re-initiallization results in a zero-load power flow solution with only the series power delivery elements considered. |
|
{All | MeterName} Default is “All”. Interpolates coordinates for missing bus coordinates in meter zone |
|
Define x,y coordinates for buses using Latitude and Longitude values (decimal numbers). Similar to BusCoords command. Execute after Solve command or MakeBusList command is executed so that bus lists are defined.Reads coordinates from a CSV file with records of the form: busname, Latitude, Longitude. |
|
Returns the total losses for the active circuit element (see Select command) in the Result string in kW, kvar. |
|
Continuation of editing on the active object. An abbreviation for More |
|
Updates the buslist, if needed, using the currently enabled circuit elements. (This happens automatically for Solve command.) See ReprocessBuses |
|
Attempts to convert present circuit model to a positive sequence equivalent. It is recommended to Save the circuit after this and edit the saved version to correct possible misinterpretations. |
|
Continuation of editing on the active object. |
|
Create a new object within the DSS. Object becomes the active object |
|
This command creates a new actor (OpenDSS Instance) and sets the new actor as the active actor. There can be only 1 circuit per actor. The NewActor command will increment the variable NumOfActors; however, if the number of actors is the same as the number of available CPUs the new actor will not be created generating an error message. This instruction will deliver the ID of the active actor. This command does not requires a precedent command. |
|
{Year | Hour | t} Increments year, hour, or time as specified. If “t” is specified, then increments time by current step size. |
|
Global result is set to voltage difference, volts and degrees, (Node1 - Node2) between any two nodes. Syntax: |
|
[Circuit element name] (Optional) Returns a list of node numbers for all conductors of all terminals of the active circuit element in the Result window or interface.If the optional circuit element name is supplied, the program makes it the active element. Usage: |
|
Change Bus and circuit element names to generic values to remove identifying names. Generally, you will follow this command immediately by a “Save Circuit Dir=MyDirName” command. |
|
Opens the specified terminal and conductor of the specified circuit element. If the conductor is not specified, all phase conductors of the terminal are opened. |
|
Displays main control panel window. |
|
Returns the losses for the active circuit element (see Select command) for each PHASE in the Result string in comma-separated kW, kvar pairs. |
|
Plots circuits and results in a variety of manners. See separate Plot command help. |
|
Returns the powers (complex) going into each conductors of ALL terminals of the active circuit element in the Result string. (See Select command.)Returned as comma-separated kW and kvar. |
|
Pst calculation. PstCalc Npts=nnn Voltages=[array] dt=nnn freq=nn lamp=120 or 230. |
|
Just like the Voltages command, except the voltages are in per unit if the kVbase at the bus is defined. |
|
Shuts down DSS unless this is the DLL version. Then it does nothing; DLL parent is responsible for shutting down the DLL. |
|
Reconductor a line section. Must be in an EnergyMeter zone. |
|
Reads the designated file name containing DSS commands and processes them as if they were entered directly into the command line. Similar to “Compile”, but leaves current directory where it was when Redirect command is invoked.Can temporarily change to subdirectories if nested Redirect commands require. |
|
{All | MeterName} Default is “All”. Reduce the circuit according to reduction options. See “Set ReduceOptions” and “Set Keeplist” options.Energymeter objects actually perform the reduction. “All” causes all meters to reduce their zones. |
|
This function takes the bus levels array and traces all the possible paths considering the longest paths from the substation to the farthest branches within the circuit. Then, the new paths are filled with 0 to complement the original levels proposed by the calcincmatrix_o command. |
|
[restore=Y/N]Perform reliability calcs: Failure rates and number of interruptions. |
|
{ElementName=} [KeepLoad=Y*/N] [EditString=“…”] Remove (disable) all branches downline from the PDelement named by “ElementName” property. Circuit must have an Energymeter on this branch. If KeepLoad=Y (default) a new Load element is defined and kW, kvar set to present power flow solution for the first element eliminated. The EditString is applied to each new Load element defined. |
|
Generates a script to change the phase designation of all lines downstream from a start in line. Useful for such things as moving a single-phase lateral from one phase to another and keep the phase designation consistent for reporting functions that need it to be (not required for simply solving). |
|
Forces reprocessing of bus definitions whether there has been a change or not. Use for rebuilding meter zone lists when a line length changes, for example or some other event that would not normally trigger an update to the bus list. |
|
{MOnitors | MEters | Faults | Controls | Eventlog | Keeplist |(no argument) } Resets all Monitors, Energymeters, etc. If no argument specified, resets all options listed. |
|
Usage: Rotate [angle=]nnn. Rotate circuit plotting coordinates by specified angle (degrees). |
|
Force all monitors and meters to take a sample for the most recent solution. Keep in mind that meters will perform integration. |
|
{Save [class=]{Meters | Circuit | Voltages | (classname)} [file=]filename [dir=]directory |
|
Selects an element and makes it the active element. You can also specify the active terminal (default = 1). |
|
Returns the sequence currents into all terminals of the active circuit element (see Select command) in Result string. Returned as comma-separated magnitude only values.Order of returned values: 0, 1, 2 (for each terminal). |
|
Returns the sequence powers into all terminals of the active circuit element (see Select command) in Result string. Returned as comma-separated kw, kvar pairs.Order of returned values: 0, 1, 2 (for each terminal). |
|
Returns the sequence voltages at all terminals of the active circuit element (see Select command) in Result string. Returned as comma-separated magnitude only values.Order of returned values: 0, 1, 2 (for each terminal). |
|
Used to set various DSS solution modes and options. You may also set the options with the Solve command. See “Options” for help. |
|
Bus=… X=… Y=… Set the X, Y coordinates for a single bus. Prerequisite: Bus must exist as a result of a Solve, CalcVoltageBases, or MakeBusList command. |
|
Command to explicitly set the base voltage for a bus. Bus must be previously defined. Parameters in order are: |
|
Set load and generator object kv to agree with the bus they are connected to using the bus voltage base and connection type. |
|
Writes selected results to a text file and brings up the default text editor (see Set Editor=….) with the file for you to browse. |
|
Perform the solution of the present solution mode. You can set any option that you can set with the Set command (see Set). The Solve command is virtually synonymous with the Set command except that a solution is performed after the options are processed. |
|
Solves all the circuits (Actors) loaded into memory by the user |
|
Returns a power flow summary of the most recent solution in the global result string. |
|
[class=]{Loadshape | Tshape | Monitor } [object=]{ALL (Loadshapes only) | objectname}. Send specified object to TOP. Loadshapes and TShapes must be hourly fixed interval. |
|
Returns the total powers (complex) at ALL terminals of the active circuit element in the Result string. (See Select command.)Returned as comma-separated kW and kvar. |
|
Totals all EnergyMeter objects in the circuit and reports register totals in the result string. |
|
Update Storage elements based on present solution and time interval. |
|
List of user-defined DSS Classes. Returns comma-separated list in Result variable. |
|
Read UUIDs (v4) for class names and other CIM objects. Tab or comma-delimited file with full object name (or key) and UUID. Side effect is to start a new UUID list for the Export CIM100 command; the UUID list is freed after the Export UUIDs command. |
|
Define and view script variables. Variable names begin with “@” |
|
[name=] MyVariableName [Index=] IndexofMyVariable |
|
Returns variable names for active element if PC element. Otherwise, returns null. |
|
Returns variable values for active element if PC element. Otherwise, returns null. |
|
Displays the difference between the present solution and the last on saved using the SAVE VOLTAGES command. |
|
[What=] one of {Currents* | Voltages | Powers} [element=]full_element_name (class.name). Shows the selected quantity for selected element on a multiphase line drawing in phasor values. |
|
Returns the voltages for the ACTIVE BUS in the Result string. For setting the active Bus, use the Select command or the Set Bus= option. Returned as magnitude and angle quantities, comma separated, one set per conductor of the terminal. |
|
Pauses the scripting thread until all the active actors are Ready to receive new commands (have finished all their tasks and are ready to receive new simulation orders). |
|
[cases=](case1, case2, …) [registers=](reg1, reg2, …) [meter=]{Totals* | SystemMeter | metername}Plots yearly curves for specified cases and registers. |
|
Returns full Ysc matrix for the ACTIVE BUS in comma-separated complex number form G + jB. |
|
Returns full Zsc matrix for the ACTIVE BUS in comma-separated complex number form. |
|
Returns symmetrical component short circuit impedances Z0, Z1, and Z2 for the ACTIVE 3-PHASE BUS. Determined from Zsc matrix. |
|
Returns symmetrical component impedances, Z1, Z0 for the ACTIVE BUS in comma-separated R+jX form. |
|
Refreshes Zsc matrix for the ACTIVE BUS. |
|
Continuation of editing on the active object. An abbreviation. |