@@ -24,7 +24,7 @@ struct ProcessFlowRaw {
2424 #[ serde( default ) ]
2525 #[ serde( rename = "type" ) ]
2626 kind : FlowType ,
27- flow_cost : Option < f64 > ,
27+ cost : Option < f64 > ,
2828 is_pac : bool ,
2929}
3030
@@ -44,10 +44,10 @@ impl ProcessFlowRaw {
4444 ) ;
4545
4646 // Check that flow cost is non-negative
47- if let Some ( flow_cost ) = self . flow_cost {
47+ if let Some ( cost ) = self . cost {
4848 ensure ! (
49- ( 0.0 ..f64 :: INFINITY ) . contains( & flow_cost ) ,
50- "Invalid value for flow cost ({flow_cost }). Must be >=0."
49+ ( 0.0 ..f64 :: INFINITY ) . contains( & cost ) ,
50+ "Invalid value for flow cost ({cost }). Must be >=0."
5151 )
5252 }
5353
@@ -111,7 +111,7 @@ where
111111 commodity : Rc :: clone ( commodity) ,
112112 coeff : record. coeff ,
113113 kind : record. kind ,
114- flow_cost : record. flow_cost . unwrap_or ( 0.0 ) ,
114+ cost : record. cost . unwrap_or ( 0.0 ) ,
115115 is_pac : record. is_pac ,
116116 } ;
117117
@@ -205,7 +205,7 @@ mod tests {
205205 fn create_process_flow_raw (
206206 coeff : f64 ,
207207 kind : FlowType ,
208- flow_cost : Option < f64 > ,
208+ cost : Option < f64 > ,
209209 is_pac : bool ,
210210 ) -> ProcessFlowRaw {
211211 ProcessFlowRaw {
@@ -215,7 +215,7 @@ mod tests {
215215 regions : "region" . into ( ) ,
216216 coeff,
217217 kind,
218- flow_cost ,
218+ cost ,
219219 is_pac,
220220 }
221221 }
@@ -250,7 +250,7 @@ mod tests {
250250 commodity,
251251 coeff,
252252 kind : FlowType :: Fixed ,
253- flow_cost : 0.0 ,
253+ cost : 0.0 ,
254254 is_pac,
255255 }
256256 }
0 commit comments