Beispiel #1
0
	/**
	 * Compute a vector of maximal levels and store information about states.
	 */
	void computeBoundaries() {
		// Compute naive bounds.
		for (const SpecieID ID : cscope(model.species)) {
			// Maximal values of species
			names.push_back(model.species[ID].name);
			maxes.push_back(model.species[ID].max_value);
			mins.push_back(0);
		}

		// Add experiment constraints.
		ConstraintParser * cons_pars = new ConstraintParser(model.species.size(), ModelTranslators::getMaxLevel(model));
		cons_pars->addBoundaries(maxes, true);
		cons_pars->applyFormula(ModelTranslators::getAllNames(model), property.getExperiment());
		cons_pars->status();

		// Compute refined boundaries.
		mins = cons_pars->getBounds(false);
		maxes = cons_pars->getBounds(true);
		rng::transform(maxes, mins, back_inserter(range_size), [](const ActLevel max, const ActLevel min) {
			return max - min + 1;
		});
	}
Beispiel #2
0
 /** Create a new (empty) level.  This is the level into which the next higher level's vertices will be partitioned. The
  * return value is the new level number. */
 size_t new_level(const InputValues &inputs) {
     levels.push_back(Level(inputs));
     return levels.size()-1;
 }