cuiksystem.c File Reference Detailed DescriptionImplementation of the functions operating on TCuikSystem.
Definition in file cuiksystem.c.
Function Documentation
Adds an equation to the cuiksystem taking into account the dummification level selected by the user when fixing the parameters. In the extreme dummification level, all quadratic and bilinear terms in the equations are replaced by a new (dummy) variable and the corresponding equation parabola or saddle equation is added to the system. In the other extreme (i.e., not to dummify anything) equations are added as given by the user to the system.
Definition at line 422 of file cuiksystem.c. References AddCt2Monomial(), AddEquation(), AddMonomial(), AddVariable(), AddVariable2Monomial(), CircleEquation(), CT_DUMMIFY, DeleteEquation(), DeleteMonomial(), DeleteVariable(), DUMMY_EQ, DUMMY_VAR, EQU, TCuikSystem::equations, Error(), GetEquationCmp(), GetEquationOrder(), GetEquationType(), GetEquationValue(), GetEquationVariables(), GetMonomial(), GetMonomialCt(), GetMonomialVariables(), GetNumMonomials(), GetParameter(), GetVariable(), GetVariableFunctionN(), GetVariableID(), GetVariableInterval(), GetVariableN(), GetVariableName(), GetVariablePowerN(), InitEquation(), InitMonomial(), IntervalPow(), IntervalProduct(), LinearEquation(), NEW, NewVariable(), NFUN, NO_UINT, NVariables(), ParabolaEquation(), SaddleEquation(), SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SphereEquation(), TRUE, TCuikSystem::variables, and VariableSetSize(). Referenced by DummifyCuikSystem().
Dummify all equations in the cuiksystem according to the parameters given by the user.
Definition at line 695 of file cuiksystem.c. References CopyEquations(), DeleteEquations(), DummifyAndAddEquation(), TCuikSystem::equations, GetEquation(), InitEquations(), NEquations(), and TCuikSystem::scalar. Referenced by SimplifyCuikSystem().
Evaluates the equation to minimize when the search mode is set to MINIMIZATION_SEARCH. In any other search mode the output is 0. Note that the input box is a box in the simplified system since, for efficiency, the equation to minimize is re-written into this system too.
Definition at line 2369 of file cuiksystem.c. References Error(), EvaluateEquationInt(), EvaluateWholeEquation(), GetBoxInterval(), GetBoxIntervals(), GetEquationValue(), IntervalCenter(), IntervalOffset(), MINIMIZATION_SEARCH, NEW, and NVariables(). Referenced by CmpBoxesEquation(), PostProcessBox(), and SolveCuikSystem().
Reduces the ranges of a box considering one equation at a time. Linear equations are cropped directly and non-linear equations are linearized. Special treatement is implement for parabola, circle, sphere, and saddle equations since they appear frequently and the non-linear cropping is stronger than the one obtained via linearization.
Definition at line 714 of file cuiksystem.c. References ANY_TYPE_VAR, CopyBox(), CropEquation(), CT_EPSILON, CT_RHO, CT_SMALL_SIGMA, DeleteBox(), EMPTY_BOX, TCuikSystem::equations, FALSE, GetBoxInterval(), GetBoxSize(), GetBoxVolume(), GetParameter(), IntervalSize(), TCuikSystem::nvariables, PrintBox(), REDUCED_BOX, TCuikSystem::systemVar, TRUE, and TCuikSystem::variables. Referenced by ReduceBox().
Reduces the ranges of a box as much as possible applying first an equation-wise crop and then a simplex-based reduction. If the reduction is significative (i.e., the reduction ratio is above paramter RHO) and the box is not smaller than SMALL_SIGMA, the reduction process is iterated.
Definition at line 833 of file cuiksystem.c. References AddEquation2Simplex(), BoxInclusion(), TCuikSystem::consistent, CopyBox(), CT_EPSILON, CT_LR2TM_Q, CT_LR2TM_S, CT_RHO, CT_SAFE_SIMPLEX, CT_SMALL_SIGMA, DeleteBox(), EMPTY_BOX, TCuikSystem::equations, Error(), ERROR_IN_PROCESS, FALSE, GetBoxInterval(), GetBoxSize(), GetBoxVolume(), GetParameter(), IntervalSize(), NewBoxReduction(), TCuikSystem::notDummyVar, TCuikSystem::nvariables, PrintBox(), ReduceBoxEquationWise(), REDUCED_BOX, REDUCED_BOX_WITH_SOLUTION, ReduceRange(), ResetSimplex(), TCuikSystem::simp_nequations, SimplexColEmpty(), SimplexCreate(), SimplexDelete(), SimplexNRows(), TCuikSystem::st, TCuikSystem::systemVar, TRUE, TCuikSystem::updated, TCuikSystem::variables, and TCuikSystem::varType. Referenced by MaxReduction(), MPI_TreatBox(), and SolveCuikSystem().
After box reduction we have to decide what to do with the box. If it empty, we just discart it. If is small enough (smaller than SIGMA) we consider it as a solution. Finally, non-empty, non-small boxes are bisected and added to the list of boxes pending to be processed.
Definition at line 1059 of file cuiksystem.c. References AddBox2HeapOfBoxes(), AddLastElement(), BoxFromVariables(), ComputeSplitDimInt(), CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CopyBox(), CT_EPSILON, CT_MAX_NEWTON_ITERATIONS, CT_SIGMA, CuikNewtonInBox(), CUT_POINT, DeleteBox(), EMPTY_BOX, ERROR_IN_PROCESS, ErrorInSolution(), EvaluateEqMin(), GetBoxDiagonal(), GetBoxLevel(), GetBoxSize(), GetBoxVolume(), GetElapsedTime(), GetNSolutionBoxes(), GetParameter(), MINIMIZATION_SEARCH, NEW, NewEmptyBox(), NewRBError(), NewSolutionBox(), NewSplittedBox(), TCuikSystem::orig2sd, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, TCuikSystem::orig_varNames, PrintBox(), PrintBoxSubset(), REDUCED_BOX_WITH_SOLUTION, TCuikSystem::searchMode, SplitBox(), TCuikSystem::st, TCuikSystem::systemVar, and UpdateOriginalFromSimple(). Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Remove the variables that do not appear in the equation set.
Definition at line 1260 of file cuiksystem.c. References CT_EPSILON, DUMMY_VAR, TCuikSystem::equations, GetEquationVariables(), GetParameter(), GetVariableTypeN(), NVariables(), TCuikSystem::orig_eqMin, RemoveEquationsWithVar(), RemoveVariable(), SYSTEM_VAR, UsedVarInEquations(), UsedVarInNonDummyEquations(), TCuikSystem::variables, and VarIncluded(). Referenced by SimplifyCuikSystem().
Variables with punctual range are constants that can be removed from the equations. If the variables was previously used to replace another variable in the cuiksystem then the replaced variable also becomes constant.
Definition at line 1286 of file cuiksystem.c. References AddCt2LinearConstraint(), CT_EPSILON, DeleteLinearConstraint(), TCuikSystem::equations, Error(), FALSE, GetBoxInterval(), GetParameter(), GetVariable(), GetVariableID(), GetVariableName(), GetVariableNames(), InitLinearConstraint(), IntervalSize(), LowerLimit(), NEW, NO_UINT, NVariables(), TCuikSystem::orig_variables, PrintEquations(), PrintVariables(), RemoveVariable(), ReplaceVariableInEquations(), TRUE, and TCuikSystem::variables. Referenced by SimplifyCuikSystem().
Detects equations of the form
From where a variable replacement can be defined
Note that if This is one of the steps executed in the cuiksystem simplification. The simplification is the process of defining a new set of equations and variables from those given by the user but eliminating variables with trivial values or variables that are linearly related with other variables. In this process, all variable indexes are referred to those in the original cuiksystem (since the simplified one is still in construction).
Definition at line 1371 of file cuiksystem.c. References AddCt2LinearConstraint(), AddLinearConstraints(), AddTerm2LinearConstraint(), ANY_TYPE_VAR, CopyLinearConstraint(), CropLinearConstraint(), CT_EPSILON, DeleteBox(), DeleteLinearConstraint(), TCuikSystem::equations, Error(), FALSE, GetEquation(), GetLinearConstraintCoefficient(), GetLinearConstraintError(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), GetParameter(), GetVariable(), GetVariableID(), GetVariableInterval(), GetVariableName(), GetVariableNames(), InitBox(), IntervalCenter(), IntervalSize(), IsSimplificable(), IsSystemVariable(), LinearConstraintIncludes(), NEquations(), NEW, NO_UINT, NVariables(), TCuikSystem::orig_variables, PrintEquations(), PrintLinearConstraint(), PrintVariables(), RemoveTermFromLinearConstraint(), RemoveVariable(), ReplaceVariableInEquations(), ScaleLinearConstraint(), SetBoxInterval(), TRUE, TCuikSystem::variables, and ZERO. Referenced by SimplifyCuikSystem().
Generate a simplified version of a cuiksystem by eliminating variables with constant values from the equations and by replacing variables by other variables if there is a linear dependency between them. Simplifications can introduce numerical issues. For instance to replace a variable that appear in a equation like
we have to operate b/a and this can introduce perturbations in the system due to floating point rounding. We try to do our best to avoid problems (for instance we only apply the above simplification if a=1) but small perturbation are unavoidable in general and for particularly ill-conditioned problems they can lead to simplified systems with a different set of solutions than the original system. If you encounter such a problem it would be safer to operate directly with the original system and not with the simplified one. This can be done, setting the SIMPLIFICATION_LEVEL parameter to 0.
Definition at line 1539 of file cuiksystem.c. References AddCt2LinearConstraint(), AddTerm2LinearConstraint(), BoxFromVariables(), CopyEquations(), CopyVariables(), CSRemoveLCVars(), CSRemoveUnusedVars(), CSRemoveVarsWithCtRange(), CT_SIMPLIFICATION_LEVEL, DeleteBox(), DeleteLinearConstraint(), DummifyCuikSystem(), TCuikSystem::equations, FALSE, GaussianElimination(), GetBoxInterval(), GetLinearConstraintCoefficient(), GetLinearConstraintError(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), GetParameter(), GetVariable(), GetVariableID(), GetVariableName(), GetVariableNames(), InitLinearConstraint(), InitMapping(), IntervalCenter(), MAX_TERMS_SIMP, NEW, NVariables(), TCuikSystem::orig2s, TCuikSystem::orig2sd, TCuikSystem::orig_equations, TCuikSystem::orig_variables, PolynomialEquations(), PrintEquations(), PrintVariables(), TCuikSystem::scalar, SetOriginalVarRelation(), SetVariableInterval(), TCuikSystem::simp_equations, TCuikSystem::simp_variables, SimpleFromOriginal(), TRUE, and TCuikSystem::variables. Referenced by UpdateCuikSystem().
This is the common part of AddJacobianEquations and AddSimplifiedJacobianEquations. It basically operates on a given Jacobian, independently of where this Jacobian comes from. Note that the new equations are to be added to the original system and therefore the input Jacobian MUST be expressed in this system of equations. For instance, when adding equations from the simplified system we have to first re-write the equations in terms of the original variables.
Definition at line 2695 of file cuiksystem.c. References AccumulateEquations(), AddEquation2CS(), AddVariable2CS(), CopyEquation(), DeleteEquation(), DeleteVariable(), EQU, Error(), GenerateGeneralNormEquation(), GetJacobianEquation(), GetJacobianSize(), InitEquation(), NEW, NewInterval(), NewVariable(), TCuikSystem::scalar, SetEquationCmp(), SetEquationType(), SetVariableInterval(), SYSTEM_EQ, SYSTEM_VAR, and VarScaleEquation(). Referenced by AddJacobianEquations(), and AddSimplifiedJacobianEquations().
The cuiksystem stores some cached information about variables and equations. This information has to be re-computed everytime the cuiksystem is modified.
Definition at line 1844 of file cuiksystem.c. References TCuikSystem::consistent, CT_EPSILON, DEPTH_FIRST_SEARCH, TCuikSystem::empty, TCuikSystem::eqMin, TCuikSystem::equations, Error(), FALSE, GetNumMonomials(), GetParameter(), GetVariableNames(), GetVariablesTopology(), GetVariableTypeN(), InitJacobian(), IsDummyVariable(), IsSecondaryVariable(), IsSystemVariable(), TCuikSystem::J, MINIMIZATION_SEARCH, NEqualityEquations(), TCuikSystem::nequations, NEquations(), NEW, TCuikSystem::notDummyVar, NVariables(), TCuikSystem::nvariables, TCuikSystem::orig2sd, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_nequations, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, TCuikSystem::orig_varNames, ResetEquation(), RewriteEquation2Simp(), TCuikSystem::searchMode, TCuikSystem::simp_empty, TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nequations, TCuikSystem::simp_nvariables, TCuikSystem::simp_tp, TCuikSystem::simp_variables, SimplifyCuikSystem(), TCuikSystem::systemVar, TOPOLOGY_R, TRUE, TCuikSystem::updated, TCuikSystem::variables, and TCuikSystem::varType. Referenced by AddJacobianEquations(), AddSimplifiedJacobianEquations(), ComputeSplitDim(), ComputeSplitDimInt(), CuikNewtonInBox(), CuikNewtonSimp(), ErrorInSimpCSEquations(), ErrorInSimpInequalitiesOnPoint(), EvaluateSimpCSEquations(), EvaluateSubSetSimpCSEquations(), GenerateSimpInitialBox(), GenerateSimplifiedPoint(), GetSimpCSJacobian(), GetSimpCSTopology(), IncrementalSampleCuikSystemInBox(), IsSystemVarInSimpCS(), MaxReduction(), MPI_SolveCuikSystem(), MPI_TreatBox(), PrintCuikSystemWithSimplification(), RegenerateOriginalBox(), RegenerateOriginalPoint(), RegenerateSolution(), RegenerateSolutionPoint(), SaveCuikSystemSimplification(), SimpInequalitiesHoldOnPoint(), SolveCuikSystem(), and VerifyCuikSystem().
The cuiksystem stores some cached information about variables and equations. This information has to be re-computed everytime the cuiksystem is modified.
Definition at line 1763 of file cuiksystem.c. References TCuikSystem::consistent, DeleteEquation(), DeleteEquations(), DeleteJacobian(), DeleteMapping(), DeleteVariables(), TCuikSystem::eqMin, TCuikSystem::equations, FALSE, TCuikSystem::J, MINIMIZATION_SEARCH, TCuikSystem::nequations, TCuikSystem::notDummyVar, TCuikSystem::nvariables, TCuikSystem::orig2s, TCuikSystem::orig2sd, TCuikSystem::orig_nequations, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_varNames, TCuikSystem::searchMode, TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nequations, TCuikSystem::simp_nvariables, TCuikSystem::simp_tp, TCuikSystem::simp_variables, TCuikSystem::systemVar, TRUE, TCuikSystem::updated, TCuikSystem::variables, and TCuikSystem::varType. Referenced by AddEquation2CS(), AddJacobianEquations(), AddMatrixEquation2CS(), AddSimplifiedJacobianEquations(), AddVariable2CS(), DeleteCuikSystem(), IncrementalSampleCuikSystemInBox(), SampleCuikSystemInBox(), and SetCSVariableRange().
Selects and optimal split dimension for a given box.
Definition at line 1972 of file cuiksystem.c. References CT_EPSILON, CT_SPLIT_TYPE, TCuikSystem::equations, Error(), GetBoxIntervals(), GetParameter(), INF, IntervalSize(), TCuikSystem::nequations, NEW, NO_UINT, TCuikSystem::nvariables, randomMax(), TCuikSystem::systemVar, UpdateCuikSystem(), UpdateSplitWeight(), and Warning(). Referenced by ComputeSplitDim(), and PostProcessBox().
While solving a problem, every STATE_PERIOD processed boxes we store the solver state into a file. In this way if the process crashes, we can re-start the solver from the last saved state.
Definition at line 2093 of file cuiksystem.c. References Error(), GetElapsedTime(), NEW, SaveListOfBoxes(), SaveStatistics(), and TCuikSystem::st. Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Retrives the internal the cuik solver state information from a file previously saved by SaveCSState. This allows to init the solving process from a intermediate point (and not from scratch) after, for intance, a power failure.
Definition at line 2122 of file cuiksystem.c. References Error(), First(), GetBoxNIntervals(), GetCurrent(), GetTime(), InitIterator(), LoadListOfBoxes(), LoadStatistics(), TCuikSystem::nvariables, SetInitialTime(), and TCuikSystem::st. Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Creates an empty cuiksystem.
Definition at line 2155 of file cuiksystem.c. References TCuikSystem::consistent, TCuikSystem::constants, DEPTH_FIRST_SEARCH, TCuikSystem::empty, FALSE, InitConstants(), InitEquation(), InitEquations(), InitVariables(), TCuikSystem::nequations, TCuikSystem::notDummyVar, TCuikSystem::nvariables, TCuikSystem::orig2s, TCuikSystem::orig2sd, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_nequations, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, TCuikSystem::scalar, TCuikSystem::searchMode, TCuikSystem::simp_empty, TCuikSystem::simp_tp, TCuikSystem::systemVar, TRUE, TCuikSystem::updated, and TCuikSystem::varType. Referenced by AdjustBioWorldGeometry(), CuikSystemMerge(), InitWorldCS(), and main().
Checks the consistency of the cuiksystem. If the system is inconsistent an error is trigered. Note that if new equations/variables are added to the cuiksystem its consistancy might no longer hold.
Definition at line 2194 of file cuiksystem.c. References Error(), and UpdateCuikSystem(). Referenced by main().
Creates an cuiksystem from another cuiksystem.
Definition at line 2204 of file cuiksystem.c. References TCuikSystem::consistent, TCuikSystem::constants, CopyConstants(), CopyEquation(), CopyEquations(), CopyJacobian(), CopyMapping(), CopyStatistics(), CopyVariables(), TCuikSystem::empty, TCuikSystem::eqMin, TCuikSystem::equations, GetVariableNames(), TCuikSystem::J, MINIMIZATION_SEARCH, TCuikSystem::nequations, NEW, TCuikSystem::notDummyVar, TCuikSystem::nvariables, TCuikSystem::orig2s, TCuikSystem::orig2sd, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_nequations, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, TCuikSystem::orig_varNames, TCuikSystem::scalar, TCuikSystem::searchMode, TCuikSystem::simp_empty, TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nequations, TCuikSystem::simp_nvariables, TCuikSystem::simp_tp, TCuikSystem::simp_variables, TCuikSystem::st, TCuikSystem::systemVar, TCuikSystem::updated, TCuikSystem::variables, and TCuikSystem::varType. Referenced by AddJacobianEquations(), AddSimplifiedJacobianEquations(), GenerateWorldSingularityEquations(), and GetSCpSystem().
Defines a new cuiksystem by union of two given cuiksystems. CAUTION!
Definition at line 2320 of file cuiksystem.c. References AccumulateEquations(), AddVariable2CS(), TCuikSystem::consistent, TCuikSystem::constants, CopyEquation(), CopyEquations(), CopyVariables(), TCuikSystem::empty, FALSE, GetVariable(), InitCuikSystem(), MergeConstants(), MergeEquations(), TCuikSystem::nequations, TCuikSystem::notDummyVar, NVariables(), TCuikSystem::nvariables, TCuikSystem::orig2sd, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_nequations, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, TCuikSystem::scalar, ScalarEquations(), TCuikSystem::searchMode, TCuikSystem::simp_empty, TCuikSystem::systemVar, TRUE, TCuikSystem::updated, and TCuikSystem::varType.
Determines which box to explore first in minimization mode. In this mode boxes are sorted according to an objective function given by an equation in the problem file. The equation is evaluated at the center of the box and the box with a minimum value is processed first.
Definition at line 2413 of file cuiksystem.c. References EvaluateEqMin(). Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Defines the criterion to be used sorting the boxes to be treated when searching for a solution. Possible critera are
Definition at line 2418 of file cuiksystem.c. References BREADTH_FIRST_SEARCH, CopyEquation(), DeleteEquation(), DEPTH_FIRST_SEARCH, Error(), MINIMIZATION_SEARCH, TCuikSystem::orig_eqMin, and TCuikSystem::searchMode. Referenced by AddTerm2SearchCriterion().
Adds the ![]() to the equation guiding the search. This function automatically calls SetCSSearchMode to set the search mode to MINIMIZATION_SEARCH it is is not so.
Definition at line 2438 of file cuiksystem.c. References AccumulateEquations(), AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteEquation(), DeleteMonomial(), EQU, InitEquation(), InitMonomial(), MINIMIZATION_SEARCH, NFUN, TCuikSystem::orig_eqMin, ResetMonomial(), TCuikSystem::searchMode, SetCSSearchMode(), and SetEquationCmp(). Referenced by GenerateJointRangeEquations().
Adds a new equation to the system. The equation must use the variables already added to the system. Repeated equations are not added to the system.
Definition at line 2481 of file cuiksystem.c. References AddEquation(), TCuikSystem::orig_equations, UnUpdateCuikSystem(), and TCuikSystem::updated. Referenced by AddJacobianEquationsInt(), AdjustBioWorldGeometry(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), GenerateLinkRotQLinks(), GenerateWorldSingularityEquations(), and GetSCpSystem().
Adds a new matrix equation to the system. The equation must use the variables already added to the system. No check is performed to determine if the matrix equation is repeated.
Definition at line 2490 of file cuiksystem.c. References AddMatrixEquation(), Error(), FALSE, TCuikSystem::orig_equations, TCuikSystem::scalar, SimplifiedMEquation(), UnUpdateCuikSystem(), and TCuikSystem::updated. Referenced by GenerateEquationsFromBranch().
Adds a new variable to the system.
Definition at line 2511 of file cuiksystem.c. References AddVariable(), GetVariableID(), GetVariableName(), NO_UINT, TCuikSystem::orig_variables, UnUpdateCuikSystem(), and TCuikSystem::updated. Referenced by AddJacobianEquationsInt(), AdjustBioWorldGeometry(), CuikSystemMerge(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), GenerateLinkRotQLinks(), GenerateWorldSingularityEquations(), and GetSCpSystem().
Returns a copy of the variables stored in the cuiksystem. This can be seen as a Tvariables copy constructor, thus the output variables does not need to be initialized beforehand.
Definition at line 2529 of file cuiksystem.c. References CopyVariables(), and TCuikSystem::orig_variables. Referenced by GenerateWorldEquations().
Initializes an array of pointers to variable names. This is used to print boxes.
Definition at line 2534 of file cuiksystem.c. References GetVariableNames(), and TCuikSystem::orig_variables. Referenced by AdjustBioWorldGeometry(), and GetWorldVarNames().
Returns the number of variables already in the cuiksystem.
Definition at line 2544 of file cuiksystem.c. References NVariables(), and TCuikSystem::orig_variables. Referenced by DealWithCP(), GenerateWorldTWSEquations(), GetLinkTransformsFromSolutionPoint(), GetSCpSystem(), GetWorldNumVariables(), GetWorldSimpVariableMask(), IncrementalSampleCuikSystemInBox(), main(), MoveWorld(), PrintWorldAxes(), RegenerateWorldOriginalPoint(), RegenerateWorldSolutionPoint(), SampleCuikSystemInBox(), WorldDOF2Sol(), and WorldSample2DOF().
Returns the number of system variables in the cuiksystem. System variables are system+secondary (see GetCSSystemVars).
Definition at line 2549 of file cuiksystem.c. References GetNumSecondaryVariables(), GetNumSystemVariables(), and TCuikSystem::orig_variables. Referenced by GetSolutionPointFromLinkTransforms(), GetWorldNumSystemVariables(), and MoveWorld().
Returns the number of non-dummy (i.e., the sum of system, secondary and cartesian variables) variables already in the cuiksystem.
Definition at line 2558 of file cuiksystem.c. References GetNumDummyVariables(), NVariables(), and TCuikSystem::orig_variables. Referenced by AnimateWorld().
Returns a copy of one of the variables of the cuiksystem. This can be seen as a Tvariable copy constructor, thus the output variable does not need to be initialized beforehand.
Definition at line 2566 of file cuiksystem.c. References CopyVariable(), GetVariable(), and TCuikSystem::orig_variables.
Returns a copy of the range of one of the variables of the cuiksystem. This can be seen as a Tinterval constructor, thus the output interval does not need to be initialized beforehand.
Definition at line 2574 of file cuiksystem.c. References GetVariable(), TCuikSystem::orig_variables, SetVariableInterval(), UnUpdateCuikSystem(), and TCuikSystem::updated. Referenced by GetSCpSystem(), and SampleCuikSystemInBox().
Returns the numerical identifier of a variable given its name.
Definition at line 2586 of file cuiksystem.c. References GetVariableID(), and TCuikSystem::orig_variables. Referenced by AdjustBioWorldGeometry(), ApplyLinkRotFLinks(), ApplyLinkRotLinks(), ApplyLinkRotQLinks(), CacheRotVarsFLinks(), CacheRotVarsLinks(), CacheRotVarsQLinks(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateJointSolution(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), GenerateLinkRotQLinks(), GenerateWorldTWSEquations(), GetJointTransSeq(), main(), RegenerateJointBox(), RegenerateJointSolution(), SetTransVars(), and WorldDOF2Sol().
Gets the name of a particular variable. The returned pointer should not be manipulated.
Definition at line 2591 of file cuiksystem.c. References TCuikSystem::orig_variables, and VariableName(). Referenced by GetLinkPoseSimpVars().
Identifies system variables that survive in the simplified system.
Definition at line 2596 of file cuiksystem.c. References Error(), GetVariableID(), IsSecondaryVariable(), IsSystemVariable(), NO_UINT, TCuikSystem::simp_variables, and UpdateCuikSystem(). Referenced by GetLinkPoseSimpVars().
Creates an array of booleans with the size of the number of variables in the cuiksystem and set to TRUE the entries corresponding to system and secondary variables. In coherence with the definition of the orig_systemVar field of TCuikSystem, here we identify system and secondary varibles. Internally, though, we differentiate between them (secondary varibles are not used when splitting boxes).
Definition at line 2614 of file cuiksystem.c. References IsSecondaryVariable(), IsSystemVariable(), NEW, NVariables(), and TCuikSystem::orig_variables. Referenced by AdjustBioWorldGeometry(), GenerateWorldEquations(), GetSCpSystem(), GetWorldSystemVars(), IncrementalSampleCuikSystemInBox(), main(), NewtonInWorld(), and SampleCuikSystemInBox().
Determines the topology of a given variable (of the original variable set).
Definition at line 2627 of file cuiksystem.c. References GetVariable(), GetVariableTopology(), and TCuikSystem::orig_variables. Referenced by GetWorldVarTopology().
Returns a copy of the system equations. This is a Tequations copy constructor.
Definition at line 2635 of file cuiksystem.c. References CopyEquations(), and TCuikSystem::orig_equations.
Returns a copy of one of the equations of the cuiksystem. This can be seen as a Tequation copy constructor.
Definition at line 2643 of file cuiksystem.c. References CopyEquation(), Error(), GetEquation(), TCuikSystem::orig_equations, and TCuikSystem::scalar.
Returns TRUE if the cuiksystem is fully polynomial. We check if the original cuiksystem is polynomial since if this system is polynomial, so are the rest of systems (simplified, simplified+dummified).
Definition at line 2651 of file cuiksystem.c. References TCuikSystem::orig_equations, and PolynomialEquations(). Referenced by IsWorldPolynomial().
Returns TRUE if the cuiksystem is fully scalar.
Definition at line 2656 of file cuiksystem.c. References TCuikSystem::scalar.
Returns the number of equations already in the cuiksystem.
Definition at line 2664 of file cuiksystem.c. References NEquations(), and TCuikSystem::orig_equations. Referenced by GetSCpSystem(), IncrementalSampleCuikSystemInBox(), and SampleCuikSystemInBox().
Defines the Jacobian of a CuikSystem considering each equation as a function. Defines an array with as many rows as equations and as many columns as variables where each entry (i,j) is de derivative of equation i (considered as a function) with repect to variable j.
Definition at line 2669 of file cuiksystem.c. References InitJacobian(), TCuikSystem::orig_equations, and TCuikSystem::orig_variables. Referenced by AddJacobianEquations(), GetSCpSystem(), GetSimpCSJacobian(), and GetWorldJacobian().
Creates an array with the topology information for the variables in the simplified system. The topology gives information on the type of range for each variable (either real or spherical). This is relevant when searching for nearest neighbours (in the case of spherical topology pi is close to -pi but not in the case of real topology).
Definition at line 2674 of file cuiksystem.c. References Error(), GetVariablesTopology(), TCuikSystem::simp_variables, and UpdateCuikSystem(). Referenced by GetWorldSimpTopology().
The same as GetCSJacobian but for the simplified system.
Definition at line 2683 of file cuiksystem.c. References Error(), GetCSJacobian(), InitJacobian(), TCuikSystem::scalar, TCuikSystem::simp_equations, TCuikSystem::simp_variables, and UpdateCuikSystem(). Referenced by GetWorldSimpJacobian().
Adds linear a linear combination of the Jacobian to the system. Generates a new variable for each equation in the system and creates a linear combination of the Jacobian rows using the new variables. Those new variables are normalized to avoid getting redudant solutions. Only the Jacobian columns corresponding to the selectedVars is used. This functions is used when looking for singularities.
Definition at line 2758 of file cuiksystem.c. References AddJacobianEquationsInt(), CopyCuikSystem(), DeleteCuikSystem(), DeleteJacobian(), Error(), GetCSJacobian(), GetJacobianSize(), UnUpdateCuikSystem(), and UpdateCuikSystem(). Referenced by main().
This is the same as AddJacobianEquations but the we use the Jacobian of the simplified system instead of that of the original system. Note that the selectedVars refer to the original system and they can be missing from the original system. We try to translate variables from original to simple. Origianl variables assigned to constants are unselected and variables assigned to other variables are replaced accordingly.
Definition at line 2788 of file cuiksystem.c. References AddJacobianEquationsInt(), CopyCuikSystem(), DeleteCuikSystem(), DeleteJacobian(), DeleteLinearConstraint(), Error(), FALSE, GetJacobianEquation(), GetLinearConstraintVariable(), GetNumTermsInLinearConstraint(), GetOriginalVarRelation(), GetVariableNames(), InitJacobian(), NEW, TCuikSystem::orig2s, TCuikSystem::orig_nvariables, TCuikSystem::orig_variables, TCuikSystem::orig_varNames, PrintEquation(), RewriteEquation2Orig(), TCuikSystem::scalar, TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nvariables, TCuikSystem::simp_variables, TRUE, UnUpdateCuikSystem(), UpdateCuikSystem(), and VariableName(). Referenced by GenerateWorldTWSEquations().
Reduces a box using the constraints included in the cuiksystem and using the algorithms described in our papers.
Definition at line 2908 of file cuiksystem.c. References DeleteBox(), DUMMY_VAR, EMPTY_BOX, Error(), GetBoxSize(), TCuikSystem::orig2sd, ReduceBox(), TCuikSystem::scalar, SimpleFromOriginal(), TCuikSystem::systemVar, UpdateCuikSystem(), and UpdateOriginalFromSimple(). Referenced by IncrementalSampleCuikSystemInBox(), MaxWorldReduction(), and SampleCuikSystemInBox().
Determine points for which all the equations in the cuiksystem hold. Actually it determines tiny boxes (boxes with size below EPSILON) and the center of the box is taken as the solution point. Since, in general, EPSILON is very small (1e-6) the error of the given solutions is also tiny (order of 1e-12).
Definition at line 2941 of file cuiksystem.c. References DeleteBox(), Error(), GenerateInitialBox(), SampleCuikSystemInBox(), and TCuikSystem::scalar.
This like function SampleCuikSystem but the samples are generated only in the given box. Morover, this function can store the (tiny) solution boxes in a list of boxes.
Definition at line 2960 of file cuiksystem.c. References AddLastElement(), Advance(), ChangeParameter(), ComputeSplitDim(), CopyBox(), CreateFileName(), CT_EPSILON, CT_N_SOLUTIONS, CT_SMALL_SIGMA, CT_SPLIT_TYPE, DeleteBox(), DeleteFileName(), DeleteListOfBoxes(), DUMMY_VAR, EMPTY_BOX, EndOfList(), Error(), FALSE, First(), GenerateInitialBox(), GetBoxInterval(), GetCSNumEquations(), GetCSNumVariables(), GetCSSystemVars(), GetCurrent(), GetFileFullName(), GetParameter(), GetVariable(), GetVariableTypeN(), InitIterator(), InitListOfBoxes(), IntervalCenter(), LINKS_EXT, MaxReduction(), NEW, NewInterval(), NO_UINT, NVariables(), TCuikSystem::orig_equations, TCuikSystem::orig_variables, PrintBox(), randomInInterval(), TCuikSystem::scalar, SetCSVariableRange(), SetVariableInterval(), SOL_EXT, SolveCuikSystem(), SYSTEM_VAR, TRUE, UnUpdateCuikSystem(), TCuikSystem::updated, and UsedVarInEquations(). Referenced by SampleCuikSystem().
This function is very similar to SampleCuikSystem but degrees of freedom are progressively fixed instead of fixed all simultaneously.
Definition at line 3218 of file cuiksystem.c. References DeleteBox(), Error(), GenerateInitialBox(), IncrementalSampleCuikSystemInBox(), and TCuikSystem::scalar. Referenced by main().
This function is very similar to SampleCuikSystemInBox but degrees of freedom are progressively fixed instead of fixed all simultaneously.
Definition at line 3238 of file cuiksystem.c. References AddLastElement(), Advance(), BoxFromVariables(), ChangeParameter(), CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CopyBox(), CreateFileName(), CT_EPSILON, CT_MAX_NEWTON_ITERATIONS, CT_N_SOLUTIONS, CT_SMALL_SIGMA, CuikNewtonInBox(), DeleteBox(), DeleteFileName(), DeleteListOfBoxes(), DUMMY_VAR, EMPTY_BOX, EndOfList(), Error(), ErrorInSolution(), FALSE, First(), GetBoxInterval(), GetBoxSumSide(), GetCSNumEquations(), GetCSNumVariables(), GetCSSystemVars(), GetCurrent(), GetFileFullName(), GetParameter(), InitIterator(), InitListOfBoxes(), IntervalCenter(), IntervalSize(), IsInSimple(), IsSystemVariable(), LINKS_EXT, MaxReduction(), NEW, NewInterval(), NO_UINT, NVariables(), TCuikSystem::orig2sd, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_variables, TCuikSystem::orig_varNames, PrintBox(), PrintBoxSubset(), randomInInterval(), randomMax(), TCuikSystem::scalar, SetBoxInterval(), SOL_EXT, SolveCuikSystem(), TRUE, UnUpdateCuikSystem(), UpdateCuikSystem(), and VariablesFromBox(). Referenced by IncrementalSampleCuikSystem().
This is simplified a version of CuikNewtonInBox since
This used when defining a RRT: we sample points in ambient space (of the simplified system) and we want to converge to the manifold (if possible). If you want to understand what is done in CuikNewtonInBox it is better to start by this function.
Definition at line 3571 of file cuiksystem.c. References ArrayPi2Pi(), CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CT_EPSILON, CT_MAX_NEWTON_ITERATIONS, DeleteNewton(), DIVERGED, Error(), ErrorInSimpCSEquations(), EvaluateEqualityEquations(), EvaluateJacobianInVector(), FALSE, GetNewtonMatrixBuffer(), GetNewtonRHBuffer(), GetParameter(), InitNewton(), TCuikSystem::J, NewtonStep(), TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nequations, TCuikSystem::simp_nvariables, TCuikSystem::simp_tp, TRUE, and UpdateCuikSystem(). Referenced by WorldSimpCuikNewton().
Find a solution of a cuiksystem set of equations using the Newton-Rhapson method. The initial point is sampled form the given box. Note that parameter box is used both for input and for output. As an input it defienes the box from where to drawn the initial point for the Newton method. As an output it is a small box around the last point of the Newton iteration (the solution if the process converged).
Definition at line 3667 of file cuiksystem.c. References ArrayPi2Pi(), BoxFromVariables(), CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CONVERGED_OUTSIDE_GLOBAL, CopyBox(), CT_EPSILON, CT_MAX_NEWTON_ITERATIONS, DeleteBox(), DeleteNewton(), DIVERGED, Error(), ErrorInInequalities(), EvaluateEqualityEquations(), EvaluateJacobianInVector(), FALSE, GenerateInitialBox(), GetBoxInterval(), GetBoxNIntervals(), GetNewtonMatrixBuffer(), GetNewtonRHBuffer(), GetNumDummyVariables(), GetParameter(), InitBoxFromPoint(), InitNewton(), IntervalCenter(), IntervalSize(), TCuikSystem::J, NEW, NewInterval(), NewtonSetMatrix(), NewtonSetRH(), NewtonStep(), Norm(), TCuikSystem::orig2s, TCuikSystem::orig_notDummyVar, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, TCuikSystem::orig_variables, PointInBox(), randomInInterval(), RegenerateSolution(), SetBoxInterval(), SetBoxSubset(), TCuikSystem::simp_equations, TCuikSystem::simp_nee, TCuikSystem::simp_nequations, TCuikSystem::simp_nvariables, TCuikSystem::simp_tp, SimpleFromOriginal(), UpdateCuikSystem(), and UpdateOriginalFromSimple(). Referenced by CuikNewton(), IncrementalSampleCuikSystemInBox(), main(), and PostProcessBox().
Find a solution of a cuiksystem set of equations using the Newton-Rhapson method. This function is only a wrapper of CuikNewtonInBox using the initial box (i.e., the one defined form the variable ranges) to sample the initial point.
Definition at line 3905 of file cuiksystem.c. References CONVERGED_IN_BOX, CONVERGED_IN_GLOBAL, CuikNewtonInBox(), DeleteBox(), and GenerateInitialBox(). Referenced by main(), and NewtonInWorld().
This is the entry function for the Cuik solver. It takes as input a cuiksystem and returns a set of boxes bounding the solution set. If the solutions are isolated (zero-dimensional) the output is a set of isolated boxes. If the solution is continuous the output is a set of boxes bounding the solution space. Be aware that isolating solution sets with high dimensionality can be expensive. To this end it is recommended to use the parallel version of cuik
Definition at line 3926 of file cuiksystem.c. References AddBox2HeapOfBoxes(), AddList2Heap(), BoxFromVariables(), BREADTH_FIRST_SEARCH, CmpBoxBreadthFirst(), CmpBoxDepthFirst(), CmpBoxesEquation(), CT_N_SOLUTIONS, CT_STATE_PERIOD, DeleteBox(), DeleteHeap(), DeleteListOfBoxes(), DEPTH_FIRST_SEARCH, DUMMY_VAR, Error(), EvaluateEqMin(), ExtractMinElement(), FALSE, GetBoxLevel(), GetBoxSize(), GetBoxVolume(), GetNSolutionBoxes(), GetParameter(), Heap2List(), HeapEmpty(), HeapOfBoxesVolume(), InitBox(), InitHeapOfBoxes(), InitStatistics(), LoadCSState(), MINIMIZATION_SEARCH, NewBoxProcessed(), NewMaxLevel(), TCuikSystem::orig2sd, PostProcessBox(), PrintBox(), PrintStatistics(), ReduceBox(), REDUCED_BOX_WITH_SOLUTION, SaveCSState(), TCuikSystem::scalar, TCuikSystem::searchMode, TCuikSystem::simp_empty, TCuikSystem::simp_nvariables, SimpleFromOriginal(), TCuikSystem::st, TCuikSystem::systemVar, UpdateCuikSystem(), and TCuikSystem::variables. Referenced by DealWithCP(), IncrementalSampleCuikSystemInBox(), main(), and SampleCuikSystemInBox().
This is the parallel version of SolveCuikSystem. Actually this function is the main scheduler, i.e., the one in charge of managing the boxes to be processes to send them to the child processors. to collec the result, and to deal with them accordingly (bisect, consider solutions, discard if they are empty,...).
Definition at line 4103 of file cuiksystem.c. References AddBox2HeapOfBoxes(), AddFirstElement(), AddList2Heap(), AddNBoxReductions(), Box2Buffer(), BoxFromVariables(), BREADTH_FIRST_SEARCH, Buffer2Box(), CmpBoxBreadthFirst(), CmpBoxDepthFirst(), CmpBoxesEquation(), CT_N_SOLUTIONS, CT_STATE_PERIOD, DeleteBox(), DeleteHeap(), DeleteListOfBoxes(), DeleteStatistics(), DEPTH_FIRST_SEARCH, Error(), ERROR_IN_PROCESS, ExtractMinElement(), FALSE, GetBoxBufferSize(), GetBoxLevel(), GetBoxSize(), GetBoxVolume(), GetNSolutionBoxes(), GetParameter(), Heap2List(), HeapEmpty(), HeapOfBoxesVolume(), HeapSize(), InitBox(), InitHeapOfBoxes(), InitStatistics(), LoadCSState(), MINIMIZATION_SEARCH, MPI_TREAT_BOX_TIMEOUT, NEW, NewBoxProcessed(), NewLostBox(), NewMaxLevel(), TCuikSystem::nvariables, TCuikSystem::orig2sd, PostProcessBox(), PrintBox(), PrintStatistics(), REDUCED_BOX, SaveCSState(), TCuikSystem::scalar, TCuikSystem::searchMode, SimpleFromOriginal(), TCuikSystem::st, TCuikSystem::systemVar, TRUE, UpdateCuikSystem(), and TCuikSystem::variables. Referenced by main().
This is the function executed by the child processors when solving a problem in a multi-processor environment.
Definition at line 4490 of file cuiksystem.c. References Box2Buffer(), Buffer2Box(), DeleteBox(), DUMMY_VAR, Error(), FALSE, GetBoxBufferSize(), GetNBoxReductions(), InitBox(), NEW, TCuikSystem::nvariables, PrintBox(), ReduceBox(), ResetNBoxReductions(), TCuikSystem::scalar, TCuikSystem::st, TRUE, and UpdateCuikSystem(). Referenced by main().
Determines the search space for the solutions of a cuiksystem in the form of a box defined from the variable ranges.
Definition at line 4583 of file cuiksystem.c. References BoxFromVariables(), and TCuikSystem::orig_variables. Referenced by CuikNewton(), CuikNewtonInBox(), GetWorldInitialBox(), IncrementalSampleCuikSystem(), SampleCuikSystem(), and SampleCuikSystemInBox().
The same as GenerateInitialBox but for the simplified system.
Definition at line 4588 of file cuiksystem.c. References BoxFromVariables(), Error(), TCuikSystem::simp_variables, and UpdateCuikSystem(). Referenced by GetWorldSimpInitialBox().
Generates values for all variables in the box (including dummies and cartesian ones) from the values of the system variables. In general, solutions only include system variables and for many operations the cartesian/dummy ones are also needed (for plotting, for refining a solution,...). This functions reverses the removal of the non-system variables in a box. Observe that the box must be given in the original system and with values only for the system variables. This is different of what happens with RegenerateOriginalBox where the input box has values for all variables in the simplified system.
Definition at line 4596 of file cuiksystem.c. References CARTESIAN_VAR, CropEquation(), CT_EPSILON, CT_RHO, DeleteBox(), DUMMY_VAR, EMPTY_BOX, FALSE, GetParameter(), INF, InitBox(), IsCartesianVariable(), IsCoordEquation(), IsDummyEquation(), IsDummyVariable(), NewInterval(), TCuikSystem::orig_equations, TCuikSystem::orig_nvariables, TCuikSystem::orig_variables, SetBoxInterval(), TRUE, and UpdateCuikSystem(). Referenced by CuikNewtonInBox(), and RegenerateSolutionPoint().
Defines a solution point including the dummy and cartesian variables from an array with only values for the system variables. This function is based on RegenerateSolution.
Definition at line 4660 of file cuiksystem.c. References DeleteBox(), Error(), GetBoxInterval(), InitBoxFromPoint(), IntervalCenter(), NEW, TCuikSystem::orig_nvariables, TCuikSystem::orig_systemVar, RegenerateSolution(), and UpdateCuikSystem().
Generates a box in the original cuiksystem from a box of the simplified one. You can generate a simplified cuiksystem using cuiksimplify and then solve it. To obtain the solution boxes in the un-simplified (or original) system using the cuikunsimplify application that basically relies on this function.
Definition at line 4701 of file cuiksystem.c. References BoxFromVariables(), Error(), TCuikSystem::orig2sd, TCuikSystem::orig_variables, UpdateCuikSystem(), and UpdateOriginalFromSimple(). Referenced by main().
Defines a point in the original system from a point in the simplified system. It is like RegenerateOriginalBox but on points and not on boxes and taking points from the simplified system and not the simplified+dummified. This is basically used from cuikatlas that operates on the simplified system.
Definition at line 4712 of file cuiksystem.c. References Error(), TCuikSystem::orig2s, TCuikSystem::orig_nvariables, TCuikSystem::orig_variables, PointFromVariables(), UpdateCuikSystem(), and UpdateOriginalPointFromSimple(). Referenced by GetLinkTransformsFromSolutionPoint(), and RegenerateWorldOriginalPoint().
Generates a simplified point from an original one. This is the inverse mapping of RegenerateOriginalPoint.
Definition at line 4725 of file cuiksystem.c. References Error(), TCuikSystem::orig2s, TCuikSystem::simp_nvariables, SimplePointFromOriginal(), and UpdateCuikSystem(). Referenced by WorldGenerateSimplifiedPoint().
Determines the dimension for which it is more advisable to split a box. The criterion to determine the split dimension can be selected through the parameters.
Definition at line 4742 of file cuiksystem.c. References ComputeSplitDimInt(), DeleteBox(), Error(), GetVarIDInOriginal(), NO_UINT, TCuikSystem::orig2sd, TCuikSystem::scalar, SimpleFromOriginal(), and UpdateCuikSystem(). Referenced by SampleCuikSystemInBox().
Determines if a given point is fully included in the system sub-box (i.e., the sub-box fot the system variables). The point is typically one obtained via sampling.
Definition at line 4766 of file cuiksystem.c. References Error(), GetBoxInterval(), GetBoxNIntervals(), GetVectorElement(), IsDummyVariable(), IsInside(), NVariables(), TCuikSystem::orig_variables, and TRUE.
Evaluates the equation set on a point. Only equalities are evaluated and thus only space for as many ouputs as equalities is needed in r.
Definition at line 4793 of file cuiksystem.c. References EvaluateEqualityEquations(), FALSE, and TCuikSystem::orig_equations. Referenced by WorldEvaluateEquations().
The same as EvaluateCSEquations but on the simplified system. The direct access to the simplified equations is needed to obtain an efficient cuikatlas (and associated utilities). If defined on the original systems they will include too many (trivial) equations and fixed variables. Note that in this case the input point p must be defined on the simplified space.
Definition at line 4798 of file cuiksystem.c. References Error(), EvaluateEqualityEquations(), FALSE, TCuikSystem::simp_equations, and UpdateCuikSystem(). Referenced by WorldEvaluateSimpEquations().
The same as EvaluateSimpCSEquations but on a subset of equations. This is used to evaluate the independent subset of equations during the atlas construction.
Definition at line 4806 of file cuiksystem.c. References Error(), EvaluateSubSetEqualityEquations(), TCuikSystem::simp_equations, and UpdateCuikSystem(). Referenced by WorldEvaluateSubSetSimpEquations().
Returns the matrix resulting from evaluationg the Jacobian of the system in a given point. The Jacobian is defined on the original cuiksystem (without simplification nor dummyfications).
Definition at line 4814 of file cuiksystem.c. References AllocateJacobianEvaluation(), DeleteJacobian(), EvaluateJacobian(), InitJacobian(), TCuikSystem::orig_equations, and TCuikSystem::orig_variables. Referenced by EvaluateWorldJacobian().
Evaluates the equations on a point and returns the norm of the error. Recall that solution points should have zero error. This is similar to ErrorInSolution but works on points and not on boxes and takes into account all equations and not only system ones.
Definition at line 4826 of file cuiksystem.c. References EvaluateEqualityEquations(), FALSE, NEqualityEquations(), NEW, Norm(), and TCuikSystem::orig_equations. Referenced by main(), and WorldErrorInEquations().
The same as ErrorInCSEquations but in the simplified set of equations. The direct access to the simplified equations is needed to obtain an efficient cuikatlas (and associated utilities). If defined on the original systems they will include too many (trivial) equations and fixed variables. Note that in this case the input point p must be defined on the simplified space.
Definition at line 4845 of file cuiksystem.c. References Error(), EvaluateEqualityEquations(), FALSE, NEqualityEquations(), NEW, Norm(), TCuikSystem::simp_equations, and UpdateCuikSystem(). Referenced by CuikNewtonSimp(), and WorldErrorInSimpEquations().
This interface is provided to use it form T-RRT. The same interface is used for other cost function.
Definition at line 4867 of file cuiksystem.c. References EvaluateWholeEquation(). Referenced by EvaluateWorldCost().
Computes the error for the solution represented by a box. The error is computed taking the central point of the box and replacing the values in the equation set. Only system equality equations are taken into account in the error.
Definition at line 4885 of file cuiksystem.c. References Error(), EvaluateEqualityEquations(), GetBoxInterval(), GetBoxNIntervals(), IntervalCenter(), NEqualityEquations(), NEW, Norm(), NVariables(), TCuikSystem::orig_equations, TCuikSystem::orig_variables, and TRUE. Referenced by IncrementalSampleCuikSystemInBox(), main(), and PostProcessBox().
Computes the error for the solution represented by a box as far as inequalities is concerned. The error is computed taking the central point of the box and replacing the values in the equation set. This can be seen as a complement of ErrorInSolution when inequalities are also to be taken into account.
Definition at line 4924 of file cuiksystem.c. References Error(), EvaluateInequalityEquations(), GetBoxInterval(), GetBoxNIntervals(), IntervalCenter(), MaxVector(), NEW, NInequalityEquations(), NVariables(), TCuikSystem::orig_equations, TCuikSystem::orig_nvariables, and TCuikSystem::orig_variables. Referenced by CuikNewtonInBox().
Checks if all inqualities hold for a given point. For many processes (i.e., continuation, etc) only the equalities are taken into account. Thus, we need a function to check if the inequalities hold.
Definition at line 4953 of file cuiksystem.c. References EvaluateInequalityEquations(), MaxVector(), NEW, NInequalityEquations(), TCuikSystem::orig_equations, and TRUE. Referenced by WorldInequalitiesHold().
Checks if all inqualities hold for a given point for the simplified system.
Definition at line 4973 of file cuiksystem.c. References Error(), EvaluateInequalityEquations(), MaxVector(), NEW, NInequalityEquations(), TCuikSystem::simp_equations, TRUE, and UpdateCuikSystem(). Referenced by WorldSimpInequalitiesHold().
Determines the maximum error in the inequalities in the simplified system.
Definition at line 4996 of file cuiksystem.c. References Error(), EvaluateInequalityEquations(), MaxVector(), NEW, NInequalityEquations(), TCuikSystem::simp_equations, and UpdateCuikSystem(). Referenced by WorldErrorInSimpInequalities().
Writes the cuiksystem in a file that can be stdout.
Definition at line 5022 of file cuiksystem.c. References GetVariableNames(), MINIMIZATION_SEARCH, NEW, NVariables(), TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_variables, PrintEquations(), PrintMonomials(), PrintVariables(), and TCuikSystem::searchMode. Referenced by AdjustBioWorldGeometry(), main(), and PrintWorldCS().
Writes the simplified cuiksystem in a file that can be stdout. If the DEBUG mode is above 1 it first print the original system and then the simplified one (in the same file)
Definition at line 5047 of file cuiksystem.c. References CT_SIMPLIFICATION_LEVEL, TCuikSystem::eqMin, TCuikSystem::equations, GetNumSecondaryVariables(), GetNumSystemVariables(), GetParameter(), GetVariableNames(), MINIMIZATION_SEARCH, NEW, NVariables(), TCuikSystem::orig2sd, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_nvariables, TCuikSystem::orig_variables, PrintEquations(), PrintMapping(), PrintMonomials(), PrintVariables(), TCuikSystem::searchMode, TCuikSystem::simp_nvariables, TCuikSystem::simp_variables, UpdateCuikSystem(), and TCuikSystem::variables. Referenced by DealWithCP(), and main().
Saves the simplification information associated with a cuiksystem.
Definition at line 5102 of file cuiksystem.c. References TCuikSystem::orig2sd, SaveMapping(), and UpdateCuikSystem().
Deletes a cuiksystem.
Definition at line 5113 of file cuiksystem.c. References TCuikSystem::constants, DeleteConstants(), DeleteEquation(), DeleteEquations(), DeleteStatistics(), DeleteVariables(), TCuikSystem::empty, TCuikSystem::orig_eqMin, TCuikSystem::orig_equations, TCuikSystem::orig_variables, TCuikSystem::simp_empty, TCuikSystem::st, TRUE, and UnUpdateCuikSystem(). Referenced by AddJacobianEquations(), AddSimplifiedJacobianEquations(), AdjustBioWorldGeometry(), DealWithCP(), DeleteWorldCS(), and main(). |
Follow us!