Is there a SQL/english like language that lets you define formulations given some data?In an integer program, how I can force a binary variable to equal 1 if some condition holds?What is the “big-M” method? And are there two of them?Are there examples of spatially explicit MIP problems?Are valid inequalities worth the effort given modern solvers?
What is the status of the F-1B engine development?
Heat equation: Squiggly lines
Bitcoin successfully deducted on sender wallet but did not reach receiver wallet
What gave Harry Potter the idea of writing in Tom Riddle's diary?
Boss wants me to ignore a software license
How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?
Simplification of numbers
How to create events observer that only call when REST api dispatch events?
How to assign many blockers at the same time?
How does proof assistant organize knowledge?
How are you supposed to know the strumming pattern for a song from the "chord sheet music"?
Understanding the point of a kölsche Witz
PhD advisor lost funding, need advice
Why is there a large performance impact when looping over an array over 240 elements?
Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
Why isn’t SHA-3 in wider use?
Is God unknowable?
Annotating a table with arrows
If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?
What does the phrase "pull off sick wheelies and flips" mean here?
Can the government force you to change your license plate?
How to take the beginning and end parts of a list with simpler syntax?
These were just lying around
Is there a SQL/english like language that lets you define formulations given some data?
In an integer program, how I can force a binary variable to equal 1 if some condition holds?What is the “big-M” method? And are there two of them?Are there examples of spatially explicit MIP problems?Are valid inequalities worth the effort given modern solvers?
$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 http://lettuce.it/tutorial/simple.html
For example lets 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 its 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 modelling
$endgroup$
add a comment |
$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 http://lettuce.it/tutorial/simple.html
For example lets 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 its 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 modelling
$endgroup$
add a comment |
$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 http://lettuce.it/tutorial/simple.html
For example lets 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 its 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 modelling
$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 http://lettuce.it/tutorial/simple.html
For example lets 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 its 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 modelling
mixed-integer-programming applications modelling
asked 8 hours ago
fhkfhk
5292 silver badges11 bronze badges
5292 silver badges11 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$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:
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.
$endgroup$
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
add a comment |
$begingroup$
MiniZinc is the closest I know of. In terms of syntax, it is closer to python/R/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"];
https://www.minizinc.org/doc-2.3.1/en/modelling.html#ex-cakes2
New contributor
$endgroup$
add a comment |
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/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$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:
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.
$endgroup$
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
add a comment |
$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:
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.
$endgroup$
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
add a comment |
$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:
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.
$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:
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.
answered 7 hours ago
LarrySnyder610LarrySnyder610
5,39513 silver badges62 bronze badges
5,39513 silver badges62 bronze badges
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
add a comment |
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
$begingroup$
greatly appreciated!
$endgroup$
– fhk
7 hours ago
add a comment |
$begingroup$
MiniZinc is the closest I know of. In terms of syntax, it is closer to python/R/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"];
https://www.minizinc.org/doc-2.3.1/en/modelling.html#ex-cakes2
New contributor
$endgroup$
add a comment |
$begingroup$
MiniZinc is the closest I know of. In terms of syntax, it is closer to python/R/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"];
https://www.minizinc.org/doc-2.3.1/en/modelling.html#ex-cakes2
New contributor
$endgroup$
add a comment |
$begingroup$
MiniZinc is the closest I know of. In terms of syntax, it is closer to python/R/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"];
https://www.minizinc.org/doc-2.3.1/en/modelling.html#ex-cakes2
New contributor
$endgroup$
MiniZinc is the closest I know of. In terms of syntax, it is closer to python/R/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"];
https://www.minizinc.org/doc-2.3.1/en/modelling.html#ex-cakes2
New contributor
New contributor
answered 54 secs ago
BuddBudd
1
1
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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