Is there a SQL/English like language that lets you define formulations given some data?Are there any real-world problems where quadratization helps to solve something that couldn't have been solved without quadratization?

Is it possible to determine if a Pokémon is a powerful encounter?

If you discard Immortal Phoenix, does it return to your hand?

Why would a family misspell their surname?

how can traditional forms of magic compete against demon magic?

Why does Tywin Lannister send Tyrion to King's Landing to be Hand of the King instead of himself?

Why superuser permission is needed for accessing /data partition?

Switching engine coolant with similar properties oil

How can I add an ammeter / voltmeter to my breaker panel?

Is the sentence "pay some in cash" understandable?

Is the genre 'fantasy' still fantasy without magic?

Sort and Table a Sentence by Word Lengths

When Using Throne room on a Throne room do you need two more action cards already in hand?

Isn't any conversation with the US president quid-pro-quo?

What is the maximum distance you can cause damage from?

Can a website incur liability for linking to a funding campaign for a lawsuit against it?

Fitting data in polar coordinates

How is taste of chemical compounds determined?

What should I tell a customer when my co-worker fails to show up to a meeting?

Why was ambassador Sondland involved in Ukraine?

Why telnet is considered to be a protocol? Isn't it just a simple TCP send/echo program?

Is there a heavy usage of the word "bonfire" in English?

Is there any math conjecture that would cause a lot of damage if disproven?

Is Scrum actually suitable for all kinds of projects?

What exactly is "Japanese" Salt and Pepper?



Is there a SQL/English like language that lets you define formulations given some data?


Are there any real-world problems where quadratization helps to solve something that couldn't have been solved without quadratization?













13















$begingroup$


It would be very useful for beginning and non technical users to be able to define models in a way that was natural for them. Further this could perhaps assist generating some kind of generic modelling language which could be used in applications.



Inspired by the BDD (Behavior Driven Development) library



For example, let's take a diet like problem. It could be stated as:



Given I have ingredient banana
Given that a banana costs 1 unit
The ingredient banana has 10 units of potassium
Find me the cheapest ingredient combination for 100 units of potassium


Maybe it's an implementation detail? And I should just define the types of constraints and parse the string data? Is this an area of research?










share|improve this question











$endgroup$










  • 1




    $begingroup$
    People not thinking in SQL after date of birth? 0 rows returned?
    $endgroup$
    – Stian Yttervik
    Aug 13 at 14:29






  • 1




    $begingroup$
    I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
    $endgroup$
    – wha7ever
    Aug 13 at 16:18






  • 3




    $begingroup$
    I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
    $endgroup$
    – Alexander
    Aug 13 at 16:51






  • 1




    $begingroup$
    Great, now graduates will have another excuse not to learn programming!
    $endgroup$
    – Indrajit
    Aug 14 at 10:57
















13















$begingroup$


It would be very useful for beginning and non technical users to be able to define models in a way that was natural for them. Further this could perhaps assist generating some kind of generic modelling language which could be used in applications.



Inspired by the BDD (Behavior Driven Development) library



For example, let's take a diet like problem. It could be stated as:



Given I have ingredient banana
Given that a banana costs 1 unit
The ingredient banana has 10 units of potassium
Find me the cheapest ingredient combination for 100 units of potassium


Maybe it's an implementation detail? And I should just define the types of constraints and parse the string data? Is this an area of research?










share|improve this question











$endgroup$










  • 1




    $begingroup$
    People not thinking in SQL after date of birth? 0 rows returned?
    $endgroup$
    – Stian Yttervik
    Aug 13 at 14:29






  • 1




    $begingroup$
    I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
    $endgroup$
    – wha7ever
    Aug 13 at 16:18






  • 3




    $begingroup$
    I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
    $endgroup$
    – Alexander
    Aug 13 at 16:51






  • 1




    $begingroup$
    Great, now graduates will have another excuse not to learn programming!
    $endgroup$
    – Indrajit
    Aug 14 at 10:57














