Commit fbe96ca5 authored by jouke's avatar jouke
Browse files

Minor engine updates, making sure getSibling does not return a pointer

to itself.
parent e290ca64
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -381,7 +381,12 @@ SimulaBase* SimulaBase::getSibling(const std::string & name){

SimulaBase* SimulaBase::existingSibling(const std::string& name){
	if(parent_) {
		return parent_->existingChild(name);
		SimulaBase* p=parent_->existingChild(name);
		if(p!=this){
			return p;
		}else{
			return nullptr;
		}
	}else{
		return nullptr;
	}
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ void SimulaExternal::get(const Time &t, double &var) {
		reEntryLocked_=false;
	}else{
		var=0; // this value is not used anyway, as we simply try to update the table. Solution is not generic, but works for SWMS3D.
		msg::warning("SimulaExternal:: locked, and it has no predictor. This is likely to cause extrapolation warnings. ");
		msg::warning("SimulaExternal:: locked, and it has no predictor. This is likely to cause extrapolation warnings. ",2);
	}
	if(multiplier_) {
		double m;
+8 −0
Original line number Diff line number Diff line
@@ -249,6 +249,14 @@ void SimulaVariable::getTime(const double & var, Time & t, Time tmin, Time tmax)
			break;
		}
	}

	//experimental form of delayed garabge collection, assuming getTime also progresses in time more or less.
	/*if(t>5){
		collectGarbage_=true;
		collectGarbage(t-5);
		collectGarbage_=false;
	}*/

#ifdef WRITEGRAPH
	unwindDependencieGraph();
#endif