public void DeserializeSolvePartialProblems() { SolvePartialProblems d = new SolvePartialProblems(); string xml = d.SerializeToXML(); d = (SolvePartialProblems)xml.DeserializeXML(); Assert.IsNotNull(d); }
public void SerializeSolvePartialProblems() { SolvePartialProblems d = new SolvePartialProblems(); string xml = d.SerializeToXML(); Assert.IsNotNull(xml); }
protected override string ReceivedDivideProblem(DivideProblem divideProblem) { /* Divide Problem is sent to TM to start the action of dividing the problem instance to smaller tasks. * TM is provided with information about the computational power of the cluster in terms of total number * of available threads. The same message is used to relay information for synchronizing info with Backup CS. */ //Debug.Assert(false, "Unimplemented"); //!!!!!!!!!!!!!!!!!!! ////we are not dividing yet - inserting everything into CommonData ////the same should be done in the ComputationalNode SolvePartialProblems solvePartialProblems = new SolvePartialProblems(); solvePartialProblems.CommonData = divideProblem.Data; solvePartialProblems.Id = divideProblem.Id; solvePartialProblems.SolvingTimeoutSpecified = false; if(divideProblem.ProblemType != null) solvePartialProblems.ProblemType = divideProblem.ProblemType; CMSocket.Instance.SendMessage(this.Port, this.IP, solvePartialProblems.SerializeToXML(), this); return null; }