13













13









13


1



$begingroup$


It would be very useful for beginning and non technical users to be able to define models in a way that was natural for them. Further this could perhaps assist generating some kind of generic modelling language which could be used in applications.



Inspired by the BDD (Behavior Driven Development) library



For example, let's take a diet like problem. It could be stated as:



Given I have ingredient banana
Given that a banana costs 1 unit
The ingredient banana has 10 units of potassium
Find me the cheapest ingredient combination for 100 units of potassium


Maybe it's an implementation detail? And I should just define the types of constraints and parse the string data? Is this an area of research?










share|improve this question











$endgroup$




It would be very useful for beginning and non technical users to be able to define models in a way that was natural for them. Further this could perhaps assist generating some kind of generic modelling language which could be used in applications.



Inspired by the BDD (Behavior Driven Development) library



For example, let's take a diet like problem. It could be stated as:



Given I have ingredient banana
Given that a banana costs 1 unit
The ingredient banana has 10 units of potassium
Find me the cheapest ingredient combination for 100 units of potassium


Maybe it's an implementation detail? And I should just define the types of constraints and parse the string data? Is this an area of research?







mixed-integer-programming applications modeling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 13 at 9:18









Glorfindel

1091 gold badge1 silver badge8 bronze badges




1091 gold badge1 silver badge8 bronze badges










asked Aug 12 at 17:52









fhkfhk

1,0192 silver badges13 bronze badges




1,0192 silver badges13 bronze badges










  • 1




    $begingroup$
    People not thinking in SQL after date of birth? 0 rows returned?
    $endgroup$
    – Stian Yttervik
    Aug 13 at 14:29






  • 1




    $begingroup$
    I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
    $endgroup$
    – wha7ever
    Aug 13 at 16:18






  • 3




    $begingroup$
    I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
    $endgroup$
    – Alexander
    Aug 13 at 16:51






  • 1




    $begingroup$
    Great, now graduates will have another excuse not to learn programming!
    $endgroup$
    – Indrajit
    Aug 14 at 10:57













  • 1




    $begingroup$
    People not thinking in SQL after date of birth? 0 rows returned?
    $endgroup$
    – Stian Yttervik
    Aug 13 at 14:29






  • 1




    $begingroup$
    I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
    $endgroup$
    – wha7ever
    Aug 13 at 16:18






  • 3




    $begingroup$
    I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
    $endgroup$
    – Alexander
    Aug 13 at 16:51






  • 1




    $begingroup$
    Great, now graduates will have another excuse not to learn programming!
    $endgroup$
    – Indrajit
    Aug 14 at 10:57








1




1




$begingroup$
People not thinking in SQL after date of birth? 0 rows returned?
$endgroup$
– Stian Yttervik
Aug 13 at 14:29




$begingroup$
People not thinking in SQL after date of birth? 0 rows returned?
$endgroup$
– Stian Yttervik
Aug 13 at 14:29




1




1




$begingroup$
I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
$endgroup$
– wha7ever
Aug 13 at 16:18




$begingroup$
I wonder if Prolog could be used to solve this. Not sure if prolog could perform that last sentence requirement.
$endgroup$
– wha7ever
Aug 13 at 16:18




3




3




$begingroup$
I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
$endgroup$
– Alexander
Aug 13 at 16:51




$begingroup$
I think there's a bit of an uncanny valley type effect going on here. If you tell users that "hey, this thing understands English," but it doesn't have a full understanding of all possible English, then your users are bound to get frustrated by the short-comings, in a way that they wouldn't with a "machine language" (i.e. systematic, optimized for easy and non-ambiguous parsing), where users "prepare themselves" and set some expectations.
$endgroup$
– Alexander
Aug 13 at 16:51




1




1




$begingroup$
Great, now graduates will have another excuse not to learn programming!
$endgroup$
– Indrajit
Aug 14 at 10:57





