MATLAB Answers

0

MILP Optimization dynamic input

Asked by Christin Karrenbauer on 10 Jul 2019
Latest activity Answered by Dheeraj Singh on 29 Jul 2019
Hi,
I'm planning to implement a tool to optimize a project portfolio. My problem is that the optimization is dependent from a users input, as these inflence the contrains. For example, an user can enter a required amout of resources in order to complete a project. It is than tested whether there are enough resources to complete this project and this input is than used for the optimization. I was thinking to use the App Designer in order to create a GUI with tables to enter all required inputs. However, I thinks it's hard to get the data enterd into a table. Has anyone an idea on how to implement this tool?
Cheers

  0 Comments

Sign in to comment.

1 Answer

Answer by Dheeraj Singh on 29 Jul 2019

I understand that you want to enter user input through a table.
You can do that by making the table fields editable.
So, depending upon the input, suppose you want the user input in the form of mXn matrix
You can initially fill the table with NaN(not a number) values along with a button in the following manner:
function startupFcn(app)
%no of rows 10
%no of columns 4
a1=nan(10,4);
a2=num2cell(a1);
app.UITable2.Data = a2;
end
It will look something like this:
ML.PNG
After that you can use call back for the button the to take all your input using table.

  0 Comments

Sign in to comment.