Interface ICWFGM Scenario. More...
import "FireEngine.idl";
Public Member Functions | |
HRESULT | Clone ([out, retval]ICWFGM_Scenario **scenario) |
HRESULT | GetGridEngine ([out] __int64 *layerThread, [out] ICWFGM_GridEngine **pVal) |
HRESULT | PutGridEngine ([in] __int64 layerThread, [in] ICWFGM_GridEngine *newVal) |
HRESULT | GetAttribute ([in]unsigned short option, [out, retval]VARIANT *value) |
HRESULT | SetAttribute ([in]unsigned short option, [in]VARIANT value) |
HRESULT | GetIgnitionCount ([out, retval]unsigned long *count) |
HRESULT | AddIgnition ([in]ICWFGM_Ignition *fire) |
HRESULT | RemoveIgnition ([in]ICWFGM_Ignition *fire) |
HRESULT | IgnitionAtIndex ([in]unsigned long index, [out, retval]ICWFGM_Ignition **fire) |
HRESULT | IndexOfIgnition ([in]ICWFGM_Ignition *fire, [out, retval]unsigned long *index) |
HRESULT | GetVectorEngineCount ([out, retval]unsigned long *count) |
HRESULT | AddVectorEngine ([in]ICWFGM_VectorEngine *vectorEngine) |
HRESULT | RemoveVectorEngine ([in]ICWFGM_VectorEngine *vectorEngine) |
HRESULT | VectorEngineAtIndex ([in]unsigned long index, [out, retval]ICWFGM_VectorEngine **vectorEngine) |
HRESULT | IndexOfVectorEngine ([in]ICWFGM_VectorEngine *vectorEngine, [out, retval]unsigned long *index) |
HRESULT | Simulation_State () |
HRESULT | Simulation_Reset () |
HRESULT | Simulation_Step () |
HRESULT | Simulation_StepBack () |
HRESULT | Simulation_Clear () |
HRESULT | SetDayBurnCondition ([in]short day, [in]VARIANT_BOOL bEffective,[in]unsigned short StartHour, [in]unsigned short EndHour, [in]double MaxWS, [in]double MinRH, [in]double MinFWI) |
HRESULT | SetDefaultBurnCondition ([in]VARIANT_BOOL bEffective,[in]unsigned short StartHour, [in]unsigned short EndHour, [in]double MaxWS, [in]double MinRH, [in]double MinFWI) |
HRESULT | AdjustBurnCondition () |
HRESULT | GetDayBurnCondition ([in]short day,[out]VARIANT_BOOL *bEffective,[out]unsigned short *StartHour,[out]unsigned short *EndHour,[out]double *MaxWS,[out]double *MinRH, [out]double *MinFWI) |
HRESULT | GetBurnConditionDays ([out]unsigned short *days) |
HRESULT | GetDefaultBurnCondition ([out]VARIANT_BOOL *bEffective,[out]unsigned short *StartHour,[out]unsigned short *EndHour,[out]double *MaxWS,[out]double *MinRH, [out]double *MinFWI) |
HRESULT | IsXYBurned ([in]double X, [in]double Y, [in]unsigned __int64 time, [out, retval]short *burned) |
HRESULT | GetBurnedBox ([in]unsigned __int64 time, [out]double *left, [out]double *right, [out]double *bottom, [out]double *top) |
HRESULT | GetNumberSteps ([out, retval]unsigned long *steps) |
HRESULT | GetStepsArray ([in, out]unsigned long *size, [in, out]SAFEARRAY(unsigned __int64)*times) |
HRESULT | GetNumberFires ([in, out]unsigned __int64 *time, [out, retval]unsigned long *size) |
HRESULT | IgnitionAtFireIndex ([in]unsigned long index, [in, out]unsigned __int64 *time, [out, retval]ICWFGM_Ignition **fire) |
HRESULT | GetVectorSize ([in]unsigned long fire, [in, out]unsigned __int64 *time, [out, retval]unsigned long *size) |
HRESULT | GetVectorArray ([in]unsigned long fire, [in, out]unsigned __int64 *time, [in, out]unsigned long *size, [in, out]SAFEARRAY(double)*xy_pairs) |
HRESULT | GetStatsArray ([in]unsigned long fire, [in, out]unsigned __int64 *time, [in]unsigned short stat, [in, out]unsigned long *size, [in, out]SAFEARRAY(double)*stats) |
HRESULT | GetStats ([in]unsigned long fire, [in, out]unsigned __int64 *time, [in]unsigned short stat, [out, retval]VARIANT *stats) |
HRESULT | GetXYStats ([in]double X, [in]double Y, [in, out]unsigned __int64 *time, [in]unsigned short stat, [in]unsigned short interp_method, [out, retval]VARIANT *stats) |
HRESULT | GetStatsPercentage ([in]ULONG fire, [in, out]unsigned __int64 *time, [in]unsigned short stat, [in]double greater_equal, [in]double less_than, [out, retval]double *stats) |
HRESULT | ExportFires ([in] ICWFGM_Ignition *set, [in, out] unsigned __int64 *start_time, [in, out] unsigned __int64 *end_time, [in] unsigned short flags, [in] const BSTR driver_name, [in] const BSTR projection, [in] const BSTR file_path, [in] SAFEARRAY(SExportRule) rules) |
Properties | |
VARIANT | UserData [get, set] |
Interface ICWFGM Scenario.
The ICWFGM Scenario Interface is part of FireEngine
ICWFGM_Scenario::AddIgnition | ( | [in] ICWFGM_Ignition * | fire | ) |
Adds an ignition to this scenario object.
fire | An ignition object |
ICWFGM_Scenario::AddVectorEngine | ( | [in] ICWFGM_VectorEngine * | vectorEngine | ) |
Adds a vector engine object to this scenario object. The order of vector engine objects is unimportant (where the order of grid engine objects is).
vectorEngine | A vector engine object. |
ICWFGM_Scenario::AdjustBurnCondition | ( | ) |
This method will propagate the last defined day burned condition to all remaining days in the simulation. This method is a candidate for removal and should not be used. This functionality is best implemented by the client application to avoid any possible assumptions on its behaviour and side-effects. This functionality is likely not needed with a more generalized approach to implementing burning conditions.
ICWFGM_Scenario::Clone | ( | [out, retval] ICWFGM_Scenario ** | scenario | ) |
Creates a new scenario object with all the same properties of the object being called, returns a handle to the new object in 'scenario'. This operation does not link the cloned object to the fires attached to the object being called, nor does it record the GridEngine handle in the new object, it only duplicates the properties such as start time, end time, calculation intervals, etc.
scenario | A scenario object |
ICWFGM_Scenario::ExportFires | ( | [in] ICWFGM_Ignition * | set, |
[in,out] unsigned __int64 * | start_time, | ||
[in,out] unsigned __int64 * | end_time, | ||
[in] unsigned short | flags, | ||
[in] const BSTR | driver_name, | ||
[in] const BSTR | projection, | ||
[in] const BSTR | file_path, | ||
[in] SAFEARRAY(SExportRule) | rules | ||
) |
Exports fires generated from a specific ignition at a specific simulated time, given options.
set | Identifies a specific ignition. If NULL, then all fires at the time specified are exported |
start_time | Start time for which to export at, specified GMT time since Midnight January 1, 1600. Only displayable time steps will be output. |
end_time | End time for which to export at, specified GMT time since Midnight January 1, 1600. Only displayable time steps will be output. |
flags |
|
driver_name | Identifies file format. Refer to GDAL documentation for supported formats |
projection | Projection file name |
file_path | Vector data file name |
rules | Set of rules defining extra / optional data fields, etc. to be included in the export |
ICWFGM_Scenario::GetAttribute | ( | [in] unsigned short | option, |
[out, retval] VARIANT * | value | ||
) |
Polymorphic. Retrieves a value for a scenario setting that the client application can used to modify the operation of the scenario. These values are defined in FireEngine_ext.h.
option | Option of interest(a list of possible options apears in "FireEngine_ext.h" |
value | Value of the option |
ICWFGM_Scenario::GetBurnConditionDays | ( | [out] unsigned short * | days | ) |
Retrieves the number of burn condition days.
days | The number of days which satisfy the burn condition |
ICWFGM_Scenario::GetBurnedBox | ( | [in] unsigned __int64 | time, |
[out] double * | left, | ||
[out] double * | right, | ||
[out] double * | bottom, | ||
[out] double * | top | ||
) |
Retrieves the rectangular area encompassing all burned areas of all fires at a specific time during the simulation.
time | A GMT time provided as seconds since Midnight January 1, 1600 |
left | Minimum X coordinate, inclusive |
right | Maximum X coordinate, inclusive |
bottom | Minimum Y coordinate, inclusive |
top | Maximum Y coordinate, inclusive |
ICWFGM_Scenario::GetDayBurnCondition | ( | [in] short | day, |
[out] VARIANT_BOOL * | bEffective, | ||
[out] unsigned short * | StartHour, | ||
[out] unsigned short * | EndHour, | ||
[out] double * | MaxWS, | ||
[out] double * | MinRH, | ||
[out] double * | MinFWI | ||
) |
Retrieves the burning conditions for a specific day in the simulation. If the burning time is outside the bounds of StartHourand EndHour, then the fire does not burn. If the wind speed is less than MaxWS, then the fire does not burn. If the relative humidity is greater than MinRH, then the fire does not burn. Otherwise, the fire will burn based on the spatial and temporal conditions available. This method is a candidate for updating and should used with care. This method definition uses a non-standard (w/r to the rest of this interface) means of identifying days and times. This method declaration is also very limiting with respect to the type and range of conditions which may define the burning condition (and thus the fire growth).
day | Identifies the day of the simulation to set these conditions upon |
bEffective | Enables or disables the burning condition |
StartHour | Start of the burning period of the day |
EndHour | End of the burning period of the day |
MaxWS | Minimum wind speed which will sustain burning |
MinRH | Maximum relative humidity which will sustain burning |
MinFWI | Minimum FWI value which will sustain burning |
ICWFGM_Scenario::GetDefaultBurnCondition | ( | [out] VARIANT_BOOL * | bEffective, |
[out] unsigned short * | StartHour, | ||
[out] unsigned short * | EndHour, | ||
[out] double * | MaxWS, | ||
[out] double * | MinRH, | ||
[out] double * | MinFWI | ||
) |
Burning conditions may individually exist for each day of the simulation. In addition, a standard, default burning condition can be defined for any day without specific settings. This method retrieves those default burning conditions. This method is a candidate for updating and should used with care. This method definition uses a non-standard (w/r to the rest of this interface) means of identifying times. This method declaration is also very limiting with respect to the type and range of conditions which may define the burning condition (and thus the fire growth).
bEffective | Enables or disables the burning condition |
StartHour | Start of the burning period of the day |
EndHour | End of the burning period of the day |
MaxWS | Minimum wind speed which will sustain burning |
MinRH | Maximum relative humidity which will sustain burning |
MinFWI | Minimum FWI value which will sustain burning |
ICWFGM_Scenario::GetGridEngine | ( | [out] __int64 * | layerThread, |
[out] ICWFGM_GridEngine ** | pVal | ||
) |
Sets or retrieves the object exposing the GridEngine interface that this scenario object uses to retrieve the spatial and temporal grid data (representing fuels, elevations, and weather). Note that objects implementing this interface may be chained, or layered together, but the scenario object is only concerned with the top-most object.
pVal | Value of GridEngine |
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
ICWFGM_Scenario::GetIgnitionCount | ( | [out, retval] unsigned long * | count | ) |
Returns the number of ignitions associated with this scenario object.
count | Number of ignitions |
ICWFGM_Scenario::GetNumberFires | ( | [in,out] unsigned __int64 * | time, |
[out,retval] unsigned long * | size | ||
) |
Returns the number of fires (burning, partially burning, or not burning) which are in the simulation at the specified time.
time | Time for the query |
size | Return value, number of fires |
ICWFGM_Scenario::GetNumberSteps | ( | [out, retval] unsigned long * | steps | ) |
Given a scenario, this method returns the number of output time steps that have been calculated in the simulation for this fire. A fire can simultaneously contain statistical information for a variety of scenarios.
steps | Number of output times steps |
ICWFGM_Scenario::GetStats | ( | [in] unsigned long | fire, |
[in,out] unsigned __int64 * | time, | ||
[in] unsigned short | stat, | ||
[out,retval] VARIANT * | stats | ||
) |
This method returns a particular statistic for the fire, for a specific simulation at a specific time. stat must be a valid statistic, as defined in FireEngine_ext.h. time is passed in as a requested time and returned as the actual time that the data is for.
fire | Index of the fire |
time | Specified GMT time since Midnight January 1, 1600 |
stat | Requested statistic. Valid statistics for query are:
|
stats | Calculated statistic value |
ICWFGM_Scenario::GetStatsArray | ( | [in] unsigned long | fire, |
[in,out] unsigned __int64 * | time, | ||
[in] unsigned short | stat, | ||
[in,out] unsigned long * | size, | ||
[in,out] SAFEARRAY(double)* | stats | ||
) |
Given a fire, this method returns a statistic for each point defining a fire front at the time specified in the simulation. stat must be a valid statistic, as defined in FireEngine_ext.h. size is passed in as the size of the array, and returned as the actual number of elements set. xand y are pointers to arrays that will receive the locations (in grid units) of the fire. time is passed in as a requested time and returned as the actual time that the data is for. Statistics data is returned for both active and inactive points.
fire | Index of the fire |
time | Specified GMT time since Midnight January 1, 1600 |
stat | Requested statistic, valid statistics are:
|
size | Size of the stats array |
stats | Array of statistics |
ICWFGM_Scenario::GetStatsPercentage | ( | [in] ULONG | fire, |
[in,out] unsigned __int64 * | time, | ||
[in] unsigned short | stat, | ||
[in] double | greater_equal, | ||
[in] double | less_than, | ||
[out,retval] double * | stats | ||
) |
This method returns a count of occurence particular statistic for a specific range of values, given a fire and time. stat must be a valid statistic, as defined in FireEngine.h
fire | Index of the fire |
time | Specified GMT time since Midnight January 1, 1600 |
stat | Requested statistic. Valid statistics for query are:
|
greater_equal | Lower range of values |
less_than | Upper range of values |
stats | Calculated statistic value |
ICWFGM_Scenario::GetStepsArray | ( | [in,out] unsigned long * | size, |
[in,out] SAFEARRAY(unsigned __int64)* | times | ||
) |
Given an array, return the times for each time step calculated in the simulation. size is passed in as the size of the array, and returned as the actual number of elements set. times is a pointer to an array that will receive the GMT times for each calculated time step. The size of the array that is required can be obtained by calling GetNumberSteps().
size | Size of the times array |
times | Array of times |
ICWFGM_Scenario::GetVectorArray | ( | [in] unsigned long | fire, |
[in,out] unsigned __int64 * | time, | ||
[in,out] unsigned long * | size, | ||
[in,out] SAFEARRAY(double)* | xy_pairs | ||
) |
Given a fire, this method returns the points defining a fire front at the time specified in the simulation. size is passed in as the size of the array, and returned as the actual number of elements set. Locations are returned in X/Y pairs in the appropriate array (in grid units) of the fire. time is passed in as a requested time and returned as the actual time that the data is for.
fire | Index of the fire |
time | Specified time(on return, time is set to the actual time the array of coordinates relates to) |
size | Size of the xy_pairs array |
xy_pairs | 2D Array of coordinates |
ICWFGM_Scenario::GetVectorEngineCount | ( | [out, retval] unsigned long * | count | ) |
Returns the number of vector engine objects associated with this scenario object.
count | Number of vector engine objects |
ICWFGM_Scenario::GetVectorSize | ( | [in] unsigned long | fire, |
[in,out] unsigned __int64 * | time, | ||
[out,retval] unsigned long * | size | ||
) |
Given a fire, this method returns the number of points defining a fire front at the time specified in the simulation. time is passed in as a requested time and returned as the actual time that the vector size relates to.
fire | Index of the fire |
time | Specified time(on return, time is set to the actual time the vector size relates to) |
size | Number of points defining a fire front |
ICWFGM_Scenario::GetXYStats | ( | [in] double | X, |
[in] double | Y, | ||
[in,out] unsigned __int64 * | time, | ||
[in] unsigned short | stat, | ||
[in] unsigned short | interp_method, | ||
[out,retval] VARIANT * | stats | ||
) |
This method returns a particular statistic for a specific location in the fire/grid, for a specific simulation at a specific time. stat must be a valid statistic, as defined in FireEngine_ext.h. time is passed in as a requested time and returned as the actual time that the data is for.
X | The x coordinate |
Y | The y coordinate |
time | Specified GMT time since January 1, 1600 |
stat | Request statistic. Valid statistics for query are:
|
interp_method | How to calculate/determine the value of the statistic requested
|
stats | Calculated statistic value |
ICWFGM_Scenario::IgnitionAtFireIndex | ( | [in] unsigned long | index, |
[in,out] unsigned __int64 * | time, | ||
[out,retval] ICWFGM_Ignition ** | fire | ||
) |
Given a fire at a specific time in the simulation, identifies the ignition from which the fire originated.
index | Index of the fire |
time | Time of the simulation |
fire | Return value; ignition |
ICWFGM_Scenario::IgnitionAtIndex | ( | [in] unsigned long | index, |
[out,retval] ICWFGM_Ignition ** | fire | ||
) |
Given an index value, returns a pointer to an ignition associated with this scenario.
index | Index to an ignition |
fire | An ignition object |
ICWFGM_Scenario::IndexOfIgnition | ( | [in] ICWFGM_Ignition * | fire, |
[out, retval] unsigned long * | index | ||
) |
Returns the index of fire in this scenario's set of ignitions.
fire | An ignition object |
index | Index to a fire object |
ICWFGM_Scenario::IndexOfVectorEngine | ( | [in] ICWFGM_VectorEngine * | vectorEngine, |
[out, retval] unsigned long * | index | ||
) |
Returns the index of vectorEngine in this scenario's set of vector engines.
vectorEngine | A vector engine object |
index | Indes to a vector engine |
ICWFGM_Scenario::IsXYBurned | ( | [in] double | X, |
[in] double | Y, | ||
[in] unsigned __int64 | time, | ||
[out, retval] short * | burned | ||
) |
Retrieves whether the location at (X, Y) was burned before or during time.
X | X coordinate |
Y | Y coordinate |
time | A GMT time provided as seconds since Midnight January 1, 1600 |
burned | If the location has been burned, this value is set to 1, otherwise it is set to 0. |
ICWFGM_Scenario::PutGridEngine | ( | [in] __int64 | layerThread, |
[in] ICWFGM_GridEngine * | newVal | ||
) |
Sets or retrieves the object exposing the GridEngine interface that this scenario object uses to retrieve the spatial and temporal grid data (representing fuels, elevations, and weather). Note that objects implementing this interface may be chained, or layered together, but the scenario object is only concerned with the top-most object.
newVal | Replacement value for GridEngine |
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
ICWFGM_Scenario::RemoveIgnition | ( | [in] ICWFGM_Ignition * | fire | ) |
Removes an association between an ignition and this scenario object.
fire | An ignition object |
ICWFGM_Scenario::RemoveVectorEngine | ( | [in] ICWFGM_VectorEngine * | vectorEngine | ) |
Removes a vector engine object from this scenario.
vectorEngine | A vector engine object |
ICWFGM_Scenario::SetAttribute | ( | [in] unsigned short | option, |
[in] VARIANT | value | ||
) |
Polymorphic. Sets a value for a scenario setting that the client application can modify to change the operation of the scenario.
option | Option of interest |
value | Value to set the option to |
ICWFGM_Scenario::SetDayBurnCondition | ( | [in] short | day, |
[in] VARIANT_BOOL | bEffective, | ||
[in] unsigned short | StartHour, | ||
[in] unsigned short | EndHour, | ||
[in] double | MaxWS, | ||
[in] double | MinRH, | ||
[in] double | MinFWI | ||
) |
Sets the burning conditions for a specific day in the simulation. If the burning time is outside the bounds of StartHour and EndHour, then the fire does not burn. If the wind speed is less than MaxWS, then the fire does not burn. If the relative humidity is greater than 'MinRH', then the fire does not burn. Otherwise, the fire will burn based on the spatial and temporal conditions available. This method is a candidate for updating and should used with care. This method definition uses a non-standard (w/r to the rest of this interface) means of identifying days and times. This method declaration is also very limiting with respect to the type and range of conditions which may define the burning condition (and thus the fire growth). The implementation in this scenario object also requires that if burning conditions exits for days 3, 5, then specific burning conditions must also exist for days 0, 1, 2, 4.
day | Identifires the day of the simulation to set these conditions upon |
bEffective | Enables or disables the burning condition |
StartHour | Start of the burning period of the day |
EndHour | End of the burning period of the day |
MaxWS | Minimum wind speed which will sustain burning |
MinRH | Maximum relative humidity which will sustain burning |
MinFWI | Minimum FWI value which will sustain burning |
ICWFGM_Scenario::SetDefaultBurnCondition | ( | [in] VARIANT_BOOL | bEffective, |
[in] unsigned short | StartHour, | ||
[in] unsigned short | EndHour, | ||
[in] double | MaxWS, | ||
[in] double | MinRH, | ||
[in] double | MinFWI | ||
) |
Burning conditions may individually exist for each day of the simulation. In addition, a standard, default burning condition can be defined for any day without specific settings. This method sets these default burning conditions. This method is a candidate for updating and should used with care. This method definition uses a non-standard (w/r to the rest of this interface) means of identifying times. This method declaration is also very limiting with respect to the type and range of conditions which may define the burning condition (and thus the fire growth).
bEffective | Enables or disables the burning condition |
StartHour | Start of the burning period of the day |
EndHour | End of the burning period of the day |
MaxWS | Minimum windpseed which will sustain burning |
MinRH | Maximum relative humidity which will sustain burning |
MinFWI | Minimum FWI value which will sustain burning |
ICWFGM_Scenario::Simulation_Clear | ( | ) |
Clears the current scenario's calculations, unlocks the scenario's objects and clears the displays.
ICWFGM_Scenario::Simulation_Reset | ( | ) |
Prepares a scenario's simulation to begin running. This routine must be called before Simulation_Step(), and must be called to re-run a simulation. This routine erases any data stored from a previously running simulation.
ICWFGM_Scenario::Simulation_State | ( | ) |
Returns the current state of the simulation, being currently running, complete, or in some invalid state preventing any simulation from beginning.
ICWFGM_Scenario::Simulation_Step | ( | ) |
Runs the simulation for exactly one calculation time step period of time. This routine can be called after Simulation_Reset().
ICWFGM_Scenario::Simulation_StepBack | ( | ) |
Removes one displayable step during a simulation.
ICWFGM_Scenario::VectorEngineAtIndex | ( | [in] unsigned long | index, |
[out,retval] ICWFGM_VectorEngine ** | vectorEngine | ||
) |
Given an index value, returns a pointer to a vector engine associated with this scenario.
index | Indes to a vector engine |
vectorEngine | A vector engine object |
|
getsetproperty |
This property is unused by this object, and is available for exclusive use by the client code. It is a VARIANT value to ensure that the client code can store a pointer value (if it chooses) for use in manual subclassing this object. This value is not loaded or saved during serialization operations, and it is the responsibility of the client code to manage any value or object stored here. Access to this property is not thread-safe.
pVal | when retrieving the property |
newVal | when setting the property |