$begingroup$
Great, now graduates will have another excuse not to learn programming!
$endgroup$
– Indrajit
Aug 14 at 10:57











4 Answers
4






active

oldest

votes


















11

















$begingroup$

Not answering your question, but related: I just came across a paper (Wang, Shi, and Reddy 2019) that aims to translate natural English into SQL queries. Here's an example of their results:



enter image description here



Maybe this can be a useful starting point if you're searching for literature on this, or starting to build your own English-to-modelling-language translator.






share|improve this answer










$endgroup$














  • $begingroup$
    greatly appreciated!
    $endgroup$
    – fhk
    Aug 12 at 18:19






  • 1




    $begingroup$
    Something similar was featured on the Stackoverflow blog some weeks ago.
    $endgroup$
    – Raidri says Reinstate Monica
    Aug 13 at 9:30










  • $begingroup$
    This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
    $endgroup$
    – fhk
    Aug 15 at 16:49


















11

















$begingroup$

MiniZinc is the closest I know of. In terms of syntax, it is closer to
Python, R, and MATLAB than SQL. However, it is a pretty powerful language.



Example:



% Baking cakes for the school fete (with data file)

int: flour; %no. grams of flour available
int: banana; %no. of bananas available
int: sugar; %no. grams of sugar available
int: butter; %no. grams of butter available
int: cocoa; %no. grams of cocoa available

constraint assert(flour >= 0,"Invalid datafile: " ++
"Amount of flour should be non-negative");
constraint assert(banana >= 0,"Invalid datafile: " ++
"Amount of banana should be non-negative");
constraint assert(sugar >= 0,"Invalid datafile: " ++
"Amount of sugar should be non-negative");
constraint assert(butter >= 0,"Invalid datafile: " ++
"Amount of butter should be non-negative");
constraint assert(cocoa >= 0,"Invalid datafile: " ++
"Amount of cocoa should be non-negative");

var 0..100: b; % no. of banana cakes
var 0..100: c; % no. of chocolate cakes

% flour
constraint 250*b + 200*c <= flour;
% bananas
constraint 2*b <= banana;
% sugar
constraint 75*b + 150*c <= sugar;
% butter
constraint 100*b + 150*c <= butter;
% cocoa
constraint 75*c <= cocoa;

% maximize our profit
solve maximize 400*b + 450*c;

output ["no. of banana cakes = (b)n",
"no. of chocolate cakes = (c)n"];





share|improve this answer












$endgroup$






















    5

















    $begingroup$

    It is a little uncommon these days, but prolog is well suited to this type of problem. It allows you to concisely state and efficiently solve a wide variety of interesting things.



    See https://stackoverflow.com/questions/57316504/zebra-puzzle-who-lives-on-which-floor as well as a whole mess of tagged questions https://stackoverflow.com/questions/tagged/prolog+zebra-puzzle as examples.






    share|improve this answer










    $endgroup$






















      3

















      $begingroup$

      Controlled natural language



      There's a bunch of research in using controlled natural language (e.g. in the CNL workshop https://link.springer.com/conference/cnl) and one of the use cases is for making queries in some knowledge base. If the data and its ontology is in a structured format such as RDF, then there exist tools for querying that data directly (usually with SPARQL), there are a bunch of tools for visualizing the models/ontologies and the data in them, and there are also natural language querying tools such as http://aksw.org/Projects/AutoSPARQL.html or https://github.com/AKSW/NSpM which I admittedly haven't tried. It's a whole field of research that's not that related to operations research, but there are some interesting things there.






      share|improve this answer










      $endgroup$
















        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "700"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );














        draft saved

        draft discarded
















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2for.stackexchange.com%2fquestions%2f1255%2fis-there-a-sql-english-like-language-that-lets-you-define-formulations-given-som%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown


























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        11

















        $begingroup$

        Not answering your question, but related: I just came across a paper (Wang, Shi, and Reddy 2019) that aims to translate natural English into SQL queries. Here's an example of their results:



        enter image description here



        Maybe this can be a useful starting point if you're searching for literature on this, or starting to build your own English-to-modelling-language translator.






        share|improve this answer










        $endgroup$














        • $begingroup$
          greatly appreciated!
          $endgroup$
          – fhk
          Aug 12 at 18:19






        • 1




          $begingroup$
          Something similar was featured on the Stackoverflow blog some weeks ago.
          $endgroup$
          – Raidri says Reinstate Monica
          Aug 13 at 9:30










        • $begingroup$
          This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
          $endgroup$
          – fhk
          Aug 15 at 16:49















        11

















        $begingroup$

        Not answering your question, but related: I just came across a paper (Wang, Shi, and Reddy 2019) that aims to translate natural English into SQL queries. Here's an example of their results:



        enter image description here



        Maybe this can be a useful starting point if you're searching for literature on this, or starting to build your own English-to-modelling-language translator.






        share|improve this answer










        $endgroup$














        • $begingroup$
          greatly appreciated!
          $endgroup$
          – fhk
          Aug 12 at 18:19






        • 1




          $begingroup$
          Something similar was featured on the Stackoverflow blog some weeks ago.
          $endgroup$
          – Raidri says Reinstate Monica
          Aug 13 at 9:30










        • $begingroup$
          This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
          $endgroup$
          – fhk
          Aug 15 at 16:49













        11















        11











        11







        $begingroup$

        Not answering your question, but related: I just came across a paper (Wang, Shi, and Reddy 2019) that aims to translate natural English into SQL queries. Here's an example of their results:



        enter image description here



        Maybe this can be a useful starting point if you're searching for literature on this, or starting to build your own English-to-modelling-language translator.






        share|improve this answer










        $endgroup$



        Not answering your question, but related: I just came across a paper (Wang, Shi, and Reddy 2019) that aims to translate natural English into SQL queries. Here's an example of their results:



        enter image description here



        Maybe this can be a useful starting point if you're searching for literature on this, or starting to build your own English-to-modelling-language translator.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Aug 12 at 18:15









        LarrySnyder610LarrySnyder610

        8,57115 silver badges72 bronze badges




        8,57115 silver badges72 bronze badges














        • $begingroup$
          greatly appreciated!
          $endgroup$
          – fhk
          Aug 12 at 18:19






        • 1




          $begingroup$
          Something similar was featured on the Stackoverflow blog some weeks ago.
          $endgroup$
          – Raidri says Reinstate Monica
          Aug 13 at 9:30










        • $begingroup$
          This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
          $endgroup$
          – fhk
          Aug 15 at 16:49
















        • $begingroup$
          greatly appreciated!
          $endgroup$
          – fhk
          Aug 12 at 18:19






        • 1




          $begingroup$
          Something similar was featured on the Stackoverflow blog some weeks ago.
          $endgroup$
          – Raidri says Reinstate Monica
          Aug 13 at 9:30










        • $begingroup$
          This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
          $endgroup$
          – fhk
          Aug 15 at 16:49















        $begingroup$
        greatly appreciated!
        $endgroup$
        – fhk
        Aug 12 at 18:19




        $begingroup$
        greatly appreciated!
        $endgroup$
        – fhk
        Aug 12 at 18:19




        1




        1




        $begingroup$
        Something similar was featured on the Stackoverflow blog some weeks ago.
        $endgroup$
        – Raidri says Reinstate Monica
        Aug 13 at 9:30




        $begingroup$
        Something similar was featured on the Stackoverflow blog some weeks ago.
        $endgroup$
        – Raidri says Reinstate Monica
        Aug 13 at 9:30












        $begingroup$
        This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
        $endgroup$
        – fhk
        Aug 15 at 16:49




        $begingroup$
        This paper also has a similar idea - arxiv.org/pdf/1907.05774.pdf
        $endgroup$
        – fhk
        Aug 15 at 16:49











        11

















        $begingroup$

        MiniZinc is the closest I know of. In terms of syntax, it is closer to
        Python, R, and MATLAB than SQL. However, it is a pretty powerful language.



        Example:



        % Baking cakes for the school fete (with data file)

        int: flour; %no. grams of flour available
        int: banana; %no. of bananas available
        int: sugar; %no. grams of sugar available
        int: butter; %no. grams of butter available
        int: cocoa; %no. grams of cocoa available

        constraint assert(flour >= 0,"Invalid datafile: " ++
        "Amount of flour should be non-negative");
        constraint assert(banana >= 0,"Invalid datafile: " ++
        "Amount of banana should be non-negative");
        constraint assert(sugar >= 0,"Invalid datafile: " ++
        "Amount of sugar should be non-negative");
        constraint assert(butter >= 0,"Invalid datafile: " ++
        "Amount of butter should be non-negative");
        constraint assert(cocoa >= 0,"Invalid datafile: " ++
        "Amount of cocoa should be non-negative");

        var 0..100: b; % no. of banana cakes
        var 0..100: c; % no. of chocolate cakes

        % flour
        constraint 250*b + 200*c <= flour;
        % bananas
        constraint 2*b <= banana;
        % sugar
        constraint 75*b + 150*c <= sugar;
        % butter
        constraint 100*b + 150*c <= butter;
        % cocoa
        constraint 75*c <= cocoa;

        % maximize our profit
        solve maximize 400*b + 450*c;

        output ["no. of banana cakes = (b)n",
        "no. of chocolate cakes = (c)n"];





        share|improve this answer












        $endgroup$



















          11

















          $begingroup$

          MiniZinc is the closest I know of. In terms of syntax, it is closer to
          Python, R, and MATLAB than SQL. However, it is a pretty powerful language.



          Example:



          % Baking cakes for the school fete (with data file)

          int: flour; %no. grams of flour available
          int: banana; %no. of bananas available
          int: sugar; %no. grams of sugar available
          int: butter; %no. grams of butter available
          int: cocoa; %no. grams of cocoa available

          constraint assert(flour >= 0,"Invalid datafile: " ++
          "Amount of flour should be non-negative");
          constraint assert(banana >= 0,"Invalid datafile: " ++
          "Amount of banana should be non-negative");
          constraint assert(sugar >= 0,"Invalid datafile: " ++
          "Amount of sugar should be non-negative");
          constraint assert(butter >= 0,"Invalid datafile: " ++
          "Amount of butter should be non-negative");
          constraint assert(cocoa >= 0,"Invalid datafile: " ++
          "Amount of cocoa should be non-negative");

          var 0..100: b; % no. of banana cakes
          var 0..100: c; % no. of chocolate cakes

          % flour
          constraint 250*b + 200*c <= flour;
          % bananas
          constraint 2*b <= banana;
          % sugar
          constraint 75*b + 150*c <= sugar;
          % butter
          constraint 100*b + 150*c <= butter;
          % cocoa
          constraint 75*c <= cocoa;

          % maximize our profit
          solve maximize 400*b + 450*c;

          output ["no. of banana cakes = (b)n",
          "no. of chocolate cakes = (c)n"];





          share|improve this answer












          $endgroup$

















            11















            11











            11







            $begingroup$

            MiniZinc is the closest I know of. In terms of syntax, it is closer to
            Python, R, and MATLAB than SQL. However, it is a pretty powerful language.



            Example:



            % Baking cakes for the school fete (with data file)

            int: flour; %no. grams of flour available
            int: banana; %no. of bananas available
            int: sugar; %no. grams of sugar available
            int: butter; %no. grams of butter available
            int: cocoa; %no. grams of cocoa available

            constraint assert(flour >= 0,"Invalid datafile: " ++
            "Amount of flour should be non-negative");
            constraint assert(banana >= 0,"Invalid datafile: " ++
            "Amount of banana should be non-negative");
            constraint assert(sugar >= 0,"Invalid datafile: " ++
            "Amount of sugar should be non-negative");
            constraint assert(butter >= 0,"Invalid datafile: " ++
            "Amount of butter should be non-negative");
            constraint assert(cocoa >= 0,"Invalid datafile: " ++
            "Amount of cocoa should be non-negative");

            var 0..100: b; % no. of banana cakes
            var 0..100: c; % no. of chocolate cakes

            % flour
            constraint 250*b + 200*c <= flour;
            % bananas
            constraint 2*b <= banana;
            % sugar
            constraint 75*b + 150*c <= sugar;
            % butter
            constraint 100*b + 150*c <= butter;
            % cocoa
            constraint 75*c <= cocoa;

            % maximize our profit
            solve maximize 400*b + 450*c;

            output ["no. of banana cakes = (b)n",
            "no. of chocolate cakes = (c)n"];





            share|improve this answer












            $endgroup$



            MiniZinc is the closest I know of. In terms of syntax, it is closer to
            Python, R, and MATLAB than SQL. However, it is a pretty powerful language.



            Example:



            % Baking cakes for the school fete (with data file)

            int: flour; %no. grams of flour available
            int: banana; %no. of bananas available
            int: sugar; %no. grams of sugar available
            int: butter; %no. grams of butter available
            int: cocoa; %no. grams of cocoa available

            constraint assert(flour >= 0,"Invalid datafile: " ++
            "Amount of flour should be non-negative");
            constraint assert(banana >= 0,"Invalid datafile: " ++
            "Amount of banana should be non-negative");
            constraint assert(sugar >= 0,"Invalid datafile: " ++
            "Amount of sugar should be non-negative");
            constraint assert(butter >= 0,"Invalid datafile: " ++
            "Amount of butter should be non-negative");
            constraint assert(cocoa >= 0,"Invalid datafile: " ++
            "Amount of cocoa should be non-negative");

            var 0..100: b; % no. of banana cakes
            var 0..100: c; % no. of chocolate cakes

            % flour
            constraint 250*b + 200*c <= flour;
            % bananas
            constraint 2*b <= banana;
            % sugar
            constraint 75*b + 150*c <= sugar;
            % butter
            constraint 100*b + 150*c <= butter;
            % cocoa
            constraint 75*c <= cocoa;

            % maximize our profit
            solve maximize 400*b + 450*c;

            output ["no. of banana cakes = (b)n",
            "no. of chocolate cakes = (c)n"];






            share|improve this answer















            share|improve this answer




            share|improve this answer








            edited Aug 14 at 1:37









            Peter Mortensen

            1072 bronze badges




            1072 bronze badges










            answered Aug 13 at 2:13









            BuddBudd

            2115 bronze badges




            2115 bronze badges
























                5

















                $begingroup$

                It is a little uncommon these days, but prolog is well suited to this type of problem. It allows you to concisely state and efficiently solve a wide variety of interesting things.



                See https://stackoverflow.com/questions/57316504/zebra-puzzle-who-lives-on-which-floor as well as a whole mess of tagged questions https://stackoverflow.com/questions/tagged/prolog+zebra-puzzle as examples.






                share|improve this answer










                $endgroup$



















                  5

















                  $begingroup$

                  It is a little uncommon these days, but prolog is well suited to this type of problem. It allows you to concisely state and efficiently solve a wide variety of interesting things.



                  See https://stackoverflow.com/questions/57316504/zebra-puzzle-who-lives-on-which-floor as well as a whole mess of tagged questions https://stackoverflow.com/questions/tagged/prolog+zebra-puzzle as examples.






                  share|improve this answer










                  $endgroup$

















                    5















                    5











                    5







                    $begingroup$

                    It is a little uncommon these days, but prolog is well suited to this type of problem. It allows you to concisely state and efficiently solve a wide variety of interesting things.



                    See https://stackoverflow.com/questions/57316504/zebra-puzzle-who-lives-on-which-floor as well as a whole mess of tagged questions https://stackoverflow.com/questions/tagged/prolog+zebra-puzzle as examples.






                    share|improve this answer










                    $endgroup$



                    It is a little uncommon these days, but prolog is well suited to this type of problem. It allows you to concisely state and efficiently solve a wide variety of interesting things.



                    See https://stackoverflow.com/questions/57316504/zebra-puzzle-who-lives-on-which-floor as well as a whole mess of tagged questions https://stackoverflow.com/questions/tagged/prolog+zebra-puzzle as examples.







                    share|improve this answer













                    share|improve this answer




                    share|improve this answer










                    answered Aug 13 at 19:28









                    CireoCireo

                    1511 bronze badge




                    1511 bronze badge
























                        3

















                        $begingroup$

                        Controlled natural language



                        There's a bunch of research in using controlled natural language (e.g. in the CNL workshop https://link.springer.com/conference/cnl) and one of the use cases is for making queries in some knowledge base. If the data and its ontology is in a structured format such as RDF, then there exist tools for querying that data directly (usually with SPARQL), there are a bunch of tools for visualizing the models/ontologies and the data in them, and there are also natural language querying tools such as http://aksw.org/Projects/AutoSPARQL.html or https://github.com/AKSW/NSpM which I admittedly haven't tried. It's a whole field of research that's not that related to operations research, but there are some interesting things there.






                        share|improve this answer










                        $endgroup$



















                          3

















                          $begingroup$

                          Controlled natural language



                          There's a bunch of research in using controlled natural language (e.g. in the CNL workshop https://link.springer.com/conference/cnl) and one of the use cases is for making queries in some knowledge base. If the data and its ontology is in a structured format such as RDF, then there exist tools for querying that data directly (usually with SPARQL), there are a bunch of tools for visualizing the models/ontologies and the data in them, and there are also natural language querying tools such as http://aksw.org/Projects/AutoSPARQL.html or https://github.com/AKSW/NSpM which I admittedly haven't tried. It's a whole field of research that's not that related to operations research, but there are some interesting things there.






                          share|improve this answer










                          $endgroup$

















                            3















                            3











                            3







                            $begingroup$

                            Controlled natural language



                            There's a bunch of research in using controlled natural language (e.g. in the CNL workshop https://link.springer.com/conference/cnl) and one of the use cases is for making queries in some knowledge base. If the data and its ontology is in a structured format such as RDF, then there exist tools for querying that data directly (usually with SPARQL), there are a bunch of tools for visualizing the models/ontologies and the data in them, and there are also natural language querying tools such as http://aksw.org/Projects/AutoSPARQL.html or https://github.com/AKSW/NSpM which I admittedly haven't tried. It's a whole field of research that's not that related to operations research, but there are some interesting things there.






                            share|improve this answer










                            $endgroup$



                            Controlled natural language



                            There's a bunch of research in using controlled natural language (e.g. in the CNL workshop https://link.springer.com/conference/cnl) and one of the use cases is for making queries in some knowledge base. If the data and its ontology is in a structured format such as RDF, then there exist tools for querying that data directly (usually with SPARQL), there are a bunch of tools for visualizing the models/ontologies and the data in them, and there are also natural language querying tools such as http://aksw.org/Projects/AutoSPARQL.html or https://github.com/AKSW/NSpM which I admittedly haven't tried. It's a whole field of research that's not that related to operations research, but there are some interesting things there.







                            share|improve this answer













                            share|improve this answer




                            share|improve this answer










                            answered Aug 13 at 9:48









                            PeterisPeteris

                            1312 bronze badges




                            1312 bronze badges































                                draft saved

                                draft discarded















































                                Thanks for contributing an answer to Operations Research Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                Use MathJax to format equations. MathJax reference.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2for.stackexchange.com%2fquestions%2f1255%2fis-there-a-sql-english-like-language-that-lets-you-define-formulations-given-som%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown









                                Popular posts from this blog

                                Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

                                How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

                                Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü