diff options
Diffstat (limited to 'src/modelica_model.rs')
-rw-r--r-- | src/modelica_model.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modelica_model.rs b/src/modelica_model.rs index bcc00b1..36c5a2e 100644 --- a/src/modelica_model.rs +++ b/src/modelica_model.rs @@ -133,10 +133,10 @@ impl ModelicaModelExt for ModelicaModel { // TODO: sort output equations by LHS Ok(ModelicaModel{ name: self.name.clone(), + description: self.description.clone(), components: self.components.clone(), connections: vec![], equations: solved, - extends: vec![], }) } } @@ -186,10 +186,10 @@ impl SimpleEquationExt for SimpleEquation { use modelica_parser::ast::BinOperator::*; match self.lhs { Ident(ref s) if s == ident => Ok((*self).clone()), - Ident(_) | Integer(_) | Float(_) => + Ident(_) | Integer(_) | Float(_) | Boolean(_) | StringLiteral(_) => Err("SymbolicError: InternalError: expected var on LHS".to_string()), - Der(_) | Abs(_) => - Err("SymbolicError: NaiveImplementation: can't simplify der() or abs()".to_string()), + Der(_) | MathUnaryExpr(_,_) | Sign(_) | Array(_) => + Err("SymbolicError: NaiveImplementation: can't simplify".to_string()), // TODO: create a macro for the below... BinExpr(Multiply, ref a, ref b) if a.contains(ident) => { SimpleEquation{ |