Commit ecd4ce65 authored by DaKi404's avatar DaKi404
Browse files

copy to changes

parent 9b01fcac
*------------- Additional results symbols ---------------------------------------------------
* =============================================================================
* --- Realized parameter values ---------------------------------------------
* =============================================================================
//$ontext
// --- Result arrays required by model dynamics --------------------------------
if(tSolveFirst >= mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod') - mSettings(mSolve, 't_jump')
and firstResultsOutputSolve,
loop(msf(mSolve, s, f_solve),
firstResultsOutputSolve = 0;
r_flagState(gn_state(grid, node), ww_flowType, ww_range, f_solve, t) $[ord(t) = mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_flagState.l(grid, node, ww_flowType, ww_range, s, f_solve, t);
);
);
// Realized flag states
loop(sft_realized(s, f, t),
r_flagState(gn_state(grid, node), ww_flowType, ww_range, f, t)$[ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')]
= v_flagState.l(grid, node, ww_flowType, ww_range, s, f, t);
// Realized state history - initial state values in samples
r_flagState(gn_state(grid, node), ww_flowType, ww_range, f_solve(f), t+dt(t))${ ord(t) > mSettings(mSolve, 't_start') + mSettings(mSolve, 't_initializationPeriod')
and sum(ms(mSolve, s), mst_start(mSolve, s, t))
}
= v_flagState.l(grid, node, ww_flowType, ww_range, s, f, t+dt(t));
); // END loop(m)
*------------- Additional results symbols ---------------------------------------------------
* =============================================================================
* --- Time Step Dependent Results ---------------------------------------------
* =============================================================================
// Need to loop over the model dimension, as this file is no longer contained in the modelSolves loop...
loop(m,
// Incoming diffusion of a node in t
r_incomingDiffusion(gnn_state(grid, from_node, node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= + p_gnn(grid, from_node, node, 'diffCoeff_in')
* sum(ww_flowType,
sum(ww_range,
+ p_ww_A(ww_flowType, ww_range, from_node, node, 'diff_in')
* p_ww_dilution(ww_flowType, ww_range, from_node, node)
* r_flagState(grid, node, ww_flowType, ww_range, f, t)
)) // END sum(ww_flowType)
;
// Outgoing diffusion of a node in t
r_outgoingDiffusion(gnn_state(grid, node, to_node), ft_realizedNoReset(f, t))$[ord(t) > mSettings(m, 't_start') + mSettings(m, 't_initializationPeriod')]
= + p_gnn(grid, node, to_node, 'diffCoeff_out')
* sum(ww_flowType,
sum(ww_range,
+ p_ww_A(ww_flowType, ww_range, node, to_node, 'diff_out')
* p_ww_dilution(ww_flowType, ww_range, node, to_node)
* r_flagState(grid, node, ww_flowType, ww_range, f, t)
)) // END sum(ww_flowType)
;
); // END loop(m)
//$offtext
......@@ -26,6 +26,7 @@ Parameters
p_ww_threshold(ww_flowType, ww_range, ww_lowerUpper) "Lower and upper thresholds for flow ranges"
p_ww_A(ww_flowType, ww_range, node, node_, diff_direction) "Linearization parameters A for the wastewater treatment model"
p_ww_dilution(ww_flowType, ww_range, node, node_) "Dilution factor D in the waste water treatment model for different inflow ranges"
p_ww_dilution(ww_flowType, ww_range, node, node_) "Dilution factor D in the waste water treatment model for different inflow ranges and node pairs"
p_ww_dilutionUnit(ww_flowType, ww_range, node, unit) "Dilution factor D in the waste water treatment model for different inflow ranges and node unit pairs"
;
......@@ -163,4 +163,22 @@ $offtext
*3b_periodicLoop
*Option clear = v_flagState; // part of the WWTP model
*Option clear = v_flagGen; // part of the WWTP model
*Option clear = v_flagGen; // part of the WWTP model
$ontext
sum(ww_flowType,
sum(ww_range,
+ p_ww_dilution(ww_flowType, ww_range, node, node_)
* v_flagTransfer(grid, node, node_, ww_flowType, ww_range, s, f, t)
)
)
$offtext
$ontext
sum(ww_flowType,
sum(ww_range,
+ p_ww_dilution(ww_flowType, ww_range, node_, node)
* v_flagTransfer(grid, node_, node, ww_flowType, ww_range, s, f, t)
)
)
$offtext
\ No newline at end of file
$ifthen exist '%input_dir%/add_inputData.gdx'
$$gdxin '%input_dir%/add_inputData.gdx'
$$loaddcm grid
$$loaddcm node
$$loaddcm flow
$$loaddcm unittype
$$loaddcm unit
$$loaddcm unitUnittype
$$loaddcm unit_fail
$$loaddcm commodity
$$loaddcm unitUnitEffLevel
$$loaddcm effLevelGroupUnit
$$loaddcm group
$$loaddcm p_gn
$$loaddcm p_gnn
$$loaddcm p_gnu_io
$$loaddcm p_gnuBoundaryProperties
$$loaddcm p_unit
$$loaddcm ts_unit
$$loaddcm p_unitConstraint
$$loaddcm p_unitConstraintNode
$$loaddcm ww_range
$$loaddcm ww_flowType
$$loaddcm ww_flowRange
$$loaddcm p_ww_threshold
$$loaddcm p_ww_A
$$loaddcm p_ww_dilution
$$loaddcm p_ww_dilutionUnit
$$loaddcm restype
$$loaddcm restypeDirection
$$loaddcm restypeReleasedForRealization
$$loaddcm restype_inertia
$$loaddcm p_groupReserves
$$loaddcm p_groupReserves3D
$$loaddcm p_groupReserves4D
$$loaddcm p_gnuReserves
$$loaddcm p_gnnReserves
$$loaddcm p_gnuRes2Res
$$loaddcm ts_reserveDemand
$$loaddcm p_gnBoundaryPropertiesForStates
$$loaddcm p_uStartupfuel
$$loaddcm flowUnit
$$loaddcm emission
$$loaddcm p_nEmission
$$loaddcm ts_cf
* $$loaddcm p_price // Disabled for convenience, see line 278-> ("Determine Fuel Price Representation")
$$loaddcm ts_priceChange
$$loaddcm ts_influx
$$loaddcm ts_unitConstraintNode
$$loaddcm ts_node
$$loaddcm p_s_discountFactor
$$loaddcm t_invest
$$loaddcm utAvailabilityLimits
$$loaddcm p_storageValue
$$loaddcm ts_storageValue
$$loaddcm uGroup
$$loaddcm gnuGroup
$$loaddcm gn2nGroup
$$loaddcm gn2nFlowType
$$loaddcm gnGroup
$$loaddcm sGroup
$$loaddcm p_groupPolicy
$$loaddcm p_groupPolicyUnit
$$loaddcm p_groupPolicyEmission
$$loaddcm gnss_bound
$$loaddcm uss_bound
$$gdxin
$endif
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment