<% '============= Create and Open Database Connection ============= 'OPEN THE DATABASE If blnConnectToDB Then dim blnDBconnectionDown blnDBconnectionDown = false Err.Clear on error resume next set dbConn = Server.CreateObject("ADODB.Connection") 'Open the Connnection 'dbConn.Open Application("dbConn_ConnectionString") dbConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" ''New Error trapping. KC added 2/23/2012 If Err.Number <> 0 Then ''Response.Write (Err.Description& "

") dbConn.Close Set dbConn = nothing blnDBconnectionDown = true End If On Error GoTo 0 ''error trapping not working here KC removed 2/23/2012 ''tmpDBErrorNativeError = 0 '' For Each dbErr In dbConn.Errors '' strErrMsg = strErrMsg & _ '' "Source: " & dbErr.Source & vbCrLF & _ '' "Description: " & dbErr.Description & vbCrLF & _ '' "SQL State: " & dbErr.SQLState & vbCrLF & _ '' "NativeError: " & dbErr.NativeError & vbCrLF & _ '' "Number: " & dbErr.Number & vbCrLF & vbCrLF '' tmpDBErrorNativeError = dbErr.NativeError '' Next '' If (dbConn.Errors.Count > 0) AND (tmpDBErrorNativeError <> 5703) Then '' dbConn.Close '' Set dbConn = nothing '' blnDBconnectionDown = true '' Response.write(strErrMsg) '' Response.end '' End If dim arrErrors() Redim arrErrors(2,0) End If '============================================================== Public Function GetRS2(myCommand) On Error GoTo 0 'objConn: local connection object 'objRS: local recordset object 'objComm: command object passed in to the function Dim objConn, objRS, blnErrorLogged, objComm 'Create the command object Set objComm = Server.CreateObject("ADODB.Command") Set objComm = myCommand 'Create the connection object Set objConn = Server.CreateObject("ADODB.Connection") 'Open the connection object objConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" 'Set the active connection objComm.ActiveConnection = objConn 'Create the recordset object Set objRS = Server.CreateObject("ADODB.Recordset") 'Set the cursor location for disconnected recordsets 'objRS.CursorLocation = adUseClient 'Turn on error handling for just a second ' On Error Resume Next 'Open the recordset 'objRS.Open SQL, objConn, adOpenStatic, adLockOptimistic Set objRS = objComm.Execute 'Response.Write "State = " & objRS.State & "
" 'objRS.MoveLast 'objRS.MoveFirst 'Response.Write "Count = " & objRS.RecordCount & "
" 'Response.End 'Check for an error ' If Err.Number <> 0 Then ' Response.Write "Database Error Occured

" ' Response.Write "Error #" & Err.Number & "
" ' Response.Write Err.Description & "

