Create a simple method calculator lpp - methods

Yo, Need Help for making a simple method LPP calculator.
if someone know begging to help me because i was found myself making an GUI about that calculator
making a software that calculate LPP problem

Related

Trying to design a Gui based Boolean logic to Boolean Equation program

my job is in automation and I deal a lot with Boolean logic for when a piece of equipment has permission to do something or not do something. this requires that I design expressions in simple one line equations. I'm trying to figure out how I can design a little helper app to make it easier to code.
For example, let's say I'm trying to design a permissive to allow a vehicle to start moving, just jumping into a car won't make it start going, there steps that need to happen before the car will go any where. such as turning on the motor. i'f you look at the image below you can kind of get an idea of a simpler equation.
https://i.ibb.co/fnQ3x9x/IMG-2389.jpg
The eq for the picture is:
Start Permission = MotorTurnedOn AND ((AutoMode OR (ManualMode AND (OilTempNorm OR OilCoolingActive))) OR EmerOvr)
A lot of time I'm editing code that someone wrote a long time ago so it's not always easy to understand and some are very long as seen in the picture below
https://i.ibb.co/tXtrKwk/IMG-2388.jpg
the picture are generated by a third party software that is used to create the GUI's for the equipment.
I'm trying to figure how how could I design something where I could take block and drop them into something resembling the picture and it could export an equation for the equivalent boolean expression.
I'm only familiar with Python, Matlab, C++ and a little bit of java, if there's some template out there that could help me get started I'd be willing to learn a new language otherwise, i'd wanna stick closer to what I know.
Any help or ideas would be appreciated.

Creating calculator in abap

I've build a basic calculator in abap which is pretty simple and knows how to get 2 inputs and calculate them by pressing a push button of the operator( + - / *).
Now I want to make a calculator which gets one input like : "12+5*3-9"
But I really don't know how to start it.
Can anyone help me a little bit please?
Thank you.
You question is related with an algorithm for parsing mathematical strings rather than ABAP. One of them is Shunting-yard.
If you need to short way, you can add your expression into java script function and run it in CL_JAVA_SCRIPT class in ABAP.
Check example ABAP program DEMO_JAVA_SCRIPT_MINI_EDITOR.

VHDL project : create a components and combine to Digital function generator + Create a tester of circuit?

I am a student in a VHDL&Verilog class, so I have assignment in VHDL to build a function generator like shown in the picture Generator with given specifications.
Also I have a PDF file from the professors with current specifications, from where I started to build the Counter, Negator, FSM automata, Memory and the Multiplexor, but I did them separately.
Now the problem is to combine them togeter in Generator and make a test on it?
But I am stucked, because I have never learned this type programming language.
Have you got experence in VHDL and can anyone help me?
Thank you in advance. I apreciate this.

How to understand scripting language like Ruby from a C/C++/VBNET programmer perspective?

I have been C/C++/VBNET programmer for a long time. Now Ruby advanced concept is attracting me. So I decided to learn how to use it.But the "Behavior" of Ruby used to confused me. I usually feel like can't completely control my Ruby program.
Can you help me get clearly about this ?
(Maybe some of your favorite guide about "Ideas" and "Styles" in Ruby may help >:D< . Thank)
Ruby is quite an unusual programming language if you are more used to static/declarative style languages like C/C++.
I suspect it's the highly dynamic nature of the language which is causing you a problem, it can be difficult to get your head around this when you encounter it for the first time after having used only the more static languages. Ideas like Duck Typing can seem weird if you are used to declaring variables as strict types before use.
I would thoroughly recommend working your way through one of the excellent books about ruby that are out there. Don't just mess around writing code without really understanding the concepts.
Personally I really liked "The Ruby Programming Language" from O'Reilly, but I have experiance of a lot of different languages so I'm used to some of the more dynamic features in Ruby.
However you may prefer to start with something less terse such as Dave Thomas' "Programming Ruby" (make sure you get the 1.9 version).
Work through one of these books, do the examples, play around with the code. That way you will get a thorough understanding of the language.
Best of luck. Once you get your head around it, Ruby can be a very powerful language.
I think that the book Design Patterns in Ruby might help you. The first chapter describes the syntax of Ruby (which I guess that you won't need), but the rest of the book goes through the classic design patterns and shows you a Ruby way of approaching them. It's very clearly written and I learned a lot about Ruby idioms from it.
If you can talk to a Rubyist then that will probably help a lot - from experience, a code review or pairing session with someone else can get you over mental blocks better than anything else. If you don't know anyone, try writing some code then post a link to it to the Ruby Talk mailing list with questions. This is a very friendly community, and people are happy to help.
I recommend reading Why's Poignant Guide to Ruby. It will open your mind to the wonders of working in a dynamic language. Or it will piss you off with its cartoons of talking foxes. Either way it will change your thinking about Ruby :)

writing a wrapper for a programming language

I want to write a ruby wrapper swi-prolog. Can anyone please tell me how to proceed with writing one?
I would appreciate if anyone please explain me what steps need to be considered while attempting to write this sort.
You can look at this post by Mauricio Fernandez:
http://eigenclass.org/hiki.rb?tiny+prolog+in+ruby
When you are done with that, there's a follow-up article with ideas on how to make things more Rubyish by Jamis Buck:
http://weblog.jamisbuck.org/2006/10/28/prolog-in-ruby
Edit:
I also found PySwip which is a GPL Python - SWI-Prolog bridge. Even though it's not Ruby, it probably gives you some good ideas about how to tackle the problem.

Resources