Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Question about representing formula in C++ (http://www.velocityreviews.com/forums/t806184-question-about-representing-formula-in-c.html)

Teddy 11-22-2011 10:43 AM

Question about representing formula in C++
 
Hello,

We have solution which gives optimal plan for tour package including
itenary generation,route and other details. It has Pre and Post
optimisation rules. Pre Optimisation rules checks some sanity of data
like total days in itenary shouldnt exceed duration of Tour and Post
Processing Rule add some extra checks like price of Optimisation
shouldn't be -ve.

Now we have requirement that client want a document format other than C
++ code in which he can specify this rule in mathematical formula and
give it to Optimiser. So I want to know is there a standard way like
XML or something which can be used to interpret formula given in non-
Cpp format and used it.

Thanks

Victor Bazarov 11-22-2011 01:16 PM

Re: Question about representing formula in C++
 
On 11/22/2011 5:43 AM, Teddy wrote:
> We have solution which gives optimal plan for tour package including
> itenary generation,route and other details. It has Pre and Post
> optimisation rules. Pre Optimisation rules checks some sanity of data
> like total days in itenary shouldnt exceed duration of Tour and Post
> Processing Rule add some extra checks like price of Optimisation
> shouldn't be -ve.
>
> Now we have requirement that client want a document format other than C
> ++ code in which he can specify this rule in mathematical formula and
> give it to Optimiser. So I want to know is there a standard way like
> XML or something which can be used to interpret formula given in non-
> Cpp format and used it.


What I think you're asking is "is there something that is non-C++ that
would let us do our thing" (whatever that "thing" might be). If it's
non-C++ that you need, why are you asking in a C++ language newsgroup?

Generally speaking, there are probably ways to express some formulae in
a language that would be open for converting it into executable code (if
that's what you're after). It's called an "interpreter" and there are
literally thousands of those out there. Do a web search to start.

V
--
I do not respond to top-posted replies, please don't ask


All times are GMT. The time now is 09:40 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.