" ' Response.Write "SQL:
" ' Response.Write SQL ' Response.End ' End If 'Turn off error handling ' On Error GoTo 0 'Disconnect the recordset 'Set objComm.ActiveConnection = Nothing 'Close the connection 'objConn.Close 'Set the connection to Nothing 'Set objConn = Nothing 'Set the Command to Nothing 'Set objComm = Nothing 'Return the recordset Set GetRS2 = objRS On Error Resume Next End Function '=============================================================== Function GetRS(sSQL) 'Declarations dim rs 'Create Recordset Object set rs = Server.CreateObject("ADODB.Recordset") If blnConnectToDB Then 'Open Recordset based on SQL rs.Open sSQL, dbConn, 1, 3, 1 End If 'Return Recordset set GetRs = rs End Function '=============================================================== Function ExecSQL(sSQL) 'Open the Command Object dim lRecordsAffected dbConn.Execute sSQL, lRecordsAffected 'Return the Records Affected ExecSQL = lRecordsAffected End Function '======================================================================== Function sendEmail(strFrom,strTo,strSubject,strMessage) Dim sch ' Schema sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "sendusing") = 2 .Item(sch & "smtpserver") = "mxrelay.doe.gov" .update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = strFrom .To = strTo .Subject = strSubject .TextBody = strMessage .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing End Function Function removeBadChars(tmpString) tmpString = Replace(tmpString , "<", "") tmpString = Replace(tmpString , ">", "") tmpString = Replace(tmpString , "'", "") tmpString = Replace(tmpString , """", "") tmpString = Replace(tmpString , ";", "") tmpString = Replace(tmpString , "(", "") tmpString = Replace(tmpString , ")", "") removeBadChars = tmpString End Function %> <% 'If there is a mobile version of this site, check the user_agent, and forward to 'the mobile version of the site (unless cookie or querystring var is set) if "true" = "true" then tmpSeeFullPage = Mid(Request.Querystring("m"),1,1) if ((isMobile) and (tmpSeeFullPage <> "1")) then tmpMobileURL = Request.servervariables("HTTP_URL") tmpMobileFileName = mid(tmpMobileURL, InStrRev(tmpMobileURL, "/")+1) tmpMobileURL = Left(tmpMobileURL, InStrRev(tmpMobileURL, "/")) tmpMobileURL = tmpMobileURL & "m/" & tmpMobileFileName Response.Clear Response.Redirect(tmpMobileURL) end if end if %>

<% ''This code is strictly when a user clicks on a left nav and needs to be forwarded to another site/program/office if ("" <> "") then Response.Clear Response.Redirect ("") end if %>

Distributed-scale Renewable Energy Projects (Smaller than 10 MWs)

Most Federal distributed-scale renewable energy projects (smaller than 10 MWs) can be broken down into nine steps. The first two fall within the planning phase, while the remaining seven are part of the implementation phase. Many steps will be familiar to energy/facility managers already versed in conventional energy projects.

Step 1: Facility/Energy Characteristics

Federal energy/facility managers interested in renewable energy projects should collect site data covering facility and energy characteristics. This data serves as the input for the analyses conducted in step two. The data collected in this step can also help determine which project financing mechanism to pursue. Data most often required includes site location, utility bills, land-use plans or facility master plans, and information on energy consuming systems and usage patterns. The level of detail collected increases as a project moves through the project process.

Step 2: Renewable Energy Studies

Multiple renewable energy studies can be undertaken in step two to determine potential opportunities.

Preliminary Screenings

Preliminary screenings can be undertaken using free Federal Energy Management Program (FEMP) screening tools and maps. An energy/facility manager can use these resources to decide whether a renewable energy project is worth exploring. At the headquarters or regional level, an agency can prescreen multiple sites to identify and prioritize locations for further study. Multi-site preliminary screenings are often based on maps of renewable energy resources, prevailing utility rates, and incentives.


A more detailed screening can help narrow site and project options after the preliminary screening. In this option, a renewable energy expert uses calculations or analysis software to identify the best opportunities. The detailed screening should recommend technologies to pursue, and can include a comparison of financing mechanisms to consider. Energy/facility managers can apply for a detailed screening through FEMP.

Feasibility Studies

A feasibility study is often required for projects identified in preliminary and detailed screenings. Feasibility studies provide technology and financing recommendations an agency or site should pursue. If alternative financing is not pursued, then the feasibility study provides required information to request funding through the appropriations and budgeting process.

Feasibility studies typically require a site visit from a renewable energy expert. The expert conducts a detailed technical and economic study, including environmental and other constraints, for each opportunity. This study addresses all physical issues, including space for the systems, technical performance, interface with other existing systems, and anything that may impede project execution. At a minimum, economic feasibility is established by a detailed and credible life-cycle cost analysis according to Federal procedures (10 CFR 436).

Step 3: Requesting and Evaluating Proposals

After financing recommendations have been assessed, the energy/facility manager must prepare a request for proposal (RFP) for a competitive bid or skip to the next step if the contract will be purchased from an existing contract (e.g., ESPC, UESC, or PPA) or sole sourced. Funding must be available by this stage if using direct appropriations.

Step three is the stage to assemble an on-site team of key personnel, including but not limited to a contracting or procurement officer, a project manager, an attorney, an environmental officer, and a real estate officer. To prepare an RFP, the site must create a scope of work and selection criteria. After the RFP is issued, the site reviews and scores proposals according to the selection criteria.

Step three is perhaps the most important step. The success of a project is much more likely with a team capable of delivering a quality project and a strong scope of work. The scope of work must be complete to avoid change orders. Scopes of work without adequate instruction are prone to change orders and renegotiation that cost both the Federal Government and the supplier time and money. The scope of work must also include any and all details, such as coordination meetings and correspondence. If it is not in the scope of work, the offerors may not include it in their bids. Selection criteria often include capabilities and past performance. A track record and references of at least three successfully installed and operating projects is an excellent demonstration of past performance.

Step 4: Contracting

The Federal Government can award a procurement contract to the successful RFP bidder or to a pre-approved vendor through an existing or sole source contract. This contract establishes the cost, scope, and schedule of the project.

The RFP establishes the type of construction contract. Whether the Federal agency or an energy service company is contracting for construction, two basic construction contract types exist: Design-Bid-Build and Design-Build. In a Design-Bid-Build contracting arrangement, the system is designed by an engineering firm before construction companies bid on the installation. In a Design-Build contract, the same firm designs and installs the system.

With renewable energy projects, the project developer typical takes responsibility for determining the construction contract type. When the decision is made by a Federal agency, Design-Bid-Build contracts are typically chosen to allow design control. The second is selected when an agency is more concerned with performance.

Step 5: Design

In step five, the project developer begins with a schematic design (typically 35% of the design) that includes the size and type of the major system components. Most of the review effort for direct appropriation projects, which is the finance mechanism where design review most often occurs, is focused on the schematic design. Subsequent design phases (e.g., 50%, 75%, 95%) only develop the systems identified in the schematic design. Therefore, major changes after this early phase of design are unlikely to be considered. Step five ends when the final design is submitted.

Step 6: Construction/Build It

In step six, the project developer orders the equipment and begins construction or installation of the renewable energy system. Contract administration is required to enforce the terms of the contract. A construction manager is necessary to ensure that the various disciplines (e.g., roofers, plumbers, and electricians) are coordinated so that the different components work together as a system. Close coordination is also required with building occupants and management to minimize issues that could impact the facility's mission. Much of this is accomplished through frequent meetings between the construction manager and facility management and occupants.

Step 7: Acceptance Testing and Commissioning

With construction complete, it is important to commission the renewable energy system to ensure it works to specification. During the design phase, the commissioning agent should have documented the intent of the design and created the protocol by which the system performance will be evaluated and any required instrumentation. After the system is installed, the commissioning agent assesses the degree to which the system fulfills the intent of the design. Almost all large systems have at least some deficiencies that need to be corrected. In a performance contract, it is up to the developer to commission the renewable energy system.

Step 8: Performance Period

Step eight covers the period of time that the renewable energy system is in operation. It is important to take care of the renewable energy system through regular operations and maintenance (O&M), and to confirm that it is working according to specification and warranties through measurement and verification (M&V). In some alternatively financed projects, the contractor performs O&M. Every system should include at least some operational indicators so that staff can easily see if the system is working properly. Many agencies select an M&V protocol that provides enough information to determine how well the system is working, and in many cases to allow occupants and visitors to interpret the performance of the project.

Step 9: Project Closeout

When the performance contract ends, depending on the stipulations of the contract, the Federal Government may have the option to extend a performance contract, conduct a follow-on procurement, purchase the renewable energy system at fair market value (determined at time of sale), or abandon the renewable energy system in place. When the equipment is no longer functional, it must be disposed of. It can be replaced by a new renewable energy system or the space can be renovated for